Compare commits

...

30 Commits

Author SHA1 Message Date
idk
3e5b9c049d only add more flags when more flags are passed. 2022-08-21 00:25:27 -04:00
idk
e5d36aff8f fix an issue where passing the -private flag annihilates extension flags 2022-08-20 23:50:08 -04:00
idk
fa3fa165b1 update index.html 2022-08-20 22:49:08 -04:00
idk
5211c6d7e0 move target for chrome extension out of main build process because of requirement on go-crx3 2022-08-20 22:47:51 -04:00
idk
ce6a31166b update index.html 2022-08-20 21:04:45 -04:00
idk
842f4bb992 update CHANGES.html 2022-08-20 20:58:13 -04:00
idk
5fefdab16d update index.html 2022-08-20 20:58:10 -04:00
idk
53d4cf8146 update CHANGES.html 2022-08-20 20:54:21 -04:00
idk
6daeaf8297 update index.html 2022-08-20 20:54:17 -04:00
idk
8645f69067 Bump again 2022-08-20 20:53:31 -04:00
idk
4f22360b2f update index.html 2022-08-20 20:32:55 -04:00
idk
ccfe0af3f6 update index.html 2022-08-20 20:24:35 -04:00
idk
3b204871bf relase 2022-08-20 20:23:27 -04:00
idk
1f7854b35e add chromium launcher-only script 2022-08-20 20:22:04 -04:00
idk
89acc78048 add chromium launcher-only script 2022-08-20 20:21:33 -04:00
idk
31291214e2 add chromium launcher-only script 2022-08-20 20:19:59 -04:00
idk
2875197bc8 add chromium launcher-only script 2022-08-20 20:10:18 -04:00
idk
2bb8d35ed2 fixup gitignore 2022-08-20 20:08:29 -04:00
idk
e9424ee482 check in my own extension for now because I definitely shouldn't try to do a whole new set of licensing things right now, but in the future, ublock, scriptsafe 2022-08-20 19:59:40 -04:00
idk
2f3fb18eac don't check in other people's extensions 2022-08-20 19:54:11 -04:00
idk
51ecaaf1d9 don't check in other people's extensions 2022-08-20 19:53:25 -04:00
idk
11f32c211b don't check in other people's extensions 2022-08-20 19:50:55 -04:00
idk
6417dba4f5 add an unpacked extension 2022-08-20 19:41:24 -04:00
idk
4090df0148 make sure that the jar includes the Chromium profile directory 2022-08-20 19:12:43 -04:00
idk
154eec9e01 update CHANGES.html 2022-08-20 19:00:32 -04:00
idk
365c5ac6e8 update index.html 2022-08-20 19:00:29 -04:00
idk
bcb0919efa show people how to use a binary 2022-08-20 18:58:50 -04:00
idk
2f9b0e3686 put Tor Browser's at the top of the order on Windows 2022-08-19 22:54:53 -04:00
idk
62167a118a put Tor Browser's at the top of the order on Windows 2022-08-19 22:54:24 -04:00
idk
82ccb9c47f put Tor Browser's at the top of the order on Windows 2022-08-19 22:53:52 -04:00
46 changed files with 3146 additions and 17 deletions

3
.gitignore vendored
View File

@ -6,5 +6,6 @@ src/i2p.firefox.base.profile.zip
generated/
i2p.chromium.base.profile
i2p.firefox.base.profile
i2p.chromium/profile
i2p.chromium.profile
i2p.firefox.profile
src/build

View File

@ -80,6 +80,25 @@
</div>
</div>
</div>
<h2>
Fri, August 20
</h2>
<ul>
<li>
Chromium is now a first-class citizen
</li>
</ul>
<h2>
Fri, August 19
</h2>
<ul>
<li>
Adds the ability to pass private-window to Firefoxes and incognito to Chromiums
</li>
<li>
Switch Tor Browser to the top of the order on Windows to match i2p.firefox behavior
</li>
</ul>
<h2>
Mon, August 8
</h2>

View File

@ -1,7 +1,13 @@
Fri, August 20
--------------
- Chromium is now a first-class citizen
Fri, August 19
--------------
- Adds the ability to pass --private-window to Firefoxes and --incognito to Chromiums
- Switch Tor Browser to the top of the order on Windows to match i2p.firefox behavior
Mon, August 8
-------------

View File

@ -4,6 +4,41 @@ A port of the batch scripts from i2p.firefox to Java.
## Getting started
### Using a Binary
```sh
mkdir ~/tmp-i2pfirefox && cd ~/tmp-i2pfirefox
wget https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/0.0.10/i2pfirefox.zip
unzip i2pfirefox.zip
./i2pfirefox.cmd
#or if you want to use a Chromium
./i2pchromium.cmd
```
### Build Dependencies
You will need `ant`, `java` and for building the Chromium profile, a Go application
called `crx3` which is used to interact with the Chrome app store. I've been using Java 17
on Debian mostly, on Debian and Ubuntu, install the dependencies with:
```sh
sudo apt-get install openjdk-17* ant golang-go
go install github.com/mediabuyerbot/go-crx3/crx3@latest
```
For Fedora, use Yum, for Arch use pacman or something else but make sure to tell everyone
about it. Once you have that installed, when building, make sure to add `$GOPATH/bin/`
to your `$PATH`.
```sh
export PATH=$PATH:$HOME/go/bin
```
Will almost always work.
### Building
This is not actually a plugin yet, but it will be soon. The important bit is the jar.
@ -29,6 +64,7 @@ add a UI element that triggers something along the lines of this:
```java
// Firefox Example
if (i2pIsRunning()) {
logger.warning("I2P is already running");
System.out.println("I2PFirefox");
@ -37,4 +73,15 @@ if (i2pIsRunning()) {
}
```
```java
// Chromium Example
if (i2pIsRunning()) {
logger.warning("I2P is already running");
System.out.println("I2PChromium");
I2PChromium i2pChromium = new I2PChromium();
i2pChromium.launch();
}
```
to add a browser management tool to it.

View File

@ -8,7 +8,7 @@
<ant dir="src" target="build" />
</target>
<target name="jar" >
<target name="jar" depends="distclean,i2pFirefoxBaseProfileZip,i2pChromiumBaseProfileZip">
<ant dir="src" target="jar" />
</target>
@ -24,6 +24,30 @@
</exec>
</target>
<target name="i2pChromiumBaseProfile">
<exec executable="crx3" failonerror="true">
<arg value="download"/>
<arg value="ikdjcmomgldfciocnpekfndklkfgglpe" />
<arg value="-u=true"/>
<arg value="-o" />
<arg value="src/i2p.chromium.base.profile/extensions/i2pchrome.js.crx" />
</exec>
<!--<exec executable="crx3" failonerror="true">
<arg value="download"/>
<arg value="cjpalhdlnbpafiamejdnhcphjbkeiagm" />
<arg value="-u=true"/>
<arg value="-o" />
<arg value="src/i2p.chromium.base.profile/extensions/ublock.js.crx" />
</exec>
<exec executable="crx3" failonerror="true">
<arg value="download"/>
<arg value="oiigbmnaadbkfbmpbfijlflahbdbdgdf" />
<arg value="-u=true"/>
<arg value="-o" />
<arg value="src/i2p.chromium.base.profile/extensions/scriptsafe.js.crx" />
</exec>-->
</target>
<target name="i2pChromiumBaseProfileZip">
<exec executable="rm" failonerror="false" dir="src">
<arg value="-rf" />
@ -45,7 +69,8 @@
<arg value="-r"/>
<arg value="i2pfirefox.zip"/>
<arg value="src/build/i2pfirefox.jar"/>
<arg value="i2pbrowser.cmd"/>
<arg value="i2pfirefox.cmd"/>
<arg value="i2pchromium.cmd"/>
<arg value="LICENSE.md"/>
<arg value="README.md"/>
</exec>

3
i2pchromium.cmd Executable file
View File

@ -0,0 +1,3 @@
:; dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd); java -cp "$dir"/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PChromium; exit $?
@ECHO OFF
java -cp %cd%/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PChromium

View File

@ -89,6 +89,59 @@
<h2>
Getting started
</h2>
<h3>
Using a Binary
</h3>
<pre><code>
mkdir ~/tmp-i2pfirefox &amp;&amp; cd ~/tmp-i2pfirefox
wget https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/0.0.10/i2pfirefox.zip
unzip i2pfirefox.zip
./i2pfirefox.cmd
#or if you want to use a Chromium
./i2pchromium.cmd
</code></pre>
<h3>
Build Dependencies
</h3>
<p>
You will need
<code>
ant
</code>
,
<code>
java
</code>
and for building the Chromium profile, a Go application
called
<code>
crx3
</code>
which is used to interact with the Chrome app store. Ive been using Java 17
on Debian mostly, on Debian and Ubuntu, install the dependencies with:
</p>
<pre><code>sudo apt-get install openjdk-17* ant golang-go
go install github.com/mediabuyerbot/go-crx3/crx3@latest
</code></pre>
<p>
For Fedora, use Yum, for Arch use pacman or something else but make sure to tell everyone
about it. Once you have that installed, when building, make sure to add
<code>
$GOPATH/bin/
</code>
to your
<code>
$PATH
</code>
.
</p>
<pre><code>export PATH=$PATH:$HOME/go/bin
</code></pre>
<p>
Will almost always work.
</p>
<h3>
Building
</h3>
@ -98,9 +151,7 @@
produces the jar as a by-product, or you can:
</p>
<pre><code>
cd src
ant
cd ..
ant jar
</code></pre>
<p>
To build just the jar. Youll know it worked if you can:
@ -116,12 +167,22 @@ java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PFirefox
add a UI element that triggers something along the lines of this:
</p>
<pre><code>
// Firefox Example
if (i2pIsRunning()) {
logger.warning(&#34;I2P is already running&#34;);
System.out.println(&#34;I2PFirefox&#34;);
I2PFirefox i2pFirefox = new I2PFirefox();
i2pFirefox.launch();
}
</code></pre>
<pre><code>
// Chromium Example
if (i2pIsRunning()) {
logger.warning(&#34;I2P is already running&#34;);
System.out.println(&#34;I2PChromium&#34;);
I2PChromium i2pChromium = new I2PChromium();
i2pChromium.launch();
}
</code></pre>
<p>
to add a browser management tool to it.

View File

@ -2,9 +2,9 @@
GITHUB_USER=eyedeekay
GITHUB_REPO=i2p.plugins.firefox
GITHUB_NAME="With Private Windows and Incognito support"
GITHUB_NAME="Which fixes another tiny bug that was bothering me"
GITHUB_DESCRIPTION=$(cat CHANGES.md)
GITHUB_TAG=0.0.7
GITHUB_TAG=0.0.12
ant distclean
ant jar freeZip
github-release release --user "${GITHUB_USER}" \
@ -13,6 +13,11 @@ github-release release --user "${GITHUB_USER}" \
--description "${GITHUB_DESCRIPTION}" \
--tag "${GITHUB_TAG}"; true
sleep 2s
github-release edit --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \
--name "${GITHUB_NAME}" \
--description "${GITHUB_DESCRIPTION}" \
--tag "${GITHUB_TAG}"; true
github-release upload --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \
--tag "${GITHUB_TAG}" \

View File

@ -43,6 +43,7 @@
<target name="jar" depends="builddep, compile">
<jar destfile="build/i2pfirefox.jar" basedir="./build/obj" includes="**/*.class" >
<fileset file="i2p.firefox.base.profile.zip" />
<fileset file="i2p.chromium.base.profile.zip" />
</jar>
</target>

View File

@ -1 +0,0 @@
put extensions here.

View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2019 idk
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -0,0 +1,64 @@
default: zip
install: uninstall
mkdir -p /usr/share/webext/i2pchrome.js@eyedeekay.github.io \
/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/
cp -rv options /usr/share/webext/i2pchrome.js@eyedeekay.github.io/options
cp -rv icons /usr/share/webext/i2pchrome.js@eyedeekay.github.io/icons
cp -rv _locales /usr/share/webext/i2pchrome.js@eyedeekay.github.io/_locales
cp background.js /usr/share/webext/i2pchrome.js@eyedeekay.github.io
cp proxy.js /usr/share/webext/i2pchrome.js@eyedeekay.github.io
cp info.js /usr/share/webext/i2pchrome.js@eyedeekay.github.io
cp content.js /usr/share/webext/i2pchrome.js@eyedeekay.github.io
cp info.css /usr/share/webext/i2pchrome.js@eyedeekay.github.io
cp window.html /usr/share/webext/i2pchrome.js@eyedeekay.github.io
cp manifest.json /usr/share/webext/i2pchrome.js@eyedeekay.github.io/
cp README.md /usr/share/webext/i2pchrome.js@eyedeekay.github.io
cp LICENSE /usr/share/webext/i2pchrome.js@eyedeekay.github.io
ln -sf /usr/share/webext/i2pchrome.js@eyedeekay.github.io \
/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/i2pchrome.js@eyedeekay.github.io
uninstall:
rm -rf /usr/share/webext/i2pchrome.js@eyedeekay.github.io \
/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/i2pchrome.js@eyedeekay.github.io
clobber:
rm -f ../i2pchrome.js.zip ../i2p_proxy*.xpi
VERSION=1.29
xpi:
mv ~/Downloads/i2p_proxy-$(VERSION)-an+fx.xpi ../i2pchrome.js@eyedeekay.github.io.xpi
cp:
cp ../i2pchrome.js@eyedeekay.github.io.xpi ./i2pchrome.js@eyedeekay.github.io.xpi
version:
sed -i 's|$(shell grep "\"version\": " manifest.json)| \"version\": \"$(VERSION)\",|g' manifest.json
zip: version
zip --exclude="./i2pchrome.js@eyedeekay.github.io.xpi" \
--exclude="i2pchrome.js.png" -r -FS ../i2pchrome.js.zip *
profile-install:
cp ./i2pchrome.js@eyedeekay.github.io.xpi $(HOME)/.mozilla/firefox/firefox.profile.i2p/firefox.profile.i2p/extensions
cp ./i2pchrome.js@eyedeekay.github.io.xpi $(HOME)/.mozilla/firefox/.firefox.profile.i2p.default/extensions
to-profile:
cp ./i2pchrome.js@eyedeekay.github.io.xpi /usr/local/lib/firefox.profile.i2p/firefox.profile.i2p/extensions/
pi: profile-install
DESC="A simple plugin for configuring an i2p browser."
release:
gothub release -u eyedeekay -r i2pchrome.js -t $(VERSION) -n $(VERSION) -d $(DESC)
upload:
gothub upload -u eyedeekay -r i2pchrome.js -t $(VERSION) -n "i2pchrome.js@eyedeekay.github.io.xpi" -f "../i2pchrome.js@eyedeekay.github.io.xpi"
fmt:
#cleancss -O1 all -O2 all --format beautify home.css -o .home.css && mv .home.css home.css
#cleancss -O1 all -O2 all --format beautify info.css -o .info.css && mv .info.css info.css
find . -path ./node_modules -prune -o -name '*.js' -exec prettier --write {} \;
find . -path ./node_modules -prune -o -name '*.json' -exec prettier --write {} \;

View File

@ -0,0 +1,2 @@
I2P Plugin For Chromium Persona
===============================

View File

@ -0,0 +1,66 @@
{
"extensionName": {
"message": "i2pchrome.js",
"description": "Name of the extension."
},
"extensionDescription": {
"message": "Set up a browser to use the i2p http proxy automatically",
"description": "Description of the extension."
},
"titlePreface": {
"message": "I2P Browser - ",
"description": "Preface for the browser titlebar"
},
"titlePrefacePrivate": {
"message": "I2P Browser (Private) - ",
"description": "Preface for the browser titlebar"
},
"resetMessage": {
"message": "Reset Tunnel",
"description": "Message for the Reset Tunnel button"
},
"infoTitle": {
"message": "I2P Help",
"description": "Title for the help menu"
},
"infoMessage": {
"message": "You are now free to browse the eepWeb! Your browser is now configured to browse anonymously on the I2P network. As you browse, your traffic will be routed through other network nodes to disguise it's origin, both from the server and from the nodes themselves.",
"description": "Help Message"
},
"helpMessage": {
"message": "Get additional help",
"description": "Help Message"
},
"newsMessage": {
"message": "Visit the I2P Blog to learn the latest about i2p.",
"description": "Help Message"
},
"forumMessage": {
"message": "Visit the I2P Forum to learn more or ask for assistance",
"description": "Help Message"
},
"clearData": {
"message": "Clear all browsing data",
"description": "Help Message"
},
"hostText": {
"message": "Host: ",
"description": "Host for the HTTP or SOCKS5 Proxy"
},
"portText": {
"message": "Port: ",
"description": "Port for the HTTP or SOCKS5 Proxy"
},
"controlHelpText": {
"message": "These options will be inert if used with the default i2p HTTP or SOCKS proxy.",
"description": "Help for configuring the options for the Reset Tunnel button"
},
"controlHostText": {
"message": "Control Host: ",
"description": "Host for the Reset Tunnel button"
},
"controlPortText": {
"message": "Control Port: ",
"description": "Port for the Reset Tunnel button"
}
}

View File

@ -0,0 +1 @@
[{"description":"treehash per file","signed_content":{"payload":"eyJjb250ZW50X2hhc2hlcyI6W3siYmxvY2tfc2l6ZSI6NDA5NiwiZGlnZXN0Ijoic2hhMjU2IiwiZmlsZXMiOlt7InBhdGgiOiJMSUNFTlNFIiwicm9vdF9oYXNoIjoiTTVJb3kyR21yTExkazZaTllkNVJTMGpNM1VvNjlmWnVkT01OY1FfMkNodyJ9LHsicGF0aCI6Ik1ha2VmaWxlIiwicm9vdF9oYXNoIjoiR1MxYW40UEluMGZ2dnFCOUZCOXpqV1JCYjNDdWtQeFdDV09WOE1jU0N3ayJ9LHsicGF0aCI6IlJFQURNRS5tZCIsInJvb3RfaGFzaCI6ImdWd3B6TlpscVlGVm9LZVpWdTVKLXVaelhySTdQYlFtR2tic3NlR1cwNW8ifSx7InBhdGgiOiJfbG9jYWxlcy9lbi9tZXNzYWdlcy5qc29uIiwicm9vdF9oYXNoIjoiaDEzM2pHZXRsWGk2Z3RCbVNfYU5uUHY5cHhsTWhlaE51VHBtcEkyWVJoVSJ9LHsicGF0aCI6ImJhY2tncm91bmQuanMiLCJyb290X2hhc2giOiI0cWxYaDFOZGlGYWNpNGh0RGw3dGtKTkJsdWFfd0F5YTBib1JDMnh6QlA0In0seyJwYXRoIjoiYnJvd3Nlci1wb2x5ZmlsbC5qcyIsInJvb3RfaGFzaCI6IjFoWlVuR2JXeldjNmVBYmo3cUI2WGFPVGxBdk1BMU9aeDJoUDA0dF9zYVEifSx7InBhdGgiOiJjb250ZW50LmpzIiwicm9vdF9oYXNoIjoiYXgxZnpWUThpc05DWXh5UW5sWkRNbmNPRENnSWZQRFZRTzkzSkhYMmoyZyJ9LHsicGF0aCI6ImRldmVsb3Blci5wbmciLCJyb290X2hhc2giOiJ2ZGZwWTVwNDJNb2oybXFCeURLZFlvamFVSzhLYnFBZUkzNVJhTzQxbjNZIn0seyJwYXRoIjoiZGlyZWN0b3J5LnBuZyIsInJvb3RfaGFzaCI6Imk1eVhuTlJlWnBRT0w2VUxKUTNITjhxWkRxWEt4dUROWHBuUGt0Y0xBX1kifSx7InBhdGgiOiJkb25lLnBuZyIsInJvb3RfaGFzaCI6IjllTXctbmp5ZVpKYlU4a2xkZVlwQjdrTzFDMFloOXo1RHlfVFM4N00yd0kifSx7InBhdGgiOiJleHRlbnNpb25zLnBuZyIsInJvb3RfaGFzaCI6InVtZ2RfSFp6Rm1aRVZVT3NSWkFKOHg5ZG02QkU3UUlRQ002aFhNNXdMbWMifSx7InBhdGgiOiJmaW5pc2hlZC5wbmciLCJyb290X2hhc2giOiJuQ3Z6VFFQR0xpRHJCeUhuU001X0hzVVF3ak81VDAtM0phaXJ3VlF0Skd3In0seyJwYXRoIjoiaG9tZS5jc3MiLCJyb290X2hhc2giOiJDaUFNRVlfSFJKRHhsSHdiZmhFLTdDaGtrX1JzSFpnRVQzaHM3QWVZRVpJIn0seyJwYXRoIjoiaG9tZS5odG1sIiwicm9vdF9oYXNoIjoick1iOC1WZG4tWjhjVVlMeUNNbl9fZksta3NPVFJpR205bGk1WnJ1SHBBWSJ9LHsicGF0aCI6ImkycHNldHByb3h5LmpzLnBuZyIsInJvb3RfaGFzaCI6InlJamN1YmlBYTVTMWpsVGJhZGJkZV9qLXlIQ0FqREpCaDhUdHdWQUN5U1EifSx7InBhdGgiOiJpY29ucy90b29waWUucG5nIiwicm9vdF9oYXNoIjoiM3haaVZISTNtUU9jMFJHU1lnWFIxUXV3Z0xlNlZSVURsZWFvNVZwN0lfQSJ9LHsicGF0aCI6ImluZm8uY3NzIiwicm9vdF9oYXNoIjoialBsQVduNUs4Ulc3RnhvaGR4cF9HVndnN1ZBTWdvWXExZml0X0tRbzlSSSJ9LHsicGF0aCI6ImluZm8uanMiLCJyb290X2hhc2giOiJpSWtfZUdyTXdYdEFKTUpHVnpLUlhaRTg4ZWVHTjBrMGtEYTRuMTVLb2s4In0seyJwYXRoIjoibWFuYWdlci5wbmciLCJyb290X2hhc2giOiJyMC1kQ1BrVkpueHkyNDFwdzQwS3lIOWJEenM1TjhEdnY0NHJxQVhJSE9rIn0seyJwYXRoIjoibWFuaWZlc3QuanNvbiIsInJvb3RfaGFzaCI6ImVkcUt1WFNNTUFqS0dVNFlQV1dyUFFPYzBMRDhwVHRoRGZUVWtEVXdOZXcifSx7InBhdGgiOiJvcHRpb25zL29wdGlvbnMuY3NzIiwicm9vdF9oYXNoIjoiNmZQYlZCMTNoN2Q3NkNvY3VDNU5KN3ZqOE9HQ0I2ZVk0cEVETHJ6U3FKYyJ9LHsicGF0aCI6Im9wdGlvbnMvb3B0aW9ucy5odG1sIiwicm9vdF9oYXNoIjoiNkRFQnhvVWFSb2RETVBSODFnMGp3QTVNTTBmVXhuNmpXeXZzaHYzZ2dqUSJ9LHsicGF0aCI6Im9wdGlvbnMvb3B0aW9ucy5qcyIsInJvb3RfaGFzaCI6IjJSLXIyVlVFRzhRalZMdHFzVHlKbXBEM28zRXdGVjdFLUlyVk9qSmJWVE0ifSx7InBhdGgiOiJwZW9wbGUucG5nIiwicm9vdF9oYXNoIjoia0ZnbjdiTWU0WVJUSkViRXFvSTJZWEd5UnNLZlBpVUpwUXV6Y3l0YXhtYyJ9LHsicGF0aCI6InBsdWdpbnMucG5nIiwicm9vdF9oYXNoIjoiYkpnZkF1VUF1QnprVV9MRXdQVHZVYlF5dGYwQm4xSTV1TmFsOEtyU0hjcyJ9LHsicGF0aCI6InByaXZhY3kuanMiLCJyb290X2hhc2giOiJMTWZOdmRTWXMtVjh0YWpPbVplTDhjZ3hKUldKVmdnaVhqX3o0XzZkVzRzIn0seyJwYXRoIjoicHJveHkuanMiLCJyb290X2hhc2giOiJyVnhjQ2VvcDk1dmhLX3oxZGk5MHplOUd3M0steWgxdF8xMlViZTVsNG5nIn0seyJwYXRoIjoic2hhZGVzLnBuZyIsInJvb3RfaGFzaCI6IjhrQ1Z2QktuaWtMZVZtQnVMa01WNEZzNlQtWklieGoxMFZJS3lHRUtVNDAifSx7InBhdGgiOiJzeW5jLnBuZyIsInJvb3RfaGFzaCI6IjV6d1ZVWkdYMnlsRGN5d1hjdzJpaUR0N28yX1F2ajNPaHIwWG5QWEl5RnMifSx7InBhdGgiOiJ1bnBhY2tlZC5wbmciLCJyb290X2hhc2giOiJLUUZ3YXFIdU8yT01HZTZNNXd5ZG1xcnJwbkNEdW9yUFU3aVc3QVhRMmdJIn0seyJwYXRoIjoid2luZG93Lmh0bWwiLCJyb290X2hhc2giOiJBVU5OU1BqLVJabXYtRS13NnhXcXl5LS1iRVhsMkM5OEl4VDJEdWVGZDZRIn1dLCJmb3JtYXQiOiJ0cmVlaGFzaCIsImhhc2hfYmxvY2tfc2l6ZSI6NDA5Nn1dLCJpdGVtX2lkIjoiaWtkamNtb21nbGRmY2lvY25wZWtmbmRrbGtmZ2dscGUiLCJpdGVtX3ZlcnNpb24iOiIxLjI5IiwicHJvdG9jb2xfdmVyc2lvbiI6MX0","signatures":[{"header":{"kid":"publisher"},"protected":"eyJhbGciOiJSUzI1NiJ9","signature":"MnagjSc3N-RaPvxHuzypCDuVFz-JbwCW1LKcg4HqS5M-T9KkEH5NoNa9ipUdWBkwrSF0sFAU-jHUSHQ6Ht75SH3wROOS0chVQf7dYw7KjZMHLd-LAAIBygApS8DNrWE931b5XM-vh_F3VYlbvziiL1roW7OAZgoIUy_MPQ07Ynbfl0K-UyVXeUJY9qzYGCRdKFG_wsvajIGM1Y60aw66MKs2zKLarwLCRqKAN_A31nzYBm-QjoUPSK4jnzAm5Lv24oVfsWJNXmJ8nPQO3pRCF8AT0rA8ue2cEqA3zSLOkHQupmmLSmjBKBPMmPtFJCgeKvzPajo32JuAaCkWokhiwQ"},{"header":{"kid":"webstore"},"protected":"eyJhbGciOiJSUzI1NiJ9","signature":"P02kDKuZmltr_huxTnsbIzMzERDvbdwsce3ZbEJjWbE7n01TXoQr7Z62LtqZMcau2m78A-eydRwMQ6TnpvFxNoHIDFOA9d4mGdfhSwTSR4-rGJa3cSo_66VznYzMAVzfssW4_o1iTksdOtbebQCQ5TS7f2bNe1AQMx7lTDoiskVaFNeY2adByacpQp2yXWHAx9K_98hG1J-njNvokairY0ZdaJcR76pN2v9W-D8A6Wvaxy4WeAXZyFoJy_eFNjP4yG-6nZ1OtxirQ7kiDx1fKtvcDx2hEBC5noaMXygVZszAsvrrMgkhlsb1bBdptAJRPUAXXXjp6Ijk2U6z8S-V0g"}]}}]

View File

@ -0,0 +1,54 @@
function platformCallback(platformInfo) {
if (platformInfo.PlatformOs == "android") {
console.log("android detected");
return true;
} else {
console.log("desktop detected");
return false;
}
}
function isDroid() {
return chrome.runtime.getPlatformInfo(platformCallback);
}
function isLocalHost(url) {
//var x = new RegExp("/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/")
var r = false; ///(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/.test(url)
if (r == false) {
r = url.indexOf("://localhost:") != -1;
}
if (r == false) {
r = url.indexOf("://127.0.0.1:") != -1;
}
console.log("localhost:", r, "on url", url);
return r;
}
function isRouterHost(url) {
var controlPort = 7657; //getControlPort();
var r = false;
if (r == false) {
r = url.indexOf("://localhost:" + controlPort) != -1;
}
if (r == false) {
r = url.indexOf("://127.0.0.1:" + controlPort) != -1;
}
console.log("routerhost:", r, "on url", url);
return r;
}
chrome.webRequest.onBeforeRequest.addListener(
function (details) {
let localhost = isLocalHost(details.url);
let routerhost = isRouterHost(details.url);
console.log("localhost: ", localhost, "routerhost: ", routerhost);
if (localhost) {
if (!routerhost) {
return { cancel: true };
}
}
},
{ urls: ["<all_urls>"] },
["blocking"]
);

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,19 @@
/*var infoTitle = document.getElementById("text-section-header");
infoTitle.textContent = chrome.i18n.getMessage("infoTitle");
*/
/*var infoMessage = document.getElementById("text-section-helptext");
infoMessage.textContent = chrome.i18n.getMessage("infoMessage");
var helpMessage = document.getElementById("window-create-forum-panel");
helpMessage.textContent = chrome.i18n.getMessage("forumMessage");*/
/*
var helpMessage = document.getElementById('window-create-help-panel');
helpMessage.textContent = chrome.i18n.getMessage("helpMessage")
*/
/*
var newsMessage = document.getElementById("window-create-news-panel");
newsMessage.textContent = chrome.i18n.getMessage("newsMessage");
var clearData = document.getElementByID("clear-chrome-data");
cleardata.textContent = chrome.i18n.getMessage("clearData");
*/

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

View File

@ -0,0 +1,290 @@
* {
padding: 0;
margin: 0
}
html {
height: 100%
}
a,
button {
color: #3b6bbf;
text-decoration: none;
font-weight: 700;
word-wrap: break-word;
outline: 0
}
.applicationDesc {
color: #81888f;
text-decoration: none;
font-weight: 700;
word-wrap: break-word;
outline: 0
}
.applicationDesc:hover,
a:hover,
button:hover {
color: #495057;
text-decoration: none;
font-weight: 700;
word-wrap: break-word;
outline: 0
}
button {
border: none;
cursor: pointer;
color: #3b6bbf;
text-decoration: none;
font-weight: 700;
word-wrap: break-word;
outline: 0
}
body {
display: flex;
flex-direction: column;
font-family: "Droid Sans","Noto Sans",Ubuntu,"Segoe UI","Lucida Grande",Verdana,Helvetica,sans-serif;
width: 100%;
height: 100%;
margin: 0 auto;
padding: 0;
color: #495057;
background-attachment: fixed;
background-size: 100% 100%;
text-decoration: none;
font-weight: 700;
word-wrap: break-word;
outline: 0
}
.background {
background-color: #f8f8ff;
height: 100%
}
p {
line-height: 32px;
font-size: 17px;
font-family: "Droid Sans","Noto Sans",Ubuntu,"Segoe UI","Lucida Grande",Verdana,Helvetica,sans-serif;
text-decoration: none;
color: #495057;
font-weight: 700;
word-wrap: break-word;
outline: 0
}
.content {
min-height: 3rem;
padding: 1rem;
margin: 1.5rem;
display: inline-block;
border: 1px solid #d9d9d6;
border-radius: 2px;
box-shadow: inset 0 0 0 1px #fff,0 0 1px #ccc;
background: #f8f8ff;
min-width: 95%
}
.application-info,
.extended-info {
min-height: 3rem;
padding: 1rem;
margin-top: 1.5rem;
display: inline-block;
border: 1px solid #d9d9d6;
border-radius: 2px;
box-shadow: inset 0 0 0 1px #fff,0 0 1px #ccc;
background: #f8f8ff;
min-width: 95%
}
h1 {
margin-right: auto;
font-family: "Droid Sans","Noto Sans",Ubuntu,"Segoe UI","Lucida Grande",Verdana,Helvetica,sans-serif;
font-weight: 600;
font-size: 32px;
text-transform: uppercase;
color: #41465f;
border: 1px solid #dee2e6;
border-radius: 2px 2px 0 0;
width: 90%;
padding-left: 5%
}
h2,
h3 {
margin-right: auto;
font-family: "Droid Sans","Noto Sans",Ubuntu,"Segoe UI","Lucida Grande",Verdana,Helvetica,sans-serif;
font-weight: 600;
font-size: 25px;
text-transform: uppercase;
color: #41465f;
border: 1px solid #dee2e6;
border-radius: 2px 2px 0 0;
width: 90%;
padding-left: 5%
}
h4 {
margin-right: auto;
font-family: "Droid Sans","Noto Sans",Ubuntu,"Segoe UI","Lucida Grande",Verdana,Helvetica,sans-serif;
font-weight: 600;
font-size: 20px!important;
text-transform: uppercase;
color: #41465f;
border: 1px solid #dee2e6;
border-radius: 2px 2px 0 0;
width: 90%;
padding-left: 5%
}
.showhider {
margin-right: auto;
font-family: "Droid Sans","Noto Sans",Ubuntu,"Segoe UI","Lucida Grande",Verdana,Helvetica,sans-serif;
text-transform: uppercase;
background: 0 0!important;
border: none;
padding: 0!important;
width: 90%;
color: #3b6bbf;
text-decoration: none;
font-weight: 700;
word-wrap: break-word;
outline: 0;
text-align: left
}
#links .showhider {
font-size: 25px
}
.section-header {
display: flex;
flex-direction: row;
margin-bottom: 80px
}
ul {
margin-left: 2rem;
list-style: none
}
li {
min-height: 3rem;
padding: .5rem;
background: #dee2e6;
border: 1px solid #dee2e6;
width: 64%;
min-width: 64%;
border-radius: 2px;
box-shadow: inset 0 0 0 1px #fff,0 0 1px #ccc;
margin: .5rem .5rem .5rem 32%
}
#readyness {
min-height: 5rem;
padding: .5rem;
margin: .5rem;
width: 42%;
min-width: 42%;
background: #dee2e6;
text-align: center!important;
border: 1px solid #dee2e6;
border-radius: 2px;
box-shadow: inset 0 0 0 1px #fff,0 0 1px #ccc
}
#onboarding {
min-height: 5rem;
padding: .5rem;
margin: .5rem;
width: 42%;
min-width: 42%;
font-size: 2rem;
background: #a48fe1;
text-align: center!important;
border: 1px solid #a48fe1;
border-radius: 2px;
box-shadow: inset 0 0 0 1px #fff,0 0 1px #ccc
}
#i2pbrowser-description {
width: 50%;
min-width: 50%;
min-height: 5rem;
padding: .5rem;
display: inline;
background: #dee2e6;
float: right;
border: 1px solid #dee2e6;
border-radius: 2px;
box-shadow: inset 0 0 0 1px #fff,0 0 1px #ccc
}
#applicationExplain,
#controlExplain,
#linksExplain {
min-height: 5rem;
padding: .5rem;
margin: .5rem;
width: 30%;
min-width: 30%;
background: #dee2e6;
float: left;
text-align: center!important;
border: 1px solid #dee2e6;
border-radius: 2px;
box-shadow: inset 0 0 0 1px #fff,0 0 1px #ccc
}
#proxyReady {
min-height: 3rem;
padding: .5rem;
margin: .2rem;
width: 38%;
min-width: 38%;
display: inline;
background: #d9d9d6;
float: right;
text-align: center!important;
border: 1px solid #d9d9d6;
border-radius: 2px;
box-shadow: inset 0 0 0 1px #fff,0 0 1px #ccc
}
#proxyUnready {
min-height: 3rem;
padding: .5rem;
margin: .2rem;
width: 38%;
min-width: 38%;
display: inline;
float: right;
text-align: center!important;
border: 1px solid #ffc56d;
border-radius: 2px;
background: #ffc56d;
box-shadow: inset 0 0 0 1px #fff,0 0 1px #ccc
}
#consoleOn {
min-height: 3rem;
padding: .5rem;
margin: .2rem;
width: 38%;
min-width: 38%;
display: inline;
float: left;
text-align: center!important;
border: 1px solid #f7e59a;
border-radius: 2px;
background: #f7e59a;
box-shadow: inset 0 0 0 1px #fff,0 0 1px #ccc
}
.onboardingContent {
font-size: .8rem!important;
text-align: left;
display: none
}
#proxy-check {
visibility: hidden
}
#info-content {
display: none
}
.consoleOn:hover #proxy-check,
.proxyReady:hover #proxy-check {
visibility: visible;
opacity: 1
}
img {
max-width: 100%
}
img.readyness {
height: 100%;
width: auto
}
@media only screen and (max-width: 399px) {
.application-info {
display: none
}
}

View File

@ -0,0 +1,94 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="home.css"/>
</head>
<body>
<!--<div>-->
<script src="home.js" type="text/javascript"></script>
<script src="content.js" type="text/javascript"></script>
<div class='background'>
<div class='content'>
<div class='section-header'>
<h1 id="text-section-header">I2P Browsing</h1>
</div>
<div id="i2pbrowser-version"></div>
<div id="i2pbrowser-description">
<p id="description">I2P in Private Browsing is a webextension to secure and enhance your I2P use in the browser.</p>
<p id="beta">This is an experimental product.</p>
</div>
<div id="readyness">
<div id="consoleOn" class="hideIfI2PConsoleOff">
<img class="readyness" src="http://proxy.i2p/themes/console/images/local_up.png" alt="Proxy is not ready."/>
<span id="proxy-check">Proxy is ready.</span>
</div>
<!--<div id="proxyUnready" class="hideIfI2PProxyOn">The proxy is not ready yet.</div>-->
<div id="proxyReady" class="hideIfI2PProxyOff">
<img class="readyness" src="http://proxy.i2p/themes/console/images/local_up.png" alt="Proxy is not ready."/>
<span id="proxy-check">Proxy is ready.</span>
</div>
</div>
<div id="onboarding" class="hideIfI2PConsoleOff">
<h3 id="onboardingTitle">New to I2P? Learn more here.</h3>
<h4 id="onboardingZero"><button id="onboardingButtonZero" class="showhider" onclick="flipVisibility('onboardingContentZero')">Protect your Privacy</button></h4>
<p id="onboardingContentZero" class="onboardingContent">I2P Browser allows you to surf the internet using the private and secure I2P network. When using it, you are protected against tracking, surveillance, and censorship as a first-class participant in the I2P network. I2P Browser isolates cookies and deletes your browser history after your session. These modifications ensure your privacy and security are protected in the browser.</p>
<h4 id="onboardingOne"><button id="onboardingButtonOne" class="showhider" onclick="flipVisibility('onboardingContentOne')">Configure your Experience</button></h4>
<p id="onboardingContentOne" class="onboardingContent">We also provide you with additional settings for bumping up your browser security. Our Security Settings allow you to block elements that could be used to attack your computer. Click below to see what the different options do. Note: By default, NoScript and HTTPS Everywhere are not included on the toolbar, but you can customize your toolbar to add them. With all the security and privacy features provided by I2P, your experience while browsing the internet may be a little different. Things may be a bit slower, and depending on your security level, some elements may not work or load. You may also be asked to prove you are a human and not a robot.</p>
<h4 id="onboardingTwo"><button id="onboardingButtonTwo" class="showhider" onclick="flipVisibility('onboardingContentTwo')">Share Files</button></h4>
<p id="onboardingContentTwo" class="onboardingContent">I2P is capable of using peer-to-peer applications like BitTorrent, protecting your identity when you share files. Our anonymous bittorrent client is available in the browser.</p>
<h4 id="onboardingThree"><button id="onboardingButtonThree" class="showhider" onclick="flipVisibility('onboardingContentThree')">Hidden e-mail</button></h4>
<p id="onboardingContentThree" class="onboardingContent">There is also an anonymous e-mail service available inside of I2P, which is accessible from our browser via the menu directly below.</p>
<h4 id="onboardingFour"><button id="onboardingButtonFour" class="showhider" onclick="flipVisibility('onboardingContentFour')">Experience Tips</button></h4>
<p id="onboardingContentFour" class="onboardingContent">With all the security and privacy features provided by I2P, your experience while browsing the internet may be a little different. Things may be a bit slower, and depending on your security level, some elements may not work or load. You may also be asked to prove you are a human and not a robot.</p>
</div>
<!--<p class="hideIfI2POn">&aboutI2p.warn_not_running; <a href="about:i2p">&aboutI2p.refresh_text;</a> &aboutI2p.reccommend_not_running;</p>-->
<div class="application-info">
<p class="hideIfI2PConsoleOff">
<h3 id="applicationHeader">Applications</h3>
<p id="applicationExplain">These applications use I2P to provide them with security and privacy.</p>
<ul>
<li class="application">
<a id="window-visit-i2ptunnel" class="applicationName" target="_blank" href="http://127.0.0.1:7657/i2ptunnel">Hidden Services Manager </a>
<span id="i2ptunnel" class="applicationDesc">I2P has a web-based interface for configuring .i2p services like web sites, to set up your own web sites, go here:</span>
</li>
<li class="application">
<a id="window-visit-susimail" class="applicationName" target="_blank" href="http://127.0.0.1:7657/susimail">E-Mail </a>
<span id="susimail" class="applicationDesc">I2P also bundles a webmail client which can be used to access in-I2P e-mail. To use it, go here:</span>
</li>
<li class="application">
<a id="window-visit-snark" class="applicationName" target="_blank" href="http://127.0.0.1:7657/i2psnark">BitTorrent </a>
<span id="snark" class="applicationDesc">I2P is capable of anonymous Peer-to-Peer file sharing, to use the built-in bittorrent client go here:</span>
</li>
</ul>
</p>
</div>
<div class="extended-info">
<h3 id="links"><button id="fliplinks" class="showhider">Links</button></h3>
<div id="info-content">
<p id="linksExplain">If you want to get more information about I2P, you can visit these links.</p>
<p>
<ul>
<li>
<a id="window-visit-webpage" href="https://eyedeekay.github.io/I2P-Confiuration-for-Chromium/">Homepage: </a>
<span id="webpage" class="applicationDesc">More information is available here.</span>
</li>
<li>
<a id="window-visit-sources" href="https://github.com/eyedeekay/I2P-Confiuration-for-Chromium">Source Code: </a>
<span id="sources" class="applicationDesc">Browse the source or contribute here.</span>
</li>
<li>
<a id="window-visit-releases" href="https://github.com/eyedeekay/I2P-Confiuration-for-Chromium">Releases: </a>
<span id="releases" class="applicationDesc">Check for new releases here.</span>
</li>
</ul>
</p>
</div>
</div>
</div>
</div>
<!--</div>-->
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

View File

@ -0,0 +1,54 @@
body,
html {
width: 50rem
}
a {
margin: 10px
}
.panel {
margin: 5px
}
span.identity {
width: 100px;
display: inline-block;
margin-left: 1em
}
figcaption {
display: inline
}
.section-header {
display: flex;
flex-direction: row;
margin-bottom: 8px
}
p {
font-size: 12px
}
h1 {
font-size: 25px
}
h2,
h3 {
font-size: 18px
}
h4 {
font-size: 13px!important
}
#links .showhider {
font-size: 18px
}
#onboarding {
font-size: 2rem
}
img.readyness {
height: 2rem
}
#proxyUnready {
min-height: 2rem
}
#proxyReady {
min-height: 2rem
}
#consoleOn {
min-height: 2rem
}

View File

@ -0,0 +1,123 @@
document.addEventListener("click", (clickEvent) => {
if (clickEvent.target.id === "window-create-help-panel") {
let createData = {
type: "panel",
incognito: true,
};
let creating = chrome.tabs.create(createData);
creating.then(() => {
console.log("The help panel has been created");
});
} else if (clickEvent.target.id === "window-create-news-panel") {
let createData = {
type: "panel",
incognito: true,
};
let creating = chrome.tabs.create(createData);
creating.then(() => {
console.log("The news panel has been created");
});
} else if (clickEvent.target.id === "generate-fresh-tunnel") {
function refreshIdentity() {
console.log("Generating new identity");
const Http = new XMLHttpRequest();
const url = "http://" + controlHost + ":" + controlPort;
Http.open("GET", url);
Http.send();
Http.onreadystatechange = (event) => {
console.log(Http.responseText);
};
}
refreshIdentity();
} else if (clickEvent.target.id === "window-preface-title") {
console.log("attempting to create homepage tab");
goHome();
} else if (clickEvent.target.id === "window-visit-homepage") {
console.log("attempting to create homepage tab");
goHome();
} else if (clickEvent.target.id === "window-visit-readme") {
console.log("attempting to create readme tab");
goIndex();
} else if (clickEvent.target.id === "window-visit-i2ptunnel") {
console.log("attempting to create i2ptunnel tab");
goTunnel();
} else if (clickEvent.target.id === "window-visit-susimail") {
console.log("attempting to create susimail tab");
goMail();
} else if (clickEvent.target.id === "window-visit-snark") {
console.log("attempting to create snark tab");
goSnark();
} else if (clickEvent.target.id === "clear-chrome-data") {
forgetBrowsingData();
} else if (clickEvent.target.id === "check-i2p-control") {
//echo("I2P Router Detected", "panel-section-i2pcontrol-check");
} else if (clickEvent.target.id === "enable-web-rtc") {
if (clickEvent.target.checked) {
chrome.runtime.sendMessage({ rtc: "enableWebRTC" });
} else {
chrome.runtime.sendMessage({ rtc: "disableWebRTC" });
}
checkPeerConnection();
return;
} else if (clickEvent.target.id === "disable-history") {
if (clickEvent.target.checked) {
chrome.runtime.sendMessage({ history: "disableHistory" });
} else {
chrome.runtime.sendMessage({ history: "enableHistory" });
}
return;
}
clickEvent.preventDefault();
});
function proxyReadiness() {
console.log(this.responseText);
}
control_host = "localhost";
control_port = "7657";
function onTabCreated() {
console.log("Tab Created");
}
function goIndex() {
let createData = {
url: "index.html",
};
console.log("visiting readme");
let creating = chrome.tabs.create(createData);
}
function goHome() {
let createData = {
url: "home.html",
};
console.log("visiting homepage");
let creating = chrome.tabs.create(createData);
}
function goTunnel() {
let createData = {
url: "http://" + control_host + ":" + control_port + "/i2ptunnel",
};
console.log("visiting i2ptunnel");
let creating = chrome.tabs.create(createData);
}
function goMail() {
let createData = {
url: "http://" + control_host + ":" + control_port + "/susimail",
};
console.log("visiting mail");
let creating = chrome.tabs.create(createData);
}
function goSnark() {
let createData = {
url: "http://" + control_host + ":" + control_port + "/i2psnark",
};
console.log("visiting snark");
let creating = chrome.tabs.create(createData);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

View File

@ -0,0 +1,43 @@
{
"update_url": "https://clients2.google.com/service/update2/crx",
"permissions": [
"browsingData",
"notifications",
"proxy",
"privacy",
"storage",
"webRequest",
"webRequestBlocking",
"*://127.0.0.1/*",
"*://localhost/*",
"<all_urls>"
],
"manifest_version": 2,
"name": "__MSG_extensionName__",
"version": "1.29",
"description": "__MSG_extensionDescription__",
"homepage_url": "https://github.com/eyedeekay/I2P-Configuration-For-Chromium",
"icons": {
"48": "icons/toopie.png"
},
"browser_action": {
"browser_style": true,
"default_icon": "icons/toopie.png",
"default_title": "__MSG_extensionName__",
"default_popup": "window.html"
},
"options_ui": {
"page": "options/options.html"
},
"background": {
"scripts": [
"browser-polyfill.js",
"background.js",
"proxy.js",
"info.js",
"privacy.js"
]
},
"default_locale": "en"
}

View File

@ -0,0 +1,62 @@
body {
width: 25em;
font-family: "Open Sans Light", sans-serif;
font-size: 0.9em;
font-weight: 300;
}
section.scheme-options {
padding: 0.5em 0;
margin: 1em 0;
}
#clear-button {
margin: 0 1.3em 1em 0;
}
section.scheme-options input,
section.scheme-options>select,
#clear-button {
float: right;
}
label {
display: block;
padding: 0.2em 0;
}
label:hover {
background-color: #EAEFF2;
}
.title {
font-size: 1.2em;
margin-bottom: 0.5em;
}
html, body {
width: 350px;
}
a {
margin: 10px;
display: inline-block;
}
.panel {
margin: 5px;
}
span.identity {
width: 100px;
display: inline-block;
margin-left: 1em;
}
.control-options {
display: none;
}
.identity-options {
display: none;
}

View File

@ -0,0 +1,51 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="options.css"/>
</head>
<body>
<section class="scheme-options">
<span class="title">Proxy Scheme:</span>
<select id="proxy_scheme">
<option value="http" selected="selected">HTTP</option>
<option value="socks5">SOCKS5</option>
</select>
</section>
<section class="scheme-options proxy-options">
<div class="title" >Proxy Options</div>
<label id="portText">Host: </label>
<input type="text" data="host" id="host" value="127.0.0.1"/>
<br>
<label id="hostText">Port: </label>
<input type="text" data="port" id="port" value="4444"/>
</section>
<section class="scheme-options identity-options">
<div class="panel">
<div id="identity-list">Identity list?</div>
</div>
</section>
<section class="scheme-options control-options">
<div class="title" >Controller Options</div>
<p id="controlHelpText"> These options will be inert if used with the default i2p HTTP or SOCKS
proxy. </p>
<label id="controlPortText">Control Host: </label>
<input type="text" data="controlhost" id="controlhost" value="127.0.0.1"/>
<br>
<label id="controlHostText">Control Port: </label>
<input type="text" data="controlport" id="controlport" value="4444"/>
</section>
<input type="button" value="Save preferences" id="save-button"/>
<script src="options.js"></script>
</body>
</html>

View File

@ -0,0 +1,193 @@
function isDroid() {
var gettingInfo = browser.runtime.getPlatformInfo();
gettingInfo.then((got) => {
if (got.os == "android") {
return true;
} else {
return false;
}
});
}
function SetHostText() {
var hostid = document.getElementById("hostText");
hostid.textContent = chrome.i18n.getMessage("hostText");
}
function SetPortText() {
var portid = document.getElementById("portText");
portid.textContent = chrome.i18n.getMessage("portText");
}
function SetControlHostText() {
var controlhostid = document.getElementById("controlHostText");
controlhostid.textContent = chrome.i18n.getMessage("controlHostText");
}
function setupProxy() {
var Host = getHost();
var Port = getPort();
var Scheme = getScheme();
var config = {
mode: "fixed_servers",
rules: {
singleProxy: {
scheme: Scheme,
host: Host,
port: parseInt(Port),
},
},
};
chrome.proxy.settings.set(
{
value: config,
scope: "regular",
},
function () {}
);
}
function SetControlPortText() {
var controlportid = document.getElementById("controlPortText");
controlportid.textContent = chrome.i18n.getMessage("controlPortText");
}
function SetControlHelpText() {
var portid = document.getElementById("controlHelpText");
portid.textContent = chrome.i18n.getMessage("controlHelpText");
}
function getScheme() {
const proxy_scheme = document.querySelector("#proxy_scheme");
console.log("Got i2p proxy scheme:", proxy_scheme.value);
if (proxy_scheme == "HTTP") {
return "http";
}
if (proxy_scheme == "SOCKS") {
return "socks";
}
return proxy_scheme.value;
}
function getHost() {
proxy_host = document.getElementById("host").value;
console.log("Got i2p proxy host:", proxy_host);
if (proxy_host == undefined) {
return "127.0.0.1";
}
return proxy_host;
}
function getPort() {
proxy_port = document.getElementById("port").value;
console.log("Got i2p proxy port:", proxy_port);
if (proxy_port == undefined) {
return "4444";
}
return proxy_port;
}
function getControlHost() {
control_host = document.getElementById("controlhost").value;
console.log("Got i2p control host:", control_host);
if (control_host == undefined) {
return "127.0.0.1";
}
return control_host;
}
function getControlPort() {
control_port = document.getElementById("controlport").value;
console.log("Got i2p control port:", control_port);
if (control_port == undefined) {
return "4444";
}
return control_port;
}
function checkStoredSettings(storedSettings) {
let defaultSettings = {};
if (!storedSettings.proxy_scheme) {
defaultSettings["proxy_scheme"] = "http";
}
if (!storedSettings.proxy_host) {
defaultSettings["proxy_host"] = "127.0.0.1";
}
if (!storedSettings.proxy_port) {
defaultSettings["proxy_port"] = 4444;
}
if (!storedSettings.control_host) {
defaultSettings["control_host"] = "127.0.0.1";
}
if (!storedSettings.control_port) {
defaultSettings["control_port"] = 4444;
}
chrome.storage.local.set(defaultSettings);
}
function onError(e) {
console.error(e);
}
function storeSettings() {
let proxy_scheme = getScheme();
let proxy_host = getHost();
let proxy_port = getPort();
let control_host = getControlHost();
let control_port = getControlPort();
chrome.storage.local.set({
proxy_scheme,
proxy_host,
proxy_port,
control_host,
control_port,
});
console.log("storing proxy scheme:", proxy_scheme);
console.log("storing proxy host:", proxy_host);
console.log("storing proxy port:", proxy_port);
console.log("storing control host:", control_host);
console.log("storing control port:", control_port);
setupProxy();
}
function updateUI(restoredSettings) {
const selectList = document.querySelector("#proxy_scheme");
selectList.value = restoredSettings.proxy_scheme;
console.log("showing proxy scheme:", selectList.value);
const hostitem = document.getElementById("host");
hostitem.value = restoredSettings.proxy_host;
console.log("showing proxy host:", hostitem.value);
const portitem = document.getElementById("port");
portitem.value = restoredSettings.proxy_port;
console.log("showing proxy port:", portitem.value);
const controlhostitem = document.getElementById("controlhost");
controlhostitem.value = restoredSettings.control_host;
console.log("showing control host:", controlhostitem.value);
const controlportitem = document.getElementById("controlport");
controlportitem.value = restoredSettings.control_port;
console.log("showing control port:", controlportitem.value);
SetHostText();
SetPortText();
SetControlHostText();
SetControlPortText();
SetControlHelpText();
setupProxy();
}
function onError(e) {
console.error(e);
}
chrome.storage.local.get(function (got) {
checkStoredSettings(got);
updateUI(got);
});
const saveButton = document.querySelector("#save-button");
saveButton.addEventListener("click", storeSettings);
//EXPERIMENTAL: Open in I2P Tab

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -0,0 +1,277 @@
var titlepref = chrome.i18n.getMessage("titlePreface");
/* This disables protected content, which is a form of digital restrictions
management dependent on identifying information */
function disableDigitalRestrictionsManagement(platformInfo) {
if (platformInfo.PlatformOs == "android") {
chrome.privacy.websites.protectedContentEnabled.set({ value: false });
} else if (platformInfo.PlatformOs == "windows") {
chrome.privacy.websites.protectedContentEnabled.set({ value: false });
}
}
function getBrowser() {
if (typeof chrome !== "undefined") {
if (typeof browser !== "undefined") {
return "Firefox";
} else {
return "Chrome";
}
} else {
return "Chrome";
} /* else {
return "Edge";
}*/
}
function setAllPrivacy() {
chrome.privacy.network.networkPredictionEnabled.set({ value: false });
if (getBrowser() == "Chrome") {
chrome.privacy.services.alternateErrorPagesEnabled.set({ value: false });
chrome.privacy.services.autofillEnabled.set({ value: false });
chrome.privacy.services.passwordSavingEnabled.set({ value: false });
chrome.privacy.services.safeBrowsingEnabled.set({ value: false });
chrome.privacy.services.safeBrowsingExtendedReportingEnabled.set({
value: false,
});
chrome.privacy.services.searchSuggestEnabled.set({ value: false });
chrome.privacy.services.spellingServiceEnabled.set({ value: false });
chrome.privacy.services.translationServiceEnabled.set({ value: false });
chrome.privacy.websites.thirdPartyCookiesAllowed.set({ value: false });
chrome.privacy.websites.doNotTrackEnabled.set({ value: true });
chrome.privacy.websites.hyperlinkAuditingEnabled.set({ value: false });
chrome.privacy.websites.referrersEnabled.set({ value: false });
//chrome.privacy.services.hotwordSearchEnabled.set({ value: false });
} else {
browser.privacy.websites.hyperlinkAuditingEnabled.set({ value: false });
browser.privacy.websites.firstPartyIsolate.set({ value: true });
browser.privacy.websites.resistFingerprinting.set({ value: true });
// browser.privacy.websites.thirdPartyCookiesAllowed.set({ value: false });
browser.privacy.websites.trackingProtectionMode.set({ value: true });
browser.privacy.websites.cookieConfig.set({
value: {
behavior: "reject_third_party",
nonPersistentCookies: true,
},
});
browser.privacy.network.networkPredictionEnabled.set({ value: false });
}
return chrome.runtime.getPlatformInfo(disableDigitalRestrictionsManagement);
}
setAllPrivacy();
function ResetPeerConnection() {
AssurePeerConnection();
}
function EnablePeerConnection() {
AssurePeerConnection();
console.log("Enabled WebRTC");
}
function AssurePeerConnection() {
chrome.privacy.network.webRTCIPHandlingPolicy.set({
value: "disable_non_proxied_udp",
});
}
chrome.tabs.onCreated.addListener(AssurePeerConnection);
var defaultSettings = {
since: "forever",
dataTypes: ["downloads", "passwords", "formData", "localStorage", "history"],
};
function onError(therror) {
console.error(therror);
}
function forgetBrowsingData(storedSettings) {
function getSince(selectedSince) {
if (selectedSince === "forever") {
return 0;
}
const times = {
hour: () => 1000 * 60 * 60,
day: () => 1000 * 60 * 60 * 24,
week: () => 1000 * 60 * 60 * 24 * 7,
};
const sinceMilliseconds = times[selectedSince].call();
return Date.now() - sinceMilliseconds;
}
function getTypes(selectedTypes) {
let dataTypes = {};
for (let item of selectedTypes) {
dataTypes[item] = true;
}
return dataTypes;
}
const since = getSince(defaultSettings.since);
const dataTypes = getTypes(defaultSettings.dataTypes);
function notify() {
let dataTypesString = Object.keys(dataTypes).join(", ");
let sinceString = new Date(since).toLocaleString();
chrome.notifications.create({
type: "basic",
title: "Removed browsing data",
message: `Removed ${dataTypesString}\n for I2P Browsing`,
});
}
function deepCleanHistory(historyItems) {
console.log("Deep cleaning history");
for (let item of historyItems) {
if (i2pHost(item.url)) {
chrome.history.deleteUrl({
url: item.url,
});
chrome.browsingData.removeCache({});
console.log("cleared Cache");
chrome.browsingData
.removePasswords({
hostnames: [i2pHostName(item.url)],
since,
})
.then(onContextGotLog);
console.log("cleared Passwords");
chrome.browsingData
.removeDownloads({
hostnames: [i2pHostName(item.url)],
since,
})
.then(onContextGotLog);
console.log("cleared Downloads");
chrome.browsingData
.removeFormData({
hostnames: [i2pHostName(item.url)],
since,
})
.then(onContextGotLog);
console.log("cleared Form Data");
chrome.browsingData
.removeLocalStorage({
hostnames: [i2pHostName(item.url)],
since,
})
.then(onContextGotLog);
console.log("cleared Local Storage");
let contexts = chrome.contextualIdentities.query({
name: titlepref,
});
function deepCleanCookies(cookies) {
for (let cookie of cookies) {
var removing = chrome.cookies.remove({
firstPartyDomain: cookie.firstPartyDomain,
name: cookie.name,
url: item.url,
});
removing.then(onContextGotLog, onError);
}
console.log("Cleared cookies");
}
function deepCleanContext(cookieStoreIds) {
for (let cookieStoreId of cookieStoreIds) {
var removing = chrome.cookies.getAll({
firstPartyDomain: null,
storeId: cookieStoreId.cookieStoreId,
});
removing.then(deepCleanCookies, onError);
}
}
contexts.then(deepCleanContext, onError);
}
}
notify();
}
var searching = chrome.history.search({
text: "i2p",
startTime: 0,
});
searching.then(deepCleanHistory);
setAllPrivacy();
ResetPeerConnection();
}
function i2pHostName(url) {
let hostname = "";
if (url.indexOf("://") > -1) {
hostname = url.split("/")[2];
} else {
hostname = url.split("/")[0];
}
return hostname;
}
function i2pHost(url) {
let hostname = i2pHostName(url);
return hostname.endsWith(".i2p");
}
function onContextGotLog(contexts) {
if (contexts !== null) {
for (let context of contexts) {
console.log(context);
}
}
}
chrome.runtime.onMessage.addListener(message);
function enableHistory() {
function checkStoredSettings(storedSettings) {
storedSettings["disable_history"] = false;
console.log(storedSettings);
function enablehistory(settings) {
console.log("Store History:", settings);
}
let setting = chrome.storage.local.set(storedSettings);
setting.then(enablehistory);
}
const gettingStoredSettings = chrome.storage.local.get();
gettingStoredSettings.then(checkStoredSettings, onError);
}
function disableHistory() {
function checkStoredSettings(storedSettings) {
storedSettings["disable_history"] = true;
console.log(storedSettings);
function enablehistory(settings) {
console.log("Store History:", settings);
}
var setting = chrome.storage.local.set(storedSettings);
setting.then(enablehistory);
}
const gettingStoredSettings = chrome.storage.local.get();
gettingStoredSettings.then(checkStoredSettings, onError);
}
function message(recieved) {
console.log(recieved);
if (recieved.rtc === "enableWebRTC") {
console.log("enableWebRTC");
EnablePeerConnection();
} else if (recieved.rtc === "disableWebRTC") {
console.log("disableWebRTC");
ResetPeerConnection();
}
if (recieved.history === "enableHistory") {
console.log("enableHistory");
enableHistory();
} else if (recieved.history === "disableHistory") {
console.log("disableHistory");
disableHistory();
}
}

View File

@ -0,0 +1,161 @@
function platformCallback(platformInfo) {
if (platformInfo.PlatformOs == "android") {
console.log("android detected");
return true;
} else {
console.log("desktop detected");
return false;
}
}
function isDroid() {
return chrome.runtime.getPlatformInfo(platformCallback);
}
//chrome.privacy.network.peerConnectionEnabled.set({value: false});
chrome.privacy.network.networkPredictionEnabled.set({ value: false });
chrome.privacy.network.webRTCIPHandlingPolicy.set({
value: "disable_non_proxied_udp",
});
console.log("Preliminarily disabled WebRTC.");
function shouldProxyRequest(requestInfo) {
return requestInfo.parentFrameId != -1;
}
function handleProxyRequest(requestInfo) {
console.log(`Proxying: ${requestInfo.url}`);
console.log(" ", getScheme(), getHost(), ":", getPort());
return { type: getScheme(), host: getHost(), port: getPort() };
}
var proxy_scheme = "HTTP";
function getScheme() {
if (proxy_scheme == undefined) {
proxy_scheme = "http";
}
if (proxy_scheme == "HTTP") {
proxy_scheme = "http";
}
if (proxy_scheme == "SOCKS") {
proxy_scheme = "socks";
}
console.log("Got i2p proxy scheme:", proxy_scheme);
return proxy_scheme;
}
var proxy_host = "127.0.0.1";
function getHost() {
if (proxy_host == undefined) {
proxy_host = "127.0.0.1";
}
console.log("Got i2p proxy host:", proxy_host);
return proxy_host;
}
var proxy_port = "4444";
function getPort() {
if (proxy_port == undefined) {
proxy_port = "4444";
}
console.log("Got i2p proxy port:", proxy_port);
return proxy_port;
}
var control_port = "7657";
function getControlPort() {
if (control_port == undefined) {
return "7657";
}
console.log("Got i2p control port:", control_port);
return control_port;
}
function getBrowser() {
if (typeof chrome !== "undefined") {
if (typeof browser !== "undefined") {
return "Firefox";
} else {
return "Chrome";
}
} else {
return "Chrome";
}
/* else {
return "Edge";
}*/
}
function setupProxy() {
var Host = getHost();
var Port = getPort();
var Scheme = getScheme();
var config = {
mode: "fixed_servers",
rules: {
singleProxy: {
scheme: Scheme,
host: Host,
port: parseInt(Port),
},
},
};
chrome.proxy.settings.set({
value: config,
scope: "regular",
},
function() {}
);
}
setupProxy();
function checkStoredSettings(storedSettings) {
let defaultSettings = {};
if (!storedSettings.proxy_scheme) {
defaultSettings["proxy_scheme"] = "http";
}
if (!storedSettings.proxy_host) {
defaultSettings["proxy_host"] = "127.0.0.1";
}
if (!storedSettings.proxy_port) {
defaultSettings["proxy_port"] = 4444;
}
if (!storedSettings.control_host) {
defaultSettings["control_host"] = "127.0.0.1";
}
if (!storedSettings.control_port) {
defaultSettings["control_port"] = 4444;
}
chrome.storage.local.set(defaultSettings);
}
function update(restoredSettings) {
proxy_scheme = restoredSettings.proxy_scheme;
console.log("restoring proxy scheme:", proxy_scheme);
proxy_host = restoredSettings.proxy_host;
console.log("restoring proxy host:", proxy_host);
proxy_port = restoredSettings.proxy_port;
console.log("restoring proxy port:", proxy_port);
control_host = restoredSettings.control_host;
console.log("restoring control host:", control_host);
control_port = restoredSettings.control_port;
console.log("restoring control port:", control_port);
}
chrome.storage.local.get(function(got) {
checkStoredSettings(got);
update(got);
setupProxy();
});
chrome.windows.onCreated.addListener(() => {
const gettingStoredSettings = chrome.storage.local.get();
gettingStoredSettings.then(setupProxy, onError);
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

View File

@ -0,0 +1,86 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="home.css"/>
<link rel="stylesheet" href="info.css"/>
</head>
<body>
<div class="panel">
<div class="section-header panel-section panel-section-header">
<div id="text-section-header" class="text-section-header"><h1>The Invisible Internet Browser</h1></div>
</div>
<div class="panel-section-separator"></div>
<div id="i2pbrowser-version"></div>
<div id="i2pbrowser-description">
<p id="description">You are now able to use I2P in this browser.</p>
<p id="beta">It is experimental.</p>
</div>
<div id="readyness">
<img class="readyness" src="http://proxy.i2p/themes/console/images/local_up.png" alt="Proxy is not ready."/>
<span id="proxy-check">Proxy is ready.</span>
<img class="readyness" src="http://proxy.i2p/themes/console/images/local_up.png" alt="Proxy is not ready."/>
<span id="proxy-check">Proxy is ready.</span>
</div>
</div>
<div class="panel-section-separator"></div>
<div class="browser-info">
<p class="hideIfI2PConsoleOff">
<h3 id="controlHeader">Controls</h3>
<p id="controlExplain">These controls are used to tailor your I2P Browsing Experience</p>
<ul>
<li class="application">
<a id="clear-browser-data" href="#">Clear Browsing Data: </a>
<span id="clear-desc" class="applicationDesc">Use this to erase your browsing data.</span>
</li>
<li class="application">
<a id="window-visit-readme" href="#">READ ME!</a>
<span id="readme" class="applicationDesc">If you didn't read the instructions, you may be using this extension incorrectly! Do you remember creating an "I2P Browsing Mode" profile? Click here to make sure!</span>
</li>
<!--<li class="application">
<input type="checkbox" id="disable-history" name="disablehistory" value="history">
<label for="disable-history">Disable History in I2P Tabs</label>
<span id="histDesc" class="applicationDesc">History is automatically cleared when your I2P tabs are closed. If you want to clear history as you go, check this box.</span>
</li>-->
</ul>
</p>
</p>
</div>
<div class="panel-section-separator"></div>
<div class="application-info">
<p class="hideIfI2PConsoleOff">
<h3 id="applicationHeader">Applications</h3>
<p id="applicationExplain">These applications use I2P to provide them with security and privacy.</p>
<ul>
<li class="application">
<button id="window-visit-homepage" target="_blank" class="applicationName window-visit-homepage" href="#">Home Page</button>
<span id="abouthome" class="applicationDesc">For more information about this extension, go here:</span>
</li>
<li class="application">
<button id="window-visit-i2ptunnel" target="_blank" class="applicationName">Hidden Services Manager</button>
<span id="i2ptunnel" class="applicationDesc">I2P has a web-based interface for configuring .i2p services like web sites, to set up your own web sites, go here:</span>
</li>
<li class="application">
<button id="window-visit-susimail" target="_blank" class="applicationName">E-Mail</button>
<span id="susimail" class="applicationDesc">I2P also bundles a webmail client which can be used to access in-I2P e-mail. To use it, go here:</span>
</li>
<li class="application">
<button id="window-visit-snark" target="_blank" class="applicationName">BitTorrent</button>
<span id="snark" class="applicationDesc">I2P is capable of anonymous Peer-to-Peer file sharing, to use the built-in bittorrent client go here:</span>
</li>
</ul>
</p>
</p>
</div>
</div>
<script src="context.js"></script>
<script src="privacy.js"></script>
<script src="info.js"></script>
<script src="content.js" crossorigin="anonymous"></script>
<script src="i2pcontrol/i2pcontrol.js"></script>
</body>
</html>

View File

@ -314,7 +314,7 @@ public class I2PChromium {
public ProcessBuilder processBuilder(String[] args) {
String chrome = topChromium();
if (!chrome.isEmpty()) {
String[] newArgs = new String[args.length+19];
String[] newArgs = new String[args.length+20];
newArgs[0] = chrome;
newArgs[1] = "--user-data-dir="+I2PChromiumProfileBuilder.profileDirectory();
newArgs[2] = "--proxy-server=http://127.0.0.1:4444";
@ -334,8 +334,15 @@ public class I2PChromium {
newArgs[16] = "--disable-background-networking";
newArgs[17] = "--disable-d3d11";
newArgs[18] = "--disable-file-system";
for (int i = 0; i < args.length; i++) {
newArgs[i+19] = args[i];
newArgs[19] = "--load-extension="+new File(I2PChromiumProfileBuilder.profileDirectory(),"extensions/i2pchrome.js").getAbsolutePath();
/*+","+
new File(I2PChromiumProfileBuilder.profileDirectory(),"extensions/ublock.js").getAbsolutePath()
+","+
new File(I2PChromiumProfileBuilder.profileDirectory(),"extensions/scriptsafe.js").getAbsolutePath();*/
if (args.length > 0) {
for (int i = 0; i < args.length; i++) {
newArgs[i+20] = args[i];
}
}
return new ProcessBuilder(newArgs).directory(I2PChromiumProfileBuilder.runtimeDirectory(true));
} else {

View File

@ -63,12 +63,13 @@ public class I2PFirefox {
String[] tbPath = new String[]{new File(userHome, "/OneDrive/Desktop/Tor Browser/Browser/").toString(), new File(userHome, "/Desktop/Tor Browser/Browser/").toString()};
String[] path = new String[]{
tbPath[0], tbPath[1],
new File(programFiles, "Mozilla Firefox/").toString(),
new File(programFiles86, "Mozilla Firefox/").toString(),
new File(programFiles, "Waterfox/").toString(),
new File(programFiles86, "Waterfox/").toString(),
new File(programFiles, "Librewolf/").toString(),
tbPath[0], tbPath[1]};
};
String[] exes = new String[]{"firefox.exe", "firefox-bin.exe", "firefox-esr.exe", "waterfox.exe", "waterfox-bin.exe", "librewolf.exe"};
String[] exePath = new String[path.length * exes.length];
int i = 0;
@ -293,8 +294,10 @@ public class I2PFirefox {
newArgs[0] = firefox;
newArgs[1] = "--profile";
newArgs[2] = I2PFirefoxProfileBuilder.profileDirectory();
for (int i = 0; i < args.length; i++) {
newArgs[i+3] = args[i];
if (args.length > 0) {
for (int i = 0; i < args.length; i++) {
newArgs[i+3] = args[i];
}
}
return new ProcessBuilder(newArgs).directory(I2PFirefoxProfileBuilder.runtimeDirectory(true));
} else {

View File

@ -3,6 +3,5 @@
GITHUB_USER=eyedeekay
GITHUB_REPO=i2p.plugins.firefox
ant distclean
cd src && \
ant && cd ../
ant jar
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PChromium