stop restarting your i2p routers to get a new http proxy destination

General I2P related talk
Post Reply
User avatar
cumlord
Posts: 152
Joined: Thu Oct 05, 2023 5:01 pm
Location: Erect, NC
Contact:

stop restarting your i2p routers to get a new http proxy destination

Post by cumlord »

been seeing this a lot for some reason so i'm spelling it out that in both i2pd and java you can keep making new destinations without restarting the router. you can also have as many http/socks/irc proxies as you want running from different destinations. don't restart if you don't need to

java
go to /tunnelmanager and edit http proxy tunnel
Check > Reduce tunnel quantity when idle (3min, 2 tunnels for example)
Check > Close client tunnels after specified period (5,10,20, whatever)
Check > New keys on reopen

now you get fresh tunnels with new destination each time you browse, and won't waste empty tunnels. there is a slight delay when opening new tunnels this way but most of the time it's pretty seamless

Otherwise as long as "new keys on reopen" is checked whenever you stop and start the tunnel from the /tunnelmanager page you get a new destination.

i2pd
on /?page=commands click "Reload tunnels configuration"
or with scripting http://notbob.i2p/cgi-bin/blog.cgi?page=927
User avatar
lgillis
Posts: 323
Joined: Mon May 09, 2022 8:40 am

Re: stop restarting your i2p routers to get a new http proxy destination

Post by lgillis »

Hi! May I?

cumlord refers to notbob, who writes:
> "This will reset all of your tunnels. So, it might be exciting."

This statement by notbob is only conditionally true. See client tunnels, parameters: "If keys is empty, transient keys will be created on every restart. If the keys file is not found, new keys will be created and stored into the specified file. If keys starts from transient, new keys will be created, but not stored into a file."

Whether this parameter is used can be checked using the B32 addresses. (Under Debian, for example, users are allowed to manipulate the I2Pd via its website but not to read the configuration.) The addresses can be found on this page.

And in case anyone asks, the Perl script can do no more than the website.
User avatar
cumlord
Posts: 152
Joined: Thu Oct 05, 2023 5:01 pm
Location: Erect, NC
Contact:

Re: stop restarting your i2p routers to get a new http proxy destination

Post by cumlord »

important clarification, thanks Igillis :)

for context on the scripting thing, pinging a lot of sites it's good to come at them with new b32's so you're not tripping ratelimiting or anything, afaik this is what he does for his scanner. often easier to do things like that with i2pd, the log also outputs a lot of useful info for that purpose

it's more annoying to do that with java as far as scraping the console page goes. the way i do it (on a much smaller scale like for RSS feeds mainly and my unknownb32 scanner) is the way i described above, let thetunnel die down every 3-5 mins, and do requests spaced out an amount of time longer than that so we're reloading new dests

if you poke around with SAM the wrong way it's easy to do obnoxious stuff like this unintentionally but also can be useful for same reasons

Image
anikey
Posts: 78
Joined: Thu Dec 07, 2023 9:22 pm

Re: stop restarting your i2p routers to get a new http proxy destination

Post by anikey »

cumlord wrote: Mon May 26, 2025 8:46 am been seeing this a lot for some reason so i'm spelling it out that in both i2pd and java you can keep making new destinations without restarting the router. you can also have as many http/socks/irc proxies as you want running from different destinations. don't restart if you don't need to
One solution would be to create tunnel programs separate from the router (e.g. an http proxy that accesses SAM and does things on its own) - this will surely prevent users from restarting their router, instead they would restart the tunnel program, which will just create a new set of tunnels - way less disruptive than force restarting a router.
cumlord wrote: Mon May 26, 2025 6:08 pm if you poke around with SAM the wrong way it's easy to do obnoxious stuff like this unintentionally but also can be useful for same reasons
Oh, by the way, i think the i2p protocol allows to have multiple destinations using the same set of tunnels. You could try doing that somehow (or if it's not possible in SAM, maybe even make it possible?) and so you won't have to spam the network with lots of tunnels, yet still use different b32s for sites. (the sites will then have to check the IBGWs of your dests to correlate, but probably nobody does that).
User avatar
cumlord
Posts: 152
Joined: Thu Oct 05, 2023 5:01 pm
Location: Erect, NC
Contact:

Re: stop restarting your i2p routers to get a new http proxy destination

Post by cumlord »

making something like that with SAM has crossed my mind since it'd make porting stuff here very straight forward and doing stuff like this easier, i thought i saw in IDK's git something that did that in Go, but it might not have exposed a port

i had no idea that that was possible, the other way around sure, i'll have to do some searching :shock:
xqapjl
Posts: 5
Joined: Mon Jun 09, 2025 9:40 pm

Re: stop restarting your i2p routers to get a new http proxy destination

Post by xqapjl »

If I do this with i2pd, the amount of local destinations increases by 1. It does not seem to decrease again until I restart the node.
User avatar
cumlord
Posts: 152
Joined: Thu Oct 05, 2023 5:01 pm
Location: Erect, NC
Contact:

Re: stop restarting your i2p routers to get a new http proxy destination

Post by cumlord »

i've faced the same problem. i no longer use i2pd because it seems to have a lot of weird memory leaks that require more frequent restarts the more aggressively you use it
Post Reply