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

[tor-commits] [flashproxy/master] Add instructions for bundling pyobfsproxy.



commit ae05ce3aae56c28350138f8f27286a55305c35f9
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date:   Sat Jan 5 22:01:35 2013 -0800

    Add instructions for bundling pyobfsproxy.
    
    These are from Alexandre.
---
 doc/bundle-gnulinux.txt |   26 +++++++++++++++++++++++++-
 doc/bundle-macosx.txt   |   37 ++++++++++++++++++++++++++++++++-----
 doc/bundle-windows.txt  |   43 ++++++++++++++++++++++++++++++++++++++++++-
 3 files changed, 99 insertions(+), 7 deletions(-)

diff --git a/doc/bundle-gnulinux.txt b/doc/bundle-gnulinux.txt
index c84047b..848aecb 100644
--- a/doc/bundle-gnulinux.txt
+++ b/doc/bundle-gnulinux.txt
@@ -65,6 +65,14 @@ Packages to install:
 	sudo apt-get update
 	sudo apt-get upgrade
 	sudo apt-get install git make python-m2crypto zip
+	sudo apt-get install python-setuptools python-crypto python-twisted python-argparse
+
+== Dependencies
+
+=== pyptlib
+
+	$ git clone https://git.torproject.org/user/asn/pyptlib.git
+	$ cd pyptlib && python setup.py install
 
 == Browser bundle
 
@@ -74,6 +82,10 @@ Clone and build the flashproxy source.
 	$ cd flashproxy
 	$ make dist
 
+Clone pyobfsproxy.
+
+	$ git clone https://git.torproject.org/user/asn/pyobfsproxy.git
+
 Within the VM, download the 32-bit or 64-bit obfsproxy bundle from
 https://www.torproject.org/projects/obfsproxy. The instructions below
 are for the 32-bit (i686) version.
@@ -97,20 +109,32 @@ Copy files into the bundle.
 	$ mkdir -p Docs/FlashProxy
 	$ cp ~/flashproxy/dist/flashproxy-client-VERSION/{doc/*,README,LICENSE,ChangeLog} Docs/FlashProxy
 
+	$ rm App/obfsproxy
+	$ cp -r ~/pyobfsproxy/{obfsproxy,obfsproxy.py} App
+	$ cp -r /usr/lib/python2.6/dist-packages/{Crypto,twisted} App
+	$ cp /usr/lib/pymodules/python2.6/argparse.pyc App
+
 Make the second half of Data/Tor/torrc look like this (i.e., keep
 the generic configuration, but change the obfsproxy-specific stuff).
 Basically you are concatenating the normal flashproxy-client torrc, but
-changing "./flashproxy-client" to "./App/flashproxy-client".
+changing "./flashproxy-client" to "./App/flashproxy-client". You are also
+changing the obfsproxy ClientTransportPlugin line to match what pyobfsproxy
+expects.
 
 UseBridges 1
 # The address and port are ignored by the client transport plugin.
 Bridge websocket 0.0.1.0:1
+
+# Keep the obfs2 bridges.
+...
+
 LearnCircuitBuildTimeout 0
 CircuitBuildTimeout 60
 # Change the second number here (9000) to the number of a port that can
 # receive connections from the Internet (the port for which you
 # configured port forwarding).
 ClientTransportPlugin websocket exec ./App/flashproxy-client --register :0 :9000
+ClientTransportPlugin obfs2 exec ./App/obfsproxy.py managed
 
 Re-zip the bundle. The "alpha" number should be independent of the
 obfsproxy bundle's alpha.
diff --git a/doc/bundle-macosx.txt b/doc/bundle-macosx.txt
index 8d33701..7bea830 100644
--- a/doc/bundle-macosx.txt
+++ b/doc/bundle-macosx.txt
@@ -1,8 +1,8 @@
 This document describes how to build a Tor Browser bundle for Mac OS X
-that is preconfigured to use the flash proxy transport. Because Mac have
-Python preinstalled, we include the Python source of the programs. An
-exception to this is the M2Crypto library, which has some compiled
-components.
+that is preconfigured to use the pyobfsproxy and flashproxy transports.
+Because Macs have Python preinstalled, we include the Python source of
+the programs. Exceptions to this are the M2Crypto and PyCrypto libraries,
+which have some compiled components.
 
 == Dependencies
 
@@ -41,6 +41,20 @@ http://pypi.python.org/packages/source/M/M2Crypto/M2Crypto-0.21.1.tar.gz.asc
 	$ mkdir -p ~/usr/lib/python2.7/site-packages/
 	$ python setup.py install --root=~/bundle --prefix=/usr
 
+=== PyCrypto
+
+http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/pycrypto-2.6.tar.gz
+http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/pycrypto-2.6.tar.gz.asc
+
+Extract and verify the tarball. Then run
+
+	$ python setup.py install --root=~/bundle --prefix=/usr
+
+=== pyptlib
+
+	$ git clone https://git.torproject.org/user/asn/pyptlib.git
+	$ cd pyptlib && python setup.py install --root=~/bundle --prefix=/usr
+
 == Browser bundle
 
 Run "make dist" in the flashproxy source directory.
@@ -64,20 +78,33 @@ Copy files into the bundle.
 	$ mkdir -p Contents/Resources/Docs/FlashProxy
 	$ cp ~/flashproxy/dist/flashproxy-client-VERSION/{doc/*,README,LICENSE,ChangeLog} Contents/Resources/Docs/FlashProxy
 
+	$ rm Contents/MacOs/obfsproxy
+	$ cp -r ~/pyobfsproxy/{obfsproxy,obfsproxy.py} Contents/MacOs
+	$ cp -r ~/bundle/usr/lib/python2.7/site-packages/{Crypto,pyptlib} Contents/MacOS
+	$ mkdir -p Contents/Resources/Docs/PyObfsproxy
+	$ cp ~/pyobfsproxy/{LICENSE,README} Contents/Resources/Docs/PyObfsproxy
+
 Make the second half of Library/Vidalia/torrc look like this (i.e., keep
 the generic configuration, but change the obfsproxy-specific stuff).
 Basically you are concatenating the normal flashproxy-client torrc, but
-changing "./flashproxy-client" to "flashproxy-client".
+changing "./flashproxy-client" to "flashproxy-client". You are also
+changing "--managed" to "managed" and "obfsproxy" to "obfsproxy.py" in
+the obfsproxy ClientTransportPlugin line.
 
 UseBridges 1
 # The address and port are ignored by the client transport plugin.
 Bridge websocket 0.0.1.0:1
+
+# Keep the obfs2 bridges.
+...
+
 LearnCircuitBuildTimeout 0
 CircuitBuildTimeout 60
 # Change the second number here (9000) to the number of a port that can
 # receive connections from the Internet (the port for which you
 # configured port forwarding).
 ClientTransportPlugin websocket exec flashproxy-client --register :0 :9000
+ClientTransportPlugin obfs2 exec obfsproxy.py managed
 
 Re-zip the bundle. The "alpha" number should be independent of the
 obfsproxy bundle's alpha.
diff --git a/doc/bundle-windows.txt b/doc/bundle-windows.txt
index 360ec1b..9e908b6 100644
--- a/doc/bundle-windows.txt
+++ b/doc/bundle-windows.txt
@@ -13,6 +13,38 @@ The sha256sum of the package I used was
 
 fe4807b4698ec89f82de7d85d32deaa4c772fc871537e31fb0fccf4473455cb8 7z920.msi
 
+=== PyCrypto
+
+http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/pycrypto-2.6.tar.gz
+http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/pycrypto-2.6.tar.gz.asc
+
+To install run:
+
+	$ python setup.py install
+
+=== zope.interface
+
+Required by Twisted. Visit https://pypi.python.org/pypi/zope.interface/4.0.3#downloads
+and download the appropriate egg for your version of Windows. Extract the egg and
+copy the EGG-INFO and zope directories to /cygdrive/c/Python27/Lib/site-packages.
+
+=== Twisted
+
+Download and run the appropriate installer from https://twistedmatrix.com/trac/wiki/Downloads.
+
+=== pyptlib
+
+Run:
+
+	$ git clone https://git.torproject.org/user/asn/pyptlib.git
+	$ cd pyptlib && python setup.py install
+
+== Bundle pyobfsproxy
+
+Use PyInstaller to bundle pyobfsproxy.
+
+	$ ../pyinstaller-2.0/pyinstaller.py obfsproxy.py
+
 == Browser bundle
 
 Run "make dist-exe" in the flashproxy source directory.
@@ -36,21 +68,30 @@ from being overwritten.
 	$ cp -n ~/flashproxy/dist/flashproxy-client-VERSION-win32/{*.pyd,*.dll,*.exe,*.manifest} App
 	$ mkdir -p Docs/FlashProxy
 	$ cp ~/flashproxy/dist/flashproxy-client-VERSION-win32/{doc/*,README,LICENSE,ChangeLog} Docs/FlashProxy
+	$ cp -r ~/pyobfsproxy/dist/obfsproxy/{*.pyd,*.dll,*.exe,*.manifest,eggs} App
+	$ mkdir -p Docs/PyObfsproxy
+	$ cp ~/pyobfsproxy/{LICENSE,README} Docs/PyObfsproxy
 
 Make the second half of Data/Tor/torrc look like this (i.e., keep
 the generic configuration, but change the obfsproxy-specific stuff).
 Basically you are concatenating the normal flashproxy-client torrc, but
-changing "./flashproxy-client" to "flashproxy-client".
+changing "./flashproxy-client" to "flashproxy-client". You are also
+changing "--managed" to "managed" in the obfsproxy ClientTransportPlugin line.
 
 UseBridges 1
 # The address and port are ignored by the client transport plugin.
 Bridge websocket 0.0.1.0:1
+
+# Keep the list of obfs2 bridges
+...
+
 LearnCircuitBuildTimeout 0
 CircuitBuildTimeout 60
 # Change the second number here (9000) to the number of a port that can
 # receive connections from the Internet (the port for which you
 # configured port forwarding).
 ClientTransportPlugin websocket exec flashproxy-client --register :0 :9000
+ClientTransportPlugin obfs2 exec obfsproxy managed
 
 Re-zip the bundle. The "alpha" number should be independent of the
 obfsproxy bundle's alpha. The 7zg program (as opposed to 7z) causes the

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits