flashproxy-client fails to communicate with connected browser proxies when logging is disabled
This is reproducible 100% of the time on my Windows XP machine, both with plain flashproxy and obfs-flash-client. In all cases, Process Explorer shows that flashproxy-client.exe has several established incoming TCP connections on port 9000.
Failing cases:
Bridge flashproxy 127.0.0.1:9001
ClientTransportPlugin flashproxy exec App\flashproxy-client --register 127.0.0.1:9001 :9000
Bridge obfs3_flashproxy 127.0.0.1:2334
ClientTransportPlugin obfs3_flashproxy exec App\obfs-flash-client --fp-arg=--register 2334 :9000
Here, Vidalia hangs on "Establishing an encrypted directory connection". The Tor message log sometimes hangs at "Bootstrapped 10%: Finishing handshake with directory server" and sometimes at "Bootstrapped 15%: Establishing an encrypted directory connection", then eventually fails with "1 connections died in state handshaking (TLS) with SSLv2/v3 read server hello A in HANDSHAKE" or "... with SSL state SSLv3 read finished A in HANDSHAKE".
Success cases (removing --unsafe-logging
has the same effect):
Bridge flashproxy 127.0.0.1:9001
ClientTransportPlugin flashproxy exec App\flashproxy-client --register -l flashproxy.log 127.0.0.1:9001 :9000
Bridge obfs3_flashproxy 127.0.0.1:2334
ClientTransportPlugin obfs3_flashproxy exec App\obfs-flash-client --fp-arg=--register --fp-arg=-l --fp-arg=flashproxy.log 2334 :9000
This is probably some Python buffering issue. I am going to try to build flashproxy-client with py2exe's unbuffered IO option and see what happens. Possibly also try replacing cases of readlines() into a while True: readline() loop (as man python
, section -u
suggests).
I am testing using the PTBB I built myself here: https://people.torproject.org/~infinity0/bin/ I built this on WINE, but I've also dropped into it a flashproxy-client.exe / py2exe-flashproxy.zip built directly on the Windows XP machine I am using, and it shows the same behaviour. In both cases I am using flashproxy from commit b9baa31c from my github.