Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a65044fa authored by Android (Google) Code Review's avatar Android (Google) Code Review Committed by The Android Open Source Project
Browse files

am a1140ad4: Merge change 5455 into donut

Merge commit 'a1140ad4'

* commit 'a1140ad4':
  Add new PPP IPCP script for VPN.
parents 0e6146c0 a1140ad4
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
#!/system/bin/sh

/system/bin/setprop "vpn.dns1" "$DNS1"
/system/bin/setprop "vpn.dns2" "$DNS2"

GATEWAY=${6#*@}
VPNSERVER=${6%@*}

# Protect the route to vpn server
/system/bin/route add -net "$VPNSERVER" netmask 255.255.255.255 gw "$GATEWAY"

if (exp $?) ; then exit $?; fi

# Route all traffic to vpn connection
/system/bin/route add -net 0.0.0.0 netmask 128.0.0.0 gw $IPREMOTE
/system/bin/route add -net 128.0.0.0 netmask 128.0.0.0 gw $IPREMOTE

/system/bin/setprop "vpn.up" "1"