Skip to content

Commit

Permalink
specify tlsfrag
Browse files Browse the repository at this point in the history
  • Loading branch information
fortuna committed Dec 5, 2023
1 parent 1d590db commit 704a8eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x/examples/find-strategy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ func (f *StrategyFinder) testDNSClient(clientId string, client *dnsClient, testD

func (f *StrategyFinder) FindTLSStrategy(domain string, ip net.IP, dialer transport.StreamDialer, dnsClient DNSClient) error {
address := net.JoinHostPort(domain, "443")
for _, strategy := range []string{"direct", "split:1", "split:2", "split:5", "omitsni", "tlsfrag"} {
for _, strategy := range []string{"direct", "split:1", "split:2", "split:5", "omitsni", "tlsfrag:1"} {
ctx, cancel := context.WithTimeout(context.Background(), f.TestTimeout)
defer cancel()
f.log(" tls=%v", strategy)
Expand Down Expand Up @@ -420,7 +420,7 @@ func (f *StrategyFinder) FindTLSStrategy(domain string, ip net.IP, dialer transp
tlsConn, tlsErr = otls.WrapConn(ctx, conn, address)
case "omitsni":
tlsConn, tlsErr = otls.WrapConn(ctx, conn, address, otls.WithSNI(""))
case "tlsfrag":
case "tlsfrag:1":
tlsConn, tlsErr = tlsfrag.WrapConnFunc(conn, func(record []byte) (n int) { return 1 })
default:
tlsErr = errors.New("invalid strategy")
Expand Down

0 comments on commit 704a8eb

Please sign in to comment.