mirror of
https://github.com/jwinterm/grin-wallet.git
synced 2026-10-17 07:11:36 +02:00
Fix socks5 proxy support (#629)
This commit is contained in:
@@ -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(|| {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user