Bypass with network (#101)

* Fix logger init before use it

* Support specific network protocol validation in bypass
This commit is contained in:
Kebin Liu
2026-06-13 12:36:09 +08:00
committed by GitHub
parent caa82f2861
commit eaeac2763e
4 changed files with 227 additions and 19 deletions
+1
View File
@@ -50,6 +50,7 @@ func ParseBypass(cfg *config.BypassConfig) bypass.Bypass {
opts := []xbypass.Option{
xbypass.MatchersOption(cfg.Matchers),
xbypass.WhitelistOption(cfg.Reverse || cfg.Whitelist),
xbypass.NetworkOption(cfg.Network),
xbypass.ReloadPeriodOption(cfg.Reload),
xbypass.LoggerOption(logger.Default().WithFields(map[string]any{
"kind": "bypass",