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

HTTP_PROXY parsing should be more robust #147

Closed
lachlan2k opened this issue Dec 6, 2023 · 3 comments
Closed

HTTP_PROXY parsing should be more robust #147

lachlan2k opened this issue Dec 6, 2023 · 3 comments
Assignees
Labels
bug Something isn't working needs testing (on unstable) A feature that now exists, but is looking for people to test and use it

Comments

@lachlan2k
Copy link
Contributor

The HTTP_PROXY env variable can take many forms, such as http://my-egress-lad:1234. But, net.Dial is confused as it expects host:port, and this will cause an error.

When trying http_proxy, I suggest that RSSH should:

  • Strip out http://
  • If no port is specified, try both 80, and 8080
@NHAS NHAS self-assigned this Dec 6, 2023
@NHAS NHAS added bug Something isn't working needs testing (on unstable) A feature that now exists, but is looking for people to test and use it labels Dec 6, 2023
@NHAS
Copy link
Owner

NHAS commented Dec 6, 2023

This is now on unstable

@lachlan2k
Copy link
Contributor Author

I like the changes -- perhaps they should also be applied to the --proxy command line flag? It would be great for that to be more versatile (and consistency).

I have to admit it took me a hot second to realise what was was breaking when I was trying to --proxy http://foo previously.

I'll test later to make sure it works for me.

@NHAS
Copy link
Owner

NHAS commented Dec 6, 2023

Done

@NHAS NHAS closed this as completed in 53371ee Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs testing (on unstable) A feature that now exists, but is looking for people to test and use it
Projects
None yet
Development

No branches or pull requests

2 participants