Specify network route with "diodeaddrs"
You can specify a network route for traffic to or from your Diode client using the Diode CLI flag
diodeaddrs. This is handy if you are hosting your own network node and want to ensure your node is used for traffic to or from your endpoints.
How to Specify a Network Route
diodeaddrs flag should be invoked before whatever diode command you are running. It can be set to an IP address or a domain name, and must also specify the active port for network communications.
- The syntax of the setting should be something like:
diodeaddrsin a command, e.g. diode time, would look like this:
diode -diodeaddrs=us1.prenet.diode.io:41046 time
- You can use multiple instances of the flag to setup fallback routes - the last one specified is the first one used. For example, the following will try to use us1 first, but if it fails, will fallback to as1:
diode -diodeaddrs=as1.prenet.diode.io:41046 -diodeaddrs=us1.prenet.diode.io:41046 time
- If none of the specified
-diodeaddrsnodes are available, the system will continue to retry until one of them become available
Testing / Validating
-debug flag to print out details about your connection when running a command - this will explicitly show which relays are being added and validated. For example:
diode -debug -diodeaddrs=as3.prenet.diode.io:41046 -diodeaddrs=us11.prenet.diode.io:41046 time
- This command should attempt to use the route us11 first, and if it fails, fallback to as3. The
-debugflag will show the output:
The Publisher Controls Route Settings
If endpoint A is publishing content while specifying a
-diodeaddrs node, all inbound connections will be routed through the node specified.
Even if another endpoint B who has specified a different
-diodeaddrs node tries to connect to your endpoint A, the Diode Network's routing will force endpoint B to route the initial connection through the
-diodeaddrs node specified for endpoint A.