I2P

Invisible Internet Project


Ticket #64 (closed defect: fixed)

Opened 22 months ago

Last modified 19 months ago

web interface of I2PTunnel is buggy

Reported by: i2pn00b (n00b@… Owned by: zzz
Priority: major Milestone: 0.8.1
Component: apps/i2ptunnel Version: 0.8
Keywords: i2ptunnel Cc:

Description

- open link:  http://127.0.0.1:7657/i2ptunnel/index.jsp
- choose HTTP from the New server tunnel dropdown list
- click Create button
- fill in the Port form field (the only one that is marked in red)
- scroll down and hit Save button
- I get the error message 'Invalid form submission, probably because you used the 'back' or 'reload' button on your browser. Please resubmit.'

This happens almost always. This means that in about 5 cases out of ~100 the tunnel was created and I didn't see this error message.

I have tried this in at least 3 GUI browsers.

People on IRC said this looks like a nonce problem, that something similar used to happen earlier, then it was dealt with, so it is considered to be fixed now. Well, it is not. I was also told on IRC by at least one more i2p user that he experiences the same problem.

My next step was to try emulating the browser by using a HTTP speaking library. I used the following python code:

#!/usr/bin/env python 

import time 

import mechanize 

b = mechanize.Browser() 
b.open('http://127.0.0.1:7657/i2ptunnel/index.jsp') 
b.select_form(nr=0) 
b['type'] = ['httpserver'] 
r = b.submit() 
time.sleep(3) 
b.select_form(nr=0) 
b['targetPort'] = '4488' 
b['privKeyFile'] = 'eepsite1/eepPriv.dat' 
r = b.submit() 
s = r.read() 
open('log', 'w').write(s)

After running it, I refreshed link:  http://127.0.0.1:7657/i2ptunnel/index.jsp and I saw 3 (yes, three!) new tunnels there. This seems to be wrong as well. I don't know it there are 3 tunnels created or if it's just the web interface that displays redundant things, but this is certainly not the expected result.

Change History

Changed 22 months ago by anonymous

This nonce bug affects not only the creation of new tunnels. It also affects the management of existing ones. For example, I can't start the mtn tunnel, which does not autostart by default. Here is a way to mitigate this by manually editing the file ~/.i2p/i2ptunnel.config:

- locate the mtn tunnel by config option tunnel.2.name=mtn.i2p2.i2p
- to make it start automatically, fix the option tunnel.2.startOnLoad=true
- restart the i2p router and the mtn tunnel will become functional by default

Changed 19 months ago by zzz

  • owner set to zzz
  • status changed from new to assigned

re: the nonce problem, I've tried again to fix it and that fix will be in 0.8.1, but I'll leave this ticket open for a while until it's tested.

re: the python script, I don't really know what's going on there, sorry.

Changed 19 months ago by zzz

  • status changed from assigned to closed
  • version set to 0.8
  • resolution set to fixed
  • milestone set to 0.8.1

closing and hoping the nonce fix is good.

re: the python script, I have no idea what you are trying to do but we aren't designing the console for scripts.

Note: See TracTickets for help on using tickets.