comparison main.c @ 625:edac1485308d

Socks5 support stuff, not finished yet (as SOCKS5 needs to be implemented in th_network)
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 21 Jun 2014 03:02:43 +0300
parents 24d97c710497
children 493c08d452d9
comparison
equal deleted inserted replaced
624:24d97c710497 625:edac1485308d
197 optProxyType = TH_PROXY_SOCKS4; 197 optProxyType = TH_PROXY_SOCKS4;
198 else 198 else
199 if (strcasecmp(proto, "socks4a") == 0) 199 if (strcasecmp(proto, "socks4a") == 0)
200 optProxyType = TH_PROXY_SOCKS4A; 200 optProxyType = TH_PROXY_SOCKS4A;
201 else 201 else
202 /*
203 if (strcasecmp(proto, "socks5") == 0)
204 optProxyType = TH_PROXY_SOCKS5;
205 else
206 */
202 { 207 {
203 THERR("Invalid proxy type specified: '%s'\n", proto); 208 THERR("Invalid proxy type specified: '%s'\n", proto);
204 goto out; 209 goto out;
205 } 210 }
206 211
237 optProxyPort = atoi(port); 242 optProxyPort = atoi(port);
238 else 243 else
239 optProxyServer = th_strdup(host); 244 optProxyServer = th_strdup(host);
240 245
241 // Check what authentication type to use 246 // Check what authentication type to use
242 /*
243 if (optProxyType == TH_PROXY_SOCKS5 && 247 if (optProxyType == TH_PROXY_SOCKS5 &&
244 optProxyUserID != NULL && optProxyPassword != NULL) 248 optProxyUserID != NULL && optProxyPassword != NULL)
245 optProxyAuthType = TH_PROXY_AUTH_USER; 249 optProxyAuthType = TH_PROXY_AUTH_USER;
246 else 250 else
247 */
248 optProxyAuthType = TH_PROXY_AUTH_NONE; 251 optProxyAuthType = TH_PROXY_AUTH_NONE;
249 252
250 ret = TRUE; 253 ret = TRUE;
251 254
252 out: 255 out: