Skip to content
This repository has been archived by the owner on Feb 18, 2021. It is now read-only.

Latest commit

 

History

History
13 lines (7 loc) · 1.94 KB

routing.md

File metadata and controls

13 lines (7 loc) · 1.94 KB

Routing

A router in telehash is simply any endpoint that is willing to forward packets between two other endpoints, at least one of which it must already have a link for. These packets are encrypted such that the routing endpoint cannot decode the contents, but all usage of routing requires a trusted relationship since the routers are at least aware of which two endpoints are connecting to each other.

When a router is forwarding the initial handshakes for endpoints first connecting, typically those endpoints will be able to negotiate and establish direct connections immediately and not rely on the router to forward future packets for that session. To support situations in which there is no working direct network path between the two endpoints, the router should continue forwarding packets but may rate-limit them to reduce the impact on its own network.

Any router role is an explicit choice by the application, either based on an administrative decision (specific default routers) or a trust relationship (offering to route for friends). These may be through configuration values or automatically discovered by advertising support through a peer in the path channel.

All routing is performed by using a peer channel to the router, and a connect channel from the router to the requested endpoint. A router never responds to or reveals any known state about the target endpoint to the requesting endpoint.

The use of URIs may be supported by routers to facilitate easier methods of connecting to new/third-party endpoints.

A mesh may have one or more default routers which are sent a peer request for every new link connection attempt. Each link may have one or more routers that are signalled from the link itself through a peer path or other application-level relationships, and these routers are used for all future connection attempts for that link.