constantly monitor lte traffic usage and limit the usage using mwan3
- python3
- nginx
- cron
$ git clone https://github.com/oxcl/lul
$ cd lul
$ vim .env_template # add required variables
$ vim .router_template # add required variables
$ sh ./setup *ROUTER_IP_ADDRESS*
$ # copy headers.json and req_data.txt to DATA_DIR for the script to work properly
you should also add the required environment variables for the lul instance to work properly.
environments are loaded automatically if a .env
file is available in the lul folder ( a .env_template file is available to make life easy)
fetching information from the ISP requires a headers.json
file which contains request headers and can optionally use a req_data.txt
which contains post request data. these files are used for authentication of ISP web service. make sure they are placed correctly at $LUL_DATA_DIR
which is by default $HOME/.lul
make sure www
user exists and the user running the script is added to the www
group for nginx to work
required environment variables for the router:
LUL_ALLOWED_IPS
(separated by space)LUL_PASSWORD
required environment variables for the lul instance to work:
LUL_ROUTER_URL
LUL_ROUTER_PASSWORD
LUL_ISP_URL
LUL_ROUTER_PROTOCOL
(http
orhttps
. defaults tohttp
if not provided)LUL_DATA_DIR
(defaults to~/.lul
if not provided)LUL_WWW_DIR
(defaults to/www
if not provided)LUL_DAY_STARTS_AT
(defaults to 0)