toxic
toxic copied to clipboard
How do you connect to a single bootstrap server?
I setup a DHT bootstrap node, and thought it would be nice to connect to my node exclusively. To that affect, I nuked the download URL in the code base (src/bootstrap.c) and replaced it with localhost, and deleted DHTnodes.json. Well, even after doing that and having absolutely no bootstrap nodes configured, it still proceeds to connect to DHT by some magic.
The only thing that seems to work is passing the -o flag, but then I can't even manually connect via "/connect ip port key" because it's completely offline. I'm confused, am I doing something wrong or is it not possible to connect to just my DHT boostrap node?
I'd like to eventually experiment with running a DHT bootstrap node within I2P, but first I need to make sure it's not connecting to random servers.
When you start your client it will use a list of saved nodes from your previous session to bootstrap. Furthermore, when you connect to one bootstrap node, that node will connect you to other nodes in the network. There is no way (or reason that I can think of) to isolate your client from the rest of the network while stile being able to communicate with other peers using the network.
The intention is not to split off from the network, but to connect through the I2P network exclusively in order to reach the rest of the network. To that end, you need to make sure that it's not connecting to 'clearnet' but being forced through a proxy or to a single node (or nodes) which in turn have access to the regular network. Unlike Tor, it can't just use a proxy since it uses tunnels. It does support HTTP Proxy on port 4444, and a generic socks5 on 4447, but both are non-exit and require the ability to resolve an internal TLD/DNS to be of any use.
The topology is basically: I2P (client) -> I2P Tunnel to a DHT_Bootstrap Server which has access to Internet -> Regular Tox Network.
So far I have the following semi-working configuration using i2pd:
Server side tunnels.conf:
[tox]
type=server
host=127.0.01
port=33445
keys=tox.dat
signaturetype=7
inbound.length=1
outbound.length=1
This simply relays over the network port 33445, which is running the boot strap server and has access to the global network.
And... on the client side tunnels.conf:
[tox]
type = client
address = 127.0.0.1
port = 33446
destination = [xxx].b32.i2p
destinationport = 33445
keys = tox.dat
Then in client-side toxic:
toxic -t
/connect 127.0.0.1 33446 [fingerprint]
It works. However, it's hit or miss and is seemingly obtaining new DHT servers from outside my node as soon as the client restarts, defeating the point. I was under the impression when -t is used that tox uses relay servers rather than the DHT swarm, and that file transfers, etc. go through the relay? Basically it should be possible to force tox clients to go through an I2P relay much in the same way it connects to regular clearnet relays over Tor already, the only difference being it has no socks outproxy so you have to connect to one directly rather than the ones currently on DHTNodes.json.
Another way of approaching this may be to simply use the I2P socks5 proxy which can resolve .i2p addresses, however it appears toxic and/or tox is unable to resolve domains on bootstraps, and expects an IP.
Otherwise you could probably do:
toxic -t -p 127.0.0.1 4447
/connect [xxx].b32.i2p 33446 [fingerprint]
It would then proceed to resolve the address using the I2P's internal socks5 and then connect directly. This method would also (theoretically) block all clearnet connections so that all the client traffic is through the I2P DHT node and relay.
Please let me know if I misunderstood anything in the above assumptions.
I also have a running node and can provide the .b32.i2p and fingerprint for testing if interested.
Closing due to inactivity