Skip to content

Commit

Permalink
Drop non-local I2P domains if they accidentally make it to firefox-de…
Browse files Browse the repository at this point in the history
…fault or firefox-private(not likely but probably worth blocking)
  • Loading branch information
eyedeekay committed Aug 2, 2024
1 parent 86c69bb commit bfe4be9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 33 deletions.
32 changes: 1 addition & 31 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)/[email protected] \
Expand Down Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bfe4be9

Please sign in to comment.