Subject | Hash | Author | Date (UTC) |
---|---|---|---|
Allow wildcards in rules | 8d6a48bb3dd59a3193c4e0bfa2397c502186bb87 | Andrew Cady | 2020-08-21 12:03:58 |
Fix ping - move to protocol v2 | 56e4e699d2c62321356909e8a7dd1007134d83c3 | GDR! | 2023-03-15 08:53:21 |
-I option for saving tox id to a file | 0d835405e8ecb68b5904370632bc3280b3491744 | GDR! | 2023-03-15 08:17:01 |
Reject packet type | 4b726f549c4f5aa4d80f5ccde0b371d8568e0b55 | GDR! | 2023-03-15 08:01:48 |
Multiple -L working | a79c3fd655d045683f097675d9acb8e4d582c175 | GDR! | 2023-03-15 07:59:00 |
It buildsmake | 8011c477ececd3cac58dafc5d54c1721d6550fce | GDR! | 2023-03-15 06:35:50 |
Cleanup | 450509a24e93e855753f9c51dd04dde7e4ad7e3a | GDR! | 2023-03-14 20:02:33 |
Introduce local forward ID | 71f125f17cd36582e0dc98e6bc9aca560e445c5a | GDR! | 2023-03-14 19:53:36 |
Update distro packages | ef1f283cb74e3a1528596bce5ed235e7c02965a3 | GDR! | 2022-10-17 19:39:58 |
Update distro packages | df86301b9ecd967d09ab0e1e41c51796de4f2878 | GDR! | 2022-10-17 19:36:49 |
Clarify proxying in server mode | 0216b71250169e6183f36e2e478fcaa15a0dafdd | GDR! | 2022-10-17 19:27:24 |
SOCKS5 and HTTP proxies for outgoing connections | b8dc5ed52bd8af4f5c7ec5b1ad939f9876abfb45 | GDR! | 2022-10-17 19:23:11 |
Support for connecting to Tox via SOCKS5 | d39817bf9b92d3dd31e4f56aa7da5cae13bb71e7 | GDR! | 2022-10-17 18:25:48 |
include print_version_stdout declaration in main.c, conditionally add -lrt flag for non-macos | 555c3a132b8a8a0a3a39c10184c9ae3912193780 | Arte Ebrahimi | 2022-07-17 23:44:35 |
Update LICENSE.md | abe4bf14de00702f540be8522d4cac06601f61cd | GDR! | 2022-06-13 08:20:13 |
Update LICENSE.md | ff58a37ec391e82cc7470ee76c803815cf4aa362 | GDR! | 2022-06-13 08:19:54 |
Add -V for version check | 5ebfd8865f820bd50fa74947f41bd914354bbc2f | GDR! | 2022-06-12 11:48:07 |
Fix tabs/spaces in main.c | 0ba3dc62293ece11400673965b89a99d91d7e8ed | GDR! | 2022-06-12 11:42:29 |
Print --help to stdout instead of stderr | ed9ce9cf470560562346445e5bc937701b0ac0ec | GDR! | 2022-06-12 11:41:20 |
Fix bitbucket deb build that was missing gitversion | 0b01538c9bc8b1620385346dbc04bc8d4f06497b | GDR! | 2022-06-12 11:35:19 |
File | Lines added | Lines deleted |
---|---|---|
main.c | 6 | 7 |
File main.c changed (mode: 100644) (index 81231ea..efa2276) | |||
... | ... | int allowed_toxid_cmp(allowed_toxid *a, allowed_toxid *b) | |
108 | 108 | return memcmp(a->toxid, b->toxid, TOX_PUBLIC_KEY_SIZE); | return memcmp(a->toxid, b->toxid, TOX_PUBLIC_KEY_SIZE); |
109 | 109 | } | } |
110 | 110 | ||
111 | /* Comparison function for rule objects */ | ||
112 | int rule_cmp(rule *a, rule *b) | ||
111 | /* Match rule r against candidate host, port. Returns 0 for match. */ | ||
112 | int rule_match(rule *r, rule *candidate) | ||
113 | 113 | { | { |
114 | //log_printf(L_INFO, "Comparison result: %d %d\n", strcmp(a->host, b->host), (a->port == b->port)); | ||
115 | if ((strcmp(a->host, b->host)==0) && (a->port == b->port)) | ||
116 | return 0; | ||
117 | else | ||
118 | return -1; | ||
114 | bool host_match = !strcmp(r->host, "*") || !strcmp(r->host, candidate->host); | ||
115 | bool port_match = r->port == 0 || r->port == candidate->port; | ||
116 | |||
117 | return port_match && host_match ? 0 : -1; | ||
119 | 118 | } | } |
120 | 119 | ||
121 | 120 | void update_select_nfds(int fd) | void update_select_nfds(int fd) |