summaryrefslogtreecommitdiff
path: root/toxcore/tox.c
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/tox.c')
-rw-r--r--toxcore/tox.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/toxcore/tox.c b/toxcore/tox.c
index 3f458ac2..d7f231b5 100644
--- a/toxcore/tox.c
+++ b/toxcore/tox.c
@@ -1020,9 +1020,20 @@ Tox *tox_new(Tox_Options *options)
1020 } else { 1020 } else {
1021 m_options.ipv6enabled = options->ipv6enabled; 1021 m_options.ipv6enabled = options->ipv6enabled;
1022 m_options.udp_disabled = options->udp_disabled; 1022 m_options.udp_disabled = options->udp_disabled;
1023 m_options.proxy_enabled = options->proxy_enabled;
1024 1023
1025 if (m_options.proxy_enabled) { 1024 switch (options->proxy_type) {
1025 case TOX_PROXY_HTTP:
1026 m_options.proxy_info.proxy_type = TCP_PROXY_HTTP;
1027 break;
1028 case TOX_PROXY_SOCKS5:
1029 m_options.proxy_info.proxy_type = TCP_PROXY_SOCKS5;
1030 break;
1031 case TOX_PROXY_NONE:
1032 m_options.proxy_info.proxy_type = TCP_PROXY_NONE;
1033 break;
1034 }
1035
1036 if (m_options.proxy_info.proxy_type != TCP_PROXY_NONE) {
1026 ip_init(&m_options.proxy_info.ip_port.ip, m_options.ipv6enabled); 1037 ip_init(&m_options.proxy_info.ip_port.ip, m_options.ipv6enabled);
1027 1038
1028 if (m_options.ipv6enabled) 1039 if (m_options.ipv6enabled)