Support proxy#110
Open
utensil wants to merge 2 commits into
Open
Conversation
It's required if the env var has `all_proxy` etc. pointing to socks5 proxy
There was a problem hiding this comment.
Pull Request Overview
Adds support for HTTP and SOCKS proxies by enabling the corresponding features in the HTTP client dependency.
- Enables
proxy-from-envandsocks-proxyfeatures on theureqdependency - Keeps version at
2.10.0to avoid breaking changes
Comments suppressed due to low confidence (2)
hackernews_tui/Cargo.toml:40
- Consider updating the README or other user-facing docs to explain how to configure and use the new proxy support (e.g., setting environment variables or SOCKS proxy URIs).
ureq = { version = "2.10.0", features = ["json", "cookies", "proxy-from-env", "socks-proxy"] }
hackernews_tui/Cargo.toml:40
- Add integration tests or mock-based tests to verify that proxy settings from environment variables and SOCKS proxies are correctly applied in HTTP requests.
ureq = { version = "2.10.0", features = ["json", "cookies", "proxy-from-env", "socks-proxy"] }
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #43
hackernews-TUI uses ureq 2.10.0 as its HTTP client library, it supports proxies via features
proxy-from-envto load proxy settings from environment variable, andsocks-proxyto support socks proxies.ureqhas 3.x and featureproxy-from-envis enabled by default there, but I didn't bump it to 3.x to avoid compatibility issues, only adding these 2 features.Locally I've tested them to work very well with http and sock5 proxies.
For users really need things to work right now before this PR is merged, you may just
So you are good to go!