Go to file
2023-09-03 20:36:33 +03:00
my_route.db/sources/custom/cidr/ipv4 added my_route.db example 2023-08-17 21:01:57 +03:00
.gitignore clean repo 2023-08-31 10:27:24 +03:00
LICENSE Initial commit 2023-08-17 20:52:55 +03:00
my_route.conf added 'antifilter' source 2023-09-03 13:00:17 +03:00
my_route.py add '#' started comment ignoring in cidr files 2023-09-03 20:36:33 +03:00
README.md updated dependencies 2023-08-31 10:28:27 +03:00

my_route

Route manager by CIDR lists


my_route.py

Description:

Route management by CIDR lists.

Dependencies:

PARAMETERS DESCRIPTION DEFAULT
[-h] print help and exit
[--config] custom configuration file path ./my_route.conf
[-a, --add] add routes specified by config False
[-d, --del] del routes specified by config False
[-i, --imitate] only showing commands without applying them False
[-u, --update] update cidr file db False
[-f, --force] force download sources for update False

Example usage my_route.py

# download my_route.py
sudo wget https://git.hmp.today/pavel.muhortov/my_route/raw/branch/master/my_route.py -O /usr/local/bin/my_route.py
sudo chmod +x /usr/local/bin/my_route.py
# download and edit my_route.conf
sudo wget https://git.hmp.today/pavel.muhortov/my_route/raw/branch/master/my_route.conf -O /usr/local/bin/my_route.conf
sudo nano /usr/local/bin/my_route.conf
# create and edit cidr files or update by sources
sudo mkdir /usr/local/bin/my_route.db
sudo tee /usr/local/bin/my_route.db/sources/custom.cidr > /dev/null <<'EOF'
34.117.59.81/32     # ipinfo.io
EOF
# sudo crontab -e
0 0 * * * /usr/bin/python3 /usr/local/bin/my_route.py --update --force