IRCaBot 2.1.0
GPLv3 © acetone, 2021-2022
#i2pd-dev
/2023/06/23
Guest85 any i2pd tools can create tunnel by cli?
Xeha add to tunnels.conf or .d dir, send HUP signal to i2pd
Xeha if you want things more dynamic, use SAM
Guest85 i saw i2pd-tools, but none of them can do it.
Guest85 is SAM the best choice?
orignal no, 3.1 only
orignal I started but didn't finish 3.3.
orignal also i2pd uses MASTER SESSION rather than PRIMARY SESSION
Guest85 where can i get any goSam examples code?
orignal in both meanings
orignal I don't know, but ask idk
Guest85 idk's github example code import "github.com/cryptix/goSam"
Guest85 is there any way to get a tunnel's destination ? i don't want use SAM, server tunnel is better for me .
Xeha do you need dynamic server tunnels?
gogo no, just type = server.
Xeha then just define one in tunnels.conf
Xeha set a key= so the destination stays the same
gogo how to create it by using cli? coz i need to write in a .sh file.
Xeha i told you above
Xeha @Xeha | add to tunnels.conf or .d dir, send HUP signal to i2pd
gogo xehe, i know that.
gogo after that ,how to get the tunnel's destination?
Xeha then either use i2pd-tools to get address from privkey (stupid way) or just query the WUI as mentioned
gogo or change i2pd code, write to system env when tunnel created. ?
Xeha write to where?
gogo env
gogo system environment variable
Xeha that's not how env works
Xeha env is set on start and cant be changed after. for that to work, i2pd would have to spawn your process and set the env (once tunnel is up)
gogo or write to a file?
Xeha which is gruesome, dont think about doing that :D
Xeha its already in a file... your key
gogo yeh, there is .dat file, but u said use i2pd-tools (keygen) to get destination is stupid
Xeha i didnt say keygen
gogo i want my user install automatic by running a .sh file. the .sh file could create a tunnel and return tunnel's destination.
Xeha just query the WUI then
gogo any other tool could get destination?
gogo no, coz i will close 7070 port.
Xeha 7070 is only on localhost anyway...
Xeha do you know regex?
gogo yes
Xeha curl 127.1:7070/?page=i2p_tunnels --silent|grep ...
gogo what if i2pd change html format
Xeha it took me less than a minute to write a regex, we've spent way more time arguing about this...
Xeha grep, in perl mode -P, with match reset and lookahead...
gogo It is better to use keygen
gogo i guess
Xeha so you dont know regex, you lied :P
gogo :) I just feel it unstable, in case the format changes.
gogo use .sh file create .conf file in tunnel.conf.d, then send HUP to i2pd.pid. this no problem, right?
gogo the problem is how to find the new tunnel's destination.
gogo i think keygen /var/lib/i2pd/new-tunnel-name.dat to get the destination is better. what do u think?