sing-box/common/dialer/default_go1.20.go

16 lines
257 B
Go
Raw Normal View History

2023-08-16 17:47:24 +08:00
//go:build go1.20
package dialer
import (
"net"
2024-08-27 11:23:20 +08:00
"github.com/metacubex/tfo-go"
2023-08-16 17:47:24 +08:00
)
type tcpDialer = tfo.Dialer
func newTCPDialer(dialer net.Dialer, tfoEnabled bool) (tcpDialer, error) {
return tfo.Dialer{Dialer: dialer, DisableTFO: !tfoEnabled}, nil
}