diff options
author | iphydf <iphydf@users.noreply.github.com> | 2018-06-23 14:24:04 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2018-06-23 17:36:37 +0000 |
commit | ca75c014a41c2d207f705f49a9e0ce696dc0f0a7 (patch) | |
tree | 412596b5cea76b7f1f06dc3c7f457d5b09fa6a96 /toxcore/Messenger.c | |
parent | 64d115e52d3e506c360f221b67893ce41423716e (diff) |
Disable UDP when proxy is enabled.
Currently, toxcore does not support UDP over proxies. In the future, we
can relax this by disabling UDP only if the proxy doesn't support it.
Diffstat (limited to 'toxcore/Messenger.c')
-rw-r--r-- | toxcore/Messenger.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index 11109815..e3ceeb86 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c | |||
@@ -1993,6 +1993,12 @@ Messenger *new_messenger(Messenger_Options *options, unsigned int *error) | |||
1993 | 1993 | ||
1994 | unsigned int net_err = 0; | 1994 | unsigned int net_err = 0; |
1995 | 1995 | ||
1996 | if (!options->udp_disabled && options->proxy_info.proxy_type != TCP_PROXY_NONE) { | ||
1997 | // We don't currently support UDP over proxy. | ||
1998 | LOGGER_WARNING(m->log, "UDP enabled and proxy set: disabling UDP"); | ||
1999 | options->udp_disabled = true; | ||
2000 | } | ||
2001 | |||
1996 | if (options->udp_disabled) { | 2002 | if (options->udp_disabled) { |
1997 | m->net = new_networking_no_udp(m->log); | 2003 | m->net = new_networking_no_udp(m->log); |
1998 | } else { | 2004 | } else { |