-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added some i2p related address #95
Conversation
7398af5
to
48f1ea5
Compare
You can find the description of how i2p address works here https://geti2p.net/en/docs/naming. Bob, samX must be over udp or tcp address.
Some thoughts/questions about this:
(Also there should be coma after the protocol name in the CSV for consistency.) |
Yes, -1 alterator is the only negative value possible, other or count of things and building -1 hops tunnel means nothing ? (except than not sending the message (but what about -2 so ?)), alterator is about how many the hops tunnel length can be randomly altered (so if you have an 3 hops long tunnel with -1 alterator you may end up with a 2, 3 or 4 tunnel long).
Yes I havn't even thinked to that (thx), so hops and tunnel count should be varuint.
Yes but in fact these parameters are not about the protocol but about what is next, in fact these protocols allows you to get a connection to i2p and the params are about this connection to i2p (number of hops, tunnel, ...), these protocols just need ip (or a resolved dns) and tcp or udp (udp is only for sam3 (and maybe sam 1 and 2, idk)).
Yes, bob and sam doesn't use the same port so this isn't possible to do auto negotiation but for sam you can simply try 3 if that doesn't works try 2 and if that doesn't works try 1.
Good idea but not for bob and sam since they don't share the same port (and there is no bob over udp (if that was not implemented since the doc on it was made)) and I don't think
I pick that totaly randomly because it looks close to / but , could do it well. |
While implementing I wondered that steaming or datagrams isn't specified in the garlic, so we need to specify them in an other way. |
|
You can find the description of how i2p address works here https://geti2p.net/en/docs/naming.
Bob, samX must be over udp or tcp address.
I think it can be used like that :
First listen on a i2p gateway :
There is 2 protocol, bob and sam, sam3 is the best of all (it have a lot of good idea of bob but multiplexed), bob is for more edge case and older version of sam are here if your node doesn't support newer one.
Upstream and Downstream hops is the number of relay to the rendez-vous (0 is a good choice if you are also serving on non anonymized network (0 disable anonymity but greatly improve speed, useful for providing an i2p to internet node), else 3 is a standard but this choice is yours) range is 0-7 (in i2p but maybe raise in future).
Tunnels count range is 1-6, limited by i2p can maybe be raised (with cpu performance at cost but higher multiple bandwidth), need test to about possible raising.
Upstream and Downstream alterator is of how many hops the tunnel must be randomly altered. All positive number are number of more hops added. So for 3 hops and 2 alteration the number of hops will be randomly between 3-5 (included) hops. For negative one that 2 directional, so 3 hops and -1 alterator the random will choose one between 2-4 (included) hops. This one is very limited is extremely dangerous if you do an error (but still proposed by i2p), also these kind of Multiaddrs will be encoded (and reprinted) as 2 hops and 2 alterator (which is totally the same).
Datagrams and Streaming are i2p version of udp and tcp, and that simply indicate if the bridge should listen on them (both or b for both, datagrams or b for udp like, streaming or s for tcp like).
The encoded version could looks like this :
Alterator are 3 bits uint and need to be converted if -1 is putted.
And connection could be done for
garlic*
address reusing an instancied sam or bob transport (maybe with an integrated nodes in the future).PS: I've discover after that alterator is a word not existing in english sorry. So here I use as the word alterateur in french (wich doesn't have an "official" validation but works in real life), this means the one that alter.