2

For example I have hidden service xxxxx.onion:1234 and I want to forward port 1234 to the clearnet on another server. Can I do it without any socks/http proxy?

So I want to do something like

redir --lport=1234 --caddr=xxxxx.onion --cport=1234

I don't need to create new hidden service I've already got it.

3 Answers 3

3

Read The !$%# Manual

HiddenServicePort VIRTPORT [TARGET]

Configure a virtual port VIRTPORT for a hidden service. You may use this option multiple times; each time applies to the service using the most recent HiddenServiceDir. By default, this option maps the virtual port to the same port on 127.0.0.1 over TCP. You may override the target port, address, or both by specifying a target of addr, port, addr:port, or unix:path. (You can specify an IPv6 target as [addr]:port.) You may also have multiple lines with the same VIRTPORT: when a user connects to that VIRTPORT, one of the TARGETs from those lines will be chosen at random.

e.g.

HiddenServiceDir /var/lib/tor/foo/
HiddenServicePort 1234 5.6.7.8:1234

Update:

In your updated case (which seems to be the inverse of "I want to forward [...] to the clearnet"), you want some non-onion site to display the content of an onion. This will require at least some form of proxy to fetch content from the tor network. What you seem to be describing is Tor2Web.

1
  • Actually, in case of a very bad site building, he will need a HTTPS proxy with CONNECT method to do this: badly designed sites can use multiple host+port combos... But usually - your answer covers it up in full
    – Alexey Vesnin
    Commented Jun 25, 2016 at 15:04
0

I was unable to make this work using socat but I did find a nice new Golang proxy that worked without any issue: https://github.com/willscott/onionproxy.

0

You need NGinX - or another appropriate to your service - server bound to your localhost and a socket listener rule for the very addressed you need, no proxy is needed as well

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .