1
0
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:
Con Kolivas 2013-09-05 23:14:53 +10:00
parent 8ede407df7
commit b783d94c6d
2 changed files with 4 additions and 0 deletions

View File

@ -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
View File

@ -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;