Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the ability to configure empty bypass list for avoiding proxy bypass #13

Merged
merged 1 commit into from
Feb 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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