Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(transport/websocket): support SOCKS proxy with wss #3137

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

MarcoPolo
Copy link
Collaborator

@MarcoPolo MarcoPolo commented Jan 14, 2025

closes #286 (a 7 year old issue??)

This PR allows users to use a SOCKS5 proxy when dialing /wss addresses by using the HTTPS_PROXY environment variable.

Here's an example using vole to dial through a socks proxy:

HTTPS_PROXY="socks5://127.0.0.1:9081" vole libp2p ping /dns4/am6.bootstrap.libp2p.io/tcp/443/wss/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb

@MarcoPolo MarcoPolo requested a review from aschmahmann January 15, 2025 02:19
@MarcoPolo MarcoPolo marked this pull request as ready for review January 15, 2025 02:20
@MarcoPolo MarcoPolo changed the title Support SOCKS proxy with wss feat(transport/websocket): support SOCKS proxy with wss Jan 15, 2025
@parkan
Copy link

parkan commented Jan 15, 2025

lgtm 👍

I guess setEnv doesn't work in CI?

@MarcoPolo
Copy link
Collaborator Author

I didn't really debug, but SetEnv might be surprising if other tests are run in parallel.

@parkan
Copy link

parkan commented Jan 15, 2025

I didn't really debug, but SetEnv might be surprising if other tests are run in parallel.

huh I was fairly certain that SetEnv only affects the current process and children, though I guess the tests may run in the same process as separate goroutines?

@MarcoPolo MarcoPolo requested a review from sukunrt January 16, 2025 18: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.

(socks) proxy support
2 participants