Node icon indicating copy to clipboard operation
Node copied to clipboard

UI Setup for country_code for ExitService to modify it on Run-Time

Open czarte opened this issue 1 year ago • 1 comments

We want to create UI Setup which allows UI to set desired country_code for ExitService part of computing Route for users requests. This Setup should be able to set the desired country_code on Run-Time.

Create function to harvest all country codes from neighborhood DB and send them to UI allow user select between them.

masq_lib/src/shared_schema.rs create fn exit_location_arg() add .arg(exit_location_arg()) to shared_app.head

This cartd contains other two cards MASQ-Project/Node#469 MASQ-Project/Node#468

czarte avatar Jul 15 '24 15:07 czarte

Data-flow chart of communication between Node and UI about Exit Location. This Exit Location system is non-blocking, so it will always serve the User data, most of the time, from desired country, but in edge case it will fall back to standard routing. This system gives user opportunity to cancel consuming services in case all exit nodes from desired country disconnects from the network.

From Node to UI we will send JSON message on every update of the Neighborhood DB. This message is described in provided figure in this comment. Contains basic information about Nodes and information about wheather the Node serve as Exit Node. This message could be enriched in the future by more informations about the node, that will be desired by UI.

  • public key
  • version
  • country_code
  • exit_service boolean indicates if Node can serve as Exit Node
  • unreachable_hosts

From UI is possible to send message contains objects with arrays of ‘country_codes’ and the priority of particular selection. This priorities of countries are going into routing engine.

  • country_codes - array of objects containing
    • country_codes (array of strings of country_codes)
    • and its priority

After request is served, Node responses to the browser with TLS connection and to the Electron app (UI) is sent third message. This message informs about Proxy services, contains public keys and country_codes of Nodes serving as exit Nodes.

  • array of all established routes, each contains array of public keys of all nodes in particular route

So UI can inform user in edge case, when Exit Node disconnects from the network. This would be probably rare edge case, because if other Node with desired country_code is present in the Patch, will take over the serving Exit Service for current user. Electron app can control weather browser should send the HTTP Request trhu established route.

Image

czarte avatar Aug 15 '24 16:08 czarte

@kauri-hero I moved this card to Done because it's a for-reference-only card. There are no tasks on it; it just contains two other cards that do have tasks and are both in development.

If you think it should go somewhere other than Done, feel free to move it; but I'm pretty sure it's not Awaiting Development.

dnwiebe avatar Oct 29 '24 12:10 dnwiebe