1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-04-14 01:29:17 -04:00

Apply timeout to dns outbound (#1330)

Cherry-pick from 7b0699e8a5
This commit is contained in:
世界
2021-10-15 20:56:55 +08:00
committed by Shelikhoo
parent 25e2b74c95
commit cdb14de63e
4 changed files with 43 additions and 18 deletions

View File

@@ -9,9 +9,10 @@ import (
)
type DNSOutboundConfig struct {
Network cfgcommon.Network `json:"network"`
Address *cfgcommon.Address `json:"address"`
Port uint16 `json:"port"`
Network cfgcommon.Network `json:"network"`
Address *cfgcommon.Address `json:"address"`
Port uint16 `json:"port"`
UserLevel uint32 `json:"userLevel"`
}
func (c *DNSOutboundConfig) Build() (proto.Message, error) {
@@ -20,6 +21,7 @@ func (c *DNSOutboundConfig) Build() (proto.Message, error) {
Network: c.Network.Build(),
Port: uint32(c.Port),
},
UserLevel: c.UserLevel,
}
if c.Address != nil {
config.Server.Address = c.Address.Build()