iodine/doc/proto_00000403.txt

69 lines
1.9 KiB
Plaintext
Raw Normal View History

2008-12-06 13:20:47 +00:00
Detailed specification of protocol in version 00000403
======================================================
CMC = 2 byte Cache Miss Counter, increased every time it is used
Version:
Client sends:
2008-12-07 09:41:06 +00:00
First byte v or V
Rest encoded with base32:
4 bytes big endian protocol version
CMC
2008-12-06 13:20:47 +00:00
Server replies:
2008-12-07 09:41:06 +00:00
4 chars:
2008-12-06 13:20:47 +00:00
VACK (version ok), followed by login challenge
VNAK (version differs), followed by server protocol version
VFUL (server has no free slots), followed by max users
2008-12-07 09:41:06 +00:00
4 byte value: means login challenge/server protocol version/max users
1 byte userid of the new user, or any byte if not VACK
2008-12-06 13:20:47 +00:00
Login:
Client sends:
2008-12-07 09:41:06 +00:00
First byte l or L
Rest encoded with base32:
1 byte userid
2008-12-06 13:20:47 +00:00
16 bytes MD5 hash of: (first 32 bytes of password) xor (8 repetitions of login challenge)
2008-12-07 09:41:06 +00:00
CMC
2008-12-06 13:20:47 +00:00
Server replies:
LNAK means not accepted
2008-12-07 09:41:06 +00:00
x.x.x.x-y.y.y.y-mtu means accepted (server ip, client ip, mtu)
2008-12-06 13:20:47 +00:00
Case check:
Client sends:
2008-12-07 09:41:06 +00:00
First byte z or Z
2008-12-06 13:20:47 +00:00
Lots of data that should not be decoded
Server replies:
The requested domain copied raw
Switch codec:
Client sends:
2008-12-07 09:41:06 +00:00
First byte s or S
One byte ASCII digit, meaning userid
One byte ASCII digit, with value 5 or 6, representing number of bits per byte in encoding
2008-12-06 13:20:47 +00:00
Server sends:
2008-12-07 09:41:06 +00:00
Name of codec if accepted. After this all upstream data packets must be encoded with the new codec.
BADCODEC if not accepted. Client must then revert to Base32
2008-12-06 13:20:47 +00:00
Data:
Data header:
2008-12-07 09:41:06 +00:00
321 0
+---+-+
|UUU|L|
+---+-+
2008-12-06 13:20:47 +00:00
2008-12-07 09:41:06 +00:00
UUU = Userid
2008-12-06 13:20:47 +00:00
L = Last fragment in packet flag
2008-12-07 09:41:06 +00:00
First 4 bits coded as hex in ASCII.
Followed by data encoded with the chosen codec.
2008-12-06 13:20:47 +00:00
Ping:
Command = 0x04, User = userid
Client sends:
Only a CMC
2008-12-07 09:41:06 +00:00
The server responses to Ping and Data packets is a DNS NULL type response:
If server has nothing to send, data length is 0 bytes.
If server has a packet to send, data length is set and the data is a full raw
unencoded ip packet, prefixed with 32 bits tun data.