DRAFT EXPERIMENT: Multi protocol client / MASQUE integration#11140
Draft
DRAFT EXPERIMENT: Multi protocol client / MASQUE integration#11140
Conversation
… in MozillaVPN client - add protocolType to Server model - add protocolType to InterfaceConfig - add masqueutils to daemon and to linux - add activate/deactivate/checkStatus functions for masque on linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Caution
The scope of this experiment is :
Architectural changes
Daemon
Tunnelbase class that defines a protocol-agnostic interface for tunnel management (checktunnel.hfor documentation).MasqueTunnelandWireGuardTunnelMasqueTunnelLinuxwraps an external daemon using QProcess (like we do in MacOS)WireGuardTunnelLinuxwraps WireGuard utilsDaemon, will be defined in platform specific implementationinitializeTunnelswill be called during daemon initialization, instantiate long living tunnel objects, clean interfaces if exists (done by tunnel constructor in platform specific implementation) and connect signals to the daemonselectTunnelselect the right tunnel on activate requestController / Models
ProtocolType(currentlyWireGuardandMasque) andAuthType(currentlyKeyPairandToken) toServermodel. Those fields should be provided by guardian, currenly if empty it will gracefully defaults to 'WireGuardandKeyPair`ProtocolTypeandm_hostnametoInterfaceConfigm_tokentoMozillaVPNandTaskTokenthat will be called byControllerin case auth isToken. Currently gets a token from an environment variable, in a future implementation can call guardian to issue a temporary tokenHow to reproduce
Setup a MASQUE server
Use h2o with the following configuration.
Build and install the client
Follow the usual Linux procedure but remember to set the prefix on configure so the
masque-vpntool will be installed in the right place (because yes, i hardcoded the path :))Set your token as env var and launch the VPN client
Add a MASQUE server to the server list
Add a new server to the list using inspector's
append_serverscommand, follow the following JSON template (note: this is the easy way to reproduce it but i use a patched guardian instance running locally){ "countries": [ { "code": "fk", "name": "Fake country", "cities": [ { "name": "", "code": "tau", "servers": [ { "stboot": true, "weight": 100, "provider": "MyProvider", "protocol": "Masque", "public_key": "masque-test-key", "hostname": "my.masque.server.xyz", "socks5_fqdn": "my.masque.server.xyz", "socks5_ipv4": "", "socks5_name": "my.masque.server.xyz", "socks5_port": 1080, "ipv4_addr_in": "1.2.3.4", "ipv4_gateway": "1.2.3.4", "ipv6_addr_in": "", "ipv6_gateway": "", "multihop_port": 1312, "include_in_country": true, "port_ranges": [ [ 443, 443 ], [ 53, 53 ] ] } ], "latitude": 0.0000, "longitude": 0.000 } ] } ] }Choose the masque server from the list and check your ip
Important
Reference
Jira Issue
Checklist