mirror of
https://github.com/mimblewimble/grin-wallet.git
synced 2025-02-01 08:51:09 +03:00
Fix socks5 proxy support (#629)
This commit is contained in:
parent
34d23eb17a
commit
4c81e4a693
2 changed files with 2 additions and 2 deletions
|
@ -164,7 +164,7 @@ impl HttpSlateSender {
|
||||||
IN: Serialize,
|
IN: Serialize,
|
||||||
{
|
{
|
||||||
let client =
|
let client =
|
||||||
if self.use_socks {
|
if !self.use_socks {
|
||||||
Client::new()
|
Client::new()
|
||||||
} else {
|
} else {
|
||||||
Client::with_socks_proxy(self.socks_proxy_addr.ok_or_else(|| {
|
Client::with_socks_proxy(self.socks_proxy_addr.ok_or_else(|| {
|
||||||
|
|
|
@ -125,7 +125,7 @@ impl Client {
|
||||||
.default_headers(headers);
|
.default_headers(headers);
|
||||||
|
|
||||||
if let Some(s) = socks_proxy_addr {
|
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)))?;
|
.map_err(|e| ErrorKind::Internal(format!("Unable to create proxy: {}", e)))?;
|
||||||
builder = builder.proxy(proxy);
|
builder = builder.proxy(proxy);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue