Openwrt-based router auth system
- Get a nim compiler:
apt install nim build-essential - Install needed dependencies:
nimble install jester template - Install LEDE/openwrt toolchain and build it for your router. Your target is
make toolchain/gcc. See openwrt instructions. - Clone this repository:
git clone https://github.com/derlaft/fdi.git - Edit build.sh, change openwrt toolchain path and architecture if needed.
- Run build:
bash ./build.sh - If everything is OK, you will get an executable named
main. Place it,gateway.cfgandpublic/directory to the router. - On the router, you will need to install some packages:
opkg install libpthread librt libopenssl libpcre - Make sure you have enough RAM and disk space. I recommend at least 8Mb disk space. Install
zram-swappackage if you are low on mem. - Place
fdi.initto/etc/init.d/fdito load service with start-up./etcinit.d/fdi enablewill load the service automatically. - Configure
/etc/config/firewall. Seefirewall.confas example.