From 1bde4fa2fb2e18cb1352c4e805470768d0ee835b Mon Sep 17 00:00:00 2001 From: Mohammad Amin Pasban <61119119+mAminP@users.noreply.github.com> Date: Thu, 21 Sep 2023 23:06:44 +0330 Subject: [PATCH 1/2] Update features.js if confition changed for do not proxy request if x-do-not-proxy header was set --- firefox/src/features.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firefox/src/features.js b/firefox/src/features.js index 9a9bdae..19c1efd 100644 --- a/firefox/src/features.js +++ b/firefox/src/features.js @@ -30,7 +30,7 @@ class Feature { function proxify(config, onlyContainers) { return async function (e) { - if (onlyContainers && e.cookieStoreId == 'firefox-default') + if ((onlyContainers && e.cookieStoreId == 'firefox-default') || e.requestHeaders.some(header => header.name === "X-Do-Not-Proxy" && header.value === "on")) return { type: "direct" }; const host = await config.get("burpProxyHost") const port = await config.get("burpProxyPort") @@ -295,4 +295,4 @@ class ContentScriptFeatures extends FeaturesGroup { ] super(config, features) } -} \ No newline at end of file +} From 26c881ba203d2d458186247455b9e3d481439066 Mon Sep 17 00:00:00 2001 From: Mohammad Amin Pasban <61119119+mAminP@users.noreply.github.com> Date: Thu, 21 Sep 2023 23:55:35 +0330 Subject: [PATCH 2/2] Update features.js if confition changed for do not proxy request if x-do-not-proxy header was set :) --- firefox/src/features.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firefox/src/features.js b/firefox/src/features.js index 19c1efd..661c6e1 100644 --- a/firefox/src/features.js +++ b/firefox/src/features.js @@ -54,7 +54,7 @@ class UseBurpProxyAll extends Feature { super.start() if (!await this.config.get("enabled")) return - browser.proxy.onRequest.addListener(this.proxy, { urls: [""] }) + browser.proxy.onRequest.addListener(this.proxy, { urls: [""] },["requestHeaders"]) } @@ -75,7 +75,7 @@ class UseBurpProxyContainers extends Feature { super.start() if (!await this.config.get("enabled")) return - browser.proxy.onRequest.addListener(this.proxy, { urls: [""] }) + browser.proxy.onRequest.addListener(this.proxy, { urls: [""] },["requestHeaders"]) } stop() {