Skip to content

Commit 255d320

Browse files
nsrCodeswrongsahil
andauthored
feat: blocklist (#126)
* feat: blocklist * fix --------- Co-authored-by: Sahil Gupta <[email protected]>
1 parent 63f8d15 commit 255d320

File tree

5 files changed

+17
-7
lines changed

5 files changed

+17
-7
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "requestly",
33
"productName": "Requestly",
4-
"version": "1.8.0",
4+
"version": "1.8.1",
55
"main": "src/main/main.ts",
66
"private": true,
77
"description": "Intercept & Modify HTTP Requests",

release/app/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

release/app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "requestly",
33
"productName": "Requestly",
4-
"version": "1.8.0",
4+
"version": "1.8.1",
55
"private": true,
66
"description": "Intercept & Modify HTTP Requests",
77
"main": "./dist/main/main.js",

src/renderer/actions/apps/browsers/chromium-based-browsers.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,24 @@ const getChromiumLaunchOptions = async (
3939
if (value === undefined || value === null) return `--${key}`;
4040
return `--${key}=${value}`;
4141
});
42-
42+
const blockList = await ipcRenderer
43+
.invoke("get-storage-object", "blocked_domains")
44+
.then((blockedDomains) => {
45+
console.log("Blocked domains", blockedDomains);
46+
return blockedDomains;
47+
})
48+
.catch((err) => {
49+
console.error(err);
50+
return [];
51+
});
4352
return {
4453
browser,
4554
proxy: `http://${staticConfig.PROXY_HOST}:${proxyPort}`,
4655
noProxy: [
4756
// Force even localhost requests to go through the proxy
4857
// See https://bugs.chromium.org/p/chromium/issues/detail?id=899126#c17
4958
"<-loopback>",
59+
...(blockList || []),
5060
// Don't intercept our warning hiding requests. Note that this must be
5161
// the 2nd rule here, or <-loopback> would override it.
5262
// hideWarningServer.host,

0 commit comments

Comments
 (0)