mirror of
https://github.com/QSCTech/zjunet.git
synced 2026-01-23 04:04:48 +08:00
set_up_routes(), fixes #8
This commit is contained in:
parent
50030ea19a
commit
099650be22
21
vpn.sh
21
vpn.sh
@ -21,12 +21,33 @@
|
|||||||
# <http://www.gnu.org/licenses/>.
|
# <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
start_xl2tpd() {
|
start_xl2tpd() {
|
||||||
|
echo 'start xl2tpd'
|
||||||
}
|
}
|
||||||
|
|
||||||
disconnect() {
|
disconnect() {
|
||||||
|
echo 'disconnect'
|
||||||
|
}
|
||||||
|
|
||||||
|
set_up_routes() {
|
||||||
|
IP=$(ip route show 0/0 | cut -d " " -f 3)
|
||||||
|
|
||||||
|
case "$IP" in
|
||||||
|
10.189.*)
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
10.171.*)
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# set up routes here
|
||||||
|
# todo
|
||||||
}
|
}
|
||||||
|
|
||||||
connect() {
|
connect() {
|
||||||
|
disconnect
|
||||||
|
# todo
|
||||||
|
set_up_routes
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user