Skip to content

Commit

Permalink
Add the ability to configure empty bypass list for avoiding proxy bypass
Browse files Browse the repository at this point in the history
  • Loading branch information
sergio-nsk authored and nmoinvaz committed Feb 3, 2023
1 parent 6454d03 commit 8841c3a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion config.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
3 changes: 3 additions & 0 deletions doc/proxy_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 8841c3a

Please sign in to comment.