summaryrefslogtreecommitdiff
path: root/contrib/quicktun.socks4a/run
diff options
context:
space:
mode:
authord3v11 <d3v11@d3v11.ano>2012-11-04 12:18:53 +0000
committerd3v11 <d3v11@d3v11.ano>2012-11-04 12:18:53 +0000
commitc651762fead7748ad1256409456e4896596db24e (patch)
treec36b4ee10b9ad0b7d5926fbbfefa3dee8e816545 /contrib/quicktun.socks4a/run
parent715c507f194ad3b3f2193ea6a56b2a79a800cefd (diff)
downloadresdb-c651762fead7748ad1256409456e4896596db24e.tar.gz
resdb-c651762fead7748ad1256409456e4896596db24e.zip
[contrib/quicktun.socks4a] enjoy
Diffstat (limited to 'contrib/quicktun.socks4a/run')
-rw-r--r--contrib/quicktun.socks4a/run28
1 files changed, 28 insertions, 0 deletions
diff --git a/contrib/quicktun.socks4a/run b/contrib/quicktun.socks4a/run
new file mode 100644
index 0000000..181f2cd
--- /dev/null
+++ b/contrib/quicktun.socks4a/run
@@ -0,0 +1,28 @@
+#!/bin/sh -e
+
+export DEBUG='1'
+export TUN_MODE='1'
+export INTERFACE='ppp-tortun'
+export REMOTE_FLOAT='1'
+
+export LOCAL_ADDRESS='127.0.0.1'
+export LOCAL_PORT='2998'
+
+export REMOTE_ADDRESS='127.0.0.2'
+export REMOTE_PORT='2998'
+
+export DST_ADDRESS='127.0.0.3'
+export DST_PORT='2998'
+
+export SOCKS_ADDRESS='127.0.0.1'
+export SOCKS_PORT='9050'
+
+(
+ sleep 8
+ ip addr add $LOCAL_PEER_ADDRESS peer $REMOTE_PEER_ADDRESS/32 dev $INTERFACE scope link
+ ip addr add $LOCAL_ROUTER_ADDRESS/32 dev $INTERFACE scope global
+ ip link set dev $INTERFACE up
+ ping -c 1 -I $INTERFACE $REMOTE_PEER_ADDRESS -r -w 5 >/dev/null 2>&1
+) &
+
+exec "`pwd`"/quicktun.socks4a