diff options
author | irungentoo <irungentoo@gmail.com> | 2013-08-16 20:02:53 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2013-08-16 20:02:53 -0400 |
commit | f2c336e4f553f42262fd006b818ca965eeec789f (patch) | |
tree | c269d6d241fa4521051ded59cdbf9115c836feff /docs/updates/Symmetric-NAT-Transversal.md | |
parent | ab5c2a36a298ccd3e45611be46ac47f1b4aea5fb (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.md | 43 |
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 @@ | |||
1 | Notes: | ||
2 | |||
3 | Friend requests need to be routed. | ||
4 | |||
5 | The current DHT should be capable of punching all NATs except symmetric ones. | ||
6 | |||
7 | ###### | ||
8 | |||
9 | Symmetric NAT hole punching: | ||
10 | |||
11 | If we are not connected to the friend and if the DHT is queried and ips | ||
12 | returned for the friend are the same but the port is different, the friend is | ||
13 | assumed to be behind a symmetric NAT. | ||
14 | |||
15 | Before attempting the procedure we first send a routed ping request to the | ||
16 | friend. This request is to be routed through the nodes who returned the ip of | ||
17 | the peer. | ||
18 | |||
19 | As soon as we receive one routed ping request from the other peer, we respond | ||
20 | with a ping response. | ||
21 | |||
22 | Ping request/response packet: | ||
23 | See: Crypto request packets in [[Crypto]] | ||
24 | |||
25 | Message: | ||
26 | For the ping request: | ||
27 | [char with a value of 254][char with 0][8 byte random number] | ||
28 | |||
29 | For 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 | |||
32 | As soon as we get a proper ping response from the other we run the different | ||
33 | ports returned by the DHT through our port guessing algorithm. | ||
34 | |||
35 | ###### | ||
36 | |||
37 | Port guessing algorithm: | ||
38 | |||
39 | Right now it just tries all the ports directly beside the known ports.(A better one is needed) | ||
40 | |||
41 | ###### | ||
42 | |||
43 | We send DHT ping requests to all the guessed ports, only a couple at a time. | ||