mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-12-22 23:57:26 +08:00
chore: remove unsed code
This commit is contained in:
parent
05f877a324
commit
cdd91f5132
@ -17,9 +17,7 @@ var (
|
||||
actualSingleStackDialContext = serialSingleStackDialContext
|
||||
actualDualStackDialContext = serialDualStackDialContext
|
||||
tcpConcurrent = false
|
||||
DisableIPv6 = false
|
||||
ErrorInvalidedNetworkStack = errors.New("invalided network stack")
|
||||
ErrorDisableIPv6 = errors.New("IPv6 is disabled, dialer cancel")
|
||||
ErrorConnTimeout = errors.New("connect timeout")
|
||||
)
|
||||
|
||||
@ -113,10 +111,6 @@ func dialContext(ctx context.Context, network string, destination netip.Addr, po
|
||||
bindMarkToDialer(opt.routingMark, dialer, network, destination)
|
||||
}
|
||||
|
||||
if DisableIPv6 && destination.Is6() {
|
||||
return nil, ErrorDisableIPv6
|
||||
}
|
||||
|
||||
address := net.JoinHostPort(destination.String(), port)
|
||||
if opt.tfo {
|
||||
return dialTFO(ctx, *dialer, network, address)
|
||||
|
@ -331,11 +331,7 @@ func updateTunnels(tunnels []LC.Tunnel) {
|
||||
func updateGeneral(general *config.General) {
|
||||
tunnel.SetMode(general.Mode)
|
||||
tunnel.SetFindProcessMode(general.FindProcessMode)
|
||||
dialer.DisableIPv6 = !general.IPv6
|
||||
if !dialer.DisableIPv6 {
|
||||
log.Infoln("Use IPv6")
|
||||
}
|
||||
resolver.DisableIPv6 = dialer.DisableIPv6
|
||||
resolver.DisableIPv6 =!general.IPv6
|
||||
|
||||
if general.TCPConcurrent {
|
||||
dialer.SetDial(general.TCPConcurrent)
|
||||
|
Loading…
Reference in New Issue
Block a user