diff options
author | Vasil Dimov <vd@FreeBSD.org> | 2021-07-02 10:33:38 +0200 |
---|---|---|
committer | Vasil Dimov <vd@FreeBSD.org> | 2021-07-09 11:19:38 +0200 |
commit | 4101ec9d2e05a35c35f587a28f1feee6cebcc61b (patch) | |
tree | 203e74f7ffc8a65674e5d159737d2892cec8d860 /doc | |
parent | e0a2b390c144e123e2fc8a289fdff36815476964 (diff) |
doc: mention that we enforce port=0 in I2P
Co-authored-by: Jon Atack <jon@atack.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/i2p.md | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/i2p.md b/doc/i2p.md index 8b4607208a..27ef4d9d9f 100644 --- a/doc/i2p.md +++ b/doc/i2p.md @@ -70,3 +70,18 @@ RPC. Bitcoin Core uses the [SAM v3.1](https://geti2p.net/en/docs/api/samv3) protocol to connect to the I2P network. Any I2P router that supports it can be used. + +## Ports in I2P and Bitcoin Core + +Bitcoin Core uses the [SAM v3.1](https://geti2p.net/en/docs/api/samv3) +protocol. One particularity of SAM v3.1 is that it does not support ports, +unlike newer versions of SAM (v3.2 and up) that do support them and default the +port numbers to 0. From the point of view of peers that use newer versions of +SAM or other protocols that support ports, a SAM v3.1 peer is connecting to them +on port 0, from source port 0. + +To allow future upgrades to newer versions of SAM, Bitcoin Core sets its +listening port to 0 when listening for incoming I2P connections and advertises +its own I2P address with port 0. Furthermore, it will not attempt to connect to +I2P addresses with a non-zero port number because with SAM v3.1 the destination +port (`TO_PORT`) is always set to 0 and is not in the control of Bitcoin Core. |