diff options
author | vext01 <vext01@gmail.com> | 2012-06-07 11:03:34 +0100 |
---|---|---|
committer | vext01 <vext01@gmail.com> | 2012-06-07 15:17:03 +0100 |
commit | 0141c3d067a89a9a372d8aaa1abab89d739fe6e7 (patch) | |
tree | 0c802956dba8cfe5992f1593091c09bce1bffa23 /xombrero.c | |
parent | 8c87a2283c7cec587d11bcd165dfe0408451aea6 (diff) | |
download | xombrero-0141c3d067a89a9a372d8aaa1abab89d739fe6e7.tar.gz |
Some tweaks to xombrero's proxy support.
* Display a message when toggling proxy. * Add a 'http_proxy_disabled' config option allowing a proxy to be disabled at xombrero start. * Add a note in the manual that polipo works with xombrero aswell as tsocks. * In the config file, provide examples for polipo and tsocks running on localhost with default ports. OK marco
Diffstat (limited to 'xombrero.c')
-rw-r--r-- | xombrero.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/xombrero.c b/xombrero.c index 1d63855..20894e8 100644 --- a/xombrero.c +++ b/xombrero.c @@ -3070,10 +3070,13 @@ proxy_cmd(struct tab *t, struct karg *args) show_oops(t, "can't toggle proxy"); goto done; } - if (http_proxy) + if (http_proxy) { setup_proxy(NULL); - else + show_oops(t, "http proxy disabled"); + } else { setup_proxy(http_proxy_save); + show_oops(t, "http_proxy = %s", http_proxy); + } } done: return (XT_CB_PASSTHROUGH); @@ -8096,6 +8099,13 @@ main(int argc, char **argv) else setup_proxy(http_proxy); } + + /* the user can optionally have the proxy disabled at startup */ + if ((http_proxy_starts_enabled == 0) && (http_proxy != NULL)) { + http_proxy_save = g_strdup(http_proxy); + setup_proxy(NULL); + } + #ifndef XT_SOCKET_DISABLE if (opte) { send_cmd_to_socket(argv[0]); |