[skip ci] [Fix] ban auto set iptables when tun is enabled

This commit is contained in:
Adlyq 2022-03-23 20:37:46 +08:00
parent 9b4ddbed2c
commit 6c64164bee

View file

@ -315,6 +315,11 @@ func updateIPTables(cfg *config.Config) {
}
}()
if cfg.Tun.Enable {
err = fmt.Errorf("when tun is enabled, iptables cannot be set automatically")
return
}
var (
inboundInterface = "lo"
bypass = iptables.Bypass