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)
Support IPv6 bootstrap nodes a646402f42e120c7148d4de29dbdf5b09027a80a GDR! 2021-12-24 10:37:23
Clean up merged code for JSON bootstrap nodes 7d45afdf7d00a95a8c3687175e2b1669fa1f7745 GDR! 2021-12-24 10:08:50
Added option to bootstrap from json file. 8a409731543aa2cdcba5035091e4f219d8603a76 Pietro Bonfa 2021-12-24 09:20:19
Add a break statement to silence Coverity 1e5c86a2b997f43117adbc18f8b1c16fed4c6eab GDR! 2021-12-10 10:33:02
Clean up indentation 0dc0012b699584828648ad5597ee17b77e275983 GDR! 2021-12-10 10:32:12
0.0.10 5923903d6e48e7990172f0d54394fa2bbc69ca9e GDR! 2021-12-07 08:58:46
Change docker-compose image address 18b0864c66767ed1f300f1f0ec2a2569b749c628 GDR! 2021-04-27 10:42:59
New docker image address at dockerhub 2e9e79947ecb9b62add1ff957d6b71a448d1d87b GDR! 2020-08-15 18:00:18
Add missing dockerfile d91e8ea5765bacfe3072d709d8c552d7f59f18d1 GDR! 2020-08-15 17:42:53
Perform a complete build inside Docker 92312438844988e45da6b1804cdb19ca7beef7bd GDR! 2020-08-15 17:19:52
Fix gcc warnings about strncpy a0fb587f1be623423db9d1e9882341731fab8ec5 GDR! 2020-08-15 16:50:44
Fix travis 07fd5cd5506b65afbd15c7289a341cb27da71114 GDR! 2020-08-15 16:36:25
Use py3 in travis c5e965f824faaa1a95647c469d0d8e4add17b3cd GDR! 2020-08-15 16:29:57
FreeBSD build instructions d20567154fb91de3a73baac9361d3ae99984e55c GDR! 2020-08-15 14:44:23
FAQ - links to packages 8691dbe266c51f788f763e0af3c712f3bab97f6f GDR! 2020-08-15 14:01:38
Try to name the deb appropiately 9e834d9af82f5819a59313c0b2276ba0dc2b0477 GDR! 2020-08-15 08:11:32
Lets try creating .tar.gz without dh_make 5d4dee4428e17f76b3b4a8ca769fad8695d8f02d GDR! 2020-08-15 08:04:57
Prevent dh_make warnings from stopping the build ca6a8b1f62e307c0430856619fc2b7797a71ec94 GDR! 2020-08-15 08:00:28
-y for dh_make 194a2bb10b581765d0a2a4c3e78965d4ad0e40df GDR! 2020-08-15 07:57:58
fix dh_make 7ae361ddb1d5d9e310c196e37c9e50e907c7d79c GDR! 2020-08-15 07:54:45
Commit a646402f42e120c7148d4de29dbdf5b09027a80a - Support IPv6 bootstrap nodes
Author: GDR!
Author date (UTC): 2021-12-24 10:37
Committer name: GDR!
Committer date (UTC): 2021-12-24 10:37
Parent(s): 7d45afdf7d00a95a8c3687175e2b1669fa1f7745
Signer:
Signing key: 557FAEF4E8799852
Signing status: E
Tree: 07255697d048972749e6115410ef14ab1ed22d4c
File Lines added Lines deleted
gitversion.h 1 1
tox_bootstrap_json.c 12 4
util.c 10 3
util.h 2 1
File gitversion.h changed (mode: 100644) (index ba81d9d..60a7510)
1 #define GITVERSION "f6efcab78be01b96cab761b015110e1feb154ea2"
1 #define GITVERSION "7d45afdf7d00a95a8c3687175e2b1669fa1f7745"
File tox_bootstrap_json.c changed (mode: 100644) (index 61e9f69..61c6bc0)
... ... void do_bootstrap_file(Tox *tox, const char *json_file)
61 61 continue; continue;
62 62 } }
63 63
64 if (!isValidIPv4(ipv4->valuestring)) {
64 if (!is_valid_ipv4(ipv4->valuestring) && !is_valid_ipv6(ipv6->valuestring)) {
65 65 log_printf(L_INFO, "Skipping \"%s:%d\" %s\n", ipv4->valuestring, port->valueint, pk->valuestring); log_printf(L_INFO, "Skipping \"%s:%d\" %s\n", ipv4->valuestring, port->valueint, pk->valuestring);
66 66 continue; continue;
67 67 } }
68 68
69 log_printf(L_INFO, "Bootstrapping from \"%s:%d\" %s\n", ipv4->valuestring, port->valueint, pk->valuestring);
70
71 69 /* Could have used sodium here, but did not want to change dependencies. Alternative is: /* Could have used sodium here, but did not want to change dependencies. Alternative is:
72 70 sodium_hex2bin(key_bin, sizeof(key_bin), pk->valuestring, sizeof(pk->valuestring)-1, NULL, NULL, NULL); sodium_hex2bin(key_bin, sizeof(key_bin), pk->valuestring, sizeof(pk->valuestring)-1, NULL, NULL, NULL);
73 71 */ */
74 72 hex_string_to_bin(pk->valuestring, sizeof(pk->valuestring)-1, key_bin); hex_string_to_bin(pk->valuestring, sizeof(pk->valuestring)-1, key_bin);
75 73
76 tox_bootstrap(tox, ipv4->valuestring, port->valueint, key_bin, NULL);
74 if(is_valid_ipv4(ipv4->valuestring))
75 {
76 tox_bootstrap(tox, ipv4->valuestring, port->valueint, key_bin, NULL);
77 log_printf(L_INFO, "Bootstrapping from \"%s:%d\" %s\n", ipv4->valuestring, port->valueint, pk->valuestring);
78 }
79
80 if(is_valid_ipv6(ipv6->valuestring))
81 {
82 tox_bootstrap(tox, ipv6->valuestring, port->valueint, key_bin, NULL);
83 log_printf(L_INFO, "Bootstrapping from \"%s:%d\" %s\n", ipv6->valuestring, port->valueint, pk->valuestring);
84 }
77 85
78 86 tcp_ports = cJSON_GetObjectItemCaseSensitive(node, "tcp_ports"); tcp_ports = cJSON_GetObjectItemCaseSensitive(node, "tcp_ports");
79 87 cJSON_ArrayForEach(tcp_port, tcp_ports) { cJSON_ArrayForEach(tcp_port, tcp_ports) {
File util.c changed (mode: 100644) (index 5299415..0587e30)
1 1 #include "log.h" #include "log.h"
2 2 #include "util.h" #include "util.h"
3 #include <arpa/inet.h>
3 4 #include <string.h> #include <string.h>
4 5 #include <tox/tox.h> #include <tox/tox.h>
5 6 #include <stdio.h> #include <stdio.h>
 
... ... size_t hex_string_to_bin(const char *hex_string, size_t hex_len, uint8_t *bytes)
228 229 } }
229 230
230 231 /* Very stupid test to filter out hostnames */ /* Very stupid test to filter out hostnames */
231 bool isValidIPv4(const char *ip_address)
232 bool is_valid_ipv4(const char *ip_address)
232 233 { {
233 unsigned int a,b,c,d;
234 return sscanf(ip_address,"%u.%u.%u.%u", &a, &b, &c, &d) == 4;
234 unsigned int a,b,c,d;
235 return sscanf(ip_address,"%u.%u.%u.%u", &a, &b, &c, &d) == 4;
236 }
237
238 bool is_valid_ipv6(const char *ip_address)
239 {
240 struct in6_addr result;
241 return (inet_pton(AF_INET6, ip_address, &result) == 1);
235 242 } }
File util.h changed (mode: 100644) (index 1d3b339..fea57af)
... ... const char *readable_connection_status(TOX_CONNECTION status);
16 16 int parse_local_port_forward(char *string, int *local_port, char **hostname, int *remote_port); int parse_local_port_forward(char *string, int *local_port, char **hostname, int *remote_port);
17 17 int parse_pipe_port_forward(char *string, char **hostname, int *remote_port); int parse_pipe_port_forward(char *string, char **hostname, int *remote_port);
18 18 size_t hex_string_to_bin(const char *hex_string, size_t hex_len, uint8_t *bytes); size_t hex_string_to_bin(const char *hex_string, size_t hex_len, uint8_t *bytes);
19 bool isValidIPv4(const char *ip_address);
19 bool is_valid_ipv4(const char *ip_address);
20 bool is_valid_ipv6(const char *ip_address);
20 21
21 22 #endif #endif
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