Skip to content

Commit

Permalink
Fix socks5 proxy support (#629)
Browse files Browse the repository at this point in the history
  • Loading branch information
sheldonth authored Dec 31, 2021
1 parent 34d23eb commit 4c81e4a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion impls/src/adapters/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ impl HttpSlateSender {
IN: Serialize,
{
let client =
if self.use_socks {
if !self.use_socks {
Client::new()
} else {
Client::with_socks_proxy(self.socks_proxy_addr.ok_or_else(|| {
Expand Down
2 changes: 1 addition & 1 deletion impls/src/client_utils/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ impl Client {
.default_headers(headers);

if let Some(s) = socks_proxy_addr {
let proxy = Proxy::all(&format!("socks5://{}:{}", s.ip(), s.port()))
let proxy = Proxy::all(&format!("socks5h://{}:{}", s.ip(), s.port()))
.map_err(|e| ErrorKind::Internal(format!("Unable to create proxy: {}", e)))?;
builder = builder.proxy(proxy);
}
Expand Down

0 comments on commit 4c81e4a

Please sign in to comment.