From a4a7a75cd70d41e45f12afbaba0b0bb3faa5dfd3 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Fri, 6 Nov 2020 15:51:03 +0200 Subject: Bypassing proxy on URL open with "noproxy" IssueID #25 --- src/app.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app.c b/src/app.c index 354d34d6..37279391 100644 --- a/src/app.c +++ b/src/app.c @@ -1015,11 +1015,13 @@ iBool handleCommand_App(const char *cmd) { } else if (equal_Command(cmd, "open")) { const iString *url = collectNewCStr_String(suffixPtr_Command(cmd, "url")); + const iBool noProxy = argLabel_Command(cmd, "noproxy"); iUrl parts; init_Url(&parts, url); if (equalCase_Rangecc(parts.scheme, "mailto") || - (isEmpty_String(&d->prefs.httpProxy) && (equalCase_Rangecc(parts.scheme, "http") || - equalCase_Rangecc(parts.scheme, "https")))) { + ((noProxy || isEmpty_String(&d->prefs.httpProxy)) && + (equalCase_Rangecc(parts.scheme, "http") || + equalCase_Rangecc(parts.scheme, "https")))) { openInDefaultBrowser_App(url); return iTrue; } -- cgit v1.2.3