Development discussions
What happens when client is the last hop of eepsite's inbound tunnel? « Complaints and Questions ... « I2P Help, Hints, Advice
Sat, 04 Apr 2020, 06:24pm #1

Let's have a look at the following situation:

Router Y hosts an eepsite. It has the following tunnels:
inbound Y <- ? <- W <- X
outbound Y -> ? -> ? -> ?

Client on router X requests the eepsite. X has following tunnels:
inbound X <- A <- B <- C
outbound X -> D -> E -> F

By chance eepsite's inbound tunnel has X itself as the last hop.
So X needs to send packets over D -> E -> F back to itself. And then he needs to act as a part of Y's inbound tunnel and send a packet next to W.
So how router actually handles this situation? Does it route packet over X -> D -> E -> F -> X -> W -> ...
or does it send it directly to Y's inbound tunnel X -> W -> ? -> ...?

Sun, 05 Apr 2020, 05:21pm #2
I2P Legend

Under normal circumstances that does not happen and it is prevented by software (XOR filter). It could happen if you have 0 length tunnels or Sam opened.

Right now an i2p Legend is running 1.2M through one of my routers from a Berlin VPN. No problemo.

If for some reason you decide to have 0 length you better declare yourself or be known to me or you might be a victim of friendly fire.... Def3.i2p is fine.

Sun, 05 Apr 2020, 07:39pm #3

How shall XOR filter help here?
It's router Y who built Y <- ? <- W <- X tunnel.
It's client controlling router X who requested a page from Y's eepsite.
X doesn't know that eepsite is hosted on Y. It only knows that eepsite chose him as an inbound endpoint.
So X can route traffic over D->E->F back to itself. Or it can send traffic directly to Y's inbound tunnel (of which he is an endpoint).
So what would X do? Only someone familar with source code knows.

Sun, 05 Apr 2020, 07:54pm #4

We don't do the optimized "send direct" (the second option in the OP).

It's an interesting optimization I hadn't thought of before.
It wouldn't happen very frequently though.
There may be security implications though, for example it may be detectable by measuring round trip times, which would deanonymize X.

Sun, 05 Apr 2020, 08:18pm #5
I2P Legend

I did not look at the current software in a few years but I posted here and on Def3 about the original idea with (modulo 4) 4 color map theory. It should be under how i2p works for dummies. You have to pass through 3 different reminders router numbers at least. You can search this forum or Def3.

Mon, 06 Apr 2020, 09:12pm #6

zzz wrote:

We don't do the optimized "send direct" (the second option in the OP)

Let it stay like that.
This kind of "optimization" would surely break anonymity.