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

Revert "Check for empty string when setting proxy override settings." #29

Merged
merged 1 commit into from
Feb 9, 2023
Merged
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
6 changes: 3 additions & 3 deletions config.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,20 +69,20 @@ char *proxy_config_get_bypass_list(void) {
void proxy_config_set_auto_config_url_override(const char *auto_config_url) {
if (g_proxy_config.auto_config_url)
free(g_proxy_config.auto_config_url);
g_proxy_config.auto_config_url = auto_config_url && *auto_config_url ? strdup(auto_config_url) : NULL;
g_proxy_config.auto_config_url = auto_config_url ? strdup(auto_config_url) : NULL;
g_proxy_config.auto_discover_disable = auto_config_url != NULL;
}

void proxy_config_set_proxy_override(const char *proxy) {
if (g_proxy_config.proxy)
free(g_proxy_config.proxy);
g_proxy_config.proxy = proxy && *proxy ? strdup(proxy) : NULL;
g_proxy_config.proxy = proxy ? strdup(proxy) : NULL;
g_proxy_config.auto_discover_disable = proxy != NULL;
}

void proxy_config_set_bypass_list_override(const char *bypass_list) {
free(g_proxy_config.bypass_list);
g_proxy_config.bypass_list = bypass_list && *bypass_list ? strdup(bypass_list) : NULL;
g_proxy_config.bypass_list = bypass_list ? strdup(bypass_list) : NULL;
}

bool proxy_config_global_init(void) {
Expand Down