File tree Expand file tree Collapse file tree 6 files changed +448
-332
lines changed
Expand file tree Collapse file tree 6 files changed +448
-332
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,6 @@ type Dns struct {
121121 FixedDomainTtl []KeyableString `mapstructure:"fixed_domain_ttl"`
122122 Upstream []KeyableString `mapstructure:"upstream"`
123123 Routing DnsRouting `mapstructure:"routing"`
124- Server DnsServerConfig `mapstructure:"server"`
125124}
126125
127126type Routing struct {
@@ -138,12 +137,6 @@ type Config struct {
138137 Dns Dns `mapstructure:"dns" desc:"DnsDesc"`
139138}
140139
141- // DNS服务器配置
142- type DnsServerConfig struct {
143- Enabled bool `mapstructure:"enabled" default:"false"`
144- Addresses []string `mapstructure:"address"`
145- }
146-
147140// New params from sections. This func assumes merging (section "include") and deduplication for section names has been executed.
148141func New (sections []* config_parser.Section ) (conf * Config , err error ) {
149142 // Set up name to section for further use.
Original file line number Diff line number Diff line change @@ -45,17 +45,6 @@ import (
4545 "golang.org/x/sys/unix"
4646)
4747
48- // dialArgument contains information for DNS dialing decision
49- type dialArgument struct {
50- l4proto consts.L4ProtoStr
51- ipversion consts.IpVersionStr
52- bestDialer * dialer.Dialer
53- bestOutbound * outbound.DialerGroup
54- bestTarget netip.AddrPort
55- mark uint32
56- mptcp bool
57- }
58-
5948type ControlPlane struct {
6049 log * logrus.Logger
6150
@@ -515,15 +504,6 @@ func NewControlPlane(
515504 }
516505 go dnsUpstream .InitUpstreams ()
517506
518- // 启动DNS服务器(如果已配置)
519- if dnsConfig .Server .Enabled && len (dnsConfig .Server .Addresses ) > 0 {
520- log .Infof ("Starting DNS server on addresses: %v" , dnsConfig .Server .Addresses )
521- if err = plane .dnsController .StartDnsServer (dnsConfig .Server .Addresses ); err != nil {
522- log .WithError (err ).Errorf ("Failed to start DNS server" )
523- // 不返回错误,允许DAE在DNS服务器启动失败时继续运行
524- }
525- }
526-
527507 close (plane .ready )
528508 return plane , nil
529509}
You can’t perform that action at this time.
0 commit comments