** Revision based on feedback
* API
define_hook("proxy_enabled_hook");
define_hook("proxy_disabled_hook");
define_hook("proxy_profile_updated_hook");
// Proxy modes.
PROXY_NONE = 0;
PROXY_AUTO_DETECT = 1;
PROXY_AUTO_CONFIG = 2;
PROXY_SYSTEM = 4;
PROXY_MANUAL = 5;
define_keywords("$http", "$ssl", "$ftp", "$gopher", "$socks", "$socks_ver",
"$socks_dns", "$excludes" "$ac_url", "$ac_retry_min",
"$ac_retry_max", "$ac_timeout", "$mode");
function proxy_define_profile(name) {}
function proxy_remove_profile(name) {}
function proxy_enable(name) {}
function proxy_disable() {}
function proxy_toggle() {}
interactive("proxy-toggle", "Toggle use of proxy.", proxy_toggle);
function proxy_enable_mode_line(formatter) {}
* Changes
Eliminate 'proxy_update_profile' - 'proxy_define_profile' will handle updating existing profiles.
The proxy mode is now part of the profile.
retroj suggests having some pre-defined profiles for system and auto-detection. Profiles for popular
proxies like privoxy might not be a bad idea either.
Note that one would switch from one profile to another by calling 'proxy_profile_enable' with the new
profile name, without the need to first call 'proxy_disable'. |