mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 03:32:33 +08:00
d3fea909e9
Golang officially decided not to open `internal/poll.execIO` to third-party libraries after 1.23 was released, so we can only choose to remove tfo support on the Windows platform.
19 lines
377 B
Go
19 lines
377 B
Go
package inbound
|
|
|
|
import (
|
|
"context"
|
|
"net"
|
|
)
|
|
|
|
func SetMPTCP(open bool) {
|
|
setMultiPathTCP(getListenConfig(), open)
|
|
}
|
|
|
|
func ListenContext(ctx context.Context, network, address string) (net.Listener, error) {
|
|
return lc.Listen(ctx, network, address)
|
|
}
|
|
|
|
func Listen(network, address string) (net.Listener, error) {
|
|
return ListenContext(context.Background(), network, address)
|
|
}
|