diff --git a/contrib/i2lua/README.md b/contrib/i2lua/README.md new file mode 100644 index 00000000..d5b084fe --- /dev/null +++ b/contrib/i2lua/README.md @@ -0,0 +1,15 @@ +i2lua is an experimental i2p router with an embedded lua interpreter for use in test networks and research. + +For now, don't use this unless you know exactly what you want to do, how to do it and want to hack on the source code. + +Building: + + git clone https://github.com/majestrate/kovri -b development kovir-dev + mkdir build + cd build + cmake -DWITH_LUA=ON -DWITH_AESNI=ON ../kovri-dev + make -j8 + +Running: + + ./i2lua example.lua diff --git a/contrib/i2lua/example.lua b/contrib/i2lua/example.lua new file mode 100644 index 00000000..952d18f0 --- /dev/null +++ b/contrib/i2lua/example.lua @@ -0,0 +1,19 @@ +-- +-- run i2p router with no clients on port 50050 +-- + +print("Starting i2lua") + +-- initialize i2lua router to ise port 50050 +port = 50050 +print("Using port",port) +i2lua.Init(port) + +-- start the router up +i2lua.Start() +print("Router Up") + +-- wait for the router to stop +-- the program will wait here or until SIGINT or a crash +i2lua.Wait() +print("Exiting...")