@@ -110,16 +110,17 @@ type MitmOption struct {
110
110
}
111
111
112
112
type LocalConfig struct {
113
- SocksAddr string `yaml:"socks_addr,omitempty" json:"socks_addr,omitempty"`
114
- HTTPAddr string `yaml:"http_addr,omitempty" json:"http_addr,omitempty"`
115
- SocksAuth string `yaml:"socks_auth,omitempty" json:"socks_auth,omitempty"`
116
- HTTPAuth string `yaml:"http_auth,omitempty" json:"http_auth,omitempty"`
117
- MixedAddr string `yaml:"mixed_addr,omitempty" json:"mixed_addr,omitempty"`
118
- TCPTunAddr []string `yaml:"tcp_tun_addr,omitempty" json:"tcp_tun_addr,omitempty"`
119
- SystemProxy bool `yaml:"system_proxy,omitempty" json:"system_proxy,omitempty"`
120
- Mitm * MitmOption `yaml:"mitm,omitempty" json:"mitm,omitempty"`
121
- Tun * TunOption `yaml:"tun,omitempty" json:"tun,omitempty"`
122
- DNS * DnsOption `yaml:"dns,omitempty" json:"dns,omitempty"`
113
+ SocksAddr string `yaml:"socks_addr,omitempty" json:"socks_addr,omitempty"`
114
+ HTTPAddr string `yaml:"http_addr,omitempty" json:"http_addr,omitempty"`
115
+ SocksAuth string `yaml:"socks_auth,omitempty" json:"socks_auth,omitempty"`
116
+ HTTPAuth string `yaml:"http_auth,omitempty" json:"http_auth,omitempty"`
117
+ MixedAddr string `yaml:"mixed_addr,omitempty" json:"mixed_addr,omitempty"`
118
+ TCPTunAddr []string `yaml:"tcp_tun_addr,omitempty" json:"tcp_tun_addr,omitempty"`
119
+ SystemProxy bool `yaml:"system_proxy,omitempty" json:"system_proxy,omitempty"`
120
+ LookupHostsFile bool `yaml:"lookup_hostsfile,omitempty" json:"lookup_hostsfile,omitempty"`
121
+ Mitm * MitmOption `yaml:"mitm,omitempty" json:"mitm,omitempty"`
122
+ Tun * TunOption `yaml:"tun,omitempty" json:"tun,omitempty"`
123
+ DNS * DnsOption `yaml:"dns,omitempty" json:"dns,omitempty"`
123
124
}
124
125
125
126
type Domain struct {
@@ -468,6 +469,10 @@ func (cfg *Config) BuildLocalOptions() []ss.SSOption {
468
469
opts = append (opts , ss .WithSystemProxy ())
469
470
}
470
471
472
+ if cfg .Local .LookupHostsFile {
473
+ opts = append (opts , ss .WithLookupHostsFile ())
474
+ }
475
+
471
476
return opts
472
477
}
473
478
0 commit comments