annotate contrib/quicktun.socks4a/run @ 1052:004034faf019 draft

[quicktun.socks4a] $PROTOCOL support (raw, nacl0, nacltai)
author d3v11 <d3v11@d3v11.ano>
date Sun, 04 Nov 2012 12:59:01 +0000
parents 2f1173c986e6
children c6bf58b459dd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1051
2f1173c986e6 [contrib/quicktun.socks4a] enjoy
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
1 #!/bin/sh -e
2f1173c986e6 [contrib/quicktun.socks4a] enjoy
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
2
2f1173c986e6 [contrib/quicktun.socks4a] enjoy
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
3 export DEBUG='1'
2f1173c986e6 [contrib/quicktun.socks4a] enjoy
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
4 export TUN_MODE='1'
1052
004034faf019 [quicktun.socks4a] $PROTOCOL support (raw, nacl0, nacltai)
d3v11 <d3v11@d3v11.ano>
parents: 1051
diff changeset
5 export PROTOCOL='nacltai'
1051
2f1173c986e6 [contrib/quicktun.socks4a] enjoy
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
6 export INTERFACE='ppp-tortun'
2f1173c986e6 [contrib/quicktun.socks4a] enjoy
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
7 export REMOTE_FLOAT='1'
2f1173c986e6 [contrib/quicktun.socks4a] enjoy
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
8
1052
004034faf019 [quicktun.socks4a] $PROTOCOL support (raw, nacl0, nacltai)
d3v11 <d3v11@d3v11.ano>
parents: 1051
diff changeset
9 export PRIVATE_KEY='0000000000000000000000000000000000000000000000000000000000000000'
004034faf019 [quicktun.socks4a] $PROTOCOL support (raw, nacl0, nacltai)
d3v11 <d3v11@d3v11.ano>
parents: 1051
diff changeset
10 export PUBLIC_KEY='2fe57da347cd62431528daac5fbb290730fff684afc4cfc2ed90995f58cb3b74'
004034faf019 [quicktun.socks4a] $PROTOCOL support (raw, nacl0, nacltai)
d3v11 <d3v11@d3v11.ano>
parents: 1051
diff changeset
11
1051
2f1173c986e6 [contrib/quicktun.socks4a] enjoy
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
12 export LOCAL_ADDRESS='127.0.0.1'
2f1173c986e6 [contrib/quicktun.socks4a] enjoy
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
13 export LOCAL_PORT='2998'
2f1173c986e6 [contrib/quicktun.socks4a] enjoy
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
14
2f1173c986e6 [contrib/quicktun.socks4a] enjoy
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
15 export REMOTE_ADDRESS='127.0.0.2'
2f1173c986e6 [contrib/quicktun.socks4a] enjoy
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
16 export REMOTE_PORT='2998'
2f1173c986e6 [contrib/quicktun.socks4a] enjoy
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
17
2f1173c986e6 [contrib/quicktun.socks4a] enjoy
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
18 export DST_ADDRESS='127.0.0.3'
2f1173c986e6 [contrib/quicktun.socks4a] enjoy
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
19 export DST_PORT='2998'
2f1173c986e6 [contrib/quicktun.socks4a] enjoy
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
20
2f1173c986e6 [contrib/quicktun.socks4a] enjoy
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
21 export SOCKS_ADDRESS='127.0.0.1'
2f1173c986e6 [contrib/quicktun.socks4a] enjoy
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
22 export SOCKS_PORT='9050'
2f1173c986e6 [contrib/quicktun.socks4a] enjoy
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
23
2f1173c986e6 [contrib/quicktun.socks4a] enjoy
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
24 (
2f1173c986e6 [contrib/quicktun.socks4a] enjoy
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
25 sleep 8
2f1173c986e6 [contrib/quicktun.socks4a] enjoy
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
26 ip addr add $LOCAL_PEER_ADDRESS peer $REMOTE_PEER_ADDRESS/32 dev $INTERFACE scope link
2f1173c986e6 [contrib/quicktun.socks4a] enjoy
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
27 ip addr add $LOCAL_ROUTER_ADDRESS/32 dev $INTERFACE scope global
2f1173c986e6 [contrib/quicktun.socks4a] enjoy
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
28 ip link set dev $INTERFACE up
2f1173c986e6 [contrib/quicktun.socks4a] enjoy
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
29 ping -c 1 -I $INTERFACE $REMOTE_PEER_ADDRESS -r -w 5 >/dev/null 2>&1
2f1173c986e6 [contrib/quicktun.socks4a] enjoy
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
30 ) &
2f1173c986e6 [contrib/quicktun.socks4a] enjoy
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
31
2f1173c986e6 [contrib/quicktun.socks4a] enjoy
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
32 exec "`pwd`"/quicktun.socks4a