Skip to content

Commit

Permalink
fix: use providers
Browse files Browse the repository at this point in the history
  • Loading branch information
amircybersec committed Nov 11, 2024
1 parent cd78174 commit b45e18b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x/examples/test-connectivity/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ func main() {
tcpReports := make([]tcpReport, 0)
udpReports := make([]udpReport, 0)
var connectStart = make(map[string]time.Time)
configToDialer := configurl.NewDefaultConfigToDialer()
providers := configurl.NewDefaultProviders()
onDNS := func(ctx context.Context, domain string) func(di httptrace.DNSDoneInfo) {
dnsStart := time.Now()
return func(di httptrace.DNSDoneInfo) {
Expand Down Expand Up @@ -323,7 +323,7 @@ func main() {
return newTCPTraceDialer(onDNS, onDial, onDialStart).DialStream(ctx, addr)
})

configToDialer.BasePacketDialer = transport.FuncPacketDialer(func(ctx context.Context, addr string) (net.Conn, error) {
providers.PacketDialers.BaseInstance = transport.FuncPacketDialer(func(ctx context.Context, addr string) (net.Conn, error) {
hostname, _, err := net.SplitHostPort(addr)
if err != nil {
return nil, err
Expand Down

0 comments on commit b45e18b

Please sign in to comment.