mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-22 20:44:19 +00:00
Extract any proxy url and port to be used by sockaddr if possible using extract_sockaddr.
This commit is contained in:
parent
8ede407df7
commit
b783d94c6d
3
miner.h
3
miner.h
@ -1183,6 +1183,9 @@ struct pool {
|
|||||||
char *sockbuf;
|
char *sockbuf;
|
||||||
size_t sockbuf_size;
|
size_t sockbuf_size;
|
||||||
char *sockaddr_url; /* stripped url used for sockaddr */
|
char *sockaddr_url; /* stripped url used for sockaddr */
|
||||||
|
char *sockaddr_proxy_url;
|
||||||
|
char *sockaddr_proxy_port;
|
||||||
|
|
||||||
char *nonce1;
|
char *nonce1;
|
||||||
unsigned char *nonce1bin;
|
unsigned char *nonce1bin;
|
||||||
size_t n1_len;
|
size_t n1_len;
|
||||||
|
1
util.c
1
util.c
@ -567,6 +567,7 @@ char *get_proxy(char *url, struct pool *pool)
|
|||||||
quithere(1, "Failed to malloc rpc_proxy");
|
quithere(1, "Failed to malloc rpc_proxy");
|
||||||
|
|
||||||
strcpy(pool->rpc_proxy, url + plen);
|
strcpy(pool->rpc_proxy, url + plen);
|
||||||
|
extract_sockaddr(pool->rpc_proxy, &pool->sockaddr_proxy_url, &pool->sockaddr_proxy_port);
|
||||||
pool->rpc_proxytype = proxynames[i].proxytype;
|
pool->rpc_proxytype = proxynames[i].proxytype;
|
||||||
url = split + 1;
|
url = split + 1;
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user