The SOCKSPort
is for talking to other applications. Tor runs as a SOCKS proxy and other applications (like a web browser, another proxy etc.) could connect to it. The manpage writes:
SOCKSPort [address:]port|unix:path|auto [flags] [isolation flags]
Open this port to listen for connections from SOCKS-speaking applications.
The ControlPort
is for connecting with the Tor process and sending it commands. You can use the ControlPort
for changing the configuration, getting information about the network, Tor circuits etc. The manpage writes:
ControlPort PORT|unix:path|auto [flags]
If set, Tor will accept connections on this port and
allow those connections to control the Tor process using
the Tor Control Protocol (described in
control-spec.txt).
So your Ruby software should talk to port 50001
, the SOCKSPort
. However you wrote about HTTP requests. Please make sure that your Ruby software will issue SOCKS requests or you might run into other problems. Depending on the kind of requests it might be a good idea to use some other HTTP proxy (like Privoxy) between your Ruby software and Tor.