Providers

Providers

The Nym Provider Nodes were built in the Installation section. If you haven't yet built the Nym Mixnet and want to run the code, go there first.

Providers provide a destination for mixnet packets. Most of the internet doesn't use ecnrypted Sphinx packets, so the provider is a natural point at which to translate Sphinx packets back into “normal” IP traffic.

When it starts up, the Mixnet client registers itself with a provider, and the provider returns an access token. The access token plus the provider's IP can then be used as a form of addressing for delivering packets.

The default provider implementation included in the Nym Mixnet code is a node that holds packets for later retrieval. For many applications (such as chat), this is usable out of the box, as it provides a place that potentially offline clients can retrieve packets from. The access token allows clients to pull messages from the provider node.

You can run the provider node from the top-level directory like this:

./build/nym-mixnet-provider

$ ./build/nym-mixnet-provider
Usage: nym-provider COMMAND [OPTIONS]



  _ __  _   _ _ __ ___  
 | '_ \| | | | '_ \ _ \
 | | | | |_| | | | | | |
 |_| |_|\__, |_| |_| |_|
        |___/  

(mixnet-provider)


Commands:

    run         Run a Nym mixnet provider for offline storage

Run "nym-provider help <command>" for more info on a specific command.

It's worth understanding this is just a default implementation. There may be cases where you may want to make your own provider implementation with different logic.

If you're implementing a Tor-like web proxy, for instance, you might implement a provider that makes web requests and then returns a stream of Sphinx packets back to the original requester address. The original requester could then pull responses from the provider node.

Or if you are implementing cryptocurrency anonymization, you would build a provider that decrypts packets containing incoming transaction and shoots them at your blockchain of choice.

Running a provider

./build/nym-mixnet-provider run starts up a provider node with default options.

nym-mixnet$ ./build/nym-mixnet-provider run
[2019-10-25 14:42:37.010] Provider/func1 ▶ INFO - Listening on 192.168.0.6:1789

./build/nym-mixnet-provider help run to see a list of available run options.