git.schokokeks.org
Repositories
Help
Report an Issue
tor-webwml.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
59ada101a
Branches
Tags
bridges
docs-debian
jobs
master
press-clips
tor-webwml.git
projects
en
obfsproxy-instructions.wml
Switch obfsproxy setup instructions to install the Python version.
George Kadianakis
commited
59ada101a
at 2013-04-12 18:42:35
obfsproxy-instructions.wml
Blame
History
Raw
## translation metadata # Revision: $Revision$ # Translation-Priority: 4-optional #include "head.wmi" TITLE="obfsproxy: Installation instructions" CHARSET="UTF-8" <div id="content" class="clearfix"> <div id="breadcrumbs"> <a href="<page index>">Home » </a> <a href="<page projects/projects>">Projects » </a> <a href="<page projects/obfsproxy>">obfsproxy</a> </div> <div id="maincol"> <!-- PUT CONTENT AFTER THIS TAG --> <h1 id="instructions">Obfsproxy Instructions</h1> <img src="$(IMGROOT)/obfsproxy_diagram.png" alt="client torrc"></a> <p> This is a guide for installing the Python version of obfsproxy. If you still have the C version, we recommend you to upgrade to the Python version! </p> <h3>Step 0: Install dependencies</h3> <br> <p> To setup obfsproxy you will need <code>git</code>, <code>Python</code> (>= 2.7), <code>Twisted</code> and some common Python modules (<code>setuptools</code>, <code>argparse</code> and <code>PyCrypto</code>) . If you use Debian testing (or unstable), or a version of Ubuntu newer than Oneiric, this is easy: <p> <tt># apt-get install git python2.7 python-setuptools python-crypto python-twisted python-argparse</tt> <p> You will also need a recent version of Tor (>= 0.2.4.1). We recommend you use <a href="<page docs/debian>#development">Tor's experimental repositories for Debian/Ubuntu</a> or <a href="https://gitweb.torproject.org/tor.git">install Tor from git</a>. </p> <h3>Step 1: Install pyptlib</h3> <br> <p> You will also need pyptlib, a small library developed by the Tor Project for writing pluggable transports. </p> <tt>$ git clone https://git.torproject.org/pluggable-transports/pyptlib.git</tt><br> <tt>$ cd pyptlib && python setup.py install</tt><br><br> <p> You might need to run the <em>python setup.py install</em> command as root. If you don't want to run it as root, you can use <em>python setup.py install --user</em> which will install pyptlib just for the current user. </p> <h3>Step 2: Install and test obfsproxy</h3> <br> <p> Now it's time to fetch obfsproxy and test that it works: </p> <tt>$ git clone https://git.torproject.org/pluggable-transports/obfsproxy.git</tt><br> <tt>$ cd obfsproxy</tt><br> <tt>$ python obfsproxy/test/tester.py</tt><br><br> <p> If you got a message reporting that all tests finished successfully, then obfsproxy works for you. Time to run the setup.py script so that obfsproxy gets installed in your system: </p> <tt># python setup.py install</tt><br><br> <p> You will probably want to run the setup.py script as root so that obfsproxy gets installed in /usr/local/bin. </p> <h3>Step 3: Setup tor</h3> <br> <p> Edit your /etc/tor/torrc to add: </p> <p> <tt>SocksPort 0</tt><br> <tt>ORPort 443 # or some other port if you already run a webserver/skype</tt><br> <tt>BridgeRelay 1</tt><br> <tt>Exitpolicy reject *:*</tt><br><br> <tt>## CHANGEME_1 -> provide a nickname for your bridge, can be anything you like</tt><br> <tt>#Nickname CHANGEME_1</tt><br> <tt>## CHANGEME_2 -> provide some email address so we can contact you if there's a problem</tt><br> <tt>#ContactInfo CHANGEME_2</tt><br><br> <tt>ServerTransportPlugin obfs2,obfs3 exec /usr/local/bin/obfsproxy managed</tt><br> </p> <p> Don't forget to uncomment and edit the CHANGEME fields. Also, if you didn't install obfsproxy as root, you might have to change its path. </p> <h3>Step 4: Launch Tor and verify that it bootstraps</h3> <br> <p> Restart Tor to use the new configuration file. (Preface with sudo if needed.) </p> <tt># service tor restart</tt><br><br> <p> Now check /var/log/tor/log and you should see something like this: </p> <tt>Nov 05 16:40:45.000 [notice] We now have enough directory information to build circuits.</tt><br> <tt>Nov 05 16:40:45.000 [notice] Bootstrapped 80%: Connecting to the Tor network.</tt><br> <tt>Nov 05 16:40:46.000 [notice] Bootstrapped 85%: Finishing handshake with first hop.</tt><br> <tt>Nov 05 16:40:46.000 [notice] Bootstrapped 90%: Establishing a Tor circuit.</tt><br> <tt>Nov 05 16:40:48.000 [notice] Tor has successfully opened a circuit. Looks like client functionality is working.</tt><br> <tt>Nov 05 16:40:48.000 [notice] Bootstrapped 100%: Done.</tt><br><br> <p> If Tor is earlier in the bootstrapping phase, wait until it gets to 100%. </p> <h2>Step 5: Set up port forwarding if needed</h2> <br> <p> If you're behind a NAT/firewall, you'll need to make your bridge reachable from the outside world — both on the ORPort and the obfsproxy port. The ORPort is whatever you defined in step two above. To find your obfsproxy port, check your Tor logs for two lines similar to these: </p> <tt>Oct 05 20:00:41.000 [notice] Registered server transport 'obfs2' at '0.0.0.0:26821</tt><br> <tt>Oct 05 20:00:42.000 [notice] Registered server transport 'obfs3' at '0.0.0.0:40172</tt><br><br> <p> The last number in each line, in this case 26821 and 40172, are the TCP port numbers that you need to forward through your firewall. (This port is randomly chosen the first time Tor starts, but Tor will cache and reuse the same number in future runs.) If you want to change the number, use Tor 0.2.4.7-alpha or later, and set "ServerTransportListenAddr obfs2 0.0.0.0:26821" in your torrc. </p> <br> </div> <!-- END MAINCOL --> <div id = "sidecol"> #include "side.wmi" #include "info.wmi" </div> <!-- END SIDECOL --> </div> <!-- END CONTENT --> #include <foot.wmi>