mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-14 12:53:17 +00:00
16 lines
256 B
Go
16 lines
256 B
Go
|
//go:build go1.20
|
||
|
|
||
|
package dialer
|
||
|
|
||
|
import (
|
||
|
"net"
|
||
|
|
||
|
"github.com/sagernet/tfo-go"
|
||
|
)
|
||
|
|
||
|
type tcpDialer = tfo.Dialer
|
||
|
|
||
|
func newTCPDialer(dialer net.Dialer, tfoEnabled bool) (tcpDialer, error) {
|
||
|
return tfo.Dialer{Dialer: dialer, DisableTFO: !tfoEnabled}, nil
|
||
|
}
|