summarylogtreecommitdiffstats
path: root/ip-up.sh
blob: c1b7c730867ffee50bc4693c41451961f1a0cf70 (plain)
1
2
3
4
5
6
7
8
9
#!/usr/bin/bash

OLD_GATEGAY=$(cat /run/vpn-old-gateway)

[[ -n "$OLD_GATEGAY" ]] || exit

for ip_range in $(cat /etc/china-ip-skip-vpn/china-ip-list.txt); do
  ip route add $ip_range via $OLD_GATEGAY
done