Code Monkey home page Code Monkey logo

onion-routing_p2p_qt's Introduction

voidphone-onion-qt

See reports for more documentation.

Installation & Building

Testing

Unit tests

The code contains Qt Unit tests. To build tests uncomment line 3 in onion.pro and build again. Then run oniontest from the build folder. All testing classes are contained in the tests subdirectory.

Marco/Polo

This test replaces real RPS and Onion Auth apis with mock ones, using the commandline parameters --mock-auth and --mock-peer. A peer started with --marco will build a tunnel to and start sending "marco" messages. Peers started with --polo, reply with "polo" upon receiving a "marco" message. The marco peer terminates the circuit after getting 100 responses. This successfully tests tunnel building, extending, destroying and data transfer.

Deployment (windows only)

On Windows, Qt Creator keeps Qt dlls outside the build folder. Thus the executable on its own won't start without additional work. Either include the Qt binary paths in your path (not recommended) or use the Qt deployment tool:

  1. execute Qt <version> for Desktop item from your start menu. It opens a shell setup for the respective toolkit
  2. cd into your build folder
  3. execute windeployqt.exe onion.exe

Setup

In the code directory there are bootstrapping configs that start four nodes on localhost, with their P2P modules listening on ports 10001-10004. Now we have to start 3 of them as listening peers (--polo), and give them a mock peer (so they don't pollute log files that they cannot connect to the RPS api). The fourth peer needs the intermediate hops as mock peers, and the remaining one as target, thus he is started like onion --mock-auth --mock-peer 127.0.0.1:10002 --mock-peer 127.0.0.1:10003 --polo --marco 127.0.0.1:10004 -c marcopolo1.conf.

You can start the test with four terminals and lots of typing, or use the python script python marcopolo.py <path to qt executable>. The script redirects the log of the peers to log_i.txt. If you want to see data flowing through the hops, add a -v or --verbose flag to their commandline, e.g. by editing the args array in the python file.

onion-routing_p2p_qt's People

Contributors

brandneb avatar rohitpanda avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.