1051
|
1 #!/bin/sh -e |
|
2 |
|
3 export DEBUG='1' |
|
4 export TUN_MODE='1' |
|
5 export INTERFACE='ppp-tortun' |
|
6 export REMOTE_FLOAT='1' |
|
7 |
|
8 export LOCAL_ADDRESS='127.0.0.1' |
|
9 export LOCAL_PORT='2998' |
|
10 |
|
11 export REMOTE_ADDRESS='127.0.0.2' |
|
12 export REMOTE_PORT='2998' |
|
13 |
|
14 export DST_ADDRESS='127.0.0.3' |
|
15 export DST_PORT='2998' |
|
16 |
|
17 export SOCKS_ADDRESS='127.0.0.1' |
|
18 export SOCKS_PORT='9050' |
|
19 |
|
20 ( |
|
21 sleep 8 |
|
22 ip addr add $LOCAL_PEER_ADDRESS peer $REMOTE_PEER_ADDRESS/32 dev $INTERFACE scope link |
|
23 ip addr add $LOCAL_ROUTER_ADDRESS/32 dev $INTERFACE scope global |
|
24 ip link set dev $INTERFACE up |
|
25 ping -c 1 -I $INTERFACE $REMOTE_PEER_ADDRESS -r -w 5 >/dev/null 2>&1 |
|
26 ) & |
|
27 |
|
28 exec "`pwd`"/quicktun.socks4a |