all repos — dotfiles @ 0b35aec263be02a6d674f23621439234801da75c

my *nix dotfiles

feat(bin): add redirectgateway-def1-socks.sh
Anirudh icyph0x@pm.me
Sat, 21 Apr 2018 13:52:46 +0530
commit

0b35aec263be02a6d674f23621439234801da75c

parent

2c9ee4492e49a3d4e72443cfcddc6876f0d8c53a

1 files changed, 11 insertions(+), 0 deletions(-)

jump to
A bin/redirectgateway-def1-socks.sh

@@ -0,0 +1,11 @@

+#!/usr/bin/env bash + +if [ "$script_type" == "up" ]; then + route add -host $remote_1/32 gw $route_net_gateway + route add -net 0.0.0.0/1 gw $route_vpn_gateway + route add -net 128.0.0.0/1 gw $route_vpn_gateway + /etc/openvpn/update-resolv-conf +elif [ "$script_type" == "down" ]; then + /etc/openvpn/update-resolv-conf + route del -host $remote_1/32 gw $route_net_gateway +fi