Currently, am unable to get anything to work but am posting what I’ve been able to do in hopes maybe someone can further one of the attempts. In particular, if anyone more experienced than myself about compiling go, see what might be possible(See “**obfs4: Attempting to use Tor git source” **below).
This post describes 3 main attemptsobfsproxy installed from PyPi
obfsproxy installed from local source (cloned from github)
obfs4 from git.tor.org
The following describes in detail so my steps can be replicated…
Preparing your machine
Although probably not absolutely necessary for TW, I feel that it’s still a good idea to add the Tumbleweed Python and Python3 repos when building apps
zypper ar -f http://download.opensuse.org/repositories/devel:/languages:/python3/openSUSE_Tumbleweed/ TW_Python3 &&\
zypper ar -f http://download.opensuse.org/repositories/devel:/languages:/python/openSUSE_Tumbleweed/ TW_python2 &&\
zypper --gpg-auto-import-keys ref
For anyone who wants to try to build obfsproxy, the following dependenccies should be installed to support sources from PyPi, github and likely tor git.
zypper in make automake gcc python-pip python-devel libyaml-devel python3-pyaml python-pyaml python-setuptools git openvpn NetworkManager-openvpn
Attempt to build obfsproxy from PyPi following the likely path of the @OP
pip install obfsproxy
Unfortunately for me, I can’t even get as far as the @OP since I can’t even build successfully, the following is my error. As noted above, python-setuptools is installed, and I also tried upgrading to the package from PyPi (no change).
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-0z_c_4yp/PyCrypto/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('
');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-qrhklvfi-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-0z_c_4yp/PyCrypto/
Attempt to build obfsproxy locally using github source
git clone https://github.com/isislovecruft/obfsproxy.git
cd to the root of the cloned download (obfsproxy)
In an elevated console,
python setup.py install
But when attempting to run, the following error is thrown… Note that unlike installing from Pypi, the correct version of Python is used but still an error is thrown… This “pkg_resources.DistributionNotFound:” error might be due to a Python environmental variable that could be addressed by running the application in virtualenv, but I’m not able to spend more time on this today…
obfsproxy obfs3 socks 127.0.0.1:1050
Traceback (most recent call last):
File "/usr/bin/obfsproxy", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3038, in <module>
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3022, in _call_aside
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3051, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 659, in _build_master
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 672, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 857, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'constantly>=15.1' distribution was not found and is required by Twisted
**Attempt to build obfs4 **(obfourscator)
The obfsproxy project has not been maintained for over 3 years, but because it is a relatively simple application that is always built using current versions of components, it should still likely build and function securely.
But, the obfs4 project is one year newer and does support the older project’s obfuscation protocol so can be used as a substitute client, and additionally supports its own obfuscation protocol which can be implemented using modified Tor bridges (The older obfsproxy seems to require special VPN Servers which can then forward to Tor).
Maybe someone can identify what I’m overlooking.
The main problem is that to build a go application, you normally point “go build” at a master go script but I can’t identify any such thing. I’ve tried generally pointing to the “obfs4proxy” directory which is what the INSTALL instructions seem to suggest but not much to my surprise that fails.
I wonder if the github source and the gitweb.tor.org source are simply copies of each other (the directory structure is the same), they are different but independent of each other or if both are inter-related.
I’ve also tried pointing “go build” at a random go script, but the output error suggests that the “git.tor.org” namespace is hard-coded into the script so should be built using the network name as described in the stated Build statement and cannot be easily built pointing to local source.
zypper in go
obfs4: Attempting to use Tor git source
Based on the instructions from the github source (not git.tor.org), the following command should successfully build a new executable
go get git.torproject.org/pluggable-transports/obfs4.git/obfs4proxy
If the above command results in the following error, then insert “-insecure” in the above command after “get”
package git.torproject.org/pluggable-transports/obfs4.git/obfs4proxy: cannot download, git.torproject.org/pluggable-transports/obfs4 uses insecure protocol
For me, the above build command throws no error, but fails silently since I see no change. I expect that somewhere there should be a bin/obfsproxy which would then be copied or moved to somewhere in the system path (probably /bin/)
obfs4: Attempting to also use github source
As I described above,
I don’t see any certain benefit from downloading source from github, but I’m providing that here if anyonw thinks it’s helpful.
From wherever you want to locate your github source,
git clone https://github.com/Yawning/obfs4.git