Mercurial > hg > nnchat
comparison main.c @ 633:ce605ac8167a
Proxy handling stuff.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 22 Jun 2014 02:12:37 +0300 |
parents | 005d7a0351b6 |
children | 43eee625021a |
comparison
equal
deleted
inserted
replaced
632:5b059a85cab8 | 633:ce605ac8167a |
---|---|
57 /* Options | 57 /* Options |
58 */ | 58 */ |
59 int optPort = 8005, | 59 int optPort = 8005, |
60 optProxyPort = 1080, | 60 optProxyPort = 1080, |
61 optProxyType = TH_PROXY_NONE, | 61 optProxyType = TH_PROXY_NONE, |
62 optProxyAuthType = TH_PROXY_AUTH_NONE; | 62 optProxyAuthType = TH_PROXY_AUTH_NONE, |
63 optProxyAddrType = TH_PROXY_ADDR_DOMAIN; | |
63 int optUserColor = 0x000000; | 64 int optUserColor = 0x000000; |
64 char *optServer = "chat.newbienudes.com", | 65 char *optServer = "chat.newbienudes.com", |
65 *optProxyServer = NULL, | 66 *optProxyServer = NULL, |
66 *optProxyUserID = NULL, | 67 *optProxyUserID = NULL, |
67 *optProxyPassword = NULL, | 68 *optProxyPassword = NULL, |
2224 { | 2225 { |
2225 if (optProxyUserID == NULL) | 2226 if (optProxyUserID == NULL) |
2226 optProxyUserID = "James Bond"; | 2227 optProxyUserID = "James Bond"; |
2227 | 2228 |
2228 if (th_conn_set_proxy(conn, optProxyType, optProxyPort, optProxyServer, optProxyAuthType) != THERR_OK || | 2229 if (th_conn_set_proxy(conn, optProxyType, optProxyPort, optProxyServer, optProxyAuthType) != THERR_OK || |
2229 th_conn_set_proxy_auth_user(conn, optProxyUserID, optProxyPassword) != THERR_OK) | 2230 th_conn_set_proxy_auth_user(conn, optProxyUserID, optProxyPassword) != THERR_OK || |
2231 th_conn_set_proxy_mode(conn, TH_PROXY_CMD_CONNECT) != THERR_OK || | |
2232 th_conn_set_proxy_addr_type(conn, optProxyAddrType)) | |
2230 { | 2233 { |
2231 errorMsg("Error setting proxy information.\n"); | 2234 errorMsg("Error setting proxy information.\n"); |
2232 goto err_exit; | 2235 goto err_exit; |
2233 } | 2236 } |
2234 } | 2237 } |