Skip to content

Commit

Permalink
misc: reenable connectivity test with new url
Browse files Browse the repository at this point in the history
  • Loading branch information
markpash committed Feb 1, 2025
1 parent bf79cc0 commit 686eeb4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
38 changes: 19 additions & 19 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@ func runWireguard(ctx context.Context, l *slog.Logger, opts WarpOptions) error {
}

// Test wireguard connectivity
// werr = usermodeTunTest(ctx, l, tnet)
// if werr != nil {
// continue
// }
werr = usermodeTunTest(ctx, l, tnet)
if werr != nil {
continue
}
break
}
if werr != nil {
Expand Down Expand Up @@ -216,10 +216,10 @@ func runWarp(ctx context.Context, l *slog.Logger, opts WarpOptions, endpoint str
}

// Test wireguard connectivity
// werr = usermodeTunTest(ctx, l, tnet)
// if werr != nil {
// continue
// }
werr = usermodeTunTest(ctx, l, tnet)
if werr != nil {
continue
}
break
}
if werr != nil {
Expand Down Expand Up @@ -285,10 +285,10 @@ func runWarpInWarp(ctx context.Context, l *slog.Logger, opts WarpOptions, endpoi
}

// Test wireguard connectivity
// werr = usermodeTunTest(ctx, l, tnet1)
// if werr != nil {
// continue
// }
werr = usermodeTunTest(ctx, l, tnet1)
if werr != nil {
continue
}
break
}
if werr != nil {
Expand Down Expand Up @@ -343,9 +343,9 @@ func runWarpInWarp(ctx context.Context, l *slog.Logger, opts WarpOptions, endpoi
}

// Test wireguard connectivity
// if err := usermodeTunTest(ctx, l, tnet2); err != nil {
// return err
// }
if err := usermodeTunTest(ctx, l, tnet2); err != nil {
return err
}

_, err = wiresocks.StartProxy(ctx, l, tnet2, opts.Bind)
if err != nil {
Expand Down Expand Up @@ -405,10 +405,10 @@ func runWarpWithPsiphon(ctx context.Context, l *slog.Logger, opts WarpOptions, e
}

// Test wireguard connectivity
// werr = usermodeTunTest(ctx, l, tnet)
// if werr != nil {
// continue
// }
werr = usermodeTunTest(ctx, l, tnet)
if werr != nil {
continue
}
break
}
if werr != nil {
Expand Down
2 changes: 1 addition & 1 deletion app/wg.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/bepass-org/warp-plus/wiresocks"
)

const connTestEndpoint = "http://1.1.1.1/cdn-cgi/trace"
const connTestEndpoint = "http://connectivity.cloudflareclient.com/cdn-cgi/trace"

func usermodeTunTest(ctx context.Context, l *slog.Logger, tnet *netstack.Net) error {
ctx, cancel := context.WithDeadline(ctx, time.Now().Add(5*time.Second))
Expand Down

0 comments on commit 686eeb4

Please sign in to comment.