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

ZeroNet Sharing Protocol Transport Abstraction #517

Closed
wants to merge 7 commits into from
Closed

ZeroNet Sharing Protocol Transport Abstraction #517

wants to merge 7 commits into from

Conversation

up4
Copy link

@up4 up4 commented Jul 22, 2016

Self-explanatory.

libzeronet will not support ipv4 (even through Tor exit nodes) nor BitTorrent trackers for hardened security and improved decentralization.

@codecov-io
Copy link

codecov-io commented Jul 22, 2016

Current coverage is 48.51% (diff: 50.00%)

Merging #517 into master will increase coverage by 0.05%

@@             master       #517   diff @@
==========================================
  Files            55         55          
  Lines          6579       6586     +7   
  Methods           0          0          
  Messages          0          0          
  Branches       1379       1382     +3   
==========================================
+ Hits           3188       3195     +7   
+ Misses         2993       2991     -2   
- Partials        398        400     +2   

Powered by Codecov. Last update 523a7d4...ff463b3

@radfish
Copy link
Contributor

radfish commented Jul 23, 2016

I think you's also need to change the ZeroAnnounce to request only onion peers from the Boostrapper.

As is, the CLI argument naming and semantics are a bit hard to understand for somebody who did not read the code. I would do something like this, instead:

--transports {tor,ipv4}
Select the set of transports over which the node will communicate with trackers and peers.
Default {tor,ipv4}.

Then it is all simple to understand and use, and straightforward to extend to other transports, like I2P. The only subtlety is that with --tor=always and ipv4 in --transports, clearnet (ipv4) trackers will be accessed via Tor exit nodes. Intuitively, to prevent that, simply exclude ipv4 from --transports list, in which case only trackers with Tor addresses would be accessed (as of now, this only includes the zero://*.onion super-nodes that run the Bootstrapper plugin). As far as peers go, the behaviour is obvious.

The tracker protocol (zero:// aka ZeroAnnounce) should not be mixed into this. Also, the peer protocols (PEX) should not be mixed into this. Both, because the same protocol can return peer addresses in multiple transports. These are orthogonal concerns.

@up4
Copy link
Author

up4 commented Jul 23, 2016

@radfish Also change ZeroAnnounce: I agree. I also agree with your --transports {tor,ipv4} proposal. But I would change "tor" for "onion" for "onion routing" so it excludes ipv4 via tor exit nodes. I would also change --pex-only to --zero-annouce only, however I am not 100% confident about this and I will need to read more on the whole ZeroAnnounce/Boostraper plugin bundle. But I think it is important to keep this pull request open to signify that a refactoring is in progress regarding that. Will be back with more in the next couple of days. Thanks.

@up4
Copy link
Author

up4 commented Jul 28, 2016

So, I'm just fixing the current implementation towards benchmarking the siteDownload command the same way it is implemented in libzeronet (pex_only, onion_only). I talked to @shortcutme about merging the "pex" and "announce" commands but I will need more time to think about it and propose something that is backward compatible and will also simplify the code (both commands should be handled by the same code).

@up4 up4 changed the title Add onion_only and pex_only options ZeroNet Sharing Protocol Transport Abstraction Jul 30, 2016
@up4
Copy link
Author

up4 commented Jul 30, 2016

I am closing and re-opening this in its own branch.

@up4 up4 closed this Jul 30, 2016
up4 added a commit to up4/ZeroNet that referenced this pull request Jul 30, 2016
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.

3 participants