gdr / tuntox (public) (License: GPLv3) (since 2017-01-24) (hash sha1)
Tunnel TCP connections over the Tox protocol
List of commits:
Subject Hash Author Date (UTC)
Rename -P to -W for consistency with SSH client a2ad73a5b544459a3d0ee8c7e408ac058c040dc0 GDR! 2017-10-20 20:53:03
Bump versions and new deps in Travis 77177d357b5bcb2e7fedabcceab3df085b73e9f0 GDR! 2017-10-20 20:50:10
Makefile compatible with c-toxcore 0.1.10 00e059f854254cc7bc9722e3cc4f8450398f3ccc GDR! 2017-10-20 20:31:46
New bootstrap nodes 5339a624aba30799494c876a970d1d9fd010ec1b GDR! 2017-10-20 20:03:06
Rename rtmp to more readable temp_rule d41a65bc350a151075dba23729727d8f44cb76ce GDR! 2017-10-20 19:47:11
Fix warning - control reaches end of non-void function e36cd56347fd88d4943faf3edbbdefc72435db23 GDR! 2017-10-20 19:41:28
Clarify PSK 8498602e68a73b56675d1a022f9f84aa3d504b9b GDR! 2017-06-28 13:42:56
Close Issue #42 c1a04ae71aa9dd7a590035326d5dabac31645fca Andrzej Godziuk 2017-05-04 10:17:49
Configurable TCP and UDP listen ports 3acdcaaa65badbf3feb7d5438fdf1f66e1faa955 Andrzej Godziuk 2017-04-19 20:30:10
Fix Travis build 38678c2c0a3c03acece160a05a771dd10ee20277 Andrzej Godziuk 2017-04-19 12:09:33
Fix Travis build f12ed68c482d08681b6be2e2045c1840a52d1e97 Andrzej Godziuk 2017-04-19 12:03:22
Fix Travis build 1931c1218b24612724c2da679199c786e6a30652 Andrzej Godziuk 2017-04-19 11:52:34
Update VPN.md 8bacf02a4bd50eaded5d9c86fc8b7ff103d16341 GDR! 2017-04-18 16:40:38
Improve data transfer speed and latency fe1b53fd47ffd5a527d9e072ad179028e0330d2c ValdikSS 2017-04-16 18:19:07
tokssh: add missing secret option to cmd line 🤦 65243979ba7216b32045c5da98c98f2686a97f7a fabrixxm 2017-04-07 19:11:12
tokssh: shared secret support,fix no user cmd line d59b35d00bf2da3eb185043bba08acb3acc7c977 fabrixxm 2017-04-07 19:07:03
Try installing jinja2 with pip not apt 0ba5a19f9942b8086474d91561b9b14a87aa042e GDR! 2017-02-01 10:52:10
Remove devnull redirect in travis.yml 162b886c7e7a8f59aee7f7e58ec7dee338d327d0 GDR! 2017-01-31 21:16:12
Install jinja2 in Travis 1d49afc7c880d940ba2d75ff7807b64d27de15ca GDR! 2017-01-31 20:12:24
Nicer help message d77375c08113707235fe3949a7020bb87a7fdc41 Francesco Gazzetta 2017-01-24 18:16:03
Commit a2ad73a5b544459a3d0ee8c7e408ac058c040dc0 - Rename -P to -W for consistency with SSH client
Author: GDR!
Author date (UTC): 2017-10-20 20:53
Committer name: GDR!
Committer date (UTC): 2017-10-20 20:53
Parent(s): 77177d357b5bcb2e7fedabcceab3df085b73e9f0
Signer:
Signing key: 9BEBA5223DB93046
Signing status: E
Tree: 6289ab7251ca0d4190c0538c91cf7318c43b6555
File Lines added Lines deleted
README.md 1 1
VPN.md 2 2
main.c 3 3
scripts/tokssh 2 2
util.c 1 1
File README.md changed (mode: 100644) (index 06443ef..de1c5ad)
... ... The -L switch works (almost) the same way it does in SSH. For the uninitiated, -
54 54
55 55 Alternatively, SSH ProxyCommand mode works too: Alternatively, SSH ProxyCommand mode works too:
56 56
57 ssh -o ProxyCommand='./tuntox -i <ToxID> -P localhost:22' gdr@localhost
57 ssh -o ProxyCommand='./tuntox -i <ToxID> -W localhost:22' gdr@localhost
58 58
59 59 Fun stuff: [VPN over Tox](VPN.md) Fun stuff: [VPN over Tox](VPN.md)
60 60
File VPN.md changed (mode: 100644) (index 73faf4c..7fe339a)
... ... On the server (where tuntox is already running):
8 8
9 9 On the client: On the client:
10 10
11 socat -d -d TUN:10.20.30.40/24,up 'SYSTEM:./tuntox -P 127.0.0.1@9876 -i 86e70ffe9f835b12667d296f2df9c307ba1aff06'
11 socat -d -d TUN:10.20.30.40/24,up 'SYSTEM:./tuntox -W 127.0.0.1@9876 -i 86e70ffe9f835b12667d296f2df9c307ba1aff06'
12 12
13 13 Viola, you have a point-to-point VPN. On client: Viola, you have a point-to-point VPN. On client:
14 14
 
... ... Also: inefficient, insecure (requires PermitRootLogin yes on server).
28 28
29 29 On the client: On the client:
30 30
31 socat -d -d TUN:10.20.30.40/24,up 'SYSTEM:ssh root@localhost -o ProxyCommand=\"./tuntox -P "127.0.0.1:22" -d -i 86e70ffe9f835b12667d296f2df9c307ba1aff06\" socat -d -d - "TUN:10.20.30.41/24,up"'
31 socat -d -d TUN:10.20.30.40/24,up 'SYSTEM:ssh root@localhost -o ProxyCommand=\"./tuntox -W "127.0.0.1:22" -d -i 86e70ffe9f835b12667d296f2df9c307ba1aff06\" socat -d -d - "TUN:10.20.30.41/24,up"'
32 32
33 33 # ping 10.20.30.41 # ping 10.20.30.41
34 34 PING 10.20.30.41 (10.20.30.41) 56(84) bytes of data. PING 10.20.30.41 (10.20.30.41) 56(84) bytes of data.
File main.c changed (mode: 100644) (index 4d211d7..0d2e5e8)
... ... void help()
1181 1181 fprintf(stderr, " -i <toxid> - remote point Tox ID\n"); fprintf(stderr, " -i <toxid> - remote point Tox ID\n");
1182 1182 fprintf(stderr, " -L <localport>:<remotehostname>:<remoteport>\n"); fprintf(stderr, " -L <localport>:<remotehostname>:<remoteport>\n");
1183 1183 fprintf(stderr, " - forward <remotehostname>:<remoteport> to 127.0.0.1:<localport>\n"); fprintf(stderr, " - forward <remotehostname>:<remoteport> to 127.0.0.1:<localport>\n");
1184 fprintf(stderr, " -P <remotehostname>:<remoteport> - forward <remotehostname>:<remoteport> to\n");
1184 fprintf(stderr, " -W <remotehostname>:<remoteport> - forward <remotehostname>:<remoteport> to\n");
1185 1185 fprintf(stderr, " stdin/stdout (SSH ProxyCommand mode)\n"); fprintf(stderr, " stdin/stdout (SSH ProxyCommand mode)\n");
1186 1186 fprintf(stderr, " -p - ping the server from -i and exit\n"); fprintf(stderr, " -p - ping the server from -i and exit\n");
1187 1187 fprintf(stderr, " Common:\n"); fprintf(stderr, " Common:\n");
 
... ... int main(int argc, char *argv[])
1237 1237 } }
1238 1238 log_printf(L_DEBUG, "Forwarding remote port %d to local port %d\n", remote_port, local_port); log_printf(L_DEBUG, "Forwarding remote port %d to local port %d\n", remote_port, local_port);
1239 1239 break; break;
1240 case 'P':
1240 case 'W':
1241 1241 /* Pipe forwarding */ /* Pipe forwarding */
1242 1242 client_mode = 1; client_mode = 1;
1243 1243 client_pipe_mode = 1; client_pipe_mode = 1;
1244 1244 if(parse_pipe_port_forward(optarg, &remote_host, &remote_port) < 0) if(parse_pipe_port_forward(optarg, &remote_host, &remote_port) < 0)
1245 1245 { {
1246 log_printf(L_ERROR, "Invalid value for -P option - use something like -P 127.0.0.1:22\n");
1246 log_printf(L_ERROR, "Invalid value for -W option - use something like -W 127.0.0.1:22\n");
1247 1247 exit(1); exit(1);
1248 1248 } }
1249 1249 if(min_log_level == L_UNSET) if(min_log_level == L_UNSET)
File scripts/tokssh changed (mode: 100755) (index 0017221..6bdb74d)
... ... then
29 29 # last argument is user@toxid # last argument is user@toxid
30 30 user=${arruserhost[0]} user=${arruserhost[0]}
31 31 toxid=${arruserhost[1]} toxid=${arruserhost[1]}
32 ssh -o ProxyCommand="tuntox -i $toxid -P 127.0.0.1:%p $secret" $args $user@localhost
32 ssh -o ProxyCommand="tuntox -i $toxid -W 127.0.0.1:%p $secret" $args $user@localhost
33 33 else else
34 34 # last argument is just toxid # last argument is just toxid
35 ssh -o ProxyCommand="tuntox -i $userhost -P 127.0.0.1:%p $secret" $args localhost
35 ssh -o ProxyCommand="tuntox -i $userhost -W 127.0.0.1:%p $secret" $args localhost
36 36 fi fi
37 37
File util.c changed (mode: 100644) (index b1353b3..4d75fe5)
... ... int parse_local_port_forward(char *string, int *local_port, char **hostname, int
114 114 return 0; return 0;
115 115 } }
116 116
117 /* Parse the -P parameter */
117 /* Parse the -W parameter */
118 118 /* 0 = success */ /* 0 = success */
119 119 int parse_pipe_port_forward(char *string, char **hostname, int *remote_port) int parse_pipe_port_forward(char *string, char **hostname, int *remote_port)
120 120 { {
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/gdr/tuntox

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/gdr/tuntox

Clone this repository using git:
git clone git://git.rocketgit.com/user/gdr/tuntox

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main