Close

TUNTOX : Tunnel TCP connections over the Tox protocol

A project log for Wandboard experiments

Setting up the WBQUAD

christoph-tackChristoph Tack 06/06/2020 at 15:390 Comments

All the info and programs can be found on Github.

Download program

Starting the Tox-server on the wandboard

It's as simple as running that single command.  The shared secret is here "hellohello" (could use something more sophisticated).

ubuntu@wandboard:~$ TUNTOX_SHARED_SECRET=hellohello ./tuntox-armv7l 
2020-06-06 15:11:42: [INFO]     Tuntox built from git commit 0.0.9
2020-06-06 15:11:42: [INFO]     Using 11624 for TCP relay port and 50928-50938 for UDP
2020-06-06 15:11:42: [WARNING]  File not found (/etc/tuntox/tox_save)
2020-06-06 15:11:42: [WARNING]  Could not open save file
2020-06-06 15:11:42: [WARNING]  Could not open save file
2020-06-06 15:11:42: [INFO]     Using Tox ID: 6611AA8F892AC73A88C43379C0CA31F1FDA58EED917D970846A43A45BF664966E48678E3ABB1
2020-06-06 15:11:51: [INFO]     Connection status changed: An UDP connection has been established
2020-06-06 15:14:51: [INFO]     Accepted friend request from 9E85FB6D952DDE04580E87E5EEBFD46E75DBD322B374D973EA214DF16C8EE3313E4E7AF0A901 as 0
2020-06-06 15:16:06: [INFO]     Got a request to forward data from 127.0.0.1:22
2020-06-06 15:16:06: [INFO]     Created a new tunnel object connid=35487 sockfd=8

Client connecting to the Tox-server

This command connects to the server and sets up local port forwarding.

christoph@christoph-ThinkPad-L580:~/Documents/InterestingStuff/remoteConnection$ TUNTOX_SHARED_SECRET=hellohello ./tuntox-x64 -i 6611AA8F892AC73A88C43379C0CA31F1FDA58EED917D970846A43A45BF664966E48678E3ABB1 -L 2222:127.0.0.1:22
2020-06-06 17:14:32: [DEBUG]	Server whitelist mode enabled
2020-06-06 17:14:32: [INFO]	Tuntox built from git commit 896775c6089baa24edee06e04f5b83c3bb3bef5d
2020-06-06 17:14:32: [INFO]	Using 17636 for TCP relay port and 56728-56738 for UDP
2020-06-06 17:14:32: [INFO]	Connecting to Tox...
2020-06-06 17:14:40: [INFO]	Connection status changed: An UDP connection has been established
2020-06-06 17:14:40: [INFO]	Connected. Sending friend request.
2020-06-06 17:14:40: [INFO]	Waiting for friend to accept us...
2020-06-06 17:14:53: [INFO]	Friend request accepted (A TCP connection has been established (via TCP relay))!
2020-06-06 17:16:06: [INFO]	Accepting a new connection - requesting tunnel...
2020-06-06 17:16:06: [INFO]	Sending packet to friend #0 to forward 127.0.0.1:22
2020-06-06 17:16:06: [INFO]	Created a new tunnel object connid=35487 sockfd=7
2020-06-06 17:16:06: [INFO]	Accepted a new connection on port 2222

 In another window, the client can now make a SSH connection on port 2222 which will be forwarded to the Tox-server's port 22.

christoph@christoph-ThinkPad-L580:~/Documents/InterestingStuff/remoteConnection$ ssh -p 2222 ubuntu@localhost
The authenticity of host '[localhost]:2222 ([127.0.0.1]:2222)' can't be established.
ECDSA key fingerprint is SHA256:DsYVUlf605cdhz55Anl14mqYHqnV7ZKEcm4O0xyTaOk.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[localhost]:2222' (ECDSA) to the list of known hosts.
Last login: Sat Jun  6 15:10:44 2020
ubuntu@wandboard:~$ 

 Well, that wasn't hard, was it?  The connection seems to be lagging a bit.

Discussions