Update tfo-go

This commit is contained in:
世界
2023-08-16 17:47:24 +08:00
parent 53a0bf2d11
commit 5c5c25e3ad
16 changed files with 131 additions and 39 deletions

View File

@@ -0,0 +1,15 @@
//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
}