mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-02-27 01:07:10 +00:00
chore: force to disable mptcp for tproxy
This commit is contained in:
23
component/mptcp/mptcp_go120.go
Normal file
23
component/mptcp/mptcp_go120.go
Normal file
@@ -0,0 +1,23 @@
|
||||
//go:build !go1.21
|
||||
|
||||
package mptcp
|
||||
|
||||
import (
|
||||
"net"
|
||||
)
|
||||
|
||||
const MultipathTCPAvailable = false
|
||||
|
||||
func SetNetDialer(dialer *net.Dialer, open bool) {
|
||||
}
|
||||
|
||||
func GetNetDialer(dialer *net.Dialer) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func SetNetListenConfig(listenConfig *net.ListenConfig, open bool) {
|
||||
}
|
||||
|
||||
func GetNetListenConfig(listenConfig *net.ListenConfig) bool {
|
||||
return false
|
||||
}
|
||||
23
component/mptcp/mptcp_go121.go
Normal file
23
component/mptcp/mptcp_go121.go
Normal file
@@ -0,0 +1,23 @@
|
||||
//go:build go1.21
|
||||
|
||||
package mptcp
|
||||
|
||||
import "net"
|
||||
|
||||
const MultipathTCPAvailable = true
|
||||
|
||||
func SetNetDialer(dialer *net.Dialer, open bool) {
|
||||
dialer.SetMultipathTCP(open)
|
||||
}
|
||||
|
||||
func GetNetDialer(dialer *net.Dialer) bool {
|
||||
return dialer.MultipathTCP()
|
||||
}
|
||||
|
||||
func SetNetListenConfig(listenConfig *net.ListenConfig, open bool) {
|
||||
listenConfig.SetMultipathTCP(open)
|
||||
}
|
||||
|
||||
func GetNetListenConfig(listenConfig *net.ListenConfig) bool {
|
||||
return listenConfig.MultipathTCP()
|
||||
}
|
||||
Reference in New Issue
Block a user