Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor tunnel #1188

Merged
merged 12 commits into from
Feb 3, 2015
Merged

Refactor tunnel #1188

merged 12 commits into from
Feb 3, 2015

Conversation

NielsZeilemaker
Copy link
Contributor

Supercedes #1117, rebased on devel fixes hidden tunnels

@tribler-ci
Copy link
Contributor

Merged build triggered.

@tribler-ci
Copy link
Contributor

Merged build started.

@tribler-ci
Copy link
Contributor

Merged build finished.

@tribler-ci
Copy link
Contributor

Test FAILed.
Refer to this link for build results: http://jenkins.tribler.org/job/GH_Tribler_pull-request-tester_devel/3320/

@NielsZeilemaker
Copy link
Contributor Author

@whirm the new tunnel crypto depens on cryptography. It's a package that exposes the gcm mode of openssl.

@tribler-ci
Copy link
Contributor

Merged build triggered.

@tribler-ci
Copy link
Contributor

Merged build started.

@tribler-ci
Copy link
Contributor

Merged build triggered.

@tribler-ci
Copy link
Contributor

Merged build started.

@tribler-ci
Copy link
Contributor

Merged build finished.

@tribler-ci
Copy link
Contributor

Test FAILed.
Refer to this link for build results: http://jenkins.tribler.org/job/GH_Tribler_pull-request-tester_devel/3321/

@tribler-ci
Copy link
Contributor

Merged build finished.

@tribler-ci
Copy link
Contributor

Test FAILed.
Refer to this link for build results: http://jenkins.tribler.org/job/GH_Tribler_pull-request-tester_devel/3322/

@@ -15,7 +15,7 @@ We make use of submodules, so remember using the --recursive argument when cloni

### Debian/Ubuntu/Mint
```bash
sudo apt-get install libav-tools libjs-excanvas libjs-mootools libx11-6 python-apsw python-cherrypy3 python-crypto python-feedparser python-gmpy python-libtorrent python-m2crypto python-netifaces python-pil python-pyasn1 python-requests python-twisted python-wxgtk2.8 python2.7 vlc
sudo apt-get install libav-tools libjs-excanvas libjs-mootools libx11-6 python-apsw python-cherrypy3 python-feedparser python-gmpy python-libtorrent python-m2crypto python-netifaces python-pil python-requests python-twisted python-wxgtk2.8 python2.7 vlc
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NielsZeilemaker could you add python-cryptography? also in debian/control

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it's python-crypto.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LipuFei, its python-cryptography python-crypto was used before. I'll add the package

@tribler-ci
Copy link
Contributor

Merged build triggered.

@tribler-ci
Copy link
Contributor

Merged build started.

@whirm
Copy link
Contributor

whirm commented Feb 2, 2015

@NielsZeilemaker I've updated the gorillas, let's see how it goes.

@tribler-ci
Copy link
Contributor

Merged build finished.

@tribler-ci
Copy link
Contributor

Test FAILed.
Refer to this link for build results: http://jenkins.tribler.org/job/GH_Tribler_pull-request-tester_devel/3323/

@whirm
Copy link
Contributor

whirm commented Feb 2, 2015

retest this please

@whirm
Copy link
Contributor

whirm commented Feb 2, 2015

seems that it got executed while I was installing the package :)

@synctext
Copy link
Member

synctext commented Feb 2, 2015

Almost :-)

Traceback (most recent call last):
  File "/usr/lib/python2.7/unittest/case.py", line 329, in run
    testMethod()
  File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 411, in loadTestsFromName
    addr.filename, addr.module)
  File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/home/jenkins/workspace/GH_Tribler_pull-request-tester_devel/tribler/Tribler/Test/test_tunnel_community.py", line 16, in <module>
    from Tribler.community.tunnel.tunnel_community import TunnelSettings
  File "/home/jenkins/workspace/GH_Tribler_pull-request-tester_devel/tribler/Tribler/community/tunnel/tunnel_community.py", line 27, in <module>
    from Tribler.community.tunnel.crypto.tunnelcrypto import TunnelCrypto, CryptoException
  File "/home/jenkins/workspace/GH_Tribler_pull-request-tester_devel/tribler/Tribler/community/tunnel/crypto/tunnelcrypto.py", line 3, in <module>
    from cryptowrapper import crypto_box_beforenm, crypto_auth, crypto_auth_verify, Cipher, algorithms, modes, HKDFExpand, hashes, default_backend
  File "/home/jenkins/workspace/GH_Tribler_pull-request-tester_devel/tribler/Tribler/community/tunnel/crypto/cryptowrapper.py", line 14, in <module>
    from cryptography.hazmat.backends import default_backend
ImportError: No module named cryptography.hazmat.backends

@tribler-ci
Copy link
Contributor

Merged build triggered.

@tribler-ci
Copy link
Contributor

Merged build started.

@tribler-ci
Copy link
Contributor

Merged build finished.

@tribler-ci
Copy link
Contributor

Test FAILed.
Refer to this link for build results: http://jenkins.tribler.org/job/GH_Tribler_pull-request-tester_devel/3324/

@synctext
Copy link
Member

synctext commented Feb 2, 2015

Ai. Assert:
http://jenkins.tribler.org/job/GH_Tribler_pull-request-tester_devel/3324/artifact/output//Screenshot-35.png
Multiple Tracebacks

DEBUG   1422873500.43        dispersy:778   ignore vote for ('95.211.198.142', 49165) from ('95.211.198.142', 44738) (voter is within our LAN)
DEBUG   1422873500.43       community:2640  received introduction to {95.211.198.142:22872} from {95.211.198.142:44738}
ERROR   1422873500.43       community:2184  exception during check_callback for dispersy-puncture
Traceback (most recent call last):
  File "/home/jenkins/workspace/GH_Tribler_pull-request-tester_devel/tribler/Tribler/dispersy/community.py", line 2182, in on_messages
    possibly_messages = list(meta.check_callback(messages))
  File "/home/jenkins/workspace/GH_Tribler_pull-request-tester_devel/tribler/Tribler/dispersy/community.py", line 2865, in check_puncture
    identifiers_seen[message.payload.identifer] = message.candidate
AttributeError: 'Implementation' object has no attribute 'identifer'
DEBUG   1422873500.43       community:2011  got 1 incoming packets
INFO    1422873504.39 tunnel_community:420   could not create circuit, no available hops.
DEBUG   1422873504.39   SocketHandler:503   SocketHandler: Got UDP data ('95.211.198.142', 49165) len 166
DEBUG   1422873504.39        endpoint:72                              cell <-  95.211.198.142:49165  166 bytes
DEBUG   1422873504.39       community:2011  got 1 incoming packets
DEBUG   1422873504.39       community:2213  in... 1 cell messages from {95.211.198.142:49165}
DEBUG   1422873504.39 tunnel_community:751   Got create (4076263781) from ('95.211.198.142', 49165)
ERROR   1422873504.39        dispersy:1723  exception during handle_callback for cell
Traceback (most recent call last):
  File "/home/jenkins/workspace/GH_Tribler_pull-request-tester_devel/tribler/Tribler/dispersy/dispersy.py", line 1718, in _update
    messages[0].handle_callback(messages)
  File "/home/jenkins/workspace/GH_Tribler_pull-request-tester_devel/tribler/Tribler/community/tunnel/tunnel_community.py", line 766, in on_cell
    self.dispersy.on_incoming_packets([(message.candidate, TunnelConversion.convert_from_cell(packet))], False, source=u"circuit_%d" % circuit_id)
TypeError: on_incoming_packets() got an unexpected keyword argument 'source'
DEBUG   1422873504.39       community:2011  got 1 incoming packets
DEBUG   1422873504.39       community:2213  in... 1 cell messages from {95.211.198.142:49165}
DEBUG   1422873504.39 tunnel_community:751   Got create (3294018314) from ('95.211.198.142', 49165)

@NielsZeilemaker
Copy link
Contributor Author

I guess it needs a new dispersy pointer, let me have a look to see if I can push one in.

@NielsZeilemaker
Copy link
Contributor Author

I'll have to do it tonight as I don't have access to my laptop, alternatively @whirm can you send me a pull request with the new dispersy pointer?

@synctext
Copy link
Member

synctext commented Feb 2, 2015

@whirm please help out Niels with that pull request.
If it passes then master student @rjruigrok can start testing matters full-time.

@NielsZeilemaker
Copy link
Contributor Author

That's the old version of libnacl, update your submodule recursively.

Conflicts:
	Tribler/dispersy
DH ntor handshake + GCM for encrypting packets.

Hidden services are completely broken... Maybe even need of a redesign
as the new crypto cannot provide a hybrid_encryption using only the key
of the destination.
@tribler-ci
Copy link
Contributor

Build triggered.

@tribler-ci
Copy link
Contributor

Build started.

@tribler-ci
Copy link
Contributor

Merged build triggered.

@tribler-ci
Copy link
Contributor

Merged build started.

@NielsZeilemaker
Copy link
Contributor Author

@whirm it's ready

@rjruigrok have a look at the community, I would pay special attention to the announce stuff. I'm not sure what will happen if a introduction_point of a seeder closes. Will the seeder open a new tunnel?, are you sure this will always happen? Maybe add a periodic task which creates a new introduction_point after X seconds (similar to the dht_lookup which is scheduled every 60s).

@tribler-ci
Copy link
Contributor

Build finished.

@tribler-ci
Copy link
Contributor

Test PASSed.
Refer to this link for build results: http://jenkins.tribler.org/job/GH_Tribler_pull-request-tester_devel/3340/

@tribler-ci
Copy link
Contributor

Merged build finished.

@tribler-ci
Copy link
Contributor

Test FAILed.
Refer to this link for build results: http://jenkins.tribler.org/job/GH_Tribler_pull-request-tester_devel/3343/

@tribler-ci
Copy link
Contributor

Merged build triggered.

@tribler-ci
Copy link
Contributor

Merged build started.

@tribler-ci
Copy link
Contributor

Merged build finished.

@tribler-ci
Copy link
Contributor

Test PASSed.
Refer to this link for build results: http://jenkins.tribler.org/job/GH_Tribler_pull-request-tester_devel/3345/

whirm added a commit that referenced this pull request Feb 3, 2015
@whirm whirm merged commit 006a008 into Tribler:devel Feb 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants