Bitcoin Forum
February 25, 2017, 02:31:37 AM *
News: Latest stable version of Bitcoin Core: 0.13.2  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Mining using a proxy  (Read 3551 times)
almbfsek
Newbie
*
Offline Offline

Activity: 12


View Profile
June 16, 2011, 01:43:16 PM
 #1

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

1EoGYM5vBqdzReQnFcfXDTLy9r4wVzrxQn
1487989897
Hero Member
*
Offline Offline

Posts: 1487989897

View Profile Personal Message (Offline)

Ignore
1487989897
Reply with quote  #2

1487989897
Report to moderator
1487989897
Hero Member
*
Offline Offline

Posts: 1487989897

View Profile Personal Message (Offline)

Ignore
1487989897
Reply with quote  #2

1487989897
Report to moderator
1487989897
Hero Member
*
Offline Offline

Posts: 1487989897

View Profile Personal Message (Offline)

Ignore
1487989897
Reply with quote  #2

1487989897
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1487989897
Hero Member
*
Offline Offline

Posts: 1487989897

View Profile Personal Message (Offline)

Ignore
1487989897
Reply with quote  #2

1487989897
Report to moderator
cynikal
Newbie
*
Offline Offline

Activity: 14


View Profile
June 16, 2011, 03:04:34 PM
 #2

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
Hero Member
*****
Offline Offline

Activity: 597


View Profile
June 16, 2011, 03:14:30 PM
 #3

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.

If you find my post useful send some BTC: 167XM1Za8aG9CdbYuHFMpL2kvPsw6uC8da
Bitrated || bitcoin-otc || Moon Bitcoin Faucet
nuclearstar
Newbie
*
Offline Offline

Activity: 18


View Profile
June 16, 2011, 04:32:02 PM
 #4

for the record my work has a proxy and my miner works fine without having to configure anything extra.

--------------------------------------------------------------
LTC - LSnhixMMTg2u7zxnHghgp2SN7xxM1EtYwT
BTC - 18NNhqwVsFXbcMgjpzmg8PtfSWbHEPjrzA
Free Litecoins http://ltc4you.com/?r=12945
cynikal
Newbie
*
Offline Offline

Activity: 14


View Profile
June 16, 2011, 05:24:45 PM
 #5

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
Newbie
*
Offline Offline

Activity: 12


View Profile
June 16, 2011, 06:08:42 PM
 #6

@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

1EoGYM5vBqdzReQnFcfXDTLy9r4wVzrxQn
cynikal
Newbie
*
Offline Offline

Activity: 14


View Profile
June 16, 2011, 06:12:35 PM
 #7

@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
Newbie
*
Offline Offline

Activity: 12


View Profile
June 16, 2011, 06:23:45 PM
 #8

upgrading the libcurl is the easiest I guess, thanks!

1EoGYM5vBqdzReQnFcfXDTLy9r4wVzrxQn
almbfsek
Newbie
*
Offline Offline

Activity: 12


View Profile
June 16, 2011, 06:43:21 PM
 #9

well modifying the source was easier afterall Smiley

Quote
curl_easy_setopt(curl, CURLOPT_PROXY, "socks://127.0.0.1:11334");
curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);

works like a charm...

1EoGYM5vBqdzReQnFcfXDTLy9r4wVzrxQn
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!