From bfe4be952e323c45d0f2c9039fc52d9437aa817c Mon Sep 17 00:00:00 2001 From: eyedeekay Date: Fri, 2 Aug 2024 19:09:06 -0400 Subject: [PATCH] Drop non-local I2P domains if they accidentally make it to firefox-default or firefox-private(not likely but probably worth blocking) --- Makefile | 32 +------------------------------- proxy.js | 6 ++++-- 2 files changed, 5 insertions(+), 33 deletions(-) diff --git a/Makefile b/Makefile index e3b8b34..20adafe 100644 --- a/Makefile +++ b/Makefile @@ -205,36 +205,6 @@ torrent: getxpi -a http://zviyq72xcmjupynn5y2f5qa3u7bxyu34jnqmwt6czte2l7idxm7q.b32.i2p/announce \ -a http://s5ikrdyjwbcgxmqetxb3nyheizftms7euacuub2hic7defkh3xhq.b32.i2p/a \ -a http://uajd4nctepxpac4c4bdyrdw7qvja2a5u3x25otfhkptcjgd53ioq.b32.i2p/announce \ - -a http://explodie.org:6969/announce \ - -a http://tracker.opentrackr.org:1337/announce \ - -a http://tracker.kamigami.org:2710/announce \ - -a http://tracker.internetwarriors.net:1337/announce \ - -a http://tracker.darli.net:6611/announce \ - -a http://tracker.corpscorp.online:80/announce \ - -a http://tracker.bz:80/announce \ - -a http://tracker.bt4g.com:2095/announce \ - -a http://retracker.sevstar.net:2710/announce \ - -a http://h4.trakx.nibba.trade:80/announce \ - -a http://www.proxmox.com:6969/announce \ - -a http://www.loushao.net:8080/announce \ - -a http://vps02.net.orel.ru:80/announce \ - -a http://tracker4.itzmx.com:2710/announce \ - -a http://tracker3.itzmx.com:6961/announce \ - -a http://tracker2.itzmx.com:6961/announce \ - -a http://tracker1.itzmx.com:8080/announce \ - -a http://tracker01.loveapp.com:6789/announce \ - -a http://tracker.zerobytes.xyz:1337/announce \ - -a http://tracker.yoshi210.com:6969/announce \ - -a http://tracker.torrentyorg.pl:80/announce \ - -a http://tracker.nyap2p.com:8080/announce \ - -a http://tracker.lelux.fi:80/announce \ - -a http://tracker.gbitt.info:80/announce \ - -a http://pow7.com:80/announce \ - -a http://opentracker.i2p.rocks:6969/announce \ - -a http://open.acgtracker.com:1096/announce \ - -a http://open.acgnxtracker.com:80/announce \ - -a http://mail2.zelenaya.net:80/announce \ - -a http://acg.rip:6699/announce \ -n "i2ppb-$(VERSION)@eyedeekay.github.io.xpi" \ -o "i2ppb-$(VERSION)@eyedeekay.github.io.xpi.torrent" \ -w https://github.com/eyedeekay/I2P-in-Private-Browsing-Mode-Firefox/releases/download/$(VERSION)/i2ppb@eyedeekay.github.io.xpi \ @@ -334,7 +304,7 @@ upload-updatemanifest: webext: mkdir -p profile - $(HOME)/node_modules/.bin/web-ext run --firefox /usr/bin/firefox --firefox-profile ./profile -u "about:devtools-toolbox?type=extension&id=i2ppb%40eyedeekay.github.io" http://idk.i2p http://localhost:7657 + $(HOME)/node_modules/.bin/web-ext run --firefox /usr/bin/firefox --firefox-profile ./profile -u "about:devtools-toolbox?type=extension&id=i2ppb%40eyedeekay.github.io" http://idk.i2p http://localhost:7657 https://github.com/i2p/i2p.i2p https://i2pgit.org/i2p-hackers/i2p.i2p snark-mirror: http_proxy=http://127.0.0.1:4444 wget -c -O ../i2psnark-rpc.su3 http://stats.i2p/i2p/plugins/i2psnark-rpc.su3 diff --git a/proxy.js b/proxy.js index d43a080..9b79516 100644 --- a/proxy.js +++ b/proxy.js @@ -138,8 +138,10 @@ var handleContextProxyRequest = async function (requestDetails) { }; if (context == "firefox-default" || context == "firefox-private") { - proxy = null; - return proxy; + if (!i2pHost(requestDetails.URL)) + if (!isProxyHost(requestDetails.URL)) + proxy = null; + return proxy; } // eslint-disable-next-line no-negated-condition