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

16 lines
257 B
Go
Raw Normal View History

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