diff --git a/config.c b/config.c index f322fde..0482201 100644 --- a/config.c +++ b/config.c @@ -60,7 +60,7 @@ char *proxy_config_get_proxy(const char *scheme) { char *proxy_config_get_bypass_list(void) { if (g_proxy_config.bypass_list) - return strdup(g_proxy_config.bypass_list); + return *g_proxy_config.bypass_list ? strdup(g_proxy_config.bypass_list) : NULL; if (!g_proxy_config.proxy_config_i) return NULL; return g_proxy_config.proxy_config_i->get_bypass_list(); diff --git a/doc/proxy_config.md b/doc/proxy_config.md index bebd405..b2744e9 100644 --- a/doc/proxy_config.md +++ b/doc/proxy_config.md @@ -118,6 +118,9 @@ Override the user's configured proxy bypass list. |-|-|:-| |const char *|bypass_list|Comma-separated list of proxy bypass expressions.| +Pass `NULL` to use the proxy bypass list configured on the user's system (default behavior). +Pass the empty string `""` to avoid bypassing the proxy. + **Example** ```c proxy_config_set_bypass_list_override("complex.com,welldone.com");