bypass support for auto-iptables

This commit is contained in:
Adlyq
2022-03-23 11:04:43 +08:00
parent 91e83ea955
commit f19b67fe9d
3 changed files with 22 additions and 13 deletions

View File

@ -317,6 +317,7 @@ func updateIPTables(cfg *config.Config) {
var (
inboundInterface = "lo"
bypass = iptables.Bypass
tProxyPort = cfg.General.TProxyPort
dnsCfg = cfg.DNS
)
@ -351,7 +352,7 @@ func updateIPTables(cfg *config.Config) {
dialer.DefaultRoutingMark.Store(2158)
}
err = tproxy.SetTProxyIPTables(inboundInterface, uint16(tProxyPort), uint16(dnsPort))
err = tproxy.SetTProxyIPTables(inboundInterface, bypass, uint16(tProxyPort), uint16(dnsPort))
if err != nil {
return
}