mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-30 23:37:44 +00:00
default value of dns config
This commit is contained in:
1 parent
dac1339d6e
commit
10d1d9288b
3 files changed
+36
-1
No files matched your search
@@ -40,6 +40,13 @@ func (this *Config) UnmarshalJSON(data []byte) error {
|
||||
this.OutboundConfig = jsonConfig.OutboundConfig
|
||||
this.InboundDetours = jsonConfig.InboundDetours
|
||||
this.OutboundDetours = jsonConfig.OutboundDetours
|
||||
if jsonConfig.DNSConfig == nil {
|
||||
jsonConfig.DNSConfig = &dns.Config{
|
||||
NameServers: []v2net.Destination{
|
||||
v2net.UDPDestination(v2net.DomainAddress("localhost"), v2net.Port(53)),
|
||||
},
|
||||
}
|
||||
}
|
||||
this.DNSConfig = jsonConfig.DNSConfig
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user