[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



 ... 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 127.0.0.1:8118

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

   cat /var/lib/tor/my_magic/hostname
   bocpbqy3ql6mr2t4.onion

   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} \
   }
   bocpbqy3ql6mr2t4.onion

   and /etc/privoxy/user.filter

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

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

   With forward-socks4a / 127.0.0.1:9050 . declared in
/etc/privoxy/configit goes directly back into the Tor network and even
the
   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.
-- 
tor-talk mailing list - tor-talk@xxxxxxxxxxxxxxxxxxxx
To unsubscribe or change other settings go to
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-talk