# Using Tor Browser's SOCKS Port

**URL:** https://forum.torproject.org/t/using-tor-browsers-socks-port/17718
**Category:** Core Tor
**Tags:** tor, tor-browser
**Created:** [March 4, 2025, 2:26am UTC](https://forum.torproject.org/t/using-tor-browsers-socks-port/17718 "2025-03-04T02:26:38Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![abc](https://forum.torproject.org/letter_avatar_proxy/v4/letter/a/2bfe46/32.png) [@abc](https://forum.torproject.org/u/abc)
#### Post date: [March 4, 2025, 2:26am UTC](https://forum.torproject.org/t/using-tor-browsers-socks-port/17718/1 "2025-03-04T02:26:38Z")

</div>

I use an application which uses the http protocol for communication between instances.

I set up an onion site for one side of it.

Tor Browser shows it and can interact with it. But I want the local binary to communicate with the binary at the onion site.

The app in question can connect to an http proxy but not SOCKS. ☹

Using only nc and/or ssh (I don’t have socat or netcat) can someone please show how to forward a port to Tor Browser’s SOCKS port?

I thought I’d run nc or ssh and have it listen on an open port, say 8008. Then the app would connect to 127.0.0.1:8008 and the connection would go over tor to the instance at the onion site.

I was hoping I could use nc to both listen and send that to the SOCKS port.  
`nc -l -k 33330 | nc -n -X 5 -x 127.0.0.1:9150 $site $port`

Then in another terminal window I’d run my program and point it at [http://127.0.0.1:33330](http://127.0.0.1:33330). But the above nc line tells me ‘`nc: connection failed, SOCKSv5 error: Connection refused`.’

Reading online I saw a variation:

```auto
mkfifo pip
nc -l -k 33330 < pip | nc -n -X 5 -x 127.0.0.1:9150 $site $port > pip

```

And just in case those \< \> file redirection operators were backwards, I turned them around \> \<. Same problem.

Thanks in advance.

---

<div class="post-metadata">

### Author: ![Protium\_serratum](https://forum.torproject.org/letter_avatar_proxy/v4/letter/p/eb8c5e/32.png) [@Protium\_serratum](https://forum.torproject.org/u/Protium_serratum)
#### Post date: [March 4, 2025, 10:02pm UTC](https://forum.torproject.org/t/using-tor-browsers-socks-port/17718/2 "2025-03-04T22:02:09Z")

</div>

Tor browser does not start an HTTP proxy by default, but you can add `HTTPTunnelPort 127.0.0.1:9152` to the `torrc` file to enable it.  
[https://manpages.debian.org/experimental/tor/tor.1.en.html](https://manpages.debian.org/experimental/tor/tor.1.en.html)

> **HTTPTunnelPort** [_address_ **:**]_port_| **auto** [_isolation flags_]
> 
> Open this port to listen for proxy connections using the “HTTP CONNECT” protocol instead of SOCKS. Set this to 0 if you don’t want to allow “HTTP CONNECT” connections. Set the port to “auto” to have Tor pick a port for you. This directive can be specified multiple times to bind to multiple addresses/ports. If multiple entries of this option are present in your configuration file, Tor will perform stream isolation between listeners by default. See SocksPort for an explanation of isolation flags. (Default: 0)

---

<div class="post-metadata">

### Author: ![abc](https://forum.torproject.org/letter_avatar_proxy/v4/letter/a/2bfe46/32.png) [@abc](https://forum.torproject.org/u/abc)
#### Post date: [March 6, 2025, 9:04pm UTC](https://forum.torproject.org/t/using-tor-browsers-socks-port/17718/3 "2025-03-06T21:04:31Z")

</div>

Thank you @Protium_serratum, I tried this but it didn’t work. The other software was expecting an HTTP proxy versus HTTP CONNECT.

Thankfully tor reports this to the software attempting the connection, so I was able to figure out it wouldn’t work.

I’ve used nc’s SOCKS proxy option before, to `GET` myself short messages. So I know that works.

---

<div class="post-metadata">

### Author: ![atari](https://forum.torproject.org/user_avatar/forum.torproject.org/atari/32/392_2.png) [@atari](https://forum.torproject.org/u/atari)
#### Post date: [March 7, 2025, 2:55pm UTC](https://forum.torproject.org/t/using-tor-browsers-socks-port/17718/4 "2025-03-07T14:55:48Z")

</div>

Maybe have a look at this piece of software: [https://tinyproxy.github.io/](https://tinyproxy.github.io/)

Or [Privoxy](https://www.privoxy.org/) if you are on windows [[instructions](https://www.privoxy.org/user-manual/config.html#SOCKS)], but should work on Linux too.

---

<div class="post-metadata">

### Author: ![Torceror](https://forum.torproject.org/user_avatar/forum.torproject.org/torceror/32/7336_2.png) [@Torceror](https://forum.torproject.org/u/Torceror)
#### Post date: [March 7, 2025, 2:58pm UTC](https://forum.torproject.org/t/using-tor-browsers-socks-port/17718/5 "2025-03-07T14:58:14Z")

</div>

Thank you @Protium_serratum for recommending HTTPTunnelPort.

For years I have used Polipo (deprecated) and currently Privoxy to provide an HTTP proxy pointing to Tor’s SOCKS5 port, and these worked well. Privoxy provides advanced filtering capabilities so I used that to create an additional whitelisting proxy server to keep an old Windows virtual machine in check.

I like the stream isolation advantage of HTTPTunnelPort, and I began testing HTTPTunnelPort with wget. I am using shell variables to only adjust the proxy for wget, but I noticed something unexpected.

HTTPTunnelPort appears to only work as an https\_proxy…not as an http\_proxy.

For example, this works as expected:  
export https\_proxy=“[http://127.0.0.1:9100/](http://127.0.0.1:9100/)” && wget (insert URL here)

For example, this does not work as expected:  
export http\_proxy=“[http://127.0.0.1:9100/](http://127.0.0.1:9100/)” && wget (insert URL here)

The version of wget I am using (1.21.2) does not support SOCKS5. I think that was a recent development.

I think the version of wget I am using either prefers an https\_proxy, does not work with http\_proxy, or HTTPTunnelPort provides https\_proxy.

Hopefully these notes will help @abc in troubleshooting.

---

<div class="post-metadata">

### Author: ![boldsuck](https://forum.torproject.org/user_avatar/forum.torproject.org/boldsuck/32/1370_2.png) [@boldsuck](https://forum.torproject.org/u/boldsuck)
#### Post date: [March 10, 2025, 5:28pm UTC](https://forum.torproject.org/t/using-tor-browsers-socks-port/17718/6 "2025-03-10T17:28:43Z")

</div>

Personally, I wouldn’t mess around with the Socks- and ControlPort of the TorBrowser tor binary, but would install tor for the OS.

---

<div class="post-metadata">

### Author: ![boldsuck](https://forum.torproject.org/user_avatar/forum.torproject.org/boldsuck/32/1370_2.png) [@boldsuck](https://forum.torproject.org/u/boldsuck)
#### Post date: [March 10, 2025, 5:28pm UTC](https://forum.torproject.org/t/using-tor-browsers-socks-port/17718/7 "2025-03-10T17:28:53Z")

</div>

> [@atari](#):
>
> Or [Privoxy](https://www.privoxy.org/) if you are on windows [[instructions](https://www.privoxy.org/user-manual/config.html#SOCKS)], but should work on Linux too.

Sure it works on Linux/UNIX 😀 for over 20 years.  
I’ve chained privoxy with tor to test (my) .onion sites in **any** browser.

---

<div class="post-metadata">

### Author: ![abc](https://forum.torproject.org/letter_avatar_proxy/v4/letter/a/2bfe46/32.png) [@abc](https://forum.torproject.org/u/abc)
#### Post date: [March 20, 2025, 6:19pm UTC](https://forum.torproject.org/t/using-tor-browsers-socks-port/17718/8 "2025-03-20T18:19:49Z")

</div>

Thank you @atari I’ll look at those. But I’m mainly trying to figure out a routine for non-tech folks to use, so involving software that’s not part of a default OS install is going to be a challenge.

Maybe there’s a trustworthy crate which can go into arti to provide it with a more robust HTTP Proxy capability.
