diff --git a/cmd/run.go b/cmd/run.go index 2489e5f..d400870 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -70,7 +70,7 @@ func Run() (err error) { } // Bind to link. - if err = t.BindLink(param.Global.IngressInterface); err != nil { + if err = t.BindLink(param.Global.LanInterface); err != nil { return err } diff --git a/config/config.go b/config/config.go index 3ede7a8..a493be6 100644 --- a/config/config.go +++ b/config/config.go @@ -13,11 +13,11 @@ import ( ) type Global struct { - TproxyPort uint16 `mapstructure:"tproxy_port" default:"12345"` - CheckUrl string `mapstructure:"check_url" default:"https://connectivitycheck.gstatic.com/generate_204"` - CheckInterval time.Duration `mapstructure:"check_interval" default:"15s"` - DnsUpstream string `mapstructure:"dns_upstream" default:"208.67.222.222:5353"` - IngressInterface string `mapstructure:"ingress_interface" required:""` + TproxyPort uint16 `mapstructure:"tproxy_port" default:"12345"` + CheckUrl string `mapstructure:"check_url" default:"https://connectivitycheck.gstatic.com/generate_204"` + CheckInterval time.Duration `mapstructure:"check_interval" default:"15s"` + DnsUpstream string `mapstructure:"dns_upstream" default:"208.67.222.222:5353"` + LanInterface string `mapstructure:"lan_interface" required:""` } type Group struct { diff --git a/example.conf b/example.conf index 0792bc2..a57fb8d 100644 --- a/example.conf +++ b/example.conf @@ -10,8 +10,9 @@ global { # Please make sure DNS traffic will go through and be forwarded by dae. dns_upstream: '1.1.1.1:53' + # The ingress (LAN) interface to bind. # Now only support one interface. - ingress_interface: docker0 + lan_interface: docker0 } # subscription will be resolved as nodes and merged into node pool below. @@ -61,6 +62,7 @@ group { } routing { + domain(geosite:category-ads) -> block l4proto(udp) && mac('02:42:ac:11:00:02') -> BT domain(geosite:category-ads) -> block domain(geosite:disney) -> disney