Skip to content

Commit

Permalink
Fix timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
fortuna committed Dec 5, 2023
1 parent fec16af commit 63f2e33
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions x/examples/find-strategy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -382,14 +382,16 @@ func (f *StrategyFinder) testDNSClient(clientId string, client *dnsClient, testD
}
f.log("; status=ok (%v) ✅\n", ips)
for _, ip := range ips {
f.FindTLSStrategy(ctx, testDomain, ip, &transport.TCPStreamDialer{}, client)
f.FindTLSStrategy(testDomain, ip, &transport.TCPStreamDialer{}, client)
}
return nil
}

func (f *StrategyFinder) FindTLSStrategy(ctx context.Context, domain string, ip net.IP, dialer transport.StreamDialer, dnsClient DNSClient) error {
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:2", "omitsni", "tlsfrag"} {
ctx, cancel := context.WithTimeout(context.Background(), f.TestTimeout)
defer cancel()
f.log(" tls=%v", strategy)
var tlsConn transport.StreamConn
var tlsErr error
Expand Down

0 comments on commit 63f2e33

Please sign in to comment.