[tor-talk] Regarding Proxy-Magic (Onion-Clearnet mapping)

Manfred Ackermann yo at acki.es
Fri Nov 1 17:45:03 UTC 2013

 ... you need: Tor and a intercepting Proxy (e.g. Privoxy) up-n-running.

   1. *Declare a HiddenService pointing to Privoxy*

   Edit torrc (/etc/tor/torrc) and add the following lines:

   HiddenServiceDir  /var/lib/tor/my_magic/
   HiddenServicePort 80

   Get the onion-link from /var/lib/tor/my_magic/hostname:

   cat /var/lib/tor/my_magic/hostname

   This means: Every port 80 request (http) to bocpbqy3ql6mr2t4.onion will
   get into Privoxy.

   2. *Let Privoxy do the mapping*

   Ensure that Privoxy is running with intercepting allowed. To enable
put accept-intercepted-requests
   1 into /etc/privoxy/config. Also ensure that /etc/privoxy/user.action
    and /etc/privoxy/user.filter are configured by /etc/privoxy/config:

   actionsfile user.action
   filterfile user.filter

   Edit Privoxy setup to modify the request from bocpbqy3ql6mr2t4.onion to
   magic.com. This is done in two files:

   In /etc/privoxy/user.action:

   { \
   +client-header-filter{magic-request} \
   +filter{magic-response} \

   and /etc/privoxy/user.filter

   CLIENT-HEADER-FILTER: magic-request Do onion to clearnet
   s@^(Host:)\s*bocpbqy3ql6mr2t4.onion$@$1 magic.com at i
   FILTER: magic-response Do clearnet to onion

   user.action declares what filter to apply and when, user.filter declares
   what filter does what.

   With forward-socks4a / . declared in
/etc/privoxy/configit goes directly back into the Tor network and even
   magic-declaration-location stays anonymous. But you can also declare
   additionally forward magic.com . to get it directly w/o putting it back
   into Tor network.

More information about the tor-talk mailing list