Add basic support for SOCKS 4 and HTTP CONNECT proxies.
[tinc] / doc / CONNECTIVITY
1 This document describes how nodes in a VPN find and connect to eachother and
2 maintain a stable network.
3
4    Copyright 2001-2006 Guus Sliepen <guus@tinc-vpn.org>
5
6    Permission is granted to make and distribute verbatim copies of
7    this documentation provided the copyright notice and this
8    permission notice are preserved on all copies.
9
10    Permission is granted to copy and distribute modified versions of
11    this documentation under the conditions for verbatim copying,
12    provided that the entire resulting derived work is distributed
13    under the terms of a permission notice identical to this one.
14
15 1. Synchronisation
16 ==================
17
18 Each tinc daemon has zero or more connections to other tinc daemons. It will
19 try to keep its own information synchronised with the other tinc daemons. If
20 one of its peers sends information, the tinc daemon will check if it is new
21 information. If so, it will update its own information and forward the new
22 information to all the other peers.
23
24 This scheme will make sure that after a short amount of time all tinc daemons
25 share the same information. It will also almost completely prevent information
26 from looping, because "new" information that is already known is ignored and
27 not forwarded any further. However, since information can also be deleted
28 there's the possibility of a looping sequence of add/delete messages. This is
29 resolved by additionaly adding a unique identifier to each broadcasted message.
30 Messages are dropped if the same message with that identifier has already been
31 seen.
32
33 2. Routing
34 ==========
35
36 Every node tells its peers to which other peers it is connected. This way
37 every node will eventually know every connection every node has on the VPN.
38 Each node will use graph algorithms to determine if other nodes are reachable or not and
39 what the best route is to other nodes.
40
41 Because all nodes share the same information, using a deterministic algorithm
42 each node will calculate the same minimum spanning tree for the entire VPN.
43 The MST will be used to send broadcast VPN packets.