Skip to content

feat: route server manager requests through bypass proxy#342

Merged
myleshorton merged 4 commits intomainfrom
feat/server-manager-bypass-dialer
Feb 25, 2026
Merged

feat: route server manager requests through bypass proxy#342
myleshorton merged 4 commits intomainfrom
feat/server-manager-bypass-dialer

Conversation

@myleshorton
Copy link
Contributor

@myleshorton myleshorton commented Feb 25, 2026

Summary

  • Use bypass.DialContext in the server manager's HTTP transport instead of a plain net.Dialer, so requests to private servers are routed outside the VPN tunnel
  • Pass bypass.DialContext to fronted via WithDialer so that TLS handshakes to CDN fronts also stay outside the VPN tunnel, preventing routing loops
  • Update github.com/getlantern/fronted to latest main, which adds the WithDialer option and fixes CI test timeouts by shuffling fronts before vetting

Test plan

  • go build ./... compiles
  • go test ./servers/ passes
  • go test ./bypass/ passes

🤖 Generated with Claude Code

The server manager uses HTTP to communicate with private servers. When
the VPN is active, these requests would be routed through the tunnel,
creating a loop. Use bypass.DialContext to route them outside the tunnel.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings February 25, 2026 19:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request modifies the server manager's HTTP client to route requests through the bypass proxy instead of using a plain net.Dialer. This prevents routing loops when the VPN is active and the server manager needs to reach private server endpoints.

Changes:

  • Modified retryableHTTPClient() to use bypass.DialContext for the HTTP transport's DialContext
  • Removed explicit timeout and keepalive configuration from the net.Dialer (now handled by bypass implementation)
  • Updated comments to reflect the use of bypass proxy for routing outside the VPN tunnel

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

myleshorton and others added 3 commits February 25, 2026 12:15
Configure the net.Dialer in bypass.DialContext with 30s timeout and
30s keepalive to match the settings previously used by callers, rather
than relying on OS defaults.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Picks up shuffled front vetting and CI fixes from fronted PR #68.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Pass bypass.DialContext to fronted via WithDialer so that TLS
handshakes to CDN fronts stay outside the VPN tunnel.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@myleshorton
Copy link
Contributor Author

YOLOing this since it's pretty straightforward.

@myleshorton myleshorton merged commit 60649d6 into main Feb 25, 2026
6 checks passed
@myleshorton myleshorton deleted the feat/server-manager-bypass-dialer branch February 25, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants