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

ngrok: support connecting through either http or socks5 proxies #106

Merged
merged 8 commits into from
Aug 24, 2023

Conversation

jrobsonchase
Copy link
Collaborator

@jrobsonchase jrobsonchase commented Aug 21, 2023

Resolves ngrok-private/ngrok#21250

Adds a SessionBuilder::proxy_url method that sets the session up to
connect via either an http or a socks5 proxy. As with ngrok-go, these
are mutually-exclusive with the connector and will override that
setting.

Errors from unsupported proxy schemes, like in ngrok-go, are deferred
to connect time. This isn't great, but we're kinda stuck with it since
builder method errors will consume the builder without hope of graceful
recovery, which is also bad. Might be time to re-evaluate #95.

Rebased this on #107, so we get config-time errors for unsupported proxies 🎉

@jrobsonchase jrobsonchase force-pushed the josh/proxy-url-support branch 2 times, most recently from c24d50b to 3cfdbcf Compare August 22, 2023 15:46
@jrobsonchase jrobsonchase changed the base branch from main to josh/ngrok/mutable-builder August 22, 2023 15:47
@jrobsonchase jrobsonchase force-pushed the josh/proxy-url-support branch 2 times, most recently from 5480679 to abdf813 Compare August 22, 2023 16:39
Copy link
Contributor

@bobzilladev bobzilladev left a comment

Choose a reason for hiding this comment

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

Should probably be documented somewhere, example might not be right place so maybe in the README?

ngrok/src/session.rs Outdated Show resolved Hide resolved
ngrok/src/session.rs Outdated Show resolved Hide resolved
@jrobsonchase
Copy link
Collaborator Author

@bobzilladev Do you think it needs more documentation than any other session builder methods? Apart from the authtoken-related ones, we really only have doc comments for the rest.

Base automatically changed from josh/ngrok/mutable-builder to main August 23, 2023 14:36
@jrobsonchase jrobsonchase merged commit fc54e72 into main Aug 24, 2023
11 checks passed
@jrobsonchase jrobsonchase deleted the josh/proxy-url-support branch August 24, 2023 17:38
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