summaryrefslogtreecommitdiff
path: root/docs/updates/Symmetric-NAT-Transversal.md
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-08-16 20:02:53 -0400
committerirungentoo <irungentoo@gmail.com>2013-08-16 20:02:53 -0400
commitf2c336e4f553f42262fd006b818ca965eeec789f (patch)
treec269d6d241fa4521051ded59cdbf9115c836feff /docs/updates/Symmetric-NAT-Transversal.md
parentab5c2a36a298ccd3e45611be46ac47f1b4aea5fb (diff)
Added docs detailing containing latest protocol changes.
Diffstat (limited to 'docs/updates/Symmetric-NAT-Transversal.md')
-rw-r--r--docs/updates/Symmetric-NAT-Transversal.md43
1 files changed, 43 insertions, 0 deletions
diff --git a/docs/updates/Symmetric-NAT-Transversal.md b/docs/updates/Symmetric-NAT-Transversal.md
new file mode 100644
index 00000000..49038216
--- /dev/null
+++ b/docs/updates/Symmetric-NAT-Transversal.md
@@ -0,0 +1,43 @@
1Notes:
2
3Friend requests need to be routed.
4
5The current DHT should be capable of punching all NATs except symmetric ones.
6
7######
8
9Symmetric NAT hole punching:
10
11If we are not connected to the friend and if the DHT is queried and ips
12returned for the friend are the same but the port is different, the friend is
13assumed to be behind a symmetric NAT.
14
15Before attempting the procedure we first send a routed ping request to the
16friend. This request is to be routed through the nodes who returned the ip of
17the peer.
18
19As soon as we receive one routed ping request from the other peer, we respond
20with a ping response.
21
22Ping request/response packet:
23See: Crypto request packets in [[Crypto]]
24
25Message:
26For the ping request:
27[char with a value of 254][char with 0][8 byte random number]
28
29For the ping response:
30[char with a value of 254][char with 1][8 byte random number (The same that was sent in the request)]
31
32As soon as we get a proper ping response from the other we run the different
33ports returned by the DHT through our port guessing algorithm.
34
35######
36
37Port guessing algorithm:
38
39Right now it just tries all the ports directly beside the known ports.(A better one is needed)
40
41######
42
43We send DHT ping requests to all the guessed ports, only a couple at a time.