# HG changeset patch # User Matti Hamalainen # Date 1400550285 -10800 # Node ID b10d81ddfc55c7357b9e9d37e9eaae65d79006be # Parent a8fa7803284a34313141935f6d73cb7e87658fa0 Use URI form of proxy configuration in the config file as well. diff -r a8fa7803284a -r b10d81ddfc55 main.c --- a/main.c Tue May 20 04:35:24 2014 +0300 +++ b/main.c Tue May 20 04:44:45 2014 +0300 @@ -1928,7 +1928,7 @@ nn_editbuf_t *editBuf = nn_editbuf_new(NN_TMPBUF_SIZE); nn_editstate_t editState; th_cfgitem_t *tmpcfg; - char *setHomeDir = NULL; + char *setHomeDir = NULL, *setProxyURI = NULL; memset(editHistBuf, 0, sizeof(editHistBuf)); clearEditState(&editState); @@ -1976,16 +1976,8 @@ th_cfg_add_section(&cfg, "server", tmpcfg); tmpcfg = NULL; - th_cfg_add_comment(&tmpcfg, "Proxy server type (0 = none, 1 = SOCKS 4, 2 = SOCKS 4a)"); - th_cfg_add_int(&tmpcfg, "type", &optProxyType, optProxyType); - th_cfg_add_comment(&tmpcfg, "Proxy server host name"); - th_cfg_add_string(&tmpcfg, "host", &optProxyServer, optProxyServer); - th_cfg_add_comment(&tmpcfg, "Proxy port, 1080 is the standard SOCKS port"); - th_cfg_add_int(&tmpcfg, "port", &optProxyPort, optProxyPort); - th_cfg_add_comment(&tmpcfg, "Proxy user ID"); - th_cfg_add_string(&tmpcfg, "userid", &optProxyUserID, optProxyUserID); -// th_cfg_add_comment(&tmpcfg, "Proxy password (only available for SOCKS 5)"); -// th_cfg_add_string(&tmpcfg, "password", &optProxyPassword, optProxyPassword); + th_cfg_add_comment(&tmpcfg, "Proxy URI (see comandline help for more information)"); + th_cfg_add_string(&tmpcfg, "uri", &setProxyURI, NULL); th_cfg_add_section(&cfg, "proxy", tmpcfg); @@ -2045,6 +2037,9 @@ } } + if (setProxyURI && !argHandleProxyURI(setProxyURI)) + goto err_exit; + optNickSep = optNickSepStr ? optNickSepStr[0] : SET_NICK_SEPARATOR; setBrowser = getenv("BROWSER");