almbfsek (OP)
Newbie
Offline
Activity: 12
Merit: 0
|
 |
June 16, 2011, 01:43:16 PM Last edit: June 16, 2011, 06:45:41 PM by almbfsek |
|
hello guys,
I have an SSH tunnel that I use as a SOCKS proxy for my web browser. I would also like to use it with mining softwares. is it even possible? I thought since miners use HTTP protocol it should be possible. if so, which 3rd party application can I use in order to route the miner's connection through the proxy? or may be the miner's code should be modified?
thank you in advance
|
|
|
|
|
|
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
|
|
|
|
cynikal
Newbie
Offline
Activity: 14
Merit: 0
|
 |
June 16, 2011, 03:04:34 PM |
|
if your miner uses something like libcurl, it will respect the http_proxy environment variable, look into the underlying software/libs you're using and research their proxy support
|
|
|
|
torusJKL
|
 |
June 16, 2011, 03:14:30 PM |
|
You can tunnel your localhost port to any homepage. e.g. localhost:8332 --> pool.com:8332
You can even change port numbers in the process (if you use several pools) e.g. localhost:8555 --> otherpool.com:8332
Then you connect your miner to localhost:8332 instead to the pool's address.
|
|
|
|
nuclearstar
Newbie
Offline
Activity: 18
Merit: 0
|
 |
June 16, 2011, 04:32:02 PM |
|
for the record my work has a proxy and my miner works fine without having to configure anything extra.
|
|
|
|
cynikal
Newbie
Offline
Activity: 14
Merit: 0
|
 |
June 16, 2011, 05:24:45 PM |
|
You can tunnel your localhost port to any homepage. e.g. localhost:8332 --> pool.com:8332
You can even change port numbers in the process (if you use several pools) e.g. localhost:8555 --> otherpool.com:8332
Then you connect your miner to localhost:8332 instead to the pool's address.
have you actually tried this? I have and depending on how the pool's rpc server is configured, it may not return the data if the request it gets doesn't contain the desired host (e.g. Host: localhost as opposed to actual hostname of the pool server). Again this depends on the config of the pool but i ran into issues trying to do it this way. If you really want to scale better, run a proxy service like https://github.com/cdhowie/Bitcoin-mining-proxy (this is what i'm using)
|
|
|
|
almbfsek (OP)
Newbie
Offline
Activity: 12
Merit: 0
|
 |
June 16, 2011, 06:08:42 PM Last edit: June 16, 2011, 06:44:34 PM by almbfsek |
|
@cynikal: thank you. http_proxy is what I was looking for. I did "export http_proxy=socks5://127.0.0.1:11334" and it doesn't work because according to this( http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTPROXY) my curl version(7.21.3) doesn't support protocol prefix(socks5://) on the URL. so I did some research but I couldn't find how to specify socks5 with env. variables. do you know how? thank you
|
|
|
|
cynikal
Newbie
Offline
Activity: 14
Merit: 0
|
 |
June 16, 2011, 06:12:35 PM |
|
@cynikal: thank you http_proxy is what I was looking for. I did "export http_proxy=socks5://127.0.0.1:11334" and it doesn't work because according to this( http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTPROXY) my curl version(7.21.3) doesn't support protocol prefix(socks5://) on the URL. so I did some research but I couldn't find how to specify socks5 with env. variables? do you know how? thank you sorry, i use a http proxy myself (i run one on a server remotely and then i ssh tunnel to that proxy directly, rather than use ssh tunnel as a socks proxy). upgrade your curl version? or staticly compile a local version of newer libcurl and link/include that static lib into your miner ?
|
|
|
|
almbfsek (OP)
Newbie
Offline
Activity: 12
Merit: 0
|
 |
June 16, 2011, 06:23:45 PM |
|
upgrading the libcurl is the easiest I guess, thanks!
|
|
|
|
almbfsek (OP)
Newbie
Offline
Activity: 12
Merit: 0
|
 |
June 16, 2011, 06:43:21 PM |
|
well modifying the source was easier afterall  curl_easy_setopt(curl, CURLOPT_PROXY, "socks://127.0.0.1:11334"); curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
works like a charm...
|
|
|
|
|