Commit d1242c90 authored by Ximin Luo's avatar Ximin Luo
Browse files

Merge branch 'obfs-flash'

Conflicts:
	Makefile
	bundle-torrc-windows
parents a072dd20 d4632105
Loading
Loading
Loading
Loading
+35 −3
Original line number Diff line number Diff line
BUNDLE_VERSION = 2.4.17
BUNDLE_RELEASE = beta-2
PT_BUNDLE_RELEASE = pt3
PT_BUNDLE_RELEASE = obfs-flash1

PYPTLIB_TAG = pyptlib-0.0.4
PYPTLIB_TAG = 471f02af7bc246d27088d41c90231a166a2b4f60
OBFSPROXY_TAG = obfsproxy-0.2.3
FLASHPROXY_TAG = 1.3
FLASHPROXY_TAG = fd692bd26e6db7ed86dd24615904970da20768c8
OBFS_FLASH_TAG = 6ac8b1c0db7366a70bcc9734c00ec2e19b8806e9
TXSOCKSX_TAG = 1.13.0.0

SRCDIR = $(dir $(lastword $(MAKEFILE_LIST)))
MACOSX_BUNDLE_ROOT = $(HOME)/bundle-root
@@ -20,6 +22,11 @@ FLASHPROXY_HOME = $(SRCDIR)/../flashproxy
FLASHPROXY_WORK = $(workdir)/flashproxy
FLASHPROXY_DISTNAME = flashproxy-client
FLASHPROXY_DIST = $(FLASHPROXY_WORK)/dist/$(FLASHPROXY_DISTNAME)
OBFS_FLASH_HOME = $(SRCDIR)/../obfs-flash
OBFS_FLASH_WORK = $(workdir)/obfs-flash
OBFS_FLASH_DIST_WIN32 = $(OBFS_FLASH_WORK)/dist
TXSOCKSX_HOME = $(SRCDIR)/../txsocksx
TXSOCKSX_WORK = $(workdir)/txsocksx

PYTHON = python
P7Z = "/cygdrive/c/Program Files (x86)/7-Zip/7z"
@@ -111,9 +118,15 @@ $(PT_BUNDLE_WINDOWS):
	mkdir -p "$(tbbdir)"/Docs/FlashProxy
	cp "$(FLASHPROXY_DIST)"/{doc/*,README,LICENSE,ChangeLog} "$(tbbdir)"/Docs/FlashProxy

	git clone "$(OBFS_FLASH_HOME)" "$(OBFS_FLASH_WORK)"
	cd "$(OBFS_FLASH_WORK)" && git checkout --detach "$(OBFS_FLASH_TAG)"
	cd "$(OBFS_FLASH_WORK)" && PYTHONPATH="../pyptlib/build" $(PYTHON) setup.py clean --all py2exe
	cp -Rn "$(OBFS_FLASH_DIST_WIN32)"/{*.pyd,*.dll,*.exe,*.zip} "$(tbbdir)"/App

	mkdir -p "$(tbbdir)"/Docs
	cp -RL $(SRCDIR)/doc "$(tbbdir)"/Docs/PluggableTransports


	cat $(SRCDIR)/bundle-torrc-windows >> "$(tbbdir)"/Data/Tor/torrc

	# 7zg (as opposed to 7z) causes the self-extractor to show a GUI.
@@ -154,6 +167,14 @@ $(PT_BUNDLE_MACOSX_I686):
	cp "$(FLASHPROXY_DIST)"/{doc/*,README,LICENSE,ChangeLog} "$(tbbdir)"/Contents/Resources/Docs/FlashProxy
	cp -RL "$(MACOSX_BUNDLE_ROOT)"/usr/lib/python2.7/site-packages/M2Crypto "$(tbbdir)"/Contents/MacOS

	git clone "$(OBFS_FLASH_HOME)" "$(OBFS_FLASH_WORK)"
	cd "$(OBFS_FLASH_WORK)" && git checkout --detach "$(OBFS_FLASH_TAG)"
	cp "$(OBFS_FLASH_WORK)"/obfs-flash-client "$(tbbdir)"/Contents/MacOS
	cp macosx/obfs-flash-client-env.sh "$(tbbdir)"/Contents/MacOS

	cp -RL "$(MACOSX_BUNDLE_ROOT)"/usr/lib/python2.7/site-packages/txsocksx "$(tbbdir)"/Contents/MacOS
	cp -RL "$(MACOSX_BUNDLE_ROOT)"/usr/lib/python2.7/site-packages/{parsley.py,ometa,terml} "$(tbbdir)"/Contents/MacOS

	find "$(tbbdir)"/Contents/MacOS -name '*.pyc' -print0 | xargs -0 rm -f

	mkdir -p "$(tbbdir)"/Contents/Resources/Docs
@@ -198,6 +219,17 @@ $(PT_BUNDLE_GNULINUX_I686) $(PT_BUNDLE_GNULINUX_X86_64):
	cp "$(FLASHPROXY_DIST)"/{doc/*,README,LICENSE,ChangeLog} "$(tbbdir)"/Docs/FlashProxy
	cp -RL /usr/lib/python2.6/dist-packages/M2Crypto "$(tbbdir)"/App

	git clone "$(OBFS_FLASH_HOME)" "$(OBFS_FLASH_WORK)"
	cd "$(OBFS_FLASH_WORK)" && git checkout --detach "$(OBFS_FLASH_TAG)"
	cp "$(OBFS_FLASH_WORK)"/obfs-flash-client "$(tbbdir)"/App
	cp gnulinux/obfs-flash-client-env.sh "$(tbbdir)"/App

	git clone "$(TXSOCKSX_HOME)" "$(TXSOCKSX_WORK)"
	cd "$(TXSOCKSX_WORK)" && git checkout --detach "$(TXSOCKSX_TAG)"
	cd "$(TXSOCKSX_WORK)" && $(PYTHON) setup.py clean --all build --build-lib build
	cp -RL "$(TXSOCKSX_WORK)"/build/txsocksx "$(tbbdir)"/App
	cp -RL /usr/lib/python2.6/dist-packages/{parsley.py,ometa,terml} "$(tbbdir)"/App

	find "$(tbbdir)"/App -name '*.pyc' -print0 | xargs -0 rm -f

	mkdir -p "$(tbbdir)"/Docs
+14 −0
Original line number Diff line number Diff line
@@ -56,10 +56,18 @@ Choose "Install" when it boots. Here are settings:
	Software select: uncheck all but "Standard system utilities"
	GRUB on MBR: yes

Enable wheezy-backports. python-parsley, a dependency of txsocksx, is
available in wheezy-backports but not in wheezy. Add the line
	deb http://ftp.us.debian.org/debian wheezy-backports main
to /etc/apt/sources.list. You can change "ftp.us" to a different mirror.
See http://backports.debian.org/Instructions/.

Packages to install:

	$ sudo apt-get update
	$ sudo apt-get install --no-install-recommends git make zip
	$ sudo apt-get install --no-install-recommends python-argparse python-crypto python-m2crypto python-setuptools python-twisted
	$ sudo apt-get install --no-install-recommends python-parsley

Get checkouts of pluggable transports and this bundle repository.

@@ -68,6 +76,11 @@ Get checkouts of pluggable transports and this bundle repository.
	$ git clone https://git.torproject.org/pluggable-transports/pyptlib.git
	$ git clone https://git.torproject.org/pluggable-transports/obfsproxy.git
	$ git clone https://git.torproject.org/flashproxy.git
	$ git clone https://git.torproject.org/pluggable-transports/obfs-flash.git

Get dependencies not available in Debian wheezy:

	$ git clone https://github.com/habnabit/txsocksx

== Browser bundle

@@ -82,6 +95,7 @@ Update pluggable transport checkouts.
	$ cd ~/pyptlib && git pull
	$ cd ~/obfsproxy && git pull
	$ cd ~/flashproxy && git pull
	$ cd ~/obfs-flash && git pull

Edit the top of Makefile to set the version numbers you want to use.
	BUNDLE_VERSION = ...
+24 −0
Original line number Diff line number Diff line
@@ -62,6 +62,30 @@ ddaf4b0a618335a32b6664d4ae038a1de8fbada3b25033f9021510ed2b3941a4 argparse-1.2.1

Extract the tarball into your bundle directory.

=== Parsley

This is a dependency of txsocksx.

https://pypi.python.org/pypi/Parsley
https://pypi.python.org/packages/source/P/Parsley/Parsley-1.2.tar.gz

	$ python setup.py install --root=~/bundle --prefix=/usr

The sha256sum of the package I used was

50d30cee70770fd44db7cea421cb2fb75af247c3a1cd54885c06b30a7c85dd23  Parsley-1.2.tar.gz

=== txsocksx

This is a dependency of obfs-flash-client.

https://pypi.python.org/pypi/txsocksx
https://pypi.python.org/packages/source/t/txsocksx/txsocksx-1.13.0.0.tar.gz
https://pypi.python.org/packages/source/t/txsocksx/txsocksx-1.13.0.0.tar.gz.asc

	$ gpg --verify txsocksx-1.13.0.0.tar.gz.asc
	$ python setup.py install --root=~/bundle --prefix=/usr

=== Pluggable transport repos

Get checkouts of pluggable transports and this bundle repository.
+11 −6
Original line number Diff line number Diff line

UseBridges 1
# The address and port are ignored by the client transport plugin.
Bridge flashproxy 0.0.1.0:1
# This intermediate port is the connection between obfsproxy and
# flashproxy-client. obfs-flash causes obfsproxy to connect to this port as if
# it were a remote bridge, when it is actually connecting back to obfs-flash.
# obfs-flash forwards the connection to flashproxy-client (prepending a SOCKS
# negotiation), and flashproxy-client takes it from there.
Bridge obfs3_flashproxy 127.0.0.1:2334

Bridge obfs2 109.163.233.198:1051
Bridge obfs2 83.212.100.216:47870
@@ -19,8 +23,9 @@ Bridge obfs3 83.212.101.2:42782

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 flashproxy exec ./App/flashproxy-client --register :0 :9000
# Change the last port number here (:9000) to the number of a port that can
# receive connections from the Internet (the port for which you configured port
# forwarding). The other port number must match the one used in the
# obfs3_flashproxy Bridge line above.
ClientTransportPlugin obfs3_flashproxy exec ./App/obfs-flash-client-env.sh --fp-arg=--register 2334 :9000
ClientTransportPlugin obfs2,obfs3 exec ./App/obfsproxy.bin managed
+11 −6
Original line number Diff line number Diff line

UseBridges 1
# The address and port are ignored by the client transport plugin.
Bridge flashproxy 0.0.1.0:1
# This intermediate port is the connection between obfsproxy and
# flashproxy-client. obfs-flash causes obfsproxy to connect to this port as if
# it were a remote bridge, when it is actually connecting back to obfs-flash.
# obfs-flash forwards the connection to flashproxy-client (prepending a SOCKS
# negotiation), and flashproxy-client takes it from there.
Bridge obfs3_flashproxy 127.0.0.1:2334

Bridge obfs2 109.163.233.198:1051
Bridge obfs2 83.212.100.216:47870
@@ -19,8 +23,9 @@ Bridge obfs3 83.212.101.2:42782

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 flashproxy exec flashproxy-client --register :0 :9000
# Change the last port number here (:9000) to the number of a port that can
# receive connections from the Internet (the port for which you configured port
# forwarding). The other port number must match the one used in the
# obfs3_flashproxy Bridge line above.
ClientTransportPlugin obfs3_flashproxy exec obfs-flash-client-env.sh --fp-arg=--register 2334 :9000
ClientTransportPlugin obfs2,obfs3 exec obfsproxy.bin managed
Loading