[tor-bugs] #7283 [Flashproxy]: flashproxy-client Windows .exe packages

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Fri Nov 2 00:02:08 UTC 2012


#7283: flashproxy-client Windows .exe packages
------------------------+---------------------------------------------------
 Reporter:  dcf         |          Owner:  aallai
     Type:  task        |         Status:  new   
 Priority:  normal      |      Milestone:        
Component:  Flashproxy  |        Version:        
 Keywords:              |         Parent:  #7166 
   Points:              |   Actualpoints:        
------------------------+---------------------------------------------------

Comment(by aallai):

 Steps taken to run the Flashproxy client on Windows:

 Here is what I had to do to get the client running. This was done using
 Windows
 7 Home Premium 64-bit on a !VirtualBox VM. For anything requiring a
 command
 line I used Windows !PowerShell, which is decent, you get cp, mv, ls, rm,
 the basics.
 The Windows Git installation also comes with a shell, Git Bash, which I
 haven't used
 but it could be another option.

 1. Install Python. It is a straightforward Windows Installer, it doesn't
 add itself to your PATH though, which is needed to run it from a
 shell. I set the path by going into Control Panel > System and Security >
 System > Advanced System Settings > Environment Variables.

 2. Install OpenSSL. I downloaded a Windows binary from here:
 http://slproweb.com/products/Win32OpenSSL.html, a page
 recommended by the OpenSSL website. I also had to download
 Visual C++ Redistributables from the same page, which I assume
 is some sort of libc. They both came as Windows installers. I grabbed
 version 1.0.1c.

 For actual deployment, we might want to compile it ourselves, so
 we can set compile-time options. As a motivating example, the binary
 that I have still looks for certificates in /usr/local/ssl, which is
 unlikely
 to exist on Windows.

 3. Install M2Crypto.  There are several installers at
 http://chandlerproject.org/Projects/MeTooCrypto. SWIG doesn't seem
 to be required for these installers to work.

 4. Download pyinstaller at http://www.pyinstaller.org. The zip is better
 since Windows can't untar stuff. You can just extract this anywhere, no
 installation needed since it is just a python script.

 5. Get an appropriate TBB set up, one that supports pluggable transports.
 The simplest way to do this is to get the Obfsproxy bundle at
 https://www.torproject.org/projects/obfsproxy.

 6. Get the flashproxy code.

 7. Now you should be able to bundle the executables. To do this
 just run
 pyinstaller.py --onedir  <python script to bundle>
 This will create a .spec file containing build instructions for
 pyinstaller, which you can customize. It also creates a build directory
 with log files and a dist directory with the executable and DLLs.

 The onedir option conveniently puts everything in one directory. I
 also tried the onefile option, but that doesn't work so well for us, since
 the one file is actually a self-extracting archive, which creates a
 temporary
 directory to run the executable in, which doesn't contain the registration
 methods.

 The multipackage function described in the manual is a bit iffy, it
 packages all the right dependencies but only creates one executable.
 It looks pretty easy to get working by fiddling around with the spec files
 though.
 To simulate it I simply packaged the three executables separately using
 --onedir, then I copied everything into a single directory. That way there
 is
 no duplication of common DLLs like the python runtime.

 8. Some things need to be renamed.

 M2Crypto.!__m2crypto.pyd -> !__m2crypto.pyd. The naming conventions
 M2Crypto
 uses give pyinstaller-bundled EXEs some trouble.

 flashproxy-reg-*.exe -> flashproxy-reg-*, to match what flashproxy-client
 tries to run.

 You might want to keep flashproxy-client.exe ending in .exe, otherwise if
 you
 try and run it from a shell Windows won't know what to do with it.
 Alternatively
 you can rename it and run it from the Python interpreter using subprocess.

 9. Configure port forwarding. This will vary depending on your hardware.

 10. Now you should be able to run flashproxy-client. In the Vidalia
 advanced
 settings change the torrc to the one included with the flashproxy code and
 restart Tor.

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/7283#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list