[tor-bugs] #13040 [Obfsproxy]: Get bananaphone merged in obfsproxy

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Sep 2 17:02:18 UTC 2014


#13040: Get bananaphone merged in obfsproxy
---------------------------+-----------------
     Reporter:  asn        |      Owner:  asn
         Type:  task       |     Status:  new
     Priority:  normal     |  Milestone:
    Component:  Obfsproxy  |    Version:
   Resolution:             |   Keywords:
Actual Points:             |  Parent ID:
       Points:             |
---------------------------+-----------------

Comment (by asn):

 I tried `david-bananaphone` from
 `https://github.com/david415/obfsproxy.git` with the instructions from
 https://bananaphone.readthedocs.org/en/latest/ .

 I tried to run it in external mode, but it crashed with:
 {{{
 $ ./bin/obfsproxy --log-min-severity=info bananaphone --order=1
 --model=markov --corpus=/usr/share/dict/words
 --encoding_spec='words,sha1,4' --dest=127.0.0.1:3600 server 127.0.0.1:3601
 2014-09-02 19:40:48,092 [WARNING] Obfsproxy (version:
 obfsproxy-0.2.12-39-gea0e1b2) starting up.
 2014-09-02 19:40:48,092 [WARNING] Bananaphone: building encoder markov
 model
 2014-09-02 19:40:49,542 [ERROR] Unrecognized option: False
 Traceback (most recent call last):
   File "/home/user/obfsproxy/obfsproxy/pyobfsproxy.py", line 203, in run
     pyobfsproxy()
   File "/home/user/obfsproxy/obfsproxy/pyobfsproxy.py", line 185, in
 pyobfsproxy
     do_external_mode(args)
   File "/home/user/obfsproxy/obfsproxy/pyobfsproxy.py", line 101, in
 do_external_mode
     run_transport_setup(pt_config, args.name)
   File "/home/user/obfsproxy/obfsproxy/pyobfsproxy.py", line 150, in
 run_transport_setup
     transport_class['base'].setup(pt_config)
   File
 "/home/user/obfsproxy/obfsproxy/transports/bananaphone_transport.py", line
 90, in setup
     encoder_factory, decoder_factory =
 cls.get_codec_factories(cls.encodingSpec, cls.modelName, cls.corpus,
 cls.order, cls.abridged)
   File
 "/home/user/obfsproxy/obfsproxy/transports/bananaphone_transport.py", line
 36, in get_codec_factories
     encoder_factory = rh_build_encoder_factory(encodingSpec, modelName,
 *args)
   File "/home/user/obfsproxy/obfsproxy/transports/bananaphone.py", line
 501, in rh_build_encoder_factory
     encodeFactory = model( tokenize, hash, bits, *args )
   File "/home/user/obfsproxy/obfsproxy/transports/bananaphone.py", line
 416, in markov
     assert abridged == None, "Unrecognized option: %s" % ( abridged, )
 AssertionError: Unrecognized option: False
 Traceback (most recent call last):
   File "./bin/obfsproxy", line 16, in <module>
     run()
   File "/home/user/obfsproxy/obfsproxy/pyobfsproxy.py", line 203, in run
     pyobfsproxy()
   File "/home/user/obfsproxy/obfsproxy/pyobfsproxy.py", line 185, in
 pyobfsproxy
     do_external_mode(args)
   File "/home/user/obfsproxy/obfsproxy/pyobfsproxy.py", line 101, in
 do_external_mode
     run_transport_setup(pt_config, args.name)
   File "/home/user/obfsproxy/obfsproxy/pyobfsproxy.py", line 150, in
 run_transport_setup
     transport_class['base'].setup(pt_config)
   File
 "/home/user/obfsproxy/obfsproxy/transports/bananaphone_transport.py", line
 90, in setup
     encoder_factory, decoder_factory =
 cls.get_codec_factories(cls.encodingSpec, cls.modelName, cls.corpus,
 cls.order, cls.abridged)
   File
 "/home/user/obfsproxy/obfsproxy/transports/bananaphone_transport.py", line
 36, in get_codec_factories
     encoder_factory = rh_build_encoder_factory(encodingSpec, modelName,
 *args)
   File "/home/user/obfsproxy/obfsproxy/transports/bananaphone.py", line
 501, in rh_build_encoder_factory
     encodeFactory = model( tokenize, hash, bits, *args )
   File "/home/user/obfsproxy/obfsproxy/transports/bananaphone.py", line
 416, in markov
     assert abridged == None, "Unrecognized option: %s" % ( abridged, )
 AssertionError: Unrecognized option: False
 }}}

 Simply adding the `--abridged` switch didn't fix it. Didn't look into this
 more :(

 Also, bananaphone in managed mode crashes both for client and server.  I
 just get the notorious
 {{{
 Sep 02 19:55:11.000 [warn] The communication stream of managed proxy
 '/usr/local/bin/obfsproxy' is 'closed'. Most probably the managed proxy
 stopped running. This might be a bug of the managed proxy, a bug of Tor,
 or a misconfiguration. Please enable logging on your managed proxy and
 check the logs for errors.
 }}}
 and in the obfs logs I see:
 {{{
 2014-09-02 19:55:09,889 [WARNING] Obfsproxy (version: 0.2.5) starting up.
 2014-09-02 19:55:09,889 [INFO] Entering client managed-mode.
 2014-09-02 19:55:09,890 [ERROR] type object 'BananaphoneClient' has no
 attribute 'encodingSpec'
 Traceback (most recent call last):
   File "build/bdist.linux-x86_64/egg/obfsproxy/pyobfsproxy.py", line 203,
 in run
     pyobfsproxy()
   File "build/bdist.linux-x86_64/egg/obfsproxy/pyobfsproxy.py", line 175,
 in pyobfsproxy
     do_managed_mode()
   File "build/bdist.linux-x86_64/egg/obfsproxy/pyobfsproxy.py", line 78,
 in do_managed_mode
     managed_client.do_managed_client()
   File "build/bdist.linux-x86_64/egg/obfsproxy/managed/client.py", line
 58, in do_managed_client
     transport_class.setup(pt_config)
   File "build/bdist.linux-
 x86_64/egg/obfsproxy/transports/bananaphone_transport.py", line 90, in
 setup
     encoder_factory, decoder_factory =
 cls.get_codec_factories(cls.encodingSpec, cls.modelName, cls.corpus,
 cls.order, cls.abridged)
 AttributeError: type object 'BananaphoneClient' has no attribute
 'encodingSpec'
 }}}

 I wonder what's going on, maybe the merge was not clean? Maybe you want to
 rebase instead? Why is obfsproxy still version 0.2.5 there? It should be
 0.2.12.

 Also, `setup()` is called on startup. When should `encodingSpec` be
 init'ed?

 Sorry for not being able to look at this deeper!

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


More information about the tor-bugs mailing list