mirror of
https://github.com/daeuniverse/dae.git
synced 2025-07-23 22:31:24 +07:00
feat: support to check independent tcp dns connectivity
This commit is contained in:
@ -193,12 +193,20 @@ func NewControlPlane(
|
||||
}
|
||||
|
||||
/// DialerGroups (outbounds).
|
||||
checkDnsTcp := false
|
||||
if !global.DnsUpstream.Empty {
|
||||
if scheme, _, _, err := ParseDnsUpstream(global.DnsUpstream.Url); err == nil &&
|
||||
scheme.ContainsTcp() {
|
||||
checkDnsTcp = true
|
||||
}
|
||||
}
|
||||
option := &dialer.GlobalOption{
|
||||
Log: log,
|
||||
TcpCheckOptionRaw: dialer.TcpCheckOptionRaw{Raw: global.TcpCheckUrl},
|
||||
UdpCheckOptionRaw: dialer.UdpCheckOptionRaw{Raw: global.UdpCheckDns},
|
||||
CheckDnsOptionRaw: dialer.CheckDnsOptionRaw{Raw: global.UdpCheckDns},
|
||||
CheckInterval: global.CheckInterval,
|
||||
CheckTolerance: global.CheckTolerance,
|
||||
CheckDnsTcp: checkDnsTcp,
|
||||
}
|
||||
outbounds := []*outbound.DialerGroup{
|
||||
outbound.NewDialerGroup(option, consts.OutboundDirect.String(),
|
||||
|
Reference in New Issue
Block a user