Compare commits

..

67 Commits
1.0.5 ... 0.0.6

Author SHA1 Message Date
idk
292cac5e67 update heading 2022-08-08 20:12:02 -04:00
idk
f6c8408f80 update CHANGES.html 2022-08-08 20:10:24 -04:00
idk
fb30909e3a update launcher script to self-discover jar. add some build targets of convenience 2022-08-08 20:10:10 -04:00
idk
5c66b64671 update LICENSE.html 2022-08-08 18:53:03 -04:00
idk
a87a003ceb update I2PFirefoxProfileUnpacker.html 2022-08-08 18:53:00 -04:00
idk
3b68756a32 update I2PFirefoxProfileChecker.html 2022-08-08 18:52:56 -04:00
idk
17b6922728 update I2PFirefoxProfileBuilder.html 2022-08-08 18:52:53 -04:00
idk
49d9acc383 update I2PFirefox.html 2022-08-08 18:52:49 -04:00
idk
529d763e7a update I2PChromiumProfileUnpacker.html 2022-08-08 18:52:46 -04:00
idk
582699ce1f update I2PChromiumProfileChecker.html 2022-08-08 18:52:42 -04:00
idk
6f5390eacd update I2PChromiumProfileBuilder.html 2022-08-08 18:52:38 -04:00
idk
db45db7058 update I2PChromium.html 2022-08-08 18:52:35 -04:00
idk
9693b1383f update CHANGES.html 2022-08-08 18:52:31 -04:00
idk
839d6fddb3 update index.html 2022-08-08 18:52:27 -04:00
idk
7638e5cfec update index.html 2022-08-08 15:29:47 -04:00
idk
b66e8690e2 add javadoc error reports 2022-08-08 13:28:46 -04:00
idk
ce9aeb3b19 add chromium targets to distclean 2022-08-08 13:23:44 -04:00
idk
417fd68f91 update LICENSE.html 2022-08-08 13:18:18 -04:00
idk
3468cbd637 update I2PFirefoxProfileUnpacker.html 2022-08-08 13:18:13 -04:00
idk
acf24565c6 update I2PFirefoxProfileChecker.html 2022-08-08 13:18:08 -04:00
idk
3c505187e7 update I2PFirefoxProfileBuilder.html 2022-08-08 13:18:03 -04:00
idk
cf9ecca991 update I2PFirefox.html 2022-08-08 13:17:59 -04:00
idk
350cab1d33 update I2PChromiumProfileUnpacker.html 2022-08-08 13:17:56 -04:00
idk
717dda7d0b update I2PChromiumProfileChecker.html 2022-08-08 13:17:52 -04:00
idk
f5da9b7ca3 update I2PChromiumProfileBuilder.html 2022-08-08 13:17:48 -04:00
idk
0a17f89b83 update I2PChromium.html 2022-08-08 13:17:43 -04:00
idk
12e82c3d74 update CHANGES.html 2022-08-08 13:17:40 -04:00
idk
eed2811920 update index.html 2022-08-08 13:17:36 -04:00
idk
6e92fcc976 generate markdown from javadoc 2022-08-08 13:17:25 -04:00
idk
8d075794c2 Good morning. 2022-08-08 01:45:11 -04:00
idk
169a3ec988 Adds enough Chromium support that all that needs to be added is extensions 2022-08-08 01:43:30 -04:00
idk
6df7706964 Adds enough Chromium support that all that needs to be added is extensions 2022-08-08 01:38:40 -04:00
idk
b47093009a Adds enough Chromium support that all that needs to be added is extensions 2022-08-08 01:37:52 -04:00
idk
752d7a96d8 Maybe chromium too what the hell 2022-08-07 23:55:25 -04:00
idk
3804c542ad sync tags in releaser script 2022-08-07 22:57:40 -04:00
idk
cdc3142df1 Wait on the process to close so it doesn't crash and restart 2022-08-07 22:55:35 -04:00
idk
d3b8a3d8fc add test.sh script 2022-08-07 22:49:01 -04:00
idk
519fe9b83b update CHANGES.html 2022-08-07 22:46:46 -04:00
idk
b64b96039d wait for launch to close 2022-08-07 22:46:38 -04:00
idk
b39e9ccb19 wait for launch to close 2022-08-07 22:45:34 -04:00
idk
a8adf2478f fix typo 2022-08-07 22:24:19 -04:00
idk
36b79ec7ae update index.html 2022-08-07 22:22:52 -04:00
idk
aca5ef9df1 fix typo 2022-08-07 22:22:49 -04:00
idk
183fd7cab4 update LICENSE.html 2022-08-07 22:21:38 -04:00
idk
02d23790bc update CHANGES.html 2022-08-07 22:21:34 -04:00
idk
635c1e1873 update index.html 2022-08-07 22:21:29 -04:00
idk
5cf29b43f9 update README 2022-08-07 22:21:13 -04:00
idk
75fe20d84d bump version fix release 2022-08-07 22:16:36 -04:00
idk
b5c098bb9b Fill in the changelog 2022-08-07 22:14:45 -04:00
idk
2c5e75ac5c also search the Tor Browser path on Windows. 2022-08-07 22:10:04 -04:00
idk
f7a62f57cc bump version 2022-08-07 21:29:26 -04:00
idk
ab88dc722b constructor needs to be in public scope 2022-08-07 21:28:56 -04:00
idk
dfb8bfb347 fix missing javadoc 2022-08-07 20:55:58 -04:00
idk
51a2416d26 add i2pbrowser.cmd 2022-08-07 20:50:44 -04:00
idk
b08743d09b update version 2022-08-07 20:49:20 -04:00
idk
64e4183c41 add i2pbrowser.cmd 2022-08-07 20:46:22 -04:00
idk
b9591ef84c update gitignore 2022-08-07 20:20:55 -04:00
idk
f829e9cdf1 add releaser script 2022-08-07 20:20:29 -04:00
idk
ce674a50fa Delete the zip. Generate it every time so I don't have to check it itn 2022-08-07 19:41:27 -04:00
idk
8ef27f314d Check in the unpacker thing 2022-08-07 19:40:37 -04:00
idk
15a3e69286 add gitignore, housekeeping stuff 2022-08-07 19:39:20 -04:00
idk
7d9814e330 add test dirs to clean target 2022-08-07 19:36:56 -04:00
idk
c52c4227e1 It lives 2022-08-07 19:35:30 -04:00
idk
1d77950d50 update profile 2022-08-07 16:54:06 -04:00
idk
7a38bae33c update profile 2022-08-07 16:42:19 -04:00
idk
453bc0620d add base profile 2022-08-07 16:32:51 -04:00
idk
0c022ec3e5 add license files 2022-08-07 16:30:40 -04:00
95 changed files with 11041 additions and 6624 deletions

View File

@@ -1 +0,0 @@
.git

34
.gitignore vendored
View File

@@ -1,28 +1,10 @@
log
/*.su3
/*.xpi2p
/*.zip
/generated/
/i2p.chromium.base.profile/
/i2p.firefox.base.profile/
/i2p.chromium.usability.profile/
/i2p.firefox.usability.profile/
i2p.chromium.profile
src/i2p.firefox.base.profile.zip
*.su3
*.xpi2p
*.zip
generated/
i2p.chromium.base.profile
i2p.firefox.base.profile
i2p.chromium/profile
i2p.firefox.profile
src/build
*.err
*.log
i2pbrowser/
/i2pbrowser*.deb
/i2pbrowser*.rpm
/logs
/*.jar
/*.msi
/*.exe
/user.js
arkenfoxnum
/*.tar.gz
/*.tar.xz
/i2p.firefox.profile.*
/src/*.zip
/src/*profile/extensions/*.xpi

View File

@@ -17,11 +17,6 @@
<div id="shownav">
<div id="hidenav">
<ul>
<li>
<a href="..">
Up one level ^
</a>
</li>
<li>
<a href="index.html">
index
@@ -32,36 +27,51 @@
CHANGES
</a>
</li>
<li>
<a href="I2PChromium.html">
I2PChromium
</a>
</li>
<li>
<a href="I2PChromiumProfileBuilder.html">
I2PChromiumProfileBuilder
</a>
</li>
<li>
<a href="I2PChromiumProfileChecker.html">
I2PChromiumProfileChecker
</a>
</li>
<li>
<a href="I2PChromiumProfileUnpacker.html">
I2PChromiumProfileUnpacker
</a>
</li>
<li>
<a href="I2PFirefox.html">
I2PFirefox
</a>
</li>
<li>
<a href="I2PFirefoxProfileBuilder.html">
I2PFirefoxProfileBuilder
</a>
</li>
<li>
<a href="I2PFirefoxProfileChecker.html">
I2PFirefoxProfileChecker
</a>
</li>
<li>
<a href="I2PFirefoxProfileUnpacker.html">
I2PFirefoxProfileUnpacker
</a>
</li>
<li>
<a href="LICENSE.html">
LICENSE
</a>
</li>
<li>
<a href="LINUX.html">
LINUX
</a>
</li>
<li>
<a href="OSX.html">
OSX
</a>
</li>
<li>
<a href="VERSION.html">
VERSION
</a>
</li>
<li>
<a href="WINDOWS.html">
WINDOWS
</a>
</li>
<li>
<a href="index.html">
index.html
</a>
</li>
</ul>
<br>
<a href="#hidenav">
@@ -70,248 +80,6 @@
</div>
</div>
</div>
<a id="returnhome" href="/">
/
</a>
<h2>
Tue, November 22
</h2>
<ul>
<li>
Fix some minor issues from buildsystem refactor that surfaced during release
</li>
<li>
update to version 1.0.5
</li>
</ul>
<h2>
Sat, October 22
</h2>
<ul>
<li>
Add systray for launching browsers from our own GUI
</li>
<li>
Add
<code>
browser.config
</code>
file for customizing configuration
</li>
</ul>
<h2>
Thu, October 20
</h2>
<ul>
<li>
Complete the PWA/App mode
</li>
</ul>
<h2>
Sat, October 1
</h2>
<ul>
<li>
Work around anti-automation measures on OSX by writing final command out to shell script and running that
</li>
<li>
Deterministically generate .zip files
</li>
<li>
Add Tor Browser support to OSX
</li>
<li>
Improve Tor Browser support on Linux
</li>
</ul>
<h2>
Sun, September 25
</h2>
<ul>
<li>
Become version 1.0.0
</li>
</ul>
<h2>
Wed, September 15
</h2>
<ul>
<li>
Add ant targets which auto-update the user.js
</li>
</ul>
<h2>
Wed, September 14
</h2>
<ul>
<li>
Add ant targets which fetch Firefox addons from addons.mozilla.org
</li>
</ul>
<h2>
Sun, September 11
</h2>
<ul>
<li>
Make the logging a little more sensible
</li>
</ul>
<h2>
Tue, September 6
</h2>
<ul>
<li>
Wait up to 5 seconds for the initializing headless Firefox instance to die on Windows
</li>
<li>
Add option to disable proxy pre-check by setting timeout to zero or less
</li>
</ul>
<h2>
Tue, September 6
</h2>
<ul>
<li>
Run headlessly on first-run on Windows.
</li>
<li>
Add support for building an .exe package.
</li>
<li>
Add support for building an .zip Windows portable package.
</li>
<li>
Add support for building an .rpm package.
</li>
<li>
Destroy headless process if it goes too long.
</li>
</ul>
<h2>
Mon, September 5
</h2>
<ul>
<li>
Fix several issues with running on Windows 11
</li>
<li>
Make tunnel nicknames different to avoid double shared tunnels
</li>
<li>
Add support for building a .deb package.
</li>
<li>
Add support for building an .msi package.
</li>
</ul>
<h2>
Fri, September 2
</h2>
<ul>
<li>
Disable HTTPS only mode in favor of HTTPS-first mode to remove the interstitial on I2P sites.
</li>
<li>
Clearnet sites still choose HTTPS first and will silently deny downgrades but will not warn HTTP-only users.
</li>
</ul>
<h2>
Thu, September 1
</h2>
<ul>
<li>
Add a jpackage target. Add descriptions to release items.
</li>
</ul>
<h2>
Wed, August 31
</h2>
<ul>
<li>
Add unpacked extensions for Chromium profiles
</li>
<li>
Add Chromium flags from Ungoogled-Chromium documentation
</li>
<li>
Add Usability/Strict mode switching for Chromium
</li>
</ul>
<h2>
Tue, August 30
</h2>
<ul>
<li>
Add Usability/Strict mode switching for Firefox
</li>
<li>
Factor out common functions to own class
</li>
</ul>
<h2>
Sun, August 28
</h2>
<ul>
<li>
Adds support for generically configuring a browser with environment variables.
</li>
<li>
Bugfix for MSEdgium support
</li>
<li>
Add detachable version of launchers
</li>
</ul>
<h2>
Sat, August 27
</h2>
<ul>
<li>
Added support for passing a URL as a parameter to the cli&rsquo;s
</li>
<li>
revised test.sh
</li>
</ul>
<h2>
Mon, August 22
</h2>
<ul>
<li>
Completes support for auto-selecting
<em>
either
</em>
a Firefox or Chrome instance, automatically
</li>
</ul>
<h2>
Sat, August 21
</h2>
<ul>
<li>
Adds support for passing the -private flag to start Firefox with &ndash;private-window and Chromium &ndash;incognito
</li>
</ul>
<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 &ndash;private-window to Firefoxes and &ndash;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>
@@ -360,20 +128,6 @@
Implemented processBuilder generator
</li>
</ul>
<div id="sourcecode">
<span id="sourcehead">
<strong>
Get the source code:
</strong>
</span>
<ul>
<li>
<a href="https://github.com/eyedeekay/i2p.plugins.firefox">
Source Repository: (https://github.com/eyedeekay/i2p.plugins.firefox)
</a>
</li>
</ul>
</div>
<div>
<a href="#show">
Show license

126
CHANGES.md Normal file → Executable file
View File

@@ -1,129 +1,3 @@
Tue, November 22
----------------
- Fix some minor issues from buildsystem refactor that surfaced during release
- update to version 1.0.5
Sat, October 22
---------------
- Add systray for launching browsers from our own GUI
- Add `browser.config` file for customizing configuration
Thu, October 20
---------------
- Complete the PWA/App mode
Sat, October 1
--------------
- Work around anti-automation measures on OSX by writing final command out to shell script and running that
- Deterministically generate .zip files
- Add Tor Browser support to OSX
- Improve Tor Browser support on Linux
Sun, September 25
-----------------
- Become version 1.0.0
Wed, September 15
-----------------
- Add ant targets which auto-update the user.js
Wed, September 14
-----------------
- Add ant targets which fetch Firefox addons from addons.mozilla.org
Sun, September 11
-----------------
- Make the logging a little more sensible
Tue, September 6
----------------
- Wait up to 5 seconds for the initializing headless Firefox instance to die on Windows
- Add option to disable proxy pre-check by setting timeout to zero or less
Tue, September 6
----------------
- Run headlessly on first-run on Windows.
- Add support for building an .exe package.
- Add support for building an .zip Windows portable package.
- Add support for building an .rpm package.
- Destroy headless process if it goes too long.
Mon, September 5
----------------
- Fix several issues with running on Windows 11
- Make tunnel nicknames different to avoid double shared tunnels
- Add support for building a .deb package.
- Add support for building an .msi package.
Fri, September 2
----------------
- Disable HTTPS only mode in favor of HTTPS-first mode to remove the interstitial on I2P sites.
- Clearnet sites still choose HTTPS first and will silently deny downgrades but will not warn HTTP-only users.
Thu, September 1
----------------
- Add a jpackage target. Add descriptions to release items.
Wed, August 31
--------------
- Add unpacked extensions for Chromium profiles
- Add Chromium flags from Ungoogled-Chromium documentation
- Add Usability/Strict mode switching for Chromium
Tue, August 30
--------------
- Add Usability/Strict mode switching for Firefox
- Factor out common functions to own class
Sun, August 28
--------------
- Adds support for generically configuring a browser with environment variables.
- Bugfix for MSEdgium support
- Add detachable version of launchers
Sat, August 27
--------------
- Added support for passing a URL as a parameter to the cli's
- revised test.sh
Mon, August 22
--------------
- Completes support for auto-selecting *either* a Firefox or Chrome instance, automatically
Sat, August 21
--------------
- Adds support for passing the -private flag to start Firefox with --private-window and Chromium --incognito
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

@@ -1,6 +0,0 @@
FROM debian:stable
RUN apt-get update && apt-get install -y openjdk-17* ant zip firefox-esr
ADD . /usr/src/i2p.firefox
WORKDIR /usr/src/i2p.firefox
RUN ant jar
CMD java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser

View File

@@ -1,6 +0,0 @@
FROM fedora
RUN yum -y update
RUN yum -y install rpm-build
ADD . /src/i2p.plugins.firefox
WORKDIR /src/i2p.plugins.firefox
CMD ./fedora-docker.sh

1551
I2PChromium.html Normal file

File diff suppressed because it is too large Load Diff

246
I2PChromium.md Normal file
View File

@@ -0,0 +1,246 @@
# Class I2PChromium [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java)
>
Access: public
package: net.i2p.i2pfirefox
## Dependencies
<details>
<summary>
Show dependencies
</summary>
<ul>
<li>java.io.File</li>
<li>java.io.IOException</li>
<li>java.net.Socket</li>
<li>java.util.ArrayList</li>
</ul>
</details>
## Member Variables
#### String[] CHROMIUM_SEARCH_PATHS [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L)
>
+ Access: private
+ Modifiers: final
#### int DEFAULT_TIMEOUT [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L)
>
+ Access: private
+ Modifiers: final
## Methods
### FIND_CHROMIUM_SEARCH_PATHS_UNIX [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L31)
+ Description:
+ Access: private
+ Modifiers: static
+ return: String[]
This method has no parameters.
### FIND_CHROMIUM_SEARCH_PATHS_OSX [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L44)
+ Description:
+ Access: private
+ Modifiers: static
+ return: String[]
This method has no parameters.
### FIND_CHROMIUM_SEARCH_PATHS_WINDOWS [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L57)
+ Description:
+ Access: private
+ Modifiers: static
+ return: String[]
This method has no parameters.
### FIND_ALL_CHROMIUM_SEARCH_PATHS [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L87)
+ Description:
+ Access: private
+ Modifiers: static
+ return: String[]
This method has no parameters.
### FIND_CHROMIUM_SEARCH_PATHS [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L107)
+ Description:
+ Access: private
+ Modifiers: static
+ return: String[]
This method has no parameters.
### NEARBY_CHROMIUM_SEARCH_PATHS [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L121)
+ Description:
+ Access: private
+ Modifiers: static
+ return: String[]
This method has no parameters.
### CHROMIUM_FINDER [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L165)
+ Description:
+ Access: private
+ Modifiers: static
+ return: String[]
This method has no parameters.
### getOperatingSystem [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L177)
+ Description:
+ Access: private
+ Modifiers: static
+ return: String
This method has no parameters.
### onlyValidChromiums [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L199)
+ Description:
+ Access: public
+ return: String[]
This method has no parameters.
### topChromium [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L217)
+ Description:
+ Access: public
+ return: String
This method has no parameters.
### topChromium [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L246)
+ Description:
+ Access: public
+ return: String
| Name | Type | Description |
| ----- | ----- | ----- |
| overrideChromium | String | |
### defaultProcessBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L264)
+ Description:
+ Access: public
+ return: ProcessBuilder
This method has no parameters.
### processBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L301)
+ Description:
+ Access: public
+ return: ProcessBuilder
| Name | Type | Description |
| ----- | ----- | ----- |
| args | String[] | |
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L340)
+ Description:
+ Access: public
+ return: boolean
This method has no parameters.
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L352)
+ Description:
+ Access: public
+ return: boolean
| Name | Type | Description |
| ----- | ----- | ----- |
| timeout | int | |
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L364)
+ Description:
+ Access: public
+ return: boolean
| Name | Type | Description |
| ----- | ----- | ----- |
| timeout | int | |
| port | int | |
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L377)
+ Description:
+ Access: public
+ return: boolean
| Name | Type | Description |
| ----- | ----- | ----- |
| timeout | int | |
| port | int | |
| host | String | |
### checkifPortIsOccupied [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L390)
+ Description:
+ Access: private
+ return: boolean
| Name | Type | Description |
| ----- | ----- | ----- |
| port | int | |
| host | String | |
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L408)
+ Description:
+ Access: public
+ return: void
This method has no parameters.
### main [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L441)
+ Description:
+ Access: public
+ Modifiers: static
+ return: void
| Name | Type | Description |
| ----- | ----- | ----- |
| args | String[] | |

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,161 @@
# Class I2PChromiumProfileBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java)
>
Access: public
package: net.i2p.i2pfirefox
## Dependencies
<details>
<summary>
Show dependencies
</summary>
<ul>
<li>java.io.File</li>
<li>java.io.FileInputStream</li>
<li>java.io.FileOutputStream</li>
<li>java.io.IOException</li>
<li>java.io.InputStream</li>
<li>java.io.OutputStream</li>
<li>java.nio.file.Files</li>
<li>java.nio.file.StandardCopyOption</li>
</ul>
</details>
## Member Variables
#### boolean strict [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L)
>
+ Access: private
+ Modifiers: static
## Methods
### profileDir [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L15)
+ Description:
+ Access: private
+ Modifiers: static
+ return: String
| Name | Type | Description |
| ----- | ----- | ----- |
| file | String | |
### profileDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L25)
+ Description:
+ Access: public
+ Modifiers: static
+ return: String
This method has no parameters.
### baseProfileDir [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L37)
+ Description:
+ Access: private
+ Modifiers: static
+ return: String
| Name | Type | Description |
| ----- | ----- | ----- |
| file | String | |
### baseProfileDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L57)
+ Description:
+ Access: public
+ Modifiers: static
+ return: String
This method has no parameters.
### runtimeDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L81)
+ Description:
+ Access: public
+ Modifiers: static
+ return: File
| Name | Type | Description |
| ----- | ----- | ----- |
| create | boolean | |
### runtimeDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L98)
+ Description:
+ Access: public
+ Modifiers: static
+ return: String
This method has no parameters.
### copyBaseProfiletoProfile [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L144)
+ Description:
+ Access: public
+ Modifiers: static
+ return: boolean
This method has no parameters.
### copyDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L174)
+ Description:
+ Access: private
+ Modifiers: static
+ return: void
| Name | Type | Description |
| ----- | ----- | ----- |
| sourceDirectory | File | |
| destinationDirectory | File | |
### copyDirectoryCompatibityMode [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L184)
+ Description:
+ Access: public
+ Modifiers: static
+ return: void
| Name | Type | Description |
| ----- | ----- | ----- |
| source | File | |
| destination | File | |
### copyFile [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L192)
+ Description:
+ Access: private
+ Modifiers: static
+ return: void
| Name | Type | Description |
| ----- | ----- | ----- |
| sourceFile | File | |
| destinationFile | File | |
### copyStrictOptions [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L209)
+ Description:
+ Access: public
+ Modifiers: static
+ return: boolean
This method has no parameters.

View File

@@ -17,11 +17,6 @@
<div id="shownav">
<div id="hidenav">
<ul>
<li>
<a href="..">
Up one level ^
</a>
</li>
<li>
<a href="index.html">
index
@@ -32,36 +27,51 @@
CHANGES
</a>
</li>
<li>
<a href="I2PChromium.html">
I2PChromium
</a>
</li>
<li>
<a href="I2PChromiumProfileBuilder.html">
I2PChromiumProfileBuilder
</a>
</li>
<li>
<a href="I2PChromiumProfileChecker.html">
I2PChromiumProfileChecker
</a>
</li>
<li>
<a href="I2PChromiumProfileUnpacker.html">
I2PChromiumProfileUnpacker
</a>
</li>
<li>
<a href="I2PFirefox.html">
I2PFirefox
</a>
</li>
<li>
<a href="I2PFirefoxProfileBuilder.html">
I2PFirefoxProfileBuilder
</a>
</li>
<li>
<a href="I2PFirefoxProfileChecker.html">
I2PFirefoxProfileChecker
</a>
</li>
<li>
<a href="I2PFirefoxProfileUnpacker.html">
I2PFirefoxProfileUnpacker
</a>
</li>
<li>
<a href="LICENSE.html">
LICENSE
</a>
</li>
<li>
<a href="LINUX.html">
LINUX
</a>
</li>
<li>
<a href="OSX.html">
OSX
</a>
</li>
<li>
<a href="VERSION.html">
VERSION
</a>
</li>
<li>
<a href="WINDOWS.html">
WINDOWS
</a>
</li>
<li>
<a href="index.html">
index.html
</a>
</li>
</ul>
<br>
<a href="#hidenav">
@@ -70,125 +80,165 @@
</div>
</div>
</div>
<a id="returnhome" href="/">
/
</a>
<h3>
Linux Support
</h3>
<h1>
Class I2PChromiumProfileChecker
<a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java" rel="nofollow">
[src]
</a>
</h1>
<blockquote></blockquote>
<p>
It&rsquo;s possible to use this package in the following binary formats on
Linux. These packages are for the
<strong>
<code>
amd64
</code>
</strong>
architecture.
Access: public
<br/>
package: net.i2p.i2pfirefox
</p>
<h4>
Linux jpackage:
<code>
.zip
</code>
</h4>
<pre><code class="language-sh">mkdir ~/tmp-i2pbrowser &amp;&amp; cd ~/tmp-i2pbrowser
wget https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/1.0.5/i2pbrowser.zip
unzip i2pbrowser.zip &amp;&amp; cd i2pbrowser
## THIS STEP IS OPTIONAL but it will force the system to use Tor Browser from within the i2pbrowser directory.
# This probably offers better security than vanilla Firefox.
# This will also make the directory the launcher is in relocatable to a flash drive, for instance.
# This is commonly referred to as being portable.
# If tor and torsocks are on the host system, Tor Browser will be downloaded over Tor.
./lib/torbrowser.sh
# end of optional step.
./bin/i2pbrowser
</code></pre>
<h4>
Debian/Ubuntu and variants Jpackage:
<code>
.deb
</code>
</h4>
<ol>
<h2>
Dependencies
</h2>
<p>
<details>
<br/>
<summary>
<br/>
Show dependencies
<br/>
</summary>
<br/>
<ul>
<br/>
<li>
java.io.File
</li>
</ul>
<br/>
</details>
</p>
<h2>
No member variables in this class
</h2>
<h2>
Methods
</h2>
<h3>
main
<a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L6" rel="nofollow">
[src]
</a>
</h3>
<ul>
<li>
Start your I2P Router
Description:
<br/>
</li>
<li>
Download the latest release
<code>
.deb
</code>
from
<a href="https://github.com/eyedeekay/i2p.plugins.firefox/releases">
Github
</a>
and verify it&rsquo;s hash.
Access: public
<br/>
</li>
<li>
Run
<code>
sudo apt-get install ./i2pbrowser*.deb
</code>
(Only needs to be done once per update)
Modifiers: static
</li>
<li>
Use the applications menu shortcut to launch the pre-configured I2P browser
return: void
<br/>
</li>
</ol>
<h4>
Fedora and variants Jpackage:
<code>
.rpm
</code>
</h4>
<ol>
</ul>
<p>
| Name | Type | Description |
<br/>
| —– | —– | —– |
<br/>
| args | String[] | |
</p>
<h3>
validateProfileDirectory
<a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L20" rel="nofollow">
[src]
</a>
</h3>
<ul>
<li>
Start your I2P Router
Description:
<br/>
</li>
<li>
Download the latest release
<code>
.r[m
</code>
from
<a href="https://github.com/eyedeekay/i2p.plugins.firefox/releases">
Github
</a>
and verify it&rsquo;s hash.
Access: public
<br/>
</li>
<li>
Run
<code>
sudo rpm -i ./i2pbrowser*.rpm
</code>
(Only needs to be done the first time)
Modifiers: static
</li>
<li>
Run
<code>
sudo rpm -U ./i2pbrowser*.rpm
</code>
(Only needs to be done once per update)
return: boolean
<br/>
</li>
</ul>
<p>
| Name | Type | Description |
<br/>
| —– | —– | —– |
<br/>
| profileDirectory | String | |
</p>
<h3>
validateFile
<a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L44" rel="nofollow">
[src]
</a>
</h3>
<ul>
<li>
Description:
<br/>
</li>
<li>
Use the applications menu shortcut to launch the pre-configured I2P browser
Access: public
<br/>
</li>
</ol>
<div id="sourcecode">
<span id="sourcehead">
<strong>
Get the source code:
</strong>
</span>
<ul>
<li>
<a href="https://github.com/eyedeekay/i2p.plugins.firefox">
Source Repository: (https://github.com/eyedeekay/i2p.plugins.firefox)
</a>
</li>
</ul>
</div>
<li>
Modifiers: static
</li>
<li>
return: boolean
<br/>
</li>
</ul>
<p>
| Name | Type | Description |
<br/>
| —– | —– | —– |
<br/>
| file | String | |
</p>
<h3>
validateExtensionDirectory
<a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L64" rel="nofollow">
[src]
</a>
</h3>
<ul>
<li>
Description:
<br/>
</li>
<li>
Access: public
<br/>
</li>
<li>
Modifiers: static
</li>
<li>
return: boolean
<br/>
</li>
</ul>
<p>
| Name | Type | Description |
<br/>
| —– | —– | —– |
<br/>
| extensionDirectory | String | |
</p>
<div>
<a href="#show">
Show license

View File

@@ -0,0 +1,70 @@
# Class I2PChromiumProfileChecker [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java)
>
Access: public
package: net.i2p.i2pfirefox
## Dependencies
<details>
<summary>
Show dependencies
</summary>
<ul>
<li>java.io.File</li>
</ul>
</details>
## No member variables in this class
## Methods
### main [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L6)
+ Description:
+ Access: public
+ Modifiers: static
+ return: void
| Name | Type | Description |
| ----- | ----- | ----- |
| args | String[] | |
### validateProfileDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L20)
+ Description:
+ Access: public
+ Modifiers: static
+ return: boolean
| Name | Type | Description |
| ----- | ----- | ----- |
| profileDirectory | String | |
### validateFile [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L44)
+ Description:
+ Access: public
+ Modifiers: static
+ return: boolean
| Name | Type | Description |
| ----- | ----- | ----- |
| file | String | |
### validateExtensionDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L64)
+ Description:
+ Access: public
+ Modifiers: static
+ return: boolean
| Name | Type | Description |
| ----- | ----- | ----- |
| extensionDirectory | String | |

View File

@@ -17,11 +17,6 @@
<div id="shownav">
<div id="hidenav">
<ul>
<li>
<a href="..">
Up one level ^
</a>
</li>
<li>
<a href="index.html">
index
@@ -32,36 +27,51 @@
CHANGES
</a>
</li>
<li>
<a href="I2PChromium.html">
I2PChromium
</a>
</li>
<li>
<a href="I2PChromiumProfileBuilder.html">
I2PChromiumProfileBuilder
</a>
</li>
<li>
<a href="I2PChromiumProfileChecker.html">
I2PChromiumProfileChecker
</a>
</li>
<li>
<a href="I2PChromiumProfileUnpacker.html">
I2PChromiumProfileUnpacker
</a>
</li>
<li>
<a href="I2PFirefox.html">
I2PFirefox
</a>
</li>
<li>
<a href="I2PFirefoxProfileBuilder.html">
I2PFirefoxProfileBuilder
</a>
</li>
<li>
<a href="I2PFirefoxProfileChecker.html">
I2PFirefoxProfileChecker
</a>
</li>
<li>
<a href="I2PFirefoxProfileUnpacker.html">
I2PFirefoxProfileUnpacker
</a>
</li>
<li>
<a href="LICENSE.html">
LICENSE
</a>
</li>
<li>
<a href="LINUX.html">
LINUX
</a>
</li>
<li>
<a href="OSX.html">
OSX
</a>
</li>
<li>
<a href="VERSION.html">
VERSION
</a>
</li>
<li>
<a href="WINDOWS.html">
WINDOWS
</a>
</li>
<li>
<a href="index.html">
index.html
</a>
</li>
</ul>
<br>
<a href="#hidenav">
@@ -70,73 +80,117 @@
</div>
</div>
</div>
<a id="returnhome" href="/">
/
</a>
<h1>
Extension Versions
Class I2PChromiumProfileUnpacker
<a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileUnpacker.java" rel="nofollow">
[src]
</a>
</h1>
<blockquote></blockquote>
<p>
Access: public
<br/>
package: net.i2p.i2pfirefox
</p>
<h2>
Firefox
Dependencies
</h2>
<pre><code class="language-md">i2p-in-private-browsing
1.44
https://addons.mozilla.org/firefox/downloads/file/4020669/i2p_in_private_browsing-1.44.xpi
noscript
11.4.13
https://addons.mozilla.org/firefox/downloads/file/4033638/noscript-11.4.13.xpi
localcdn-fork-of-decentraleyes
2.6.40
https://addons.mozilla.org/firefox/downloads/file/4032517/localcdn_fork_of_decentraleyes-2.6.40.xpi
https-everywhere
2021.7.13
https://addons.mozilla.org/firefox/downloads/file/3809748/https_everywhere-2021.7.13.xpi
onion-in-container-browsing
0.82
https://addons.mozilla.org/firefox/downloads/file/3904685/onion_in_container_browsing-0.82.xpi
javascript-restrictor
0.11.1
https://addons.mozilla.org/firefox/downloads/file/3950710/javascript_restrictor-0.11.1.xpi
ublock-origin
1.45.2
https://addons.mozilla.org/firefox/downloads/file/4028976/ublock_origin-1.45.2.xpi
</code></pre>
<p>
<details>
<br/>
<summary>
<br/>
Show dependencies
<br/>
</summary>
<br/>
<ul>
<br/>
<li>
java.io.File
</li>
<li>
java.io.InputStream
</li>
<li>
java.nio.file.Files
</li>
<li>
java.nio.file.StandardCopyOption
</li>
<li>
java.util.zip.ZipEntry
</li>
<li>
java.util.zip.ZipInputStream
</li>
</ul>
<br/>
</details>
</p>
<h2>
Chromium
No member variables in this class
</h2>
<pre><code class="language-md">__MSG_extensionName__
1.29
https://clients2.google.com/service/update2/crx
NoScript
11.4.13
https://clients2.google.com/service/update2/crx
__MSG_about_ext_name__
2022.5.24
https://clients2.google.com/service/update2/crx
LocalCDN
2.6.39
https://clients2.google.com/service/update2/crx
uBlock Origin
1.45.2
https://clients2.google.com/service/update2/crx
JShelter
0.11.1
https://clients2.google.com/service/update2/crx
</code></pre>
<div id="sourcecode">
<span id="sourcehead">
<strong>
Get the source code:
</strong>
</span>
<ul>
<li>
<a href="https://github.com/eyedeekay/i2p.plugins.firefox">
Source Repository: (https://github.com/eyedeekay/i2p.plugins.firefox)
</a>
</li>
</ul>
</div>
<h2>
Methods
</h2>
<h3>
main
<a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileUnpacker.java#L12" rel="nofollow">
[src]
</a>
</h3>
<ul>
<li>
Description:
<br/>
</li>
<li>
Access: public
<br/>
</li>
<li>
Modifiers: static
</li>
<li>
return: void
<br/>
</li>
</ul>
<p>
| Name | Type | Description |
<br/>
| —– | —– | —– |
<br/>
| args | String[] | |
</p>
<h3>
unpackProfile
<a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileUnpacker.java#L27" rel="nofollow">
[src]
</a>
</h3>
<ul>
<li>
Description:
<br/>
</li>
<li>
Access: public
<br/>
</li>
<li>
return: boolean
<br/>
</li>
</ul>
<p>
| Name | Type | Description |
<br/>
| —– | —– | —– |
<br/>
| profileDirectory | String | |
</p>
<div>
<a href="#show">
Show license

View File

@@ -0,0 +1,50 @@
# Class I2PChromiumProfileUnpacker [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileUnpacker.java)
>
Access: public
package: net.i2p.i2pfirefox
## Dependencies
<details>
<summary>
Show dependencies
</summary>
<ul>
<li>java.io.File</li>
<li>java.io.InputStream</li>
<li>java.nio.file.Files</li>
<li>java.nio.file.StandardCopyOption</li>
<li>java.util.zip.ZipEntry</li>
<li>java.util.zip.ZipInputStream</li>
</ul>
</details>
## No member variables in this class
## Methods
### main [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileUnpacker.java#L12)
+ Description:
+ Access: public
+ Modifiers: static
+ return: void
| Name | Type | Description |
| ----- | ----- | ----- |
| args | String[] | |
### unpackProfile [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileUnpacker.java#L27)
+ Description:
+ Access: public
+ return: boolean
| Name | Type | Description |
| ----- | ----- | ----- |
| profileDirectory | String | |

1551
I2PFirefox.html Normal file

File diff suppressed because it is too large Load Diff

246
I2PFirefox.md Normal file
View File

@@ -0,0 +1,246 @@
# Class I2PFirefox [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java)
>
Access: public
package: net.i2p.i2pfirefox
## Dependencies
<details>
<summary>
Show dependencies
</summary>
<ul>
<li>java.io.File</li>
<li>java.io.IOException</li>
<li>java.net.Socket</li>
<li>java.util.ArrayList</li>
</ul>
</details>
## Member Variables
#### String[] FIREFOX_SEARCH_PATHS [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L)
>
+ Access: private
+ Modifiers: final
#### int DEFAULT_TIMEOUT [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L)
>
+ Access: private
+ Modifiers: final
## Methods
### FIND_FIREFOX_SEARCH_PATHS_UNIX [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L30)
+ Description:
+ Access: private
+ Modifiers: static
+ return: String[]
This method has no parameters.
### FIND_FIREFOX_SEARCH_PATHS_OSX [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L43)
+ Description:
+ Access: private
+ Modifiers: static
+ return: String[]
This method has no parameters.
### FIND_FIREFOX_SEARCH_PATHS_WINDOWS [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L56)
+ Description:
+ Access: private
+ Modifiers: static
+ return: String[]
This method has no parameters.
### FIND_ALL_FIREFOX_SEARCH_PATHS [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L84)
+ Description:
+ Access: private
+ Modifiers: static
+ return: String[]
This method has no parameters.
### FIND_FIREFOX_SEARCH_PATHS [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L104)
+ Description:
+ Access: private
+ Modifiers: static
+ return: String[]
This method has no parameters.
### NEARBY_FIREFOX_SEARCH_PATHS [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L118)
+ Description:
+ Access: private
+ Modifiers: static
+ return: String[]
This method has no parameters.
### FIREFOX_FINDER [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L162)
+ Description:
+ Access: private
+ Modifiers: static
+ return: String[]
This method has no parameters.
### getOperatingSystem [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L174)
+ Description:
+ Access: private
+ Modifiers: static
+ return: String
This method has no parameters.
### onlyValidFirefoxes [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L196)
+ Description:
+ Access: public
+ return: String[]
This method has no parameters.
### topFirefox [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L214)
+ Description:
+ Access: public
+ return: String
This method has no parameters.
### topFirefox [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L243)
+ Description:
+ Access: public
+ return: String
| Name | Type | Description |
| ----- | ----- | ----- |
| overrideFirefox | String | |
### defaultProcessBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L261)
+ Description:
+ Access: public
+ return: ProcessBuilder
This method has no parameters.
### processBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L275)
+ Description:
+ Access: public
+ return: ProcessBuilder
| Name | Type | Description |
| ----- | ----- | ----- |
| args | String[] | |
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L298)
+ Description:
+ Access: public
+ return: boolean
This method has no parameters.
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L310)
+ Description:
+ Access: public
+ return: boolean
| Name | Type | Description |
| ----- | ----- | ----- |
| timeout | int | |
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L322)
+ Description:
+ Access: public
+ return: boolean
| Name | Type | Description |
| ----- | ----- | ----- |
| timeout | int | |
| port | int | |
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L335)
+ Description:
+ Access: public
+ return: boolean
| Name | Type | Description |
| ----- | ----- | ----- |
| timeout | int | |
| port | int | |
| host | String | |
### checkifPortIsOccupied [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L348)
+ Description:
+ Access: private
+ return: boolean
| Name | Type | Description |
| ----- | ----- | ----- |
| port | int | |
| host | String | |
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L366)
+ Description:
+ Access: public
+ return: void
This method has no parameters.
### main [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L399)
+ Description:
+ Access: public
+ Modifiers: static
+ return: void
| Name | Type | Description |
| ----- | ----- | ----- |
| args | String[] | |

File diff suppressed because it is too large Load Diff

161
I2PFirefoxProfileBuilder.md Normal file
View File

@@ -0,0 +1,161 @@
# Class I2PFirefoxProfileBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java)
>
Access: public
package: net.i2p.i2pfirefox
## Dependencies
<details>
<summary>
Show dependencies
</summary>
<ul>
<li>java.io.File</li>
<li>java.io.FileInputStream</li>
<li>java.io.FileOutputStream</li>
<li>java.io.IOException</li>
<li>java.io.InputStream</li>
<li>java.io.OutputStream</li>
<li>java.nio.file.Files</li>
<li>java.nio.file.StandardCopyOption</li>
</ul>
</details>
## Member Variables
#### boolean strict [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L)
>
+ Access: private
+ Modifiers: static
## Methods
### profileDir [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L15)
+ Description:
+ Access: private
+ Modifiers: static
+ return: String
| Name | Type | Description |
| ----- | ----- | ----- |
| file | String | |
### profileDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L25)
+ Description:
+ Access: public
+ Modifiers: static
+ return: String
This method has no parameters.
### baseProfileDir [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L37)
+ Description:
+ Access: private
+ Modifiers: static
+ return: String
| Name | Type | Description |
| ----- | ----- | ----- |
| file | String | |
### baseProfileDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L57)
+ Description:
+ Access: public
+ Modifiers: static
+ return: String
This method has no parameters.
### runtimeDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L81)
+ Description:
+ Access: public
+ Modifiers: static
+ return: File
| Name | Type | Description |
| ----- | ----- | ----- |
| create | boolean | |
### runtimeDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L98)
+ Description:
+ Access: public
+ Modifiers: static
+ return: String
This method has no parameters.
### copyBaseProfiletoProfile [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L144)
+ Description:
+ Access: public
+ Modifiers: static
+ return: boolean
This method has no parameters.
### copyDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L174)
+ Description:
+ Access: private
+ Modifiers: static
+ return: void
| Name | Type | Description |
| ----- | ----- | ----- |
| sourceDirectory | File | |
| destinationDirectory | File | |
### copyDirectoryCompatibityMode [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L184)
+ Description:
+ Access: public
+ Modifiers: static
+ return: void
| Name | Type | Description |
| ----- | ----- | ----- |
| source | File | |
| destination | File | |
### copyFile [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L192)
+ Description:
+ Access: private
+ Modifiers: static
+ return: void
| Name | Type | Description |
| ----- | ----- | ----- |
| sourceFile | File | |
| destinationFile | File | |
### copyStrictOptions [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L209)
+ Description:
+ Access: public
+ Modifiers: static
+ return: boolean
This method has no parameters.

View File

@@ -17,11 +17,6 @@
<div id="shownav">
<div id="hidenav">
<ul>
<li>
<a href="..">
Up one level ^
</a>
</li>
<li>
<a href="index.html">
index
@@ -32,36 +27,51 @@
CHANGES
</a>
</li>
<li>
<a href="I2PChromium.html">
I2PChromium
</a>
</li>
<li>
<a href="I2PChromiumProfileBuilder.html">
I2PChromiumProfileBuilder
</a>
</li>
<li>
<a href="I2PChromiumProfileChecker.html">
I2PChromiumProfileChecker
</a>
</li>
<li>
<a href="I2PChromiumProfileUnpacker.html">
I2PChromiumProfileUnpacker
</a>
</li>
<li>
<a href="I2PFirefox.html">
I2PFirefox
</a>
</li>
<li>
<a href="I2PFirefoxProfileBuilder.html">
I2PFirefoxProfileBuilder
</a>
</li>
<li>
<a href="I2PFirefoxProfileChecker.html">
I2PFirefoxProfileChecker
</a>
</li>
<li>
<a href="I2PFirefoxProfileUnpacker.html">
I2PFirefoxProfileUnpacker
</a>
</li>
<li>
<a href="LICENSE.html">
LICENSE
</a>
</li>
<li>
<a href="LINUX.html">
LINUX
</a>
</li>
<li>
<a href="OSX.html">
OSX
</a>
</li>
<li>
<a href="VERSION.html">
VERSION
</a>
</li>
<li>
<a href="WINDOWS.html">
WINDOWS
</a>
</li>
<li>
<a href="index.html">
index.html
</a>
</li>
</ul>
<br>
<a href="#hidenav">
@@ -70,147 +80,165 @@
</div>
</div>
</div>
<a id="returnhome" href="/">
/
</a>
<h1>
Class I2PFirefoxProfileChecker
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java" rel="nofollow">
[src]
</a>
</h1>
<blockquote></blockquote>
<p>
Access: public
<br/>
package: net.i2p.i2pfirefox
</p>
<h2>
Dependencies
</h2>
<p>
<details>
<br/>
<summary>
<br/>
Show dependencies
<br/>
</summary>
<br/>
<ul>
<br/>
<li>
java.io.File
</li>
</ul>
<br/>
</details>
</p>
<h2>
No member variables in this class
</h2>
<h2>
Methods
</h2>
<h3>
Windows Support
main
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L6" rel="nofollow">
[src]
</a>
</h3>
<ul>
<li>
Description:
<br/>
</li>
<li>
Access: public
<br/>
</li>
<li>
Modifiers: static
</li>
<li>
return: void
<br/>
</li>
</ul>
<p>
It&rsquo;s possible to use this package on Windows, but it&rsquo;s recommended that
you get it through the Easy-Install bundle which includes this functionality
already. Use this only if you want to test new features or if you prefer
an unbundled I2P router with an external JVM.
| Name | Type | Description |
<br/>
| —– | —– | —– |
<br/>
| args | String[] | |
</p>
<h4>
Windows Jpackage:
<code>
.zip
</code>
</h4>
<h3>
validateProfileDirectory
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L20" rel="nofollow">
[src]
</a>
</h3>
<ul>
<li>
Description:
<br/>
</li>
<li>
Access: public
<br/>
</li>
<li>
Modifiers: static
</li>
<li>
return: boolean
<br/>
</li>
</ul>
<p>
<strong>
(Not Recommended! This functionality is already included in the Easy-Install Bundle for Windows)
</strong>
| Name | Type | Description |
<br/>
| —– | —– | —– |
<br/>
| profileDirectory | String | |
</p>
<ol>
<h3>
validateFile
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L52" rel="nofollow">
[src]
</a>
</h3>
<ul>
<li>
Start your I2P Router
Description:
<br/>
</li>
<li>
Download the latest release
<code>
.zip
</code>
from
<a href="https://github.com/eyedeekay/i2p.plugins.firefox/releases">
Github
</a>
and verify it&rsquo;s hash.
Access: public
<br/>
</li>
<li>
Unzip the
<code>
.zip
</code>
directory
Modifiers: static
</li>
<li>
run the
<code>
i2pbrowser.exe
</code>
file inside the unzipped directory.
return: boolean
<br/>
</li>
</ol>
<h4>
Windows Jpackage:
<code>
.msi
</code>
</h4>
</ul>
<p>
<strong>
(Not Recommended! This functionality is already included in the Easy-Install Bundle for Windows)
</strong>
| Name | Type | Description |
<br/>
| —– | —– | —– |
<br/>
| file | String | |
</p>
<ol>
<h3>
validateExtensionDirectory
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L72" rel="nofollow">
[src]
</a>
</h3>
<ul>
<li>
Start your I2P Router
Description:
<br/>
</li>
<li>
Download the latest release
<code>
.msi
</code>
from
<a href="https://github.com/eyedeekay/i2p.plugins.firefox/releases">
Github
</a>
and verify it&rsquo;s hash.
Access: public
<br/>
</li>
<li>
Run the
<code>
.msi
</code>
installer(Only needs to be done once per update)
Modifiers: static
</li>
<li>
Use the start menu shortcut to launch the pre-configured I2P browser
return: boolean
<br/>
</li>
</ol>
<h4>
Windows Jpackage:
<code>
.exe
</code>
</h4>
</ul>
<p>
<strong>
(Not Recommended! This functionality is already included in the Easy-Install Bundle for Windows)
</strong>
| Name | Type | Description |
<br/>
| —– | —– | —– |
<br/>
| extensionDirectory | String | |
</p>
<ol>
<li>
Start your I2P Router
</li>
<li>
Download the latest release
<code>
.exe
</code>
from
<a href="https://github.com/eyedeekay/i2p.plugins.firefox/releases">
Github
</a>
and verify it&rsquo;s hash.
</li>
<li>
Run the
<code>
.msi
</code>
installer(Only needs to be done once per update)
</li>
<li>
Use the start menu shortcut to launch the pre-configured I2P browser
</li>
</ol>
<div id="sourcecode">
<span id="sourcehead">
<strong>
Get the source code:
</strong>
</span>
<ul>
<li>
<a href="https://github.com/eyedeekay/i2p.plugins.firefox">
Source Repository: (https://github.com/eyedeekay/i2p.plugins.firefox)
</a>
</li>
</ul>
</div>
<div>
<a href="#show">
Show license

View File

@@ -0,0 +1,70 @@
# Class I2PFirefoxProfileChecker [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java)
>
Access: public
package: net.i2p.i2pfirefox
## Dependencies
<details>
<summary>
Show dependencies
</summary>
<ul>
<li>java.io.File</li>
</ul>
</details>
## No member variables in this class
## Methods
### main [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L6)
+ Description:
+ Access: public
+ Modifiers: static
+ return: void
| Name | Type | Description |
| ----- | ----- | ----- |
| args | String[] | |
### validateProfileDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L20)
+ Description:
+ Access: public
+ Modifiers: static
+ return: boolean
| Name | Type | Description |
| ----- | ----- | ----- |
| profileDirectory | String | |
### validateFile [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L52)
+ Description:
+ Access: public
+ Modifiers: static
+ return: boolean
| Name | Type | Description |
| ----- | ----- | ----- |
| file | String | |
### validateExtensionDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L72)
+ Description:
+ Access: public
+ Modifiers: static
+ return: boolean
| Name | Type | Description |
| ----- | ----- | ----- |
| extensionDirectory | String | |

View File

@@ -17,11 +17,6 @@
<div id="shownav">
<div id="hidenav">
<ul>
<li>
<a href="..">
Up one level ^
</a>
</li>
<li>
<a href="index.html">
index
@@ -32,36 +27,51 @@
CHANGES
</a>
</li>
<li>
<a href="I2PChromium.html">
I2PChromium
</a>
</li>
<li>
<a href="I2PChromiumProfileBuilder.html">
I2PChromiumProfileBuilder
</a>
</li>
<li>
<a href="I2PChromiumProfileChecker.html">
I2PChromiumProfileChecker
</a>
</li>
<li>
<a href="I2PChromiumProfileUnpacker.html">
I2PChromiumProfileUnpacker
</a>
</li>
<li>
<a href="I2PFirefox.html">
I2PFirefox
</a>
</li>
<li>
<a href="I2PFirefoxProfileBuilder.html">
I2PFirefoxProfileBuilder
</a>
</li>
<li>
<a href="I2PFirefoxProfileChecker.html">
I2PFirefoxProfileChecker
</a>
</li>
<li>
<a href="I2PFirefoxProfileUnpacker.html">
I2PFirefoxProfileUnpacker
</a>
</li>
<li>
<a href="LICENSE.html">
LICENSE
</a>
</li>
<li>
<a href="LINUX.html">
LINUX
</a>
</li>
<li>
<a href="OSX.html">
OSX
</a>
</li>
<li>
<a href="VERSION.html">
VERSION
</a>
</li>
<li>
<a href="WINDOWS.html">
WINDOWS
</a>
</li>
<li>
<a href="index.html">
index.html
</a>
</li>
</ul>
<br>
<a href="#hidenav">
@@ -70,74 +80,117 @@
</div>
</div>
</div>
<a id="returnhome" href="/">
/
</a>
<h1>
Using this on OSX
Class I2PFirefoxProfileUnpacker
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileUnpacker.java" rel="nofollow">
[src]
</a>
</h1>
<blockquote></blockquote>
<p>
This code will launch an I2P-Configured Browser on OSX, but at this time
there are no packages for it because it&rsquo;s not possible for me to sign OSX
packages. You can use the
<code>
.jar
</code>
file with any Java greater than Java 8.
Access: public
<br/>
package: net.i2p.i2pfirefox
</p>
<pre><code class="language-sh">mkdir ~/tmp-i2pfirefox &amp;&amp; cd ~/tmp-i2pfirefox
wget https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/1.0.5/i2pfirefox.zip
unzip i2pfirefox.zip
./cmd/i2pfirefox.cmd
#or if you want to use a Chromium
./cmd/i2pchromium.cmd
</code></pre>
<h2>
Building a
<code>
jpackage
</code>
Dependencies
</h2>
<p>
In order to build a
<code>
jpackage
</code>
, install at least Java 17. To set up Java
17 and configure it to be the Java used by the system for the rest of the
session, use these commands:
<details>
<br/>
<summary>
<br/>
Show dependencies
<br/>
</summary>
<br/>
<ul>
<br/>
<li>
java.io.File
</li>
<li>
java.io.InputStream
</li>
<li>
java.nio.file.Files
</li>
<li>
java.nio.file.StandardCopyOption
</li>
<li>
java.util.zip.ZipEntry
</li>
<li>
java.util.zip.ZipInputStream
</li>
</ul>
<br/>
</details>
</p>
<pre><code class="language-sh">brew install openjdk@17
sudo ln -sfn /usr/local/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk
export JAVA_HOME=`/usr/libexec/java_home -v 17`
</code></pre>
<h2>
No member variables in this class
</h2>
<h2>
Methods
</h2>
<h3>
main
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileUnpacker.java#L12" rel="nofollow">
[src]
</a>
</h3>
<ul>
<li>
Description:
<br/>
</li>
<li>
Access: public
<br/>
</li>
<li>
Modifiers: static
</li>
<li>
return: void
<br/>
</li>
</ul>
<p>
Once you&rsquo;re finished, run
<code>
./osx-dmg.sh
</code>
in the repository root to produce a
<code>
.dmg
</code>
package.
| Name | Type | Description |
<br/>
| —– | —– | —– |
<br/>
| args | String[] | |
</p>
<h3>
unpackProfile
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileUnpacker.java#L27" rel="nofollow">
[src]
</a>
</h3>
<ul>
<li>
Description:
<br/>
</li>
<li>
Access: public
<br/>
</li>
<li>
return: boolean
<br/>
</li>
</ul>
<p>
| Name | Type | Description |
<br/>
| —– | —– | —– |
<br/>
| profileDirectory | String | |
</p>
<div id="sourcecode">
<span id="sourcehead">
<strong>
Get the source code:
</strong>
</span>
<ul>
<li>
<a href="https://github.com/eyedeekay/i2p.plugins.firefox">
Source Repository: (https://github.com/eyedeekay/i2p.plugins.firefox)
</a>
</li>
</ul>
</div>
<div>
<a href="#show">
Show license

View File

@@ -0,0 +1,50 @@
# Class I2PFirefoxProfileUnpacker [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileUnpacker.java)
>
Access: public
package: net.i2p.i2pfirefox
## Dependencies
<details>
<summary>
Show dependencies
</summary>
<ul>
<li>java.io.File</li>
<li>java.io.InputStream</li>
<li>java.nio.file.Files</li>
<li>java.nio.file.StandardCopyOption</li>
<li>java.util.zip.ZipEntry</li>
<li>java.util.zip.ZipInputStream</li>
</ul>
</details>
## No member variables in this class
## Methods
### main [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileUnpacker.java#L12)
+ Description:
+ Access: public
+ Modifiers: static
+ return: void
| Name | Type | Description |
| ----- | ----- | ----- |
| args | String[] | |
### unpackProfile [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileUnpacker.java#L27)
+ Description:
+ Access: public
+ return: boolean
| Name | Type | Description |
| ----- | ----- | ----- |
| profileDirectory | String | |

View File

@@ -17,11 +17,6 @@
<div id="shownav">
<div id="hidenav">
<ul>
<li>
<a href="..">
Up one level ^
</a>
</li>
<li>
<a href="index.html">
index
@@ -32,36 +27,51 @@
CHANGES
</a>
</li>
<li>
<a href="I2PChromium.html">
I2PChromium
</a>
</li>
<li>
<a href="I2PChromiumProfileBuilder.html">
I2PChromiumProfileBuilder
</a>
</li>
<li>
<a href="I2PChromiumProfileChecker.html">
I2PChromiumProfileChecker
</a>
</li>
<li>
<a href="I2PChromiumProfileUnpacker.html">
I2PChromiumProfileUnpacker
</a>
</li>
<li>
<a href="I2PFirefox.html">
I2PFirefox
</a>
</li>
<li>
<a href="I2PFirefoxProfileBuilder.html">
I2PFirefoxProfileBuilder
</a>
</li>
<li>
<a href="I2PFirefoxProfileChecker.html">
I2PFirefoxProfileChecker
</a>
</li>
<li>
<a href="I2PFirefoxProfileUnpacker.html">
I2PFirefoxProfileUnpacker
</a>
</li>
<li>
<a href="LICENSE.html">
LICENSE
</a>
</li>
<li>
<a href="LINUX.html">
LINUX
</a>
</li>
<li>
<a href="OSX.html">
OSX
</a>
</li>
<li>
<a href="VERSION.html">
VERSION
</a>
</li>
<li>
<a href="WINDOWS.html">
WINDOWS
</a>
</li>
<li>
<a href="index.html">
index.html
</a>
</li>
</ul>
<br>
<a href="#hidenav">
@@ -70,20 +80,17 @@
</div>
</div>
</div>
<a id="returnhome" href="/">
/
</a>
<p>
Copyright 2022 idk (hankhill19580@gmail.com)
Licensed under the Apache License, Version 2.0 (the &ldquo;License&rdquo;);
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
<a href="http://www.apache.org/licenses/LICENSE-2.0">
<a href="http://www.apache.org/licenses/LICENSE-2.0" rel="nofollow">
http://www.apache.org/licenses/LICENSE-2.0
</a>
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an &ldquo;AS IS&rdquo; BASIS,
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
@@ -93,14 +100,14 @@
Copyright 2010 zzz (zzz@mail.i2p)
Licensed under the Apache License, Version 2.0 (the &ldquo;License&rdquo;);
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
<a href="http://www.apache.org/licenses/LICENSE-2.0">
<a href="http://www.apache.org/licenses/LICENSE-2.0" rel="nofollow">
http://www.apache.org/licenses/LICENSE-2.0
</a>
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an &ldquo;AS IS&rdquo; BASIS,
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
@@ -109,25 +116,25 @@
Includes code from Jetty 5.1.15:
Copyright 199-2004 Mort Bay Consulting Pty. Ltd.
&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;
Licensed under the Apache License, Version 2.0 (the &ldquo;License&rdquo;);
————————————————————————
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
<a href="http://www.apache.org/licenses/LICENSE-2.0">
<a href="http://www.apache.org/licenses/LICENSE-2.0" rel="nofollow">
http://www.apache.org/licenses/LICENSE-2.0
</a>
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an &ldquo;AS IS&rdquo; BASIS,
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
MIT License
Copyright &copy; 2019 idk
Copyright © 2019 idk
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the &ldquo;Software&rdquo;), to deal
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
@@ -136,7 +143,7 @@
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED &ldquo;AS IS&rdquo;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
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
@@ -145,11 +152,11 @@
SOFTWARE.
HTTPS Everwyhere:
Copyright © 2010-2012 Mike Perry
<a href="mailto:mikeperry@fscked.org">
<a href="mailto:mikeperry@fscked.org" rel="nofollow">
mikeperry@fscked.org
</a>
Peter Eckersley
<a href="mailto:pde@eff.org">
<a href="mailto:pde@eff.org" rel="nofollow">
pde@eff.org
</a>
and many others
@@ -157,7 +164,7 @@
Incorporating code from NoScript,
Copyright © 2004-2007 Giorgio Maone
<a href="mailto:g.maone@informaction.com">
<a href="mailto:g.maone@informaction.com" rel="nofollow">
g.maone@informaction.com
</a>
Licensed GPL v2+
@@ -179,20 +186,20 @@
Python Software Foundation License Version 2
Net License: GPL v3+ (complete tree)
GPL v2+ (if Moxie&rsquo;s NSS.js is absent)
GPL v2+ (if Moxies NSS.js is absent)
Text of MIT License:
====================
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the &ldquo;Software&rdquo;), 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:
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 &ldquo;AS IS&rdquo;, 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.
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.
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright &copy; 1989, 1991 Free Software Foundation, Inc.
Copyright © 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -202,9 +209,9 @@
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software&ndash;to make sure the software is free for all its users. This
softwareto make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation&rsquo;s software and to any other program whose authors commit to
Foundations software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
@@ -231,18 +238,18 @@
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author&rsquo;s protection and ours, we want to make certain
Also, for each authors protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors&rsquo; reputations.
authors reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone&rsquo;s free use or not licensed at all.
patent must be licensed for everyones free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
@@ -252,13 +259,13 @@
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The &ldquo;Program&rdquo;, below,
refers to any such program or work, and a &ldquo;work based on the Program&rdquo;
under the terms of this General Public License. The “Program”, below,
refers to any such program or work, and a work based on the Program
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term &ldquo;modification&rdquo;.) Each licensee is addressed as &ldquo;you&rdquo;.
the term modification.) Each licensee is addressed as “you”.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
@@ -267,7 +274,7 @@
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program&rsquo;s
1. You may copy and distribute verbatim copies of the Programs
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
@@ -381,7 +388,7 @@
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients&rsquo; exercise of the rights granted herein.
restrictions on the recipients exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
@@ -431,8 +438,8 @@
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and &ldquo;any
later version&rdquo;, you have the option of following the terms and conditions
specifies a version number of this License which applies to it and any
later version, you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
@@ -451,7 +458,7 @@
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM &ldquo;AS IS&rdquo; WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
@@ -479,11 +486,11 @@
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the &ldquo;copyright&rdquo; line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright &copy;
<year>
<name of author>
the “copyright” line and a pointer to where the full notice is found.
Copyright ©
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
@@ -504,35 +511,35 @@
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright &copy; year name of author
Gnomovision version 69, Copyright © year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type
<code>
show w'.
show w&#39;.
This is free software, and you are welcome to redistribute it
under certain conditions; type
</code>
show c&rsquo; for details.
show c for details.
The hypothetical commands
<code>
show w' and
show w&#39; and
</code>
show c&rsquo; should show the appropriate
show c should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than
<code>
show w' and
show w&#39; and
</code>
show c&rsquo;; they could even be
mouse-clicks or menu items&ndash;whatever suits your program.
show c; they could even be
mouse-clicks or menu itemswhatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a &ldquo;copyright disclaimer&rdquo; for the program, if
school, if any, to sign a copyright disclaimer for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
<code>
Gnomovision' (which makes passes at compilers) written by James Hacker.
Gnomovision&#39; (which makes passes at compilers) written by James Hacker.
&lt;signature of Ty Coon&gt;, 1 April 1989
Ty Coon, President of Vice
@@ -547,7 +554,7 @@
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 &quot;Software&quot;), to deal
of this software and associated documentation files (the &#34;Software&#34;), 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
@@ -556,7 +563,7 @@
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
THE SOFTWARE IS PROVIDED &#34;AS IS&#34;, 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
@@ -590,16 +597,16 @@
Python Software Foundation License Version 2
Net License: GPL v3+ (complete tree)
GPL v2+ (if Moxie's NSS.js is absent)
GPL v2+ (if Moxie&#39;s NSS.js is absent)
Text of MIT License:
====================
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the &quot;Software&quot;), 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:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the &#34;Software&#34;), 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 &quot;AS IS&quot;, 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.
THE SOFTWARE IS PROVIDED &#34;AS IS&#34;, 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.
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
@@ -615,7 +622,7 @@
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
Foundation&#39;s software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
@@ -642,18 +649,18 @@
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
Also, for each author&#39;s protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
authors&#39; reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
patent must be licensed for everyone&#39;s free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
@@ -663,13 +670,13 @@
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The &quot;Program&quot;, below,
refers to any such program or work, and a &quot;work based on the Program&quot;
under the terms of this General Public License. The &#34;Program&#34;, below,
refers to any such program or work, and a &#34;work based on the Program&#34;
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term &quot;modification&quot;.) Each licensee is addressed as &quot;you&quot;.
the term &#34;modification&#34;.) Each licensee is addressed as &#34;you&#34;.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
@@ -678,7 +685,7 @@
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
1. You may copy and distribute verbatim copies of the Program&#39;s
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
@@ -792,7 +799,7 @@
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
restrictions on the recipients&#39; exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
@@ -842,8 +849,8 @@
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and &quot;any
later version&quot;, you have the option of following the terms and conditions
specifies a version number of this License which applies to it and &#34;any
later version&#34;, you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
@@ -862,7 +869,7 @@
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM &quot;AS IS&quot; WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
PROVIDE THE PROGRAM &#34;AS IS&#34; WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
@@ -890,9 +897,9 @@
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the &quot;copyright&quot; line and a pointer to where the full notice is found.
the &#34;copyright&#34; line and a pointer to where the full notice is found.
&lt;one line to give the program's name and a brief idea of what it does.&gt;
&lt;one line to give the program&#39;s name and a brief idea of what it does.&gt;
Copyright (C) &lt;year&gt; &lt;name of author&gt;
This program is free software; you can redistribute it and/or modify
@@ -918,33 +925,33 @@
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type
</code>
show w&rsquo;.
show w.
This is free software, and you are welcome to redistribute it
under certain conditions; type
<code>
show c' for details.
show c&#39; for details.
The hypothetical commands
</code>
show w&rsquo; and
show w and
<code>
show c' should show the appropriate
show c&#39; should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than
</code>
show w&rsquo; and
show w and
<code>
show c'; they could even be
show c&#39;; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a &quot;copyright disclaimer&quot; for the program, if
school, if any, to sign a &#34;copyright disclaimer&#34; for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
</code>
Gnomovision&rsquo; (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>
Gnomovision (which makes passes at compilers) written by James Hacker.
, 1 April 1989
Ty Coon, President of Vice
@@ -954,20 +961,6 @@
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
</p>
<div id="sourcecode">
<span id="sourcehead">
<strong>
Get the source code:
</strong>
</span>
<ul>
<li>
<a href="https://github.com/eyedeekay/i2p.plugins.firefox">
Source Repository: (https://github.com/eyedeekay/i2p.plugins.firefox)
</a>
</li>
</ul>
</div>
<div>
<a href="#show">
Show license

0
LICENSE.md Normal file → Executable file
View File

View File

@@ -1,35 +0,0 @@
### Linux Support
It's possible to use this package in the following binary formats on
Linux. These packages are for the **`amd64`** architecture.
#### Linux jpackage: `.zip`
```sh
mkdir ~/tmp-i2pbrowser && cd ~/tmp-i2pbrowser
wget https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/1.0.5/i2pbrowser.zip
unzip i2pbrowser.zip && cd i2pbrowser
## THIS STEP IS OPTIONAL but it will force the system to use Tor Browser from within the i2pbrowser directory.
# This probably offers better security than vanilla Firefox.
# This will also make the directory the launcher is in relocatable to a flash drive, for instance.
# This is commonly referred to as being portable.
# If tor and torsocks are on the host system, Tor Browser will be downloaded over Tor.
./lib/torbrowser.sh
# end of optional step.
./bin/i2pbrowser
```
#### Debian/Ubuntu and variants Jpackage: `.deb`
1. Start your I2P Router
2. Download the latest release `.deb` from [Github](https://github.com/eyedeekay/i2p.plugins.firefox/releases) and verify it's hash.
3. Run `sudo apt-get install ./i2pbrowser*.deb`(Only needs to be done once per update)
4. Use the applications menu shortcut to launch the pre-configured I2P browser
#### Fedora and variants Jpackage: `.rpm`
1. Start your I2P Router
2. Download the latest release `.r[m` from [Github](https://github.com/eyedeekay/i2p.plugins.firefox/releases) and verify it's hash.
3. Run `sudo rpm -i ./i2pbrowser*.rpm`(Only needs to be done the first time)
4. Run `sudo rpm -U ./i2pbrowser*.rpm`(Only needs to be done once per update)
5. Use the applications menu shortcut to launch the pre-configured I2P browser

33
OSX.md
View File

@@ -1,33 +0,0 @@
Using this on OSX
=================
This code will launch an I2P-Configured Browser on OSX, but at this time
there are no packages for it because it's not possible for me to sign OSX
packages. You can use the `.jar` file with any Java greater than Java 8.
```sh
mkdir ~/tmp-i2pfirefox && cd ~/tmp-i2pfirefox
wget https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/1.0.5/i2pfirefox.zip
unzip i2pfirefox.zip
./cmd/i2pfirefox.cmd
#or if you want to use a Chromium
./cmd/i2pchromium.cmd
```
Building a `jpackage`
---------------------
In order to build a `jpackage`, install at least Java 17. To set up Java
17 and configure it to be the Java used by the system for the rest of the
session, use these commands:
```sh
brew install openjdk@17
sudo ln -sfn /usr/local/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk
export JAVA_HOME=`/usr/libexec/java_home -v 17`
```
Once you're finished, run `./osx-dmg.sh` in the repository root to produce a
`.dmg` package.

87
README.md Normal file → Executable file
View File

@@ -1,65 +1,42 @@
# i2p.plugins.firefox
A port of the batch scripts from `i2p.firefox` to Java.
**Status:** This package is maintained. It cannot solve all your problems. Fingerprinting
is a reality in modern browsers. Exploits are too. This software attempts to provide a
best-possible baseline of privacy first, security a close second for browsing the web that
exists within I2P. Do not expect it to withstand attacks from very powerful adversaries
who can spend time and money to screw up your life. Do expect it to resist advertisers,
trackers, and jerks using off-the-shelf techniques and exploits. It is fundamentally unable
to make changes which un-trust your browser vendor, your OS, your package manager or any
other system that exists underneath it. **It is just a profile manager.**
**All packages require a running I2P router.**
**[Windows users should see the Easy-Install Bundle](https://i2pgit.org/i2p-hackers/i2p.firefox)**
## Credits
This profile manager makes use of a set of browser extensions which are largely the work of others.
It makes use of dependencies that are the work of others. In many ways, it's merely an elaborate
configuration tool. A smart one, but a configuration tool nonetheless. Many thanks to the following
projects, developers, and communities:
### Firefox and Chrome Extensions
- [NoScript - Giorgio Maone and others](https://noscript.net)
- [HTTPS Everywhere - Electronic Frontier Foundation](https://www.eff.org/https-everywhere)
- [uBlock Origin - Raymond Gorhill and others](https://ublockorigin.com/)
- [LocalCDN - nobody and others](https://www.localcdn.org/)
- [jShelter - Libor Polčák and others](https://jshelter.org/)
### Firefox Configuration Modifiations
- [Arkenfox - Thorin Oakenpants and Others](https://github.com/arkenfox/user.js/)
You can find the license files for each of the these projects in the `src/i2p.firefox.*.profile/extensions/*`
directory for Firefox, and the `src/i2p.chromium.*.profile/extensions/*.js/*` directories for Chromium.
A port of the batch scripts from i2p.firefox to Java.
## Getting started
### Building the package:
### Building
- See: [BUILD.md](docs/BUILD.md)/[BUILD.html](docs/BUILD.html)
### Using a Binary
For platform specific instructions, see
- [LINUX.md](LINUX.md)/[LINUX.html](LINUX.html)
- [OSX.md](OSX.md)/[OSX.html](OSX.html)
- [WINDOWS.md](WINDOWS.md)/[WINDOWS.html](WINDOWS.html)
#### All platforms, using a zip: `.zip` and a non-bundled Java
This is not actually a plugin yet, but it will be soon. The important bit is the jar.
To generate that, you can either generate the full plugin, which will not work but
produces the jar as a by-product, or you can:
```sh
mkdir ~/tmp-i2pfirefox && cd ~/tmp-i2pfirefox
wget https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/1.0.5/i2pfirefox.zip
unzip i2pfirefox.zip
./i2pfirefox.cmd
#or if you want to use a Chromium
./i2pchromium.cmd
cd src
ant
cd ..
```
To build just the jar. You'll know it worked if you can:
```sh
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PFirefox
```
and a new Firefox instance comes up with a fresh profile, ready-to-use for I2P browsing.
The cooler thing you can do with it is add it to an I2P distribution and somewhere in it,
add a UI element that triggers something along the lines of this:
```java
if (i2pIsRunning()) {
logger.warning("I2P is already running");
System.out.println("I2PFirefox");
I2PFirefox i2pFirefox = new I2PFirefox();
i2pFirefox.launch();
}
```
to add a browser management tool to it.

View File

@@ -1,52 +0,0 @@
Extension Versions
==================
## Firefox
```md
i2p-in-private-browsing
1.44
https://addons.mozilla.org/firefox/downloads/file/4020669/i2p_in_private_browsing-1.44.xpi
noscript
11.4.13
https://addons.mozilla.org/firefox/downloads/file/4033638/noscript-11.4.13.xpi
localcdn-fork-of-decentraleyes
2.6.40
https://addons.mozilla.org/firefox/downloads/file/4032517/localcdn_fork_of_decentraleyes-2.6.40.xpi
https-everywhere
2021.7.13
https://addons.mozilla.org/firefox/downloads/file/3809748/https_everywhere-2021.7.13.xpi
onion-in-container-browsing
0.82
https://addons.mozilla.org/firefox/downloads/file/3904685/onion_in_container_browsing-0.82.xpi
javascript-restrictor
0.11.1
https://addons.mozilla.org/firefox/downloads/file/3950710/javascript_restrictor-0.11.1.xpi
ublock-origin
1.45.2
https://addons.mozilla.org/firefox/downloads/file/4028976/ublock_origin-1.45.2.xpi
```
## Chromium
```md
__MSG_extensionName__
1.29
https://clients2.google.com/service/update2/crx
NoScript
11.4.13
https://clients2.google.com/service/update2/crx
__MSG_about_ext_name__
2022.5.24
https://clients2.google.com/service/update2/crx
LocalCDN
2.6.39
https://clients2.google.com/service/update2/crx
uBlock Origin
1.45.2
https://clients2.google.com/service/update2/crx
JShelter
0.11.1
https://clients2.google.com/service/update2/crx
```

View File

@@ -1,33 +0,0 @@
### Windows Support
It's possible to use this package on Windows, but it's recommended that
you get it through the Easy-Install bundle which includes this functionality
already. Use this only if you want to test new features or if you prefer
an unbundled I2P router with an external JVM.
#### Windows Jpackage: `.zip`
**(Not Recommended! This functionality is already included in the Easy-Install Bundle for Windows)**
1. Start your I2P Router
2. Download the latest release `.zip` from [Github](https://github.com/eyedeekay/i2p.plugins.firefox/releases) and verify it's hash.
3. Unzip the `.zip` directory
4. run the `i2pbrowser.exe` file inside the unzipped directory.
#### Windows Jpackage: `.msi`
**(Not Recommended! This functionality is already included in the Easy-Install Bundle for Windows)**
1. Start your I2P Router
2. Download the latest release `.msi` from [Github](https://github.com/eyedeekay/i2p.plugins.firefox/releases) and verify it's hash.
3. Run the `.msi` installer(Only needs to be done once per update)
4. Use the start menu shortcut to launch the pre-configured I2P browser
#### Windows Jpackage: `.exe`
**(Not Recommended! This functionality is already included in the Easy-Install Bundle for Windows)**
1. Start your I2P Router
2. Download the latest release `.exe` from [Github](https://github.com/eyedeekay/i2p.plugins.firefox/releases) and verify it's hash.
3. Run the `.msi` installer(Only needs to be done once per update)
4. Use the start menu shortcut to launch the pre-configured I2P browser

View File

@@ -1 +0,0 @@
arkenfox.number=105.0

View File

@@ -1,15 +0,0 @@
#Chromium Configuration Section
#Sun Oct 23 11:53:50 EDT 2022
chromium.bins.linux=ungoogled-chromium,chromium,brave,edge,ungoogled-chromium,chrome
chromium.bins.osx=ungoogled-chromium,chromium,brave,edge,ungoogled-chromium,chrome
chromium.bins.windows=ungoogled-chromium.exe,chromium.exe,brave.exe,edge.exe,ungoogled-chromium.exe,chrome.exe
chromium.paths.linux=/usr/bin,/usr/local/bin,/opt/chromium/bin,/snap/bin
chromium.paths.osx=/Applications/Chromium.app/Contents/MacOS,/Applications/Chrome.app/Contents/MacOS,/Applications/Brave.app/Contents/MacOS
chromium.paths.windows=C\:/Users/user/AppData/Local/Google/Chrome/Application,C\:/Program Files/Google/Chrome/Application,C\:/Program Files (x86)/Google/Chrome/Application,C\:/Users/user/AppData/Local/Chromium/Application,C\:/Program Files/Chromium/Application,C\:/Program Files (x86)/Chromium/Application,C\:/Users/user/AppData/Local/BraveSoftware/Brave Browser/Application,C\:/Program Files/BraveSoftware/Brave Browser/Application,C\:/Program Files (x86)/BraveSoftware/Brave Browser/Application,C\:/Program Files (x86)/Microsoft/Edge/Application,C\:/Program Files/Microsoft/Edge/Application
firefox.bins.linux=firefox,firefox-bin,firefox-esr,waterfox,waterfox-bin,librewolf
firefox.bins.osx=firefox,firefox-bin,firefox-esr,waterfox,waterfox-bin,librewolf
firefox.bins.windows=firefox.exe,firefox-bin.exe,firefox-esr.exe,waterfox.exe,waterfox-bin.exe,librewolf.exe
firefox.paths.linux=/usr/bin,/usr/local/bin,/opt/firefox/bin,/snap/bin
firefox.paths.osx=/Applications/Tor Browser.app/Contents/MacOS,/Applications/Firefox.app/Contents/MacOS,/Applications/Waterfox.app/Contents/MacOS,/Applications/Librewolf.app/Contents/MacOS
firefox.paths.windows=C\:/Users/user/OneDrive/Desktop/Tor Browser/Browser,C\:/Users/user/Desktop/Tor Browser/Browser,C\:/Program Files/Mozilla Firefox,C\:/Program Files (x86)/Mozilla Firefox,C\:/Program Files/Waterfox,C\:/Program Files (x86)/Waterfox,C\:/Program Files/Librewolf
generic.bins.unix=sensible-browser,xdg-open,x-www-browser,gnome-www-browser,defaultbrowser,dillo,seamonkey,konqueror,galeon,surf,www-browser,links,lynx

View File

@@ -1,7 +0,0 @@
#! /usr/bin/env sh
rm -f browser.config
ant clangFmt jar
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -chromium -outputconfig -nosystray "http://idk.i2p"
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -firefox -outputconfig -nosystray "http://idk.i2p"
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -generic -outputconfig -nosystray "http://idk.i2p"

708
build.xml
View File

@@ -2,182 +2,13 @@
<project basedir="." default="all" name="i2pfirefox">
<property file="override.properties"/>
<target name="all" depends="clean,versionMd,i2pFirefoxBaseProfileZip,i2pChromiumBaseProfileZip,jar" />
<target name="all" depends="clean,i2pFirefoxBaseProfileZip,i2pChromiumBaseProfileZip,plugin" />
<target name="war" >
<ant dir="src" target="build" />
</target>
<target name="tarball">
<exec executable="git">
<arg value="archive"/>
<arg value="--format=tar.gz"/>
<arg value="--output=i2p.plugins.firefox.tar.gz"/>
<arg value="main"/>
</exec>
</target>
<target name="examples" >
<exec executable="echo">
<redirector output="USAGE.md"/>
<arg value="Example Commands:" />
</exec>
<exec executable="echo">
<redirector output="USAGE.md" append="true"/>
<arg value="=================" />
</exec>
<exec executable="echo">
<redirector output="USAGE.md" append="true"/>
<arg value="" />
</exec>
<exec executable="printf">
<redirector output="USAGE.md" append="true"/>
<arg value="These scripts are designed so that they can be executed on both Windows and Unix.\n\nThe top command is for Unixes and should work on most POSIX shells. After it runs, the script will terminate preventing Windows commands from running.\n\nThe second and third command is for Windows and won't be reachable on
Linux(because the top command will be run and the script will exit).\n\nBoth determine the path to the script, use it to find the jar file, and execute a single command.\n\n" />
</exec>
<exec executable="echo">
<redirector output="USAGE.md" append="true"/>
<arg value="Auto-Select in Persistent Mode" />
</exec>
<exec executable="echo">
<redirector output="USAGE.md" append="true"/>
<arg value="" />
</exec>
<exec executable="echo">
<redirector output="USAGE.md" append="true"/>
<arg value="```sh" />
</exec>
<exec executable="cat">
<redirector output="USAGE.md" append="true"/>
<arg value="i2pbrowser.cmd" />
</exec>
<exec executable="echo">
<redirector output="USAGE.md" append="true"/>
<arg value="```" />
</exec>
<exec executable="echo">
<redirector output="USAGE.md" append="true"/>
<arg value="" />
</exec>
<exec executable="echo">
<redirector output="USAGE.md" append="true"/>
<arg value="Auto-Select in Private Browsing Mode" />
</exec>
<exec executable="echo">
<redirector output="USAGE.md" append="true"/>
<arg value="" />
</exec>
<exec executable="echo">
<redirector output="USAGE.md" append="true"/>
<arg value="```sh" />
</exec>
<exec executable="cat">
<redirector output="USAGE.md" append="true"/>
<arg value="i2pbrowser-private.cmd" />
</exec>
<exec executable="echo">
<redirector output="USAGE.md" append="true"/>
<arg value="```" />
</exec>
<exec executable="echo">
<redirector output="USAGE.md" append="true"/>
<arg value="" />
</exec>
<exec executable="echo">
<redirector output="USAGE.md" append="true"/>
<arg value="Firefox in Persistent Mode" />
</exec>
<exec executable="echo">
<redirector output="USAGE.md" append="true"/>
<arg value="" />
</exec>
<exec executable="echo">
<redirector output="USAGE.md" append="true"/>
<arg value="```sh" />
</exec>
<exec executable="cat">
<redirector output="USAGE.md" append="true"/>
<arg value="i2pfirefox.cmd" />
</exec>
<exec executable="echo">
<redirector output="USAGE.md" append="true"/>
<arg value="```" />
</exec>
<exec executable="echo">
<redirector output="USAGE.md" append="true"/>
<arg value="" />
</exec>
<exec executable="echo">
<redirector output="USAGE.md" append="true"/>
<arg value="Firefox in Private Browsing Mode" />
</exec>
<exec executable="echo">
<redirector output="USAGE.md" append="true"/>
<arg value="" />
</exec>
<exec executable="echo">
<redirector output="USAGE.md" append="true"/>
<arg value="```sh" />
</exec>
<exec executable="cat">
<redirector output="USAGE.md" append="true"/>
<arg value="i2pfirefox-private.cmd" />
</exec>
<exec executable="echo">
<redirector output="USAGE.md" append="true"/>
<arg value="```" />
</exec>
<exec executable="echo">
<redirector output="USAGE.md" append="true"/>
<arg value="" />
</exec>
<exec executable="echo">
<redirector output="USAGE.md" append="true"/>
<arg value="Chromium in Persistent Mode" />
</exec>
<exec executable="echo">
<redirector output="USAGE.md" append="true"/>
<arg value="" />
</exec>
<exec executable="echo">
<redirector output="USAGE.md" append="true"/>
<arg value="```sh" />
</exec>
<exec executable="cat">
<redirector output="USAGE.md" append="true"/>
<arg value="i2pchromium.cmd" />
</exec>
<exec executable="echo">
<redirector output="USAGE.md" append="true"/>
<arg value="```" />
</exec>
<exec executable="echo">
<redirector output="USAGE.md" append="true"/>
<arg value="" />
</exec>
<exec executable="echo">
<redirector output="USAGE.md" append="true"/>
<arg value="Chromium in Private Browsing Mode" />
</exec>
<exec executable="echo">
<redirector output="USAGE.md" append="true"/>
<arg value="" />
</exec>
<exec executable="echo">
<redirector output="USAGE.md" append="true"/>
<arg value="```sh" />
</exec>
<exec executable="cat">
<redirector output="USAGE.md" append="true"/>
<arg value="i2pchromium-private.cmd" />
</exec>
<exec executable="echo">
<redirector output="USAGE.md" append="true"/>
<arg value="```" />
</exec>
</target>
<target name="jar" depends="versionMd,i2pFirefoxBaseProfileZip,i2pFirefoxUsabilityProfileZip,i2pChromiumBaseProfileZip,i2pChromiumUsabilityProfileZip">
<target name="jar" >
<ant dir="src" target="jar" />
</target>
@@ -186,171 +17,48 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="-rf" />
<arg value="i2p.firefox.base.profile.zip" />
</exec>
<exec executable="dzip" failonerror="true" dir="src">
<arg value="-O"/>
<exec executable="zip" failonerror="true" dir="src">
<arg value="-r"/>
<arg value="i2p.firefox.base.profile.zip"/>
<arg value="i2p.firefox.base.profile"/>
</exec>
</target>
<target name="i2pFirefoxUsabilityProfileZip">
<exec executable="rm" failonerror="false" dir="src">
<arg value="-rf" />
<arg value="i2p.firefox.usability.profile.zip" />
</exec>
<exec executable="dzip" failonerror="true" dir="src">
<arg value="-O"/>
<arg value="i2p.firefox.usability.profile.zip"/>
<arg value="i2p.firefox.usability.profile"/>
</exec>
</target>
<target name="i2pChromiumBaseProfileZip">
<exec executable="rm" failonerror="false" dir="src">
<arg value="-rf" />
<arg value="i2p.chromium.base.profile.zip" />
</exec>
<exec executable="dzip" failonerror="true" dir="src">
<arg value="-O"/>
<exec executable="zip" failonerror="true" dir="src">
<arg value="-r"/>
<arg value="i2p.chromium.base.profile.zip"/>
<arg value="i2p.chromium.base.profile"/>
</exec>
</target>
<target name="i2pChromiumUsabilityProfileZip">
<exec executable="rm" failonerror="false" dir="src">
<arg value="-rf" />
<arg value="i2p.chromium.usability.profile.zip" />
</exec>
<exec executable="dzip" failonerror="true" dir="src">
<arg value="-O"/>
<arg value="i2p.chromium.usability.profile.zip"/>
<arg value="i2p.chromium.usability.profile"/>
</exec>
</target>
<target name="freeZip" depends="jar">
<exec executable="rm" failonerror="false" dir="src">
<arg value="-rf" />
<arg value="i2pbrowser.zip" />
</exec>
<exec executable="dzip" failonerror="true">
<arg value="-O"/>
<arg value="i2pfirefox.zip"/>
<exec executable="zip" failonerror="true">
<arg value="-r"/>
<arg value="src/build/i2pfirefox.jar"/>
<arg value="i2pbrowser.cmd"/>
<arg value="LICENSE.md"/>
<arg value="README.md"/>
</exec>
</target>
<target name="arkenfoxUpdateUserJs">
<exec executable="git" osfamily="unix" failonerror="false">
<arg value="clone" />
<arg value="https://github.com/arkenfox/user.js" />
</exec>
<exec executable="git" dir="user.js" output="user.js/.arkenfox.number">
<arg value="tag" />
<arg value="--sort=committerdate" />
</exec>
</target>
<target name="arkenfoxConfig" depends="arkenfoxUpdateUserJs">
<exec executable="tail" dir="user.js" output="user.js/.arkenfox.number">
<arg value="-n" />
<arg value="1" />
<arg value=".arkenfox.number" />
</exec>
<exec executable="echo" dir="user.js" output="arkenfox.number" append="false">
<arg value="-n" />
<arg value="-e" />
<arg value="arkenfox.number=" />
</exec>
<exec executable="cat" dir="user.js" output="arkenfox.number" append="true">
<arg value=".arkenfox.number" />
</exec>
<exec executable="tr" input="arkenfox.number" output="arkenfox.number" append="false">
<arg value="-d" />
<arg value="\n" />
</exec>
</target>
<target name="arkenfoxNum" depends="arkenfoxConfig">
<property file="arkenfox.number" />
<exec executable="echo" osfamily="unix" output="arkenfoxnum">
<arg value="{arkenfox.number}" />
</exec>
</target>
<target name="arkenfoxCheckout" depends="arkenfoxNum">
<exec executable="git" osfamily="unix" dir="user.js">
<arg value="pull" />
<arg value="--tags" />
</exec>
<exec executable="git" osfamily="unix" dir="user.js">
<arg value="checkout" />
<arg value="${arkenfox.number}" />
</exec>
</target>
<target name="userJs" depends="i2pFirefoxBaseUserJs,i2pFirefoxUsabilityUserJs">
</target>
<target name="i2pFirefoxBaseUserJs" depends="arkenfoxCheckout">
<copy file="user.js/user.js" tofile="src/i2p.firefox.base.profile/user.js"/>
<exec executable="sed" osfamily="unix">
<arg value="-i" />
<arg value='s|user_pref("extensions.autoDisableScopes", 15);|user_pref("extensions.autoDisableScopes", 0);|g' />
<arg value="src/i2p.firefox.base.profile/user.js" />
</exec>
<exec executable="sed" osfamily="unix">
<arg value="-i" />
<arg value='s|user_pref("extensions.enabledScopes", 5);|user_pref("extensions.enabledScopes", 1);|g' />
<arg value="src/i2p.firefox.base.profile/user.js" />
</exec>
<exec executable="sed" osfamily="unix">
<arg value="-i" />
<arg value='s|user_pref("dom.security.https_only_mode", true);|user_pref("dom.security.https_only_mode", false);|g' />
<arg value="src/i2p.firefox.base.profile/user.js" />
</exec>
</target>
<target name="i2pFirefoxUsabilityUserJs" depends="arkenfoxCheckout">
<copy file="user.js/user.js" tofile="src/i2p.firefox.usability.profile/user.js"/>
<exec executable="sed" osfamily="unix">
<arg value="-i" />
<arg value='s|user_pref("extensions.autoDisableScopes", 15);|user_pref("extensions.autoDisableScopes", 0);|g' />
<arg value="src/i2p.firefox.usability.profile/user.js" />
</exec>
<exec executable="sed" osfamily="unix">
<arg value="-i" />
<arg value='s|user_pref("extensions.enabledScopes", 5);|user_pref("extensions.enabledScopes", 1);|g' />
<arg value="src/i2p.firefox.usability.profile/user.js" />
</exec>
<exec executable="sed" osfamily="unix">
<arg value="-i" />
<arg value='s|user_pref("dom.security.https_only_mode", true);|user_pref("dom.security.https_only_mode", false);|g' />
<arg value="src/i2p.firefox.usability.profile/user.js" />
</exec>
</target>
<target name="buildNum">
<buildnumber file="scripts/build.number" />
<property name="release.number" value="1.0.5" />
<exec executable="echo" osfamily="unix">
<arg value="${release.number}-${build.number}" />
</exec>
</target>
<target name="ebn" depends="buildNum">
<exec executable="echo" osfamily="unix">
<arg value="${release.number}-${build.number}" />
</exec>
</target>
<target name="plugin" depends="war, buildNum">
<target name="plugin" depends="war">
<delete>
<!-- in installer but not update -->
<fileset dir="plugin/" includes="i2ptunnel.config i2pfirefox.config eepsite/docroot/index.html eepsite/docroot/robots.txt" />
</delete>
<delete dir="plugin/eepsite/docroot/torrents/" />
<!-- get version number -->
<buildnumber file="scripts/build.number" />
<property name="release.number" value="0.0.6" />
<!-- make the update xpi2p -->
<!-- this contains everything except i2ptunnel.config -->
@@ -365,8 +73,18 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="update-only=true" />
</exec>
<exec executable="echo" osfamily="unix" failonerror="true" output="plugin/plugin.config" append="true">
<arg value="${release.number}-${build.number}" />
<arg value="version=${release.number}-b${build.number}" />
</exec>
<!--<exec executable="pack200" failonerror="true">
<arg value="-r" />
<arg value="plugin/lib/i2pfirefox.jar" />
<arg value="src/build/i2pfirefox.jar" />
</exec>
<exec executable="pack200" failonerror="true">
<arg value="-r" />
<arg value="plugin/eepsite/webapps/firefox.war" />
<arg value="src/build/firefox.war.jar" />
</exec>-->
<input message="Enter su3 signing key password:" addproperty="release.password.su3" />
<fail message="You must enter a password." >
<condition>
@@ -388,7 +106,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<copy file="scripts/robots.txt" todir="plugin/eepsite/docroot/" overwrite="true" />
<mkdir dir="plugin/eepsite/docroot/torrents/" />
<exec executable="echo" osfamily="unix" failonerror="true" output="plugin/plugin.config" append="true">
<arg value="${release.number}-${build.number}" />
<arg value="version=${release.number}-b${build.number}" />
</exec>
<exec executable="scripts/makeplugin.sh" inputstring="${release.password.su3}" failonerror="true" >
<arg value="plugin" />
@@ -397,36 +115,16 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<target name="distclean" depends="clean" />
<target name="clangFmt">
<exec executable="clang-format">
<arg value="-i"/>
<arg value="src/java/net/i2p/i2pfirefox/I2PBrowser.java"/>
<arg value="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java"/>
<arg value="src/java/net/i2p/i2pfirefox/I2PChromium.java"/>
<arg value="src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java"/>
<arg value="src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java"/>
<arg value="src/java/net/i2p/i2pfirefox/I2PChromiumProfileUnpacker.java"/>
<arg value="src/java/net/i2p/i2pfirefox/I2PFirefox.java"/>
<arg value="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java"/>
<arg value="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java"/>
<arg value="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileUnpacker.java"/>
<arg value="src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java"/>
</exec>
</target>
<target name="clean" >
<ant dir="src" target="clean" />
<defaultexcludes remove="**/*~"/>
<delete>
<fileset dir="." includes="*/*.~ **/*.*~ */**/*.*~ *.*~" />
</delete>
<delete dir="user.js" />
<delete dir="i2p.firefox.base.profile" />
<delete dir="i2p.firefox.usability.profile" />
<delete dir="i2p.firefox.profile" />
<delete dir="src/i2p.firefox.profile.zip" />
<delete dir="i2p.chromium.base.profile" />
<delete dir="i2p.chromium.usability.profile" />
<delete dir="i2p.chromium.profile" />
<delete dir="src/i2p.chromium.profile.zip" />
<delete file="plugin/i2ptunnel.config" />
@@ -448,364 +146,6 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<delete file="i2pfirefox-update.su3" />
<delete file="plugin.zip" />
<delete dir="plugin/eepsite/docroot/torrents/" />
<exec executable="git">
<arg value="clean"/> <arg value="-fdx"/>
</exec>
</target>
<target name="jpackage" depends="jar">
<delete dir="i2pbrowser" />
<exec executable="jpackage" failonerror="true">
<arg value="--type"/> <arg value="app-image"/>
<arg value="--name"/> <arg value="i2pbrowser"/>
<arg value="--app-version"/> <arg value="${release_number}"/>
<arg value="--app-content"/> <arg value="etc/scripts/torbrowser.sh"/>
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
</exec>
<exec executable="rm" failonerror="true">
<arg value="-rf" />
<arg value="i2pbrowser.zip" />
</exec>
<exec executable="dzip" failonerror="true">
<arg value="-O"/>
<arg value="i2pbrowser.zip"/>
<arg value="i2pbrowser"/>
</exec>
</target>
<target name="debian" depends="jar">
<exec executable="bash" failonerror="true">
<arg value="--verbose"/>
<arg value="-c"/>
<arg value="./debian.sh"/>
</exec>
</target>
<target name="fedora" depends="jar">
<exec executable="bash" failonerror="true">
<arg value="--verbose"/>
<arg value="-c"/>
<arg value="./fedora.sh"/>
</exec>
</target>
<target name="versionMd" depends="i2pFirefoxBaseProfile, i2pFirefoxUsabilityProfile, i2pChromiumBaseProfile, i2pChromiumUsabilityProfile">
<delete file="VERSION.md"></delete>
<exec executable="echo" failonerror="true">
<redirector output="VERSION.md" error="VERSION.md" alwayslog="true" append="true"></redirector>
<arg value=""/>
</exec>
<exec executable="echo" failonerror="true">
<redirector output="VERSION.md" error="VERSION.md" alwayslog="true" append="true"></redirector>
<arg value="Extension Versions"/>
</exec>
<exec executable="echo" failonerror="true">
<redirector output="VERSION.md" error="VERSION.md" alwayslog="true" append="true"></redirector>
<arg value="=================="/>
</exec>
<exec executable="echo" failonerror="true">
<redirector output="VERSION.md" error="VERSION.md" alwayslog="true" append="true"></redirector>
<arg value=""/>
</exec>
<exec executable="echo" failonerror="true">
<redirector output="VERSION.md" error="VERSION.md" alwayslog="true" append="true"></redirector>
<arg value="## Firefox"/>
</exec>
<exec executable="echo" failonerror="true">
<redirector output="VERSION.md" error="VERSION.md" alwayslog="true" append="true"></redirector>
<arg value=""/>
</exec>
<exec executable="echo" failonerror="true">
<redirector output="VERSION.md" error="VERSION.md" alwayslog="true" append="true"></redirector>
<arg value="```md"/>
</exec>
<exec executable="amo-version" failonerror="true">
<redirector output="VERSION.md" error="VERSION.md" alwayslog="true" append="true"></redirector>
<arg value="-n"/>
<arg value="i2p-in-private-browsing"/>
</exec>
<exec executable="amo-version" failonerror="true">
<redirector output="VERSION.md" error="VERSION.md" alwayslog="true" append="true"></redirector>
<arg value="-n"/>
<arg value="noscript"/>
</exec>
<exec executable="amo-version" failonerror="true">
<redirector output="VERSION.md" error="VERSION.md" alwayslog="true" append="true"></redirector>
<arg value="-n"/>
<arg value="localcdn-fork-of-decentraleyes"/>
</exec>
<exec executable="amo-version" failonerror="true">
<redirector output="VERSION.md" error="VERSION.md" alwayslog="true" append="true"></redirector>
<arg value="-n"/>
<arg value="https-everywhere"/>
</exec>
<exec executable="amo-version" failonerror="true">
<redirector output="VERSION.md" error="VERSION.md" alwayslog="true" append="true"></redirector>
<arg value="-n"/>
<arg value="onion-in-container-browsing"/>
</exec>
<exec executable="amo-version" failonerror="true">
<redirector output="VERSION.md" error="VERSION.md" alwayslog="true" append="true"></redirector>
<arg value="-n"/>
<arg value="javascript-restrictor"/>
</exec>
<exec executable="amo-version" failonerror="true">
<redirector output="VERSION.md" error="VERSION.md" alwayslog="true" append="true"></redirector>
<arg value="-n"/>
<arg value="ublock-origin"/>
</exec>
<exec executable="echo" failonerror="true">
<redirector output="VERSION.md" error="VERSION.md" alwayslog="true" append="true"></redirector>
<arg value="```"/>
</exec>
<exec executable="echo" failonerror="true">
<redirector output="VERSION.md" error="VERSION.md" alwayslog="true" append="true"></redirector>
<arg value=""/>
</exec>
<exec executable="echo" failonerror="true">
<redirector output="VERSION.md" error="VERSION.md" alwayslog="true" append="true"></redirector>
<arg value="## Chromium"/>
</exec>
<exec executable="echo" failonerror="true">
<redirector output="VERSION.md" error="VERSION.md" alwayslog="true" append="true"></redirector>
<arg value=""/>
</exec>
<exec executable="echo" failonerror="true">
<redirector output="VERSION.md" error="VERSION.md" alwayslog="true" append="true"></redirector>
<arg value="```md"/>
</exec>
<exec executable="manifest-json-version" failonerror="true">
<redirector output="VERSION.md" error="VERSION.md" alwayslog="true" append="true"></redirector>
<arg value="-mf"/>
<arg value="src/i2p.chromium.base.profile/extensions/i2pchrome.js/manifest.json"/>
</exec>
<exec executable="manifest-json-version" failonerror="true">
<redirector output="VERSION.md" error="VERSION.md" alwayslog="true" append="true"></redirector>
<arg value="-mf"/>
<arg value="src/i2p.chromium.base.profile/extensions/noscript.js/manifest.json"/>
</exec>
<exec executable="manifest-json-version" failonerror="true">
<redirector output="VERSION.md" error="VERSION.md" alwayslog="true" append="true"></redirector>
<arg value="-mf"/>
<arg value="src/i2p.chromium.base.profile/extensions/https-everywhere.js/manifest.json"/>
</exec>
<exec executable="manifest-json-version" failonerror="true">
<redirector output="VERSION.md" error="VERSION.md" alwayslog="true" append="true"></redirector>
<arg value="-mf"/>
<arg value="src/i2p.chromium.usability.profile/extensions/localcdn.js/manifest.json"/>
</exec>
<exec executable="manifest-json-version" failonerror="true">
<redirector output="VERSION.md" error="VERSION.md" alwayslog="true" append="true"></redirector>
<arg value="-mf"/>
<arg value="src/i2p.chromium.usability.profile/extensions/ublock.js/manifest.json"/>
</exec>
<exec executable="manifest-json-version" failonerror="true">
<redirector output="VERSION.md" error="VERSION.md" alwayslog="true" append="true"></redirector>
<arg value="-mf"/>
<arg value="src/i2p.chromium.usability.profile/extensions/jshelter.js/manifest.json"/>
</exec>
<exec executable="echo" failonerror="true">
<redirector output="VERSION.md" error="VERSION.md" alwayslog="true" append="true"></redirector>
<arg value="```"/>
</exec>
</target>
<target name="i2pChromiumBaseProfile">
<mkdir dir="src/i2p.chromium.base.profile/extensions/" />
<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="doojmbjmlfjjnbmnoijecmcbfeoakpjm" />
<arg value="-u=true"/>
<arg value="-o" />
<arg value="src/i2p.chromium.base.profile/extensions/noscript.js.crx" />
</exec>
<exec executable="crx3" failonerror="true">
<arg value="download"/>
<arg value="gcbommkclmclpchllfjekcdonpmejbdp" />
<arg value="-u=true"/>
<arg value="-o" />
<arg value="src/i2p.chromium.base.profile/extensions/https-everywhere.js.crx" />
</exec>
<exec executable="echo" failonerror="true" append="false" output="src/i2p.chromium.base.profile/version.md">
<arg value="Profile Version" />
</exec>
<exec executable="echo" failonerror="true" append="true" output="src/i2p.chromium.base.profile/version.md">
<arg value="===============" />
</exec>
<exec executable="echo" failonerror="true" append="true" output="src/i2p.chromium.base.profile/version.md">
<arg value="" />
</exec>
<exec executable="echo" failonerror="true" append="true" output="src/i2p.chromium.base.profile/version.md">
<arg value="${release.number}-${build.number}" />
</exec>
<exec executable="echo" failonerror="true" append="true" output="src/i2p.chromium.base.profile/version.md">
<arg value="" />
</exec>
</target>
<target name="i2pChromiumUsabilityProfile">
<mkdir dir="src/i2p.chromium.usability.profile/extensions/" />
<exec executable="crx3" failonerror="true">
<arg value="download"/>
<arg value="ikdjcmomgldfciocnpekfndklkfgglpe" />
<arg value="-u=true"/>
<arg value="-o" />
<arg value="src/i2p.chromium.usability.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.usability.profile/extensions/ublock.js.crx" />
</exec>
<exec executable="crx3" failonerror="true">
<arg value="download"/>
<arg value="ammoloihpcbognfddfjcljgembpibcmb" />
<arg value="-u=true"/>
<arg value="-o" />
<arg value="src/i2p.chromium.usability.profile/extensions/jshelter.js.crx" />
</exec>
<exec executable="crx3" failonerror="true">
<arg value="download"/>
<arg value="njdfdhgcmkocbgbhcioffdbicglldapd" />
<arg value="-u=true"/>
<arg value="-o" />
<arg value="src/i2p.chromium.usability.profile/extensions/localcdn.js.crx" />
</exec>
<exec executable="crx3" failonerror="true">
<arg value="download"/>
<arg value="gcbommkclmclpchllfjekcdonpmejbdp" />
<arg value="-u=true"/>
<arg value="-o" />
<arg value="src/i2p.chromium.usability.profile/extensions/https-everywhere.js.crx" />
</exec>
<exec executable="echo" failonerror="true" append="false" output="src/i2p.chromium.usability.profile/version.md">
<arg value="Profile Version" />
</exec>
<exec executable="echo" failonerror="true" append="true" output="src/i2p.chromium.usability.profile/version.md">
<arg value="===============" />
</exec>
<exec executable="echo" failonerror="true" append="true" output="src/i2p.chromium.usability.profile/version.md">
<arg value="" />
</exec>
<exec executable="echo" failonerror="true" append="true" output="src/i2p.chromium.usability.profile/version.md">
<arg value="${release.number}-${build.number}" />
</exec>
<exec executable="echo" failonerror="true" append="true" output="src/i2p.chromium.usability.profile/version.md">
<arg value="" />
</exec>
</target>
<target name="i2pFirefoxBaseProfile" depends="buildNum">
<mkdir dir="src/i2p.firefox.base.profile/extensions/" />
<copy file="src/prefs.js" tofile="src/i2p.firefox.base.profile/prefs.js" />
<copy file="src/user-overrides.js" tofile="src/i2p.firefox.base.profile/user-overrides.js" />
<touch file="src/i2p.firefox.base.profile/first-run"/>
<exec executable="amo-version" failonerror="true">
<arg value="-n"/>
<arg value="i2p-in-private-browsing"/>
<arg value="-d"/>
<arg value="-o" />
<arg value="src/i2p.firefox.base.profile/extensions/i2ppb@eyedeekay.github.io.xpi" />
</exec>
<exec executable="amo-version" failonerror="true">
<arg value="-n"/>
<arg value="noscript"/>
<arg value="-d"/>
<arg value="-o" />
<arg value="src/i2p.firefox.base.profile/extensions/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi" />
</exec>
<exec executable="amo-version" failonerror="true">
<arg value="-n"/>
<arg value="https-everywhere"/>
<arg value="-d"/>
<arg value="-o" />
<arg value="src/i2p.firefox.base.profile/extensions/https-everywhere-eff@eff.org.xpi" />
</exec>
<exec executable="echo" failonerror="true" append="false" output="src/i2p.firefox.base.profile/version.md">
<arg value="Profile Version" />
</exec>
<exec executable="echo" failonerror="true" append="true" output="src/i2p.firefox.base.profile/version.md">
<arg value="===============" />
</exec>
<exec executable="echo" failonerror="true" append="true" output="src/i2p.firefox.base.profile/version.md">
<arg value="" />
</exec>
<exec executable="echo" failonerror="true" append="true" output="src/i2p.firefox.base.profile/version.md">
<arg value="${release.number}-${build.number}" />
</exec>
<exec executable="echo" failonerror="true" append="true" output="src/i2p.firefox.base.profile/version.md">
<arg value="" />
</exec>
</target>
<target name="i2pFirefoxUsabilityProfile" depends="buildNum">
<mkdir dir="src/i2p.firefox.usability.profile/extensions/" />
<copy file="src/prefs.js" tofile="src/i2p.firefox.usability.profile/prefs.js" />
<copy file="src/user-overrides.js" tofile="src/i2p.firefox.usability.profile/user-overrides.js" />
<touch file="src/i2p.firefox.usability.profile/first-run"/>
<exec executable="amo-version" failonerror="true">
<arg value="-n"/>
<arg value="i2p-in-private-browsing"/>
<arg value="-d"/>
<arg value="-o" />
<arg value="src/i2p.firefox.usability.profile/extensions/i2ppb@eyedeekay.github.io.xpi" />
</exec>
<exec executable="amo-version" failonerror="true">
<arg value="-n"/>
<arg value="localcdn-fork-of-decentraleyes"/>
<arg value="-d"/>
<arg value="-o" />
<arg value="./src/i2p.firefox.usability.profile/extensions/{b86e4813-687a-43e6-ab65-0bde4ab75758}.xpi" />
</exec>
<exec executable="amo-version" failonerror="true">
<arg value="-n"/>
<arg value="https-everywhere"/>
<arg value="-d"/>
<arg value="-o" />
<arg value="src/i2p.firefox.usability.profile/extensions/https-everywhere-eff@eff.org.xpi" />
</exec>
<exec executable="amo-version" failonerror="true">
<arg value="-n"/>
<arg value="onion-in-container-browsing"/>
<arg value="-d"/>
<arg value="-o" />
<arg value="src/i2p.firefox.usability.profile/extensions/onioncbt@eyedeekay.github.io.xpi" />
</exec>
<exec executable="amo-version" failonerror="true">
<arg value="-n"/>
<arg value="javascript-restrictor"/>
<arg value="-d"/>
<arg value="-o" />
<arg value="src/i2p.firefox.usability.profile/extensions/jsr@javascriptrestrictor.xpi" />
</exec>
<exec executable="amo-version" failonerror="true">
<arg value="-n"/>
<arg value="ublock-origin"/>
<arg value="-d"/>
<arg value="-o" />
<arg value="src/i2p.firefox.usability.profile/extensions/uBlock0@raymondhill.net.xpi" />
</exec>
<exec executable="echo" failonerror="true" append="false" output="src/i2p.firefox.usability.profile/version.md">
<arg value="Profile Version" />
</exec>
<exec executable="echo" failonerror="true" append="true" output="src/i2p.firefox.usability.profile/version.md">
<arg value="===============" />
</exec>
<exec executable="echo" failonerror="true" append="true" output="src/i2p.firefox.usability.profile/version.md">
<arg value="" />
</exec>
<exec executable="echo" failonerror="true" append="true" output="src/i2p.firefox.usability.profile/version.md">
<arg value="${release.number}-${build.number}" />
</exec>
<exec executable="echo" failonerror="true" append="true" output="src/i2p.firefox.usability.profile/version.md">
<arg value="" />
</exec>
</target>
</project>

View File

@@ -1,6 +0,0 @@
#! /usr/bin/env sh
export GITHUB_USER=eyedeekay
export GITHUB_REPO=i2p.plugins.firefox
export GITHUB_NAME="Enforces App and Browser Modes"
export GITHUB_DESCRIPTION=$(cat CHANGES.md VERSION.md)
export GITHUB_TAG=1.0.5

View File

@@ -1,17 +0,0 @@
#! /usr/bin/env sh
. ./config.sh
jpackage --verbose \
--type deb \
--linux-deb-maintainer hankhill19580@gmail.com \
--linux-menu-group "Network;WebBrowser;P2P" \
--linux-app-category "Network" \
--linux-package-deps "firefox|chromium|brave|firefox-esr|librewolf|icecat" \
--linux-shortcut \
--license-file LICENSE.md \
--name i2pbrowser \
--icon src/icon.png \
--app-version "$GITHUB_TAG" \
--input src/build \
--main-jar i2pfirefox.jar \
--main-class net.i2p.i2pfirefox.I2PBrowser

View File

@@ -1,11 +0,0 @@
#! /usr/bin/env sh
## Run this from inside the `i2p.plugins.firefox` checkout.
docker build -t eyedeekay/i2p.plugins.firefox .
xhost + local:docker
docker run -it --rm \
--net=host \
-e DISPLAY=unix"${DISPLAY}" \
-v /tmp/.X11-unix:/tmp/.X11-unix \
eyedeekay/i2p.plugins.firefox

View File

@@ -1,32 +0,0 @@
#!/bin/bash
TORSOCKS=$(which torsocks)
#if [ -f "${TORSOCKS}" ]; then
# . "${TORSOCKS}" on
#fi
version="$(curl -s https://aus1.torproject.org/torbrowser/update_3/release/downloads.json | jq -r ".version")"
locale="en-US" # mention your locale. default = en-US
if [ -d /etc/default/locale ]; then
. /etc/default/locale
locale=$(echo "${LANG}" | cut -d . -f1)
fi
if [ ! -f ./tor.keyring ]; then
gpg --auto-key-locate nodefault,wkd --locate-keys torbrowser@torproject.org
gpg --output ./tor.keyring --export torbrowser@torproject.org
fi
if [ ! -f "tor-browser-linux64-${version}_${locale}.exe" ]; then
wget -cv "https://www.torproject.org/dist/torbrowser/${version}/torbrowser-install-win64-${version}_${locale}.exe"
wget -cv "https://www.torproject.org/dist/torbrowser/${version}/torbrowser-install-win64-${version}_${locale}.exe.asc"
fi
gpgv --keyring ./tor.keyring "torbrowser-install-win64-${version}_${locale}.exe.asc" "torbrowser-install-win64-${version}_${locale}.exe"
#tar xvJf "torbrowser-install-win64-${version}_${locale}.exe"
#for n in `seq 1 2000`; do echo $n; dd ibs=256 if="torbrowser-install-win64-${version}_${locale}.exe" count=2 skip=$n | file - ; done 2>/dev/null |less
#zip -FF "torbrowser-install-win64-${version}_${locale}.exe" --out extracted.zip
export WINEPREFIX=$(pwd)/../tmp
wine "torbrowser-install-win64-${version}_${locale}.exe" /S #/D .
cp -vr "$WINEPREFIX/drive_c/users/idk/Desktop/Tor Browser/" "Tor Browser"

View File

@@ -1,28 +0,0 @@
#!/bin/bash
TORSOCKS=$(which torsocks)
if [ -f "${TORSOCKS}" ]; then
. "${TORSOCKS}" on
echo ""
fi
version="$(curl -s https://aus1.torproject.org/torbrowser/update_3/release/downloads.json | jq -r ".version")"
locale="en-US" # mention your locale. default = en-US
if [ -d /etc/default/locale ]; then
. /etc/default/locale
locale=$(echo "${LANG}" | cut -d . -f1)
fi
if [ ! -f ./tor.keyring ]; then
gpg --auto-key-locate nodefault,wkd --locate-keys torbrowser@torproject.org
gpg --output ./tor.keyring --export torbrowser@torproject.org
fi
if [ ! -f "tor-browser-linux64-${version}_${locale}.tar.xz" ]; then
wget -cv "https://www.torproject.org/dist/torbrowser/${version}/tor-browser-linux64-${version}_${locale}.tar.xz"
wget -cv "https://www.torproject.org/dist/torbrowser/${version}/tor-browser-linux64-${version}_${locale}.tar.xz.asc"
fi
gpgv --keyring ./tor.keyring "tor-browser-linux64-${version}_${locale}.tar.xz.asc" "tor-browser-linux64-${version}_${locale}.tar.xz"
tar xvJf "tor-browser-linux64-${version}_${locale}.tar.xz"

View File

@@ -1,29 +0,0 @@
#! /usr/bin/env sh
. ./config.sh
cat <<EOF > /etc/yum.repos.d/adoptium.repo
[Adoptium]
name=Adoptium
baseurl=https://packages.adoptium.net/artifactory/rpm/${DISTRIBUTION_NAME:-$(. /etc/os-release; echo $ID)}/\$releasever/\$basearch
enabled=1
gpgcheck=1
gpgkey=https://packages.adoptium.net/artifactory/api/gpg/key/public
EOF
yum -y update
yum -y install temurin-18-jdk
jpackage --verbose \
--type rpm \
--linux-menu-group "Network;WebBrowser;P2P" \
--linux-app-category "Network" \
--linux-package-deps "firefox|chromium|brave|firefox-esr|librewolf|icecat" \
--linux-shortcut \
--license-file LICENSE.md \
--name i2pbrowser \
--app-version "$GITHUB_TAG" \
--icon src/icon.png \
--input src/build \
--main-jar i2pfirefox.jar \
--main-class net.i2p.i2pfirefox.I2PBrowser
ls *.rpm

View File

@@ -1,7 +0,0 @@
#! /usr/bin/env sh
. ./config.sh
docker build -f Dockerfile.fedora -t eyedeekay/i2p.plugins.firefox.fedora .
docker rm -f i2pbrowser-fedora
docker run --name i2pbrowser-fedora eyedeekay/i2p.plugins.firefox.fedora
docker cp i2pbrowser-fedora:/src/i2p.plugins.firefox/i2pbrowser-${GITHUB_TAG}-1.x86_64.rpm .

View File

@@ -1,5 +0,0 @@
#! /usr/bin/env sh
rm lib/jars/gngr.jar
mkdir -p lib/jars/
wget -c -O lib/jars/gngr.jar https://github.com/gngrOrg/gngr/releases/download/v0.3.16/gngr-0.3.16.jar

3
i2pbrowser.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.I2PFirefox; exit $?
@ECHO OFF
java -cp %cd%/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PFirefox

View File

@@ -17,11 +17,6 @@
<div id="shownav">
<div id="hidenav">
<ul>
<li>
<a href="..">
Up one level ^
</a>
</li>
<li>
<a href="index.html">
index
@@ -32,36 +27,51 @@
CHANGES
</a>
</li>
<li>
<a href="I2PChromium.html">
I2PChromium
</a>
</li>
<li>
<a href="I2PChromiumProfileBuilder.html">
I2PChromiumProfileBuilder
</a>
</li>
<li>
<a href="I2PChromiumProfileChecker.html">
I2PChromiumProfileChecker
</a>
</li>
<li>
<a href="I2PChromiumProfileUnpacker.html">
I2PChromiumProfileUnpacker
</a>
</li>
<li>
<a href="I2PFirefox.html">
I2PFirefox
</a>
</li>
<li>
<a href="I2PFirefoxProfileBuilder.html">
I2PFirefoxProfileBuilder
</a>
</li>
<li>
<a href="I2PFirefoxProfileChecker.html">
I2PFirefoxProfileChecker
</a>
</li>
<li>
<a href="I2PFirefoxProfileUnpacker.html">
I2PFirefoxProfileUnpacker
</a>
</li>
<li>
<a href="LICENSE.html">
LICENSE
</a>
</li>
<li>
<a href="LINUX.html">
LINUX
</a>
</li>
<li>
<a href="OSX.html">
OSX
</a>
</li>
<li>
<a href="VERSION.html">
VERSION
</a>
</li>
<li>
<a href="WINDOWS.html">
WINDOWS
</a>
</li>
<li>
<a href="index.html">
index.html
</a>
</li>
</ul>
<br>
<a href="#hidenav">
@@ -70,190 +80,52 @@
</div>
</div>
</div>
<a id="returnhome" href="/">
/
</a>
<h1>
i2p.plugins.firefox
</h1>
<p>
A port of the batch scripts from
<code>
i2p.firefox
</code>
to Java.
</p>
<p>
<strong>
Status:
</strong>
This package is maintained. It cannot solve all your problems. Fingerprinting
is a reality in modern browsers. Exploits are too. This software attempts to provide a
best-possible baseline of privacy first, security a close second for browsing the web that
exists within I2P. Do not expect it to withstand attacks from very powerful adversaries
who can spend time and money to screw up your life. Do expect it to resist advertisers,
trackers, and jerks using off-the-shelf techniques and exploits. It is fundamentally unable
to make changes which un-trust your browser vendor, your OS, your package manager or any
other system that exists underneath it.
<strong>
It is just a profile manager.
</strong>
</p>
<p>
<strong>
All packages require a running I2P router.
</strong>
</p>
<p>
<strong>
<a href="https://i2pgit.org/i2p-hackers/i2p.firefox">
Windows users should see the Easy-Install Bundle
</a>
</strong>
</p>
<h2>
Credits
</h2>
<p>
This profile manager makes use of a set of browser extensions which are largely the work of others.
It makes use of dependencies that are the work of others. In many ways, it&rsquo;s merely an elaborate
configuration tool. A smart one, but a configuration tool nonetheless. Many thanks to the following
projects, developers, and communities:
</p>
<h3>
Firefox and Chrome Extensions
</h3>
<ul>
<li>
<a href="https://noscript.net">
NoScript - Giorgio Maone and others
</a>
</li>
<li>
<a href="https://www.eff.org/https-everywhere">
HTTPS Everywhere - Electronic Frontier Foundation
</a>
</li>
<li>
<a href="https://ublockorigin.com/">
uBlock Origin - Raymond Gorhill and others
</a>
</li>
<li>
<a href="https://www.localcdn.org/">
LocalCDN - nobody and others
</a>
</li>
<li>
<a href="https://jshelter.org/">
jShelter - Libor Polčák and others
</a>
</li>
</ul>
<h3>
Firefox Configuration Modifiations
</h3>
<ul>
<li>
<a href="https://github.com/arkenfox/user.js/">
Arkenfox - Thorin Oakenpants and Others
</a>
</li>
</ul>
<p>
You can find the license files for each of the these projects in the
<code>
src/i2p.firefox.*.profile/extensions/*
</code>
directory for Firefox, and the
<code>
src/i2p.chromium.*.profile/extensions/*.js/*
</code>
directories for Chromium.
A port of the batch scripts from i2p.firefox to Java.
</p>
<h2>
Getting started
</h2>
<h3>
Building the package:
</h3>
<ul>
<li>
See:
<a href="docs/BUILD.md">
BUILD.md
</a>
/
<a href="docs/BUILD.html">
BUILD.html
</a>
</li>
</ul>
<h3>
Using a Binary
Building
</h3>
<p>
For platform specific instructions, see
This is not actually a plugin yet, but it will be soon. The important bit is the jar.
To generate that, you can either generate the full plugin, which will not work but
produces the jar as a by-product, or you can:
</p>
<ul>
<li>
<a href="LINUX.md">
LINUX.md
</a>
/
<a href="LINUX.html">
LINUX.html
</a>
</li>
<li>
<a href="OSX.md">
OSX.md
</a>
/
<a href="OSX.html">
OSX.html
</a>
</li>
<li>
<a href="WINDOWS.md">
WINDOWS.md
</a>
/
<a href="WINDOWS.html">
WINDOWS.html
</a>
</li>
</ul>
<h4>
All platforms, using a zip:
<code>
.zip
</code>
and a non-bundled Java
</h4>
<pre><code class="language-sh">mkdir ~/tmp-i2pfirefox &amp;&amp; cd ~/tmp-i2pfirefox
wget https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/1.0.5/i2pfirefox.zip
unzip i2pfirefox.zip
./i2pfirefox.cmd
#or if you want to use a Chromium
./i2pchromium.cmd
<pre><code>
cd src
ant
cd ..
</code></pre>
<div id="sourcecode">
<span id="sourcehead">
<strong>
Get the source code:
</strong>
</span>
<ul>
<li>
<a href="https://github.com/eyedeekay/i2p.plugins.firefox">
Source Repository: (https://github.com/eyedeekay/i2p.plugins.firefox)
</a>
</li>
</ul>
</div>
<p>
To build just the jar. Youll know it worked if you can:
</p>
<pre><code>
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PFirefox
</code></pre>
<p>
and a new Firefox instance comes up with a fresh profile, ready-to-use for I2P browsing.
</p>
<p>
The cooler thing you can do with it is add it to an I2P distribution and somewhere in it,
add a UI element that triggers something along the lines of this:
</p>
<pre><code>
if (i2pIsRunning()) {
logger.warning(&#34;I2P is already running&#34;);
System.out.println(&#34;I2PFirefox&#34;);
I2PFirefox i2pFirefox = new I2PFirefox();
i2pFirefox.launch();
}
</code></pre>
<p>
to add a browser management tool to it.
</p>
<div>
<a href="#show">
Show license

View File

@@ -1,9 +1,10 @@
#! /usr/bin/env bash
ant distclean
rm -rf docs
~/.cargo/bin/lojidoc src/java/net/i2p/i2pfirefox/ -s -l > report.log
~/.cargo/bin/lojidoc -c src/java/net/i2p/i2pfirefox/ -s
mv -v generated/net/i2p/i2pfirefox/*.md ./docs/
mv -v generated/net/i2p/i2pfirefox/*.md .
rm -rf generated
git add ./*.md

View File

@@ -1,11 +0,0 @@
#! /usr/bin/env sh
. ./config.sh
jpackage \
--verbose \
--type dmg \
--name i2pbrowser \
--app-version "$GITHUB_TAG" \
--icon src/icon.icns \
--input src/build \
--main-jar i2pfirefox.jar \
--main-class net.i2p.i2pfirefox.I2PBrowser

View File

@@ -1,61 +0,0 @@
#! /usr/bin/env sh
. ./config.sh
github-release download --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \
--tag "${GITHUB_TAG}" \
--name "i2pfirefox.jar"
echo "Downloaded jar"
github-release download --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \
--tag "${GITHUB_TAG}" \
--name "i2pfirefox.zip"
echo "Downloaded freestanding zip"
github-release download --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \
--tag "${GITHUB_TAG}" \
--name "i2pbrowser.zip"
echo "Downloaded jpackage zip"
github-release download --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \
--tag "${GITHUB_TAG}" \
--name "i2pbrowser_${GITHUB_TAG}_amd64.deb"
echo "Downloaded debian package"
github-release download --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \
--tag "${GITHUB_TAG}" \
--name "i2pbrowser-${GITHUB_TAG}-1.x86_64.rpm"
echo "Downloaded fedora package"
github-release download --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \
--tag "${GITHUB_TAG}" \
--name "i2pbrowser.msi"
echo "Downloaded MSI package"
github-release download --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \
--tag "${GITHUB_TAG}" \
--name "i2pbrowser.exe"
echo "Downloaded EXE package"
github-release download --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \
--tag "${GITHUB_TAG}" \
--name "i2pbrowser-portable.zip"
echo "Downloaded Windows ZIP package"
echo "Sums for release ${GITHUB_TAG}" | tee RELEASES.md
echo "==============================" | tee -a RELEASES.md
echo "" | tee -a RELEASES.md
echo "- [$(sha256sum i2pfirefox.jar)](https://github.com/${GITHUB_USER}/${GITHUB_REPO}/releases/download/${GITHUB_TAG}/i2pfirefox.jar)" | tee -a RELEASES.md
echo "- [$(sha256sum i2pfirefox.zip)](https://github.com/${GITHUB_USER}/${GITHUB_REPO}/releases/download/${GITHUB_TAG}/i2pfirefox.zip)" | tee -a RELEASES.md
echo "- [$(sha256sum i2pbrowser.zip)](https://github.com/${GITHUB_USER}/${GITHUB_REPO}/releases/download/${GITHUB_TAG}/i2pbrowser.zip)" | tee -a RELEASES.md
echo "- [$(sha256sum i2pbrowser_${GITHUB_TAG}_amd64.deb)](https://github.com/${GITHUB_USER}/${GITHUB_REPO}/releases/download/${GITHUB_TAG}/i2pbrowser_${GITHUB_TAG}_amd64.deb)" | tee -a RELEASES.md
echo "- [$(sha256sum i2pbrowser-${GITHUB_TAG}-1.x86_64.rpm)](https://github.com/${GITHUB_USER}/${GITHUB_REPO}/releases/download/${GITHUB_TAG}/i2pbrowser-${GITHUB_TAG}-1.x86_64.rpm)" | tee -a RELEASES.md
echo "- [$(sha256sum i2pbrowser.msi)](https://github.com/${GITHUB_USER}/${GITHUB_REPO}/releases/download/${GITHUB_TAG}/i2pbrowser.msi)" | tee -a RELEASES.md
echo "- [$(sha256sum i2pbrowser.exe)](https://github.com/${GITHUB_USER}/${GITHUB_REPO}/releases/download/${GITHUB_TAG}/i2pbrowser.exe)" | tee -a RELEASES.md
echo "- [$(sha256sum i2pbrowser-portable.zip)](https://github.com/${GITHUB_USER}/${GITHUB_REPO}/releases/download/${GITHUB_TAG}/i2pbrowser-portable.zip)" | tee -a RELEASES.md
echo "" | tee -a RELEASES.md
git add RELEASES.md
edgar
git commit -am "Update releases page"
git push --all

View File

@@ -1,15 +0,0 @@
#! /usr/bin/env sh
. ./config.sh
ant distclean clangFmt versionMd
./javadoc.sh
NUMLINE=`grep release.number build.xml | head -n 1`
READMELINE=`grep 'i2p.plugins.firefox/releases/download' README.md | grep i2pfirefox`
sed -i "s|${READMELINE}|wget https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/${GITHUB_TAG}/i2pfirefox.zip|g" README.md
READMELINE=`grep 'i2p.plugins.firefox/releases/download' LINUX.md | grep i2pbrowser`
sed -i "s|${READMELINE}|wget https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/${GITHUB_TAG}/i2pbrowser.zip|g" LINUX.md
READMELINE=`grep 'i2p.plugins.firefox/releases/download' OSX.md | grep i2pfirefox`
sed -i "s|${READMELINE}|wget https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/${GITHUB_TAG}/i2pfirefox.zip|g" OSX.md
sed -i "s|${NUMLINE}| <property name=\"release.number\" value=\"$GITHUB_TAG\" />|g" build.xml
edgar && git push --all
ant distclean tarball versionMd jar freeZip jpackage debian fedora

View File

@@ -1,39 +0,0 @@
#! /usr/bin/env sh
. ./config.sh
profilezipsum=$(sha256sum src/i2p.chromium.base.profile.zip)
github-release upload --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \
--tag "${GITHUB_TAG}" \
--label "Chromium strict extensions ${profilezipsum}" \
--name "i2p.chromium.base.profile.zip" \
--file "src/i2p.chromium.base.profile.zip" \
--replace
echo "Uploaded Chromium base profile"
profilezipsum=$(sha256sum src/i2p.chromium.usability.profile.zip)
github-release upload --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \
--tag "${GITHUB_TAG}" \
--label "Chromium usability extensions ${profilezipsum}" \
--name "i2p.chromium.usability.profile.zip" \
--file "src/i2p.chromium.usability.profile.zip" \
--replace
echo "Uploaded Chromium usability profile"
profilezipsum=$(sha256sum src/i2p.firefox.base.profile.zip)
github-release upload --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \
--tag "${GITHUB_TAG}" \
--label "Firefox strict profile ${profilezipsum}" \
--name "i2p.firefox.base.profile.zip" \
--file "src/i2p.firefox.base.profile.zip" \
--replace
echo "Uploaded Firefox base profile"
profilezipsum=$(sha256sum src/i2p.firefox.usability.profile.zip)
github-release upload --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \
--tag "${GITHUB_TAG}" \
--label "Firefox usability profile ${profilezipsum}" \
--name "i2p.firefox.usability.profile.zip" \
--file "src/i2p.firefox.usability.profile.zip" \
--replace
echo "Uploaded Firefox usability profile"

View File

@@ -1,67 +1,29 @@
#! /usr/bin/env sh
. ./config.sh
./preprelease.sh
GITHUB_USER=eyedeekay
GITHUB_REPO=i2p.plugins.firefox
GITHUB_NAME="With a launcher script so you can run it without typing the full java command"
GITHUB_DESCRIPTION=$(cat CHANGES.md)
GITHUB_TAG=0.0.6
ant distclean
ant jar freeZip
github-release release --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \
--name "${GITHUB_NAME}" \
--description "${GITHUB_DESCRIPTION}" \
--tag "${GITHUB_TAG}"; true
./profiles-upload.sh
--tag "${GITHUB_TAG}"
sleep 2s
github-release edit --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \
--name "${GITHUB_NAME}" \
--description "${GITHUB_DESCRIPTION}" \
--tag "${GITHUB_TAG}"; true
echo "Relase ${GITHUB_TAG} setup"
tarsum=$(sha256sum i2p.plugins.firefox.tar.gz)
github-release upload --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \
--tag "${GITHUB_TAG}" \
--label "I2P Browser launcher source tarball. ${tarsum}" \
--name "i2p.plugins.firefox-${GITHUB_TAG}.tar.gz" \
--file "i2p.plugins.firefox.tar.gz"
jarsum=$(sha256sum "src/build/i2pfirefox.jar")
github-release upload --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \
--tag "${GITHUB_TAG}" \
--label "I2P Browser launcher as a .jar. Useful as a library or for advanced users. ${jarsum}" \
--name "i2pfirefox.jar" \
--file "src/build/i2pfirefox.jar"
echo "Uploaded jar"
zipsum=$(sha256sum "i2pfirefox.zip")
--file "src/build/i2pfirefox.jar" \
--replace
github-release upload --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \
--tag "${GITHUB_TAG}" \
--label "I2P Browser launcher as a .jar and a set of semi-univeral launcher scripts. ${zipsum}" \
--name "i2pfirefox.zip" \
--file "i2pfirefox.zip"
echo "Uploaded freestanding zip"
jvmsum=$(sha256sum "i2pbrowser.zip")
github-release upload --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \
--tag "${GITHUB_TAG}" \
--label "I2P Browser launcher as a Jpackage, does not require a JVM. ${jvmsum}" \
--name "i2pbrowser.zip" \
--file "i2pbrowser.zip"
echo "Uploaded jpackage zip"
debsum=$(sha256sum "i2pbrowser_${GITHUB_TAG}_amd64.deb")
github-release upload --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \
--tag "${GITHUB_TAG}" \
--label "I2P Browser launcher as a Jpackage inside of a Debian package. ${debsum}" \
--name "i2pbrowser_${GITHUB_TAG}_amd64.deb" \
--file "i2pbrowser_${GITHUB_TAG}_amd64.deb"
echo "Uploaded debian package"
rpmsum=$(sha256sum i2pbrowser-${GITHUB_TAG}-1.x86_64.rpm)
github-release upload --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \
--tag "${GITHUB_TAG}" \
--label "I2P Browser launcher as a Jpackage inside of a Fedora package. ${rpmsum}" \
--name "i2pbrowser-${GITHUB_TAG}-1.x86_64.rpm" \
--file "i2pbrowser-${GITHUB_TAG}-1.x86_64.rpm"
echo "Uploaded fedora package"
--file "i2pfirefox.zip" \
--replace
git pull github --tags
git push --all
git push --all

172
report.log Normal file
View File

@@ -0,0 +1,172 @@
Generating documentation from src/java/net/i2p/i2pfirefox/
Javadoc errors for class I2PChromiumProfileChecker
File: src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java
 Missing description for method main (Line: 6)
 Javadoc parameter not found args in method: main (Line: 6)
 Missing description for method validateProfileDirectory (Line: 20)
 Javadoc parameter not found profileDirectory in method: validateProfileDirectory (Line: 20)
 Missing description for method validateFile (Line: 44)
 Javadoc parameter not found file in method: validateFile (Line: 44)
 Missing description for method validateExtensionDirectory (Line: 64)
 Javadoc parameter not found extensionDirectory in method: validateExtensionDirectory (Line: 64)
Javadoc errors for class I2PFirefoxProfileChecker
File: src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java
 Missing description for method main (Line: 6)
 Javadoc parameter not found args in method: main (Line: 6)
 Missing description for method validateProfileDirectory (Line: 20)
 Javadoc parameter not found profileDirectory in method: validateProfileDirectory (Line: 20)
 Missing description for method validateFile (Line: 52)
 Javadoc parameter not found file in method: validateFile (Line: 52)
 Missing description for method validateExtensionDirectory (Line: 72)
 Javadoc parameter not found extensionDirectory in method: validateExtensionDirectory (Line: 72)
Javadoc errors for class I2PFirefoxProfileBuilder
File: src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java
 Missing description for member variable strict (Line: )
 Missing description for method profileDir (Line: 15)
 Javadoc parameter not found file in method: profileDir (Line: 15)
 Missing description for method profileDirectory (Line: 25)
 Missing description for method baseProfileDir (Line: 37)
 Javadoc parameter not found file in method: baseProfileDir (Line: 37)
 Missing description for method baseProfileDirectory (Line: 57)
 Missing description for method runtimeDirectory (Line: 81)
 Javadoc parameter not found create in method: runtimeDirectory (Line: 81)
 Missing description for method runtimeDirectory (Line: 98)
 Missing description for method copyBaseProfiletoProfile (Line: 144)
 Missing description for method copyDirectory (Line: 174)
 Javadoc parameter not found sourceDirectory in method: copyDirectory (Line: 174)
 Javadoc parameter not found destinationDirectory in method: copyDirectory (Line: 174)
 Missing description for method copyDirectoryCompatibityMode (Line: 184)
 Javadoc parameter not found source in method: copyDirectoryCompatibityMode (Line: 184)
 Javadoc parameter not found destination in method: copyDirectoryCompatibityMode (Line: 184)
 Missing description for method copyFile (Line: 192)
 Javadoc parameter not found sourceFile in method: copyFile (Line: 192)
 Javadoc parameter not found destinationFile in method: copyFile (Line: 192)
 Missing description for method copyStrictOptions (Line: 209)
 Missing description for method  (Line: 246)
 Missing description for method  (Line: 256)
 Javadoc parameter not found strict in method: (Line: 256)
Javadoc errors for class I2PChromium
File: src/java/net/i2p/i2pfirefox/I2PChromium.java
 Missing description for member variable String[] CHROMIUM_SEARCH_PATHS (Line: )
 Missing return type for member variable String[] CHROMIUM_SEARCH_PATHS (Line: )
 Missing description for member variable int DEFAULT_TIMEOUT (Line: )
 Missing return type for member variable int DEFAULT_TIMEOUT (Line: )
 Missing description for method  (Line: 20)
 Missing description for method FIND_CHROMIUM_SEARCH_PATHS_UNIX (Line: 31)
 Missing description for method FIND_CHROMIUM_SEARCH_PATHS_OSX (Line: 44)
 Missing description for method FIND_CHROMIUM_SEARCH_PATHS_WINDOWS (Line: 57)
 Missing description for method FIND_ALL_CHROMIUM_SEARCH_PATHS (Line: 87)
 Missing description for method FIND_CHROMIUM_SEARCH_PATHS (Line: 107)
 Missing description for method NEARBY_CHROMIUM_SEARCH_PATHS (Line: 121)
 Missing description for method CHROMIUM_FINDER (Line: 165)
 Missing description for method getOperatingSystem (Line: 177)
 Missing description for method onlyValidChromiums (Line: 199)
 Missing description for method topChromium (Line: 217)
 Missing description for method topChromium (Line: 246)
 Javadoc parameter not found overrideChromium in method: topChromium (Line: 246)
 Missing description for method defaultProcessBuilder (Line: 264)
 Missing description for method processBuilder (Line: 301)
 Javadoc parameter not found args in method: processBuilder (Line: 301)
 Missing description for method waitForProxy (Line: 340)
 Missing description for method waitForProxy (Line: 352)
 Javadoc parameter not found timeout in method: waitForProxy (Line: 352)
 Missing description for method waitForProxy (Line: 364)
 Javadoc parameter not found timeout in method: waitForProxy (Line: 364)
 Javadoc parameter not found port in method: waitForProxy (Line: 364)
 Missing description for method waitForProxy (Line: 377)
 Javadoc parameter not found timeout in method: waitForProxy (Line: 377)
 Javadoc parameter not found port in method: waitForProxy (Line: 377)
 Javadoc parameter not found host in method: waitForProxy (Line: 377)
 Missing description for method checkifPortIsOccupied (Line: 390)
 Javadoc parameter not found port in method: checkifPortIsOccupied (Line: 390)
 Javadoc parameter not found host in method: checkifPortIsOccupied (Line: 390)
 Missing description for method launch (Line: 408)
 Missing description for method main (Line: 441)
 Javadoc parameter not found args in method: main (Line: 441)
Javadoc errors for class I2PFirefoxProfileUnpacker
File: src/java/net/i2p/i2pfirefox/I2PFirefoxProfileUnpacker.java
 Missing description for method main (Line: 12)
 Javadoc parameter not found args in method: main (Line: 12)
 Missing description for method unpackProfile (Line: 27)
 Javadoc parameter not found profileDirectory in method: unpackProfile (Line: 27)
Javadoc errors for class I2PChromiumProfileUnpacker
File: src/java/net/i2p/i2pfirefox/I2PChromiumProfileUnpacker.java
 Missing description for method main (Line: 12)
 Javadoc parameter not found args in method: main (Line: 12)
 Missing description for method unpackProfile (Line: 27)
 Javadoc parameter not found profileDirectory in method: unpackProfile (Line: 27)
Javadoc errors for class I2PChromiumProfileBuilder
File: src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java
 Missing description for member variable strict (Line: )
 Missing description for method profileDir (Line: 15)
 Javadoc parameter not found file in method: profileDir (Line: 15)
 Missing description for method profileDirectory (Line: 25)
 Missing description for method baseProfileDir (Line: 37)
 Javadoc parameter not found file in method: baseProfileDir (Line: 37)
 Missing description for method baseProfileDirectory (Line: 57)
 Missing description for method runtimeDirectory (Line: 81)
 Javadoc parameter not found create in method: runtimeDirectory (Line: 81)
 Missing description for method runtimeDirectory (Line: 98)
 Missing description for method copyBaseProfiletoProfile (Line: 144)
 Missing description for method copyDirectory (Line: 174)
 Javadoc parameter not found sourceDirectory in method: copyDirectory (Line: 174)
 Javadoc parameter not found destinationDirectory in method: copyDirectory (Line: 174)
 Missing description for method copyDirectoryCompatibityMode (Line: 184)
 Javadoc parameter not found source in method: copyDirectoryCompatibityMode (Line: 184)
 Javadoc parameter not found destination in method: copyDirectoryCompatibityMode (Line: 184)
 Missing description for method copyFile (Line: 192)
 Javadoc parameter not found sourceFile in method: copyFile (Line: 192)
 Javadoc parameter not found destinationFile in method: copyFile (Line: 192)
 Missing description for method copyStrictOptions (Line: 209)
 Missing description for method  (Line: 246)
 Missing description for method  (Line: 256)
 Javadoc parameter not found strict in method: (Line: 256)
Javadoc errors for class I2PFirefox
File: src/java/net/i2p/i2pfirefox/I2PFirefox.java
 Missing description for member variable String[] FIREFOX_SEARCH_PATHS (Line: )
 Missing return type for member variable String[] FIREFOX_SEARCH_PATHS (Line: )
 Missing description for member variable int DEFAULT_TIMEOUT (Line: )
 Missing return type for member variable int DEFAULT_TIMEOUT (Line: )
 Missing description for method  (Line: 19)
 Missing description for method FIND_FIREFOX_SEARCH_PATHS_UNIX (Line: 30)
 Missing description for method FIND_FIREFOX_SEARCH_PATHS_OSX (Line: 43)
 Missing description for method FIND_FIREFOX_SEARCH_PATHS_WINDOWS (Line: 56)
 Missing description for method FIND_ALL_FIREFOX_SEARCH_PATHS (Line: 84)
 Missing description for method FIND_FIREFOX_SEARCH_PATHS (Line: 104)
 Missing description for method NEARBY_FIREFOX_SEARCH_PATHS (Line: 118)
 Missing description for method FIREFOX_FINDER (Line: 162)
 Missing description for method getOperatingSystem (Line: 174)
 Missing description for method onlyValidFirefoxes (Line: 196)
 Missing description for method topFirefox (Line: 214)
 Missing description for method topFirefox (Line: 243)
 Javadoc parameter not found overrideFirefox in method: topFirefox (Line: 243)
 Missing description for method defaultProcessBuilder (Line: 261)
 Missing description for method processBuilder (Line: 275)
 Javadoc parameter not found args in method: processBuilder (Line: 275)
 Missing description for method waitForProxy (Line: 298)
 Missing description for method waitForProxy (Line: 310)
 Javadoc parameter not found timeout in method: waitForProxy (Line: 310)
 Missing description for method waitForProxy (Line: 322)
 Javadoc parameter not found timeout in method: waitForProxy (Line: 322)
 Javadoc parameter not found port in method: waitForProxy (Line: 322)
 Missing description for method waitForProxy (Line: 335)
 Javadoc parameter not found timeout in method: waitForProxy (Line: 335)
 Javadoc parameter not found port in method: waitForProxy (Line: 335)
 Javadoc parameter not found host in method: waitForProxy (Line: 335)
 Missing description for method checkifPortIsOccupied (Line: 348)
 Javadoc parameter not found port in method: checkifPortIsOccupied (Line: 348)
 Javadoc parameter not found host in method: checkifPortIsOccupied (Line: 348)
 Missing description for method launch (Line: 366)
 Missing description for method main (Line: 399)
 Javadoc parameter not found args in method: main (Line: 399)

View File

@@ -1,3 +1,3 @@
#Build Number for ANT. Do not edit!
#Tue Nov 22 23:56:43 EST 2022
build.number=165
#Sun Aug 07 20:17:38 EDT 2022
build.number=85

View File

@@ -8,8 +8,3 @@
#hidenav {display:block; }
#shownav:target {display: block; }
#hidenav:target {display: none; }
#donate {display:none; }
#hidedonate {display:block; }
#donate:target {display: block; }
#hidedonate:target {display: none; }

View File

@@ -20,12 +20,12 @@
</path>
<target name="all" depends="clean, build" />
<target name="build" depends="jar" />
<target name="build" depends="jar, war" />
<target name="builddep">
</target>
<property name="javac.compilerargs" value="" />
<property name="javac.version" value="1.8" />
<property name="javac.version" value="1.7" />
<target name="compile">
<mkdir dir="./build" />
@@ -43,11 +43,53 @@
<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.firefox.usability.profile.zip" />
<fileset file="i2p.chromium.base.profile.zip" />
<fileset file="i2p.chromium.usability.profile.zip" />
<fileset file="icon.png" />
</jar>
</target>
<target name="precompilejsp" depends="compile" >
<mkdir dir="build" />
<mkdir dir="build/war/WEB-INF/classes" />
<path id="jspcp">
<path refid="cp" />
<pathelement location="build/obj" />
</path>
<java classname="org.apache.jasper.JspC" fork="true" classpathref="jspcp" failonerror="true">
<arg value="-d" />
<arg value="build/jspjava" />
<arg value="-v" />
<arg value="-p" />
<arg value="net.i2p.i2pfirefox" />
<arg value="-webinc" />
<arg value="build/web-fragment.xml" />
<arg value="-webapp" />
<arg value="jsp/" />
</java>
<javac
debug="true"
deprecation="on"
source="${javac.version}" target="${javac.version}"
destdir="build/war/WEB-INF/classes"
srcdir="./build/jspjava"
includes="**/*.java"
includeAntRuntime="false"
classpathref="jspcp"
failonerror="true" >
<compilerarg line="${javac.compilerargs}" />
</javac>
<copy file="jsp/WEB-INF/web.xml" tofile="build/web.xml" />
<loadfile property="jspc.web.fragment" srcfile="build/web-fragment.xml" />
<replace file="build/web.xml">
<replacefilter token="&lt;!-- precompiled servlets --&gt;" value="${jspc.web.fragment}" />
</replace>
</target>
<target name="war" depends="precompilejsp">
<war destfile="build/firefox.war.jar" webxml="build/web.xml">
<fileset dir="build/war" />
</war>
</target>
<target name="clean">

View File

@@ -0,0 +1 @@
Set up an extension loadout

View File

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

View File

@@ -0,0 +1,19 @@
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
It will be read and overwritten.
DO NOT EDIT! -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks Menu</H1>
<DL><p>
<DT><A HREF="place:type=6&sort=14&maxResults=10" ADD_DATE="1539649423" LAST_MODIFIED="1539649424">Recent Tags</A>
<HR> <DT><A HREF="http://legwork.i2p/yacysearch.html?query=%s&verify=cacheonly&contentdom=text&nav=location%2Chosts%2Cauthors%2Cnamespace%2Ctopics%2Cfiletype%2Cprotocol%2Clanguage&startRecord=0&indexof=off&meanCount=5&resource=global&prefermaskfilter=&maximumRecords=10&timezoneOffset=0" ADD_DATE="1539652098" LAST_MODIFIED="1539652098" SHORTCUTURL="legwork.i2p">Search YaCy &#39;legwork&#39;: Search Page</A>
<DD>Software HTTP Freeware Home Page
<DT><H3 ADD_DATE="1539649419" LAST_MODIFIED="1539649423" PERSONAL_TOOLBAR_FOLDER="true">Bookmarks Toolbar</H3>
<DL><p>
<DT><A HREF="place:sort=8&maxResults=10" ADD_DATE="1539649423" LAST_MODIFIED="1539649423">Most Visited</A>
<DT><A HREF="http://i2p-projekt.i2p/" ADD_DATE="1538511080" LAST_MODIFIED="1538511080">I2P Anonymous Network</A>
<DD>Anonymous peer-to-peer distributed communication layer built with open source tools and designed to run any traditional Internet service such as email, IRC or web hosting.
</DL><p>
</DL>

View File

@@ -60,7 +60,6 @@ user_pref("media.navigator.enabled", false);
user_pref("dom.w3c_touch_events.enabled", false);
user_pref("browser.privatebrowsing.autostart", false);
user_pref("browser.display.use_system_colors", false);
user_pref("dom.image-lazy-loading.enabled", false);
user_pref("dom.image-lazy-loading.enabled", false)
user_pref("extensions.autoDisableScopes", 0);
user_pref("extensions.enabledScopes", 1);
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", false);
user_pref("extensions.enabledScopes", 1);

Binary file not shown.

View File

@@ -226,5 +226,4 @@ user_pref("webgl.disable-fail-if-major-performance-caveat", true);
user_pref("webgl.enable-webgl2", false);
user_pref("dom.w3c_touch_events.enabled", false);
user_pref("browser.privatebrowsing.autostart", false);
user_pref("browser.display.use_system_colors", false);
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", false);
user_pref("browser.display.use_system_colors", false);

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1 @@
1.8.1

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

View File

@@ -1,410 +0,0 @@
package net.i2p.i2pfirefox;
import java.awt.Image;
import java.awt.Menu;
import java.awt.MenuItem;
import java.awt.PopupMenu;
import java.awt.SystemTray;
import java.awt.Toolkit;
import java.awt.TrayIcon;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.Arrays;
/**
* I2PBrowser.java
* Copyright (C) 2022 idk <hankhill19580@gmail.com>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the MIT License. See LICENSE.md for details.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @description I2PBrowser is a class that is used to open a browser window to
* the I2P network. It automatically detects the operating system and available
* browsers, and selects the best one to use, with Tor Browser at the top for
* Firefox and Brave at the top for Chrome.
*
* @author idk
* @since 0.0.16
*/
public class I2PBrowser extends I2PCommonBrowser {
private final I2PFirefox i2pFirefox = new I2PFirefox();
private final I2PChromium i2pChromium = new I2PChromium();
private final I2PGenericUnsafeBrowser i2pGeneral =
new I2PGenericUnsafeBrowser();
public boolean firefox = false;
public boolean chromium = false;
public boolean generic = false;
public boolean chromiumFirst = false;
public boolean usability = false;
static private boolean outputConfig = false;
static private boolean useSystray = true;
private void launchFirefox(int privateWindow, String[] url) {
logger.info("I2PFirefox" + privateWindow);
I2PFirefox.usability = usability;
if (outputConfig)
i2pFirefox.storeFirefoxDefaults();
i2pFirefox.launch(privateWindow, url);
}
private void launchChromium(int privateWindow, String[] url) {
logger.info("I2PChromium" + privateWindow);
I2PChromiumProfileBuilder.usability = usability;
if (outputConfig)
i2pChromium.storeChromiumDefaults();
i2pChromium.launch(privateWindow, url);
}
private void launchGeneric(int privateWindowInt, String[] url) {
boolean privateWindow = false;
if (privateWindowInt == 1)
privateWindow = true;
if (outputConfig)
i2pGeneral.storeGenericDefaults();
logger.info("I2PGeneric" + privateWindowInt);
i2pGeneral.launch(privateWindow, url);
}
/**
* Construct an I2PBrowser class which automatically determines which browser
* to use.
*
* @since 0.0.16
*/
public I2PBrowser() {}
/**
* Construct an I2PBrowser class which automatically determines which browser
* to use.
*
* @since 0.0.18
*/
public I2PBrowser(String browserPath) {
I2PGenericUnsafeBrowser.BROWSER = browserPath;
}
public void setBrowser(String browserPath) {
I2PGenericUnsafeBrowser.BROWSER = browserPath;
}
/**
* Return true if there is a Chromium available
*
* @return true if Chromium is available, false otherwise
* @since 0.0.16
*/
public boolean hasChromium() {
String chrome = i2pChromium.topChromium();
if (chrome == null) {
return false;
}
if (chrome.isEmpty()) {
return false;
}
return true;
}
/**
* Return true if there is a Firefox variant available
*
* @return true if Firefox variant is available, false otherwise
* @since 0.0.16
*/
public boolean hasFirefox() {
String fox = i2pFirefox.topFirefox();
if (fox == null) {
return false;
}
if (fox.isEmpty()) {
return false;
}
return true;
}
/**
* Populates a profile directory with a proxy configuration.
* Waits for an HTTP proxy on the port 4444 to be ready.
* Launches either Firefox or Chromium with the profile directory.
*
* @param bool if true, the profile will be ephemeral(i.e. a --private-window
* profile).
* @since 0.0.17
*/
public void launch(int privateWindow, String[] url) {
validateUserDir();
if (generic) {
this.launchGeneric(privateWindow, url);
return;
}
if ((chromium && firefox) || (!chromium && !firefox)) {
if (this.hasFirefox()) {
this.launchFirefox(privateWindow, url);
} else if (this.hasChromium()) {
this.launchChromium(privateWindow, url);
} else {
this.launchGeneric(privateWindow, url);
}
return;
}
if (chromiumFirst) {
if (chromium) {
this.launchChromium(privateWindow, url);
} else if (firefox) {
this.launchFirefox(privateWindow, url);
} else {
this.launchGeneric(privateWindow, url);
}
return;
}
if (firefox) {
this.launchFirefox(privateWindow, url);
} else if (chromium) {
this.launchChromium(privateWindow, url);
} else {
this.launchGeneric(privateWindow, url);
}
return;
}
/**
* Populates a profile directory with a proxy configuration.
* Waits for an HTTP proxy on the port 4444 to be ready.
* Launches either Firefox or Chromium with the profile directory.
*
* @param bool if true, the profile will be ephemeral(i.e. a --private-window
* profile).
* @since 0.0.16
*/
public void launch(boolean privateWindow) {
int privateWindowInt = 0;
if (privateWindow)
privateWindowInt = 1;
launch(privateWindowInt, null);
}
/**
* Populates a profile directory with a proxy configuration.
* Waits for an HTTP proxy on the port 4444 to be ready.
* Launches either Firefox or Chromium with the profile directory.
*
* @since 0.0.16
*/
public void launch() { launch(false); }
private static String ValidURL(String inUrl) {
String[] schemes = {"http", "https"};
for (String scheme : schemes) {
if (inUrl.startsWith(scheme)) {
return inUrl;
}
}
return "";
}
public static void main(String[] args) {
validateUserDir();
int privateBrowsing = 0;
logger.info("I2PBrowser");
I2PBrowser i2pBrowser = new I2PBrowser();
ArrayList<String> visitURL = new ArrayList<String>();
if (args != null) {
if (args.length > 0) {
for (String arg : args) {
if (arg.equals("-private")) {
privateBrowsing = 1;
}
if (arg.equals("-chromium")) {
i2pBrowser.chromium = true;
}
if (arg.equals("-firefox")) {
i2pBrowser.firefox = true;
}
if (arg.equals("-usability")) {
i2pBrowser.usability = true;
}
if (arg.equals("-strict")) {
i2pBrowser.usability = false;
}
if (arg.equals("-generic")) {
i2pBrowser.generic = true;
}
if (arg.equals("-app")) {
i2pBrowser.usability = true;
privateBrowsing = 2;
}
if (arg.equals("-outputconfig")) {
outputConfig = true;
}
if (arg.equals("-nosystray")) {
useSystray = false;
}
if (arg.equals("-noproxycheck")) {
logger.info("zeroing out proxy check");
i2pBrowser.setProxyTimeoutTime(0);
}
if (!arg.startsWith("-")) {
visitURL.add(ValidURL(arg));
}
}
}
}
try {
if (useSystray) {
logger.info("Starting systray");
systray(args);
Runtime.getRuntime().addShutdownHook(new Thread() {
@Override
public void run() {
shutdownSystray();
}
});
}
} catch (Exception e) {
logger.warning(e.toString());
}
i2pBrowser.launch(privateBrowsing,
visitURL.toArray(new String[visitURL.size()]));
}
private static boolean systrayIsRunningExternally() {
File systrayIsRunningFile =
new File(runtimeDirectory(""), "systray.running");
if (systrayIsRunningFile.exists()) {
logger.info("Systray is already running in another process");
return true;
}
try {
FileWriter myWriter = new FileWriter(systrayIsRunningFile);
myWriter.write("systray is running");
myWriter.close();
} catch (IOException ioe) {
logger.warning(ioe.toString());
return true;
}
return false;
}
private static void shutdownSystray() {
File systrayIsRunningFile =
new File(runtimeDirectory(""), "systray.running");
if (systrayIsRunningFile.exists())
systrayIsRunningFile.delete();
}
public static boolean systray(String[] args) throws Exception {
if (systrayIsRunningExternally()) {
return false;
}
if (!SystemTray.isSupported()) {
logger.warning("SystemTray is not supported");
return false;
}
SystemTray tray = SystemTray.getSystemTray();
Toolkit toolkit = Toolkit.getDefaultToolkit();
File iconFile = new File(runtimeDirectory(""), "icon.png");
if (!iconFile.exists()) {
InputStream resources =
I2PBrowser.class.getClassLoader().getResourceAsStream("icon.png");
OutputStream fos = new FileOutputStream(iconFile);
copy(resources, fos);
}
Image image = toolkit.getImage("icon.png");
PopupMenu menu = new PopupMenu();
TrayIcon icon = new TrayIcon(image, "I2P Browser Profile Controller", menu);
icon.setImageAutoSize(true);
tray.add(icon);
Menu submenuStrict = new Menu("Strict Mode");
MenuItem launchRegularBrowserStrict = new MenuItem("Launch I2P Browser");
launchRegularBrowserStrict.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
ArrayList<String> argsList = new ArrayList<String>();
argsList.addAll(Arrays.asList(args));
argsList.add("-strict");
main(argsList.toArray(args));
}
});
submenuStrict.add(launchRegularBrowserStrict);
MenuItem launchPrivateBrowserStrict =
new MenuItem("Launch I2P Browser - Throwaway Session");
launchPrivateBrowserStrict.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
ArrayList<String> argsList =
new ArrayList<String>(Arrays.asList(new String[] {"-private"}));
argsList.addAll(Arrays.asList(args));
argsList.add("-strict");
main(argsList.toArray(args));
}
});
submenuStrict.add(launchPrivateBrowserStrict);
MenuItem launchConfigBrowserStrict = new MenuItem("Launch I2P Console");
launchConfigBrowserStrict.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
ArrayList<String> argsList = new ArrayList<String>(
Arrays.asList(new String[] {"-app", "http://127.0.0.1:7657"}));
argsList.addAll(Arrays.asList(args));
argsList.add("-strict");
main(argsList.toArray(args));
}
});
submenuStrict.add(launchConfigBrowserStrict);
menu.add(submenuStrict);
Menu submenuUsability = new Menu("Usability Mode");
MenuItem launchRegularBrowserUsability = new MenuItem("Launch I2P Browser");
launchRegularBrowserUsability.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
ArrayList<String> argsList = new ArrayList<String>();
argsList.addAll(Arrays.asList(args));
argsList.add("-usability");
main(argsList.toArray(args));
}
});
submenuUsability.add(launchRegularBrowserUsability);
MenuItem launchPrivateBrowserUsability =
new MenuItem("Launch I2P Browser - Throwaway Session");
launchPrivateBrowserUsability.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
ArrayList<String> argsList =
new ArrayList<String>(Arrays.asList(new String[] {"-private"}));
argsList.addAll(Arrays.asList(args));
argsList.add("-usability");
main(argsList.toArray(args));
}
});
submenuUsability.add(launchPrivateBrowserUsability);
MenuItem launchConfigBrowserUsability = new MenuItem("Launch I2P Console");
launchConfigBrowserUsability.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
ArrayList<String> argsList = new ArrayList<String>(
Arrays.asList(new String[] {"-app", "http://127.0.0.1:7657"}));
argsList.addAll(Arrays.asList(args));
argsList.add("-usability");
main(argsList.toArray(args));
}
});
submenuUsability.add(launchConfigBrowserUsability);
menu.add(submenuUsability);
MenuItem closeItem = new MenuItem("Close");
closeItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
shutdownSystray();
System.exit(0);
}
});
menu.add(closeItem);
return true;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,161 +1,259 @@
package net.i2p.i2pfirefox;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
/**
* I2PChromiumProfileBuilder.java
* Copyright (C) 2022 idk <hankhill19580@gmail.com>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the MIT License. See LICENSE.md for details.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* I2PChromiumProfileBuilder is a class that builds a profile directory which
* contains the I2P browser profile for the Chromium browser family. It manages
* the base profile directory and copies it's contents to the active profile
* directory, which is actually used by Chromium.
*
* @author idk
* @since 0.0.1
*/
public class I2PChromiumProfileBuilder extends I2PCommonBrowser {
public static boolean usability;
public class I2PChromiumProfileBuilder {
private static boolean strict;
/**
* get the profile directory, creating it if necessary
*
* @return the profile directory, or null if it could not be created
*/
public static String profileDirectory(String base) {
return profileDirectory("I2P_CHROMIUM_PROFILE", "chromium", base, false);
}
private static String baseProfileDir(String file, String mode) {
File profileDir = new File(file, "i2p.chromium." + mode + ".profile");
// make sure the directory exists
if (profileDir.exists()) {
return profileDir.getAbsolutePath();
} else {
// create the directory
I2PChromiumProfileUnpacker unpacker = new I2PChromiumProfileUnpacker();
if (!unpacker.unpackProfile(profileDir.getAbsolutePath(), mode)) {
return null;
}
return profileDir.getAbsolutePath();
private static String profileDir(String file) {
File profileDir = new File(file, "i2p.chromium.profile");
return profileDir.getAbsolutePath();
}
}
/**
* get the base profile directory, creating it if necessary
*
* @return the base profile directory, or null if it could not be created
*/
/*public static String baseProfileDirectory() {
return baseProfileDirectory("base");
}*/
public static String baseProfileDirectory(String mode) {
String pd = System.getenv("I2P_CHROMIUM_BASE_PROFILE");
if (pd != null && !pd.isEmpty()) {
File pdf = new File(pd);
if (pdf.exists() && pdf.isDirectory()) {
return pd;
} else {
I2PChromiumProfileUnpacker unpacker = new I2PChromiumProfileUnpacker();
if (!unpacker.unpackProfile(pdf.getAbsolutePath(), mode)) {
return null;
/*
* get the profile directory, creating it if necessary
*
* @return the profile directory, or null if it could not be created
*/
public static String profileDirectory() {
String pd = System.getenv("I2P_FIREFOX_PROFILE");
if (pd != null && !pd.isEmpty()) {
File pdf = new File(pd);
if (pdf.exists() && pdf.isDirectory()) {
return pd;
}
}
}
String rtd = runtimeDirectory();
return profileDir(rtd);
}
String rtd = runtimeDirectory();
return baseProfileDir(rtd, mode);
}
/**
* get the runtime directory, creating it if create=true
*
* @param create if true, create the runtime directory if it does not exist
* @return the runtime directory, or null if it could not be created
* @since 0.0.1
*/
public static File runtimeDirectory(boolean create) {
String rtd = runtimeDirectory();
return runtimeDirectory(create, rtd);
}
/**
* get the correct runtime directory
*
* @return the runtime directory, or null if it could not be created or found
* @since 0.0.1
*/
public static String runtimeDirectory() {
// get the I2P_CHROMIUM_DIR environment variable
String rtd = System.getenv("I2P_CHROMIUM_DIR");
// if it is not null and not empty
if (rtd != null && !rtd.isEmpty()) {
// check if the file exists
File rtdFile = new File(rtd);
if (rtdFile.exists()) {
// if it does, return it
return runtimeDirectory(rtd);
}
private static String baseProfileDir(String file) {
File profileDir = new File(file, "i2p.chromium.base.profile");
// make sure the directory exists
if (profileDir.exists()) {
return profileDir.getAbsolutePath();
} else {
// create the directory
I2PChromiumProfileUnpacker unpacker = new I2PChromiumProfileUnpacker();
if (!unpacker.unpackProfile(profileDir.getAbsolutePath())) {
return null;
}
return profileDir.getAbsolutePath();
}
}
return runtimeDirectory("");
}
public static String usabilityMode() {
if (usability)
return "usability";
return "base";
}
/**
* Copy the inert base profile directory to the runtime profile directory
*
* @since 0.0.1
*/
public static boolean copyBaseProfiletoProfile() {
String baseProfile = baseProfileDirectory(usabilityMode());
String profile = profileDirectory(usabilityMode());
logger.info("Copying base profile to profile directory: " + baseProfile +
" -> " + profile);
if (baseProfile.isEmpty() || profile.isEmpty()) {
return false;
/*
* get the base profile directory, creating it if necessary
*
* @return the base profile directory, or null if it could not be created
*/
public static String baseProfileDirectory() {
String pd = System.getenv("I2P_FIREFOX_BASE_PROFILE");
if (pd != null && !pd.isEmpty()) {
File pdf = new File(pd);
if (pdf.exists() && pdf.isDirectory()) {
return pd;
}else{
I2PChromiumProfileUnpacker unpacker = new I2PChromiumProfileUnpacker();
if (!unpacker.unpackProfile(pdf.getAbsolutePath())) {
return null;
}
}
}
String rtd = runtimeDirectory();
return baseProfileDir(rtd);
}
File baseProfileDir = new File(baseProfile);
File profileDir = new File(profile);
if (!profileDir.exists()) {
try {
logger.info("Copying base profile to profile directory");
copyDirectory(baseProfileDir, profileDir, "chromium", usabilityMode());
} catch (Exception e) {
logger.info("Error copying base profile to profile" + e);
return false;
}
/*
* get the runtime directory, creating it if create=true
*
* @param create if true, create the runtime directory if it does not exist
* @return the runtime directory, or null if it could not be created
* @since 0.0.1
*/
public static File runtimeDirectory(boolean create) {
String rtd = runtimeDirectory();
File rtdFile = new File(rtd);
if (create) {
if (!rtdFile.exists()) {
rtdFile.mkdir();
}
}
return new File(rtd);
}
logger.info("Copied base profile to profile directory");
return true;
}
/**
* Construct a new Profile Builder
*
* @since 0.0.1
*/
public I2PChromiumProfileBuilder() {
// I2PChromiumProfileBuilder.strict = false;
}
/*
* get the correct runtime directory
*
* @return the runtime directory, or null if it could not be created or found
* @since 0.0.1
*/
public static String runtimeDirectory() {
// get the I2P_FIREFOX_DIR environment variable
String rtd = System.getenv("I2P_FIREFOX_DIR");
// if it is not null and not empty
if (rtd != null && !rtd.isEmpty()) {
// check if the file exists
File rtdFile = new File(rtd);
if (rtdFile.exists()) {
// if it does, return it
return rtd;
}
}
// obtain the PLUGIN environment variable
String plugin = System.getenv("PLUGIN");
if (plugin != null && !plugin.isEmpty()) {
File pluginDir = new File(plugin);
if (pluginDir.exists()) {
return pluginDir.toString();
}
}
String userDir = System.getProperty("user.dir");
if (userDir != null && !userDir.isEmpty()) {
File userDir1 = new File(userDir);
if (userDir1.exists()) {
return userDir1.toString();
}
}
String homeDir = System.getProperty("user.home");
if (homeDir != null && !homeDir.isEmpty()) {
File homeDir1 = new File(homeDir+"/.i2p");
if (homeDir1.exists()) {
return homeDir.toString();
}
File homeDir2 = new File(homeDir+"/i2p");
if (homeDir2.exists()) {
return homeDir2.toString();
}
}
return "";
}
/**
* Construct a new Profile Builder
* @param strict if true, the strict overrides will be copied to the profile
*
* @since 0.0.1
*/
public I2PChromiumProfileBuilder(boolean strict) {
// I2PChromiumProfileBuilder.strict = strict;
}
/*
* Copy the inert base profile directory to the runtime profile directory
*
* @since 0.0.1
*/
public static boolean copyBaseProfiletoProfile() {
String baseProfile = baseProfileDirectory();
String profile = profileDirectory();
System.out.println("Copying base profile to profile directory: " + baseProfile + " -> " + profile);
if (baseProfile.isEmpty() || profile.isEmpty()) {
return false;
}
File baseProfileDir = new File(baseProfile);
File profileDir = new File(profile);
try {
System.out.println("Copying base profile to profile directory");
copyDirectory(baseProfileDir, profileDir);
} catch (Exception e) {
System.out.println("Error copying base profile to profile"+e);
return false;
}
System.out.println("Copied base profile to profile directory");
// if user.js does not exist yet, make an empty one.
//if (!touch(profileDir.toString(), "user.js")) {
//return false;
//}
// if extensions does not exist yet, make an empty one.
//if (!mkExtensionsDir(profileDir.toString())){
//return false;
//}
return copyStrictOptions();
}
private static void copyDirectory(File sourceDirectory, File destinationDirectory) throws IOException {
destinationDirectory = new File(destinationDirectory.toString().replace("i2p.chromium.base.profile", ""));
if (!destinationDirectory.exists()) {
destinationDirectory.mkdir();
}
for (String f : sourceDirectory.list()) {
copyDirectoryCompatibityMode(new File(sourceDirectory, f), new File(destinationDirectory, f));
}
}
public static void copyDirectoryCompatibityMode(File source, File destination) throws IOException {
if (source.isDirectory()) {
copyDirectory(source, destination);
} else {
copyFile(source, destination);
}
}
private static void copyFile(File sourceFile, File destinationFile) throws IOException {
try (InputStream in = new FileInputStream(sourceFile);
OutputStream out = new FileOutputStream(destinationFile)) {
byte[] buf = new byte[1024];
int length;
while ((length = in.read(buf)) > 0) {
out.write(buf, 0, length);
}
}
}
/*
* Copy the strict options from the base profile to the profile
*
* @return true if successful, false otherwise
* @since 0.0.1
*/
public static boolean copyStrictOptions() {
if (!strict){
return true;
}
String baseProfile = baseProfileDirectory();
String profile = profileDirectory();
if (baseProfile.isEmpty() || profile.isEmpty()) {
return false;
}
File baseProfileDir = new File(baseProfile);
File profileDir = new File(profile);
if (!baseProfileDir.exists() || !profileDir.exists()) {
return false;
}
File baseOverrides = new File(baseProfile, "strict-overrides.js");
File userOverrides = new File(baseProfile, "user-overrides.js");
if (!baseOverrides.exists()) {
return false;
}
try {
Files.copy(baseOverrides.toPath(), userOverrides.toPath(), StandardCopyOption.REPLACE_EXISTING);
} catch (Exception e) {
System.out.println("Error copying base profile to profile"+e);
return false;
}
// if user-overrides.js does not exist yet, make an empty one.
//if (!touch(profileDir.toString(), "user-overrides.js")) {
//return false;
//}
return true;
}
/*
* Construct a new Profile Builder
*
* @since 0.0.1
*/
public I2PChromiumProfileBuilder() {
I2PChromiumProfileBuilder.strict = false;
}
/*
* Construct a new Profile Builder
* @param strict if true, the strict overrides will be copied to the profile
*
* @since 0.0.1
*/
public I2PChromiumProfileBuilder(boolean strict) {
I2PChromiumProfileBuilder.strict = strict;
}
}

View File

@@ -2,128 +2,83 @@ package net.i2p.i2pfirefox;
import java.io.File;
/**
* I2PChromiumProfileChecker.java
* Copyright (C) 2022 idk <hankhill19580@gmail.com>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the MIT License. See LICENSE.md for details.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* I2PChromiumProfileChecker is a class that checks if the Chromium profile
* directory exists and is valid.
*
* @author idk
* @since 0.0.1
*/
public class I2PChromiumProfileChecker extends I2PCommonBrowser {
/**
* Output feedback if the profile directory is valid or invalid
*
* @description Output feedback if the profile directory is valid or invalid
* @args unused
* @since 0.0.1
*/
public static void main(String[] args) {
String profileDirectory =
I2PChromiumProfileBuilder.profileDirectory("base");
if (profileDirectory == null) {
logger.info("No profile directory found");
return;
public class I2PChromiumProfileChecker {
public static void main(String[] args) {
String profileDirectory = I2PChromiumProfileBuilder.profileDirectory();
if (profileDirectory == null) {
System.out.println("No profile directory found");
return;
}
System.out.println("Profile directory: " + profileDirectory);
boolean ok = validateProfileDirectory(profileDirectory);
if (ok) {
System.out.println("Profile directory is valid");
} else {
System.out.println("Profile directory is invalid");
}
}
public static boolean validateProfileDirectory(String profileDirectory) {
File profileDir = new File(profileDirectory);
if (!profileDir.exists()) {
System.out.println("Profile directory does not exist");
return false;
}
if (!profileDir.isDirectory()) {
System.out.println("Profile directory is not a directory");
return false;
}
if (!profileDir.canRead()) {
System.out.println("Profile directory is not readable");
return false;
}
if (!profileDir.canWrite()) {
System.out.println("Profile directory is not writable");
return false;
}
if (!validateExtensionDirectory(profileDir+"/extensions")){
System.out.println("extensions directory is invalid");
return false;
}
return true;
}
logger.info("Profile directory: " + profileDirectory);
boolean ok = validateProfileDirectory(profileDirectory);
if (ok) {
logger.info("Profile directory is valid");
} else {
logger.info("Profile directory is invalid");
public static boolean validateFile(String file) {
File f = new File(file);
if (!f.exists()) {
System.out.println("User JavaScript file does not exist");
return false;
}
if (!f.isFile()) {
System.out.println("User JavaScript file is not a file");
return false;
}
if (!f.canRead()) {
System.out.println("User JavaScript file is not readable");
return false;
}
if (!f.canWrite()) {
System.out.println("User JavaScript file is not writable");
return false;
}
return true;
}
}
/**
* Return true if the profile directory is valid.
*
* @param profileDirectory the profile directory to check
* @return true if the profile directory is valid, false otherwise
* @since 0.0.1
*/
public static boolean validateProfileDirectory(String profileDirectory) {
File profileDir = new File(profileDirectory);
if (!profileDir.exists()) {
logger.info("Profile directory does not exist");
return false;
public static boolean validateExtensionDirectory(String extensionDirectory) {
File extensionDir = new File(extensionDirectory);
if (!extensionDir.exists()) {
System.out.println("Extension directory does not exist");
return false;
}
if (!extensionDir.isDirectory()) {
System.out.println("Extension directory is not a directory");
return false;
}
if (!extensionDir.canRead()) {
System.out.println("Extension directory is not readable");
return false;
}
if (!extensionDir.canWrite()) {
System.out.println("Extension directory is not writable");
return false;
}
return true;
}
if (!profileDir.isDirectory()) {
logger.info("Profile directory is not a directory");
return false;
}
if (!profileDir.canRead()) {
logger.info("Profile directory is not readable");
return false;
}
if (!profileDir.canWrite()) {
logger.info("Profile directory is not writable");
return false;
}
if (!validateExtensionDirectory(profileDir + "/extensions")) {
logger.info("extensions directory is invalid");
return false;
}
return true;
}
/**
* Return true if the file is valid.
*
* @param file the file to check
* @return true if the file is valid, false otherwise
* @since 0.0.1
*/
public static boolean validateFile(String file) {
File f = new File(file);
if (!f.exists()) {
logger.info("User JavaScript file does not exist");
return false;
}
if (!f.isFile()) {
logger.info("User JavaScript file is not a file");
return false;
}
if (!f.canRead()) {
logger.info("User JavaScript file is not readable");
return false;
}
if (!f.canWrite()) {
logger.info("User JavaScript file is not writable");
return false;
}
return true;
}
/**
* Return true if the extension directory is valid.
*
* @param extensionDirectory the extension directory to check
* @return true if the extension directory is valid, false otherwise
* @since 0.0.1
*/
public static boolean validateExtensionDirectory(String extensionDirectory) {
File extensionDir = new File(extensionDirectory);
if (!extensionDir.exists()) {
logger.info("Extension directory does not exist");
return false;
}
if (!extensionDir.isDirectory()) {
logger.info("Extension directory is not a directory");
return false;
}
if (!extensionDir.canRead()) {
logger.info("Extension directory is not readable");
return false;
}
if (!extensionDir.canWrite()) {
logger.info("Extension directory is not writable");
return false;
}
return true;
}
}

View File

@@ -1,42 +1,70 @@
package net.i2p.i2pfirefox;
/**
* I2PChromiumProfileUnpacker.java
* Copyright (C) 2022 idk <hankhill19580@gmail.com>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the MIT License. See LICENSE.md for details.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* I2PChromiumProfileUnpacker is a class that unpacks the Chromium profile zip
* file into the Chromium base profile directory. This is not used by the
* Chromium browser instance, it's unpacked to the disk to be copied to the
* active profile directory.
*
* @author idk
* @since 0.0.1
*/
public class I2PChromiumProfileUnpacker extends I2PCommonBrowser {
import java.io.File;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
public static void main(String[] args) {
String profileDirectory =
I2PChromiumProfileBuilder.profileDirectory("base");
if (profileDirectory == null) {
logger.info("No profile directory found");
return;
public class I2PChromiumProfileUnpacker {
public static void main(String[] args) {
String profileDirectory = I2PChromiumProfileBuilder.profileDirectory();
if (profileDirectory == null) {
System.out.println("No profile directory found");
return;
}
}
}
/**
* unpack the profile directory
*
* @return true if the profile directory was successfully unpacked
* @since 0.0.1
*/
public boolean unpackProfile(String profileDirectory, String mode) {
logger.info("Unpacking base profile to " + profileDirectory);
return unpackProfile(profileDirectory, "chromium", mode);
}
/*
* unpack the profile directory
*
* @return true if the profile directory was successfully unpacked
* @since 0.0.1
*/
public boolean unpackProfile(String profileDirectory) {
System.out.println("Unpacking base profile to " + profileDirectory);
try {
final InputStream resources = this.getClass().getClassLoader().getResourceAsStream("i2p.chromium.base.profile.zip");
if (resources == null) {
System.out.println("Could not find resources");
return false;
}
System.out.println(resources.toString());
// InputStream corresponds to a zip file. Unzip it.
//Files.copy(r, new File(profileDirectory).toPath(), StandardCopyOption.REPLACE_EXISTING);
ZipInputStream zis = new ZipInputStream(resources);
ZipEntry entry;
// while there are entries I process them
while ((entry = zis.getNextEntry()) != null)
{
System.out.println("entry: " + entry.getName() + ", " + entry.getSize());
// consume all the data from this entry
if (entry.isDirectory()) {
System.out.println("Creating directory: " + entry.getName());
File dir = new File(profileDirectory + "/" + entry.getName());
dir.mkdirs();
} else {
System.out.println("Creating file: " + entry.getName());
File file = new File(profileDirectory + "/" + entry.getName());
file.createNewFile();
Files.copy(zis, file.toPath(), StandardCopyOption.REPLACE_EXISTING);
}
while (zis.available() > 0)
zis.read();
// I could close the entry, but getNextEntry does it automatically
// zis.closeEntry()
}
// loop through the Enumeration
} catch (Exception e) {
System.out.println("Error copying profile files: " + e.getMessage());
return false;
}
return true;
}
}

View File

@@ -1,492 +0,0 @@
package net.i2p.i2pfirefox;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
import java.util.Arrays;
import java.util.Properties;
import java.util.logging.FileHandler;
import java.util.logging.Logger;
import java.util.logging.SimpleFormatter;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
/**
* I2PCommonBrowser.java
* Copyright (C) 2022 idk <hankhill19580@gmail.com>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the MIT License. See LICENSE.md for details.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
*
* @author idk
* @since 0.0.19
*/
public class I2PCommonBrowser {
static public Properties prop = new Properties();
static public Logger logger = Logger.getLogger("browserlauncher");
static FileHandler fh;
// private final int DEFAULT_TIMEOUT = 200;
private static int CONFIGURED_TIMEOUT = 200;
public I2PCommonBrowser() {
try {
// This block configure the logger with handler and formatter
fh = new FileHandler(logFile().toString());
logger.addHandler(fh);
SimpleFormatter formatter = new SimpleFormatter();
fh.setFormatter(formatter);
// the following statement is used to log any messages
logger.info("Browser log");
} catch (SecurityException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
loadPropertiesFile(new File(runtimeDirectory(""), "browser.config"));
}
public static void loadPropertiesFile(File props) {
try (InputStream propsInput = new FileInputStream(props)) {
prop = new Properties();
prop.load(propsInput);
System.out.println(prop);
} catch (IOException io) {
logger.warning(io.toString());
}
}
public static void validateUserDir() {
logger.info("Validating user directory");
String userDir = System.getProperty("user.dir");
String userHome = System.getProperty("user.home");
File userDirFile = new File(userDir);
File userHomeFile = new File(userHome);
logger.info("user.dir testing !" + userHomeFile.getAbsolutePath() +
".equals(" + userDirFile.getAbsolutePath() + ")");
if (!userDirFile.getAbsolutePath().contains("Program Files")) {
if (!userDirFile.getAbsolutePath().equals(
userHomeFile.getAbsolutePath())) {
logger.info("user.dir is not inconvenient");
if (userDirFile.exists()) {
logger.info("user.dir exists");
if (userDirFile.isDirectory()) {
logger.info("user.dir is a directory");
if (userDirFile.canWrite()) {
logger.info("user.dir is writable");
return;
} else {
logger.info("user.dir is not writable");
}
}
{ logger.info("user.dir is not actually a directory"); }
} else {
logger.info("user.dir does not exist");
}
} else {
logger.info("user.dir should not be the same as user.home");
}
} else {
logger.info("user.dir cannot run from inside Program Files");
}
if (isWindows())
userHome = new File(userHome, "AppData/Local/I2P").getAbsolutePath();
File defaultPathFile = new File(userHome, "i2p/i2pbrowser");
if (!defaultPathFile.exists())
defaultPathFile.mkdirs();
if (!defaultPathFile.isDirectory()) {
logger.info(
"default path exists and is not a directory, get it out of the way");
logger.info(defaultPathFile.getAbsolutePath());
}
System.setProperty("user.dir", defaultPathFile.getAbsolutePath());
}
public static String getOperatingSystem() {
String os = System.getProperty("os.name");
if (os.startsWith("Windows")) {
return "Windows";
} else if (os.contains("Linux")) {
return "Linux";
} else if (os.contains("BSD")) {
return "BSD";
} else if (os.contains("Mac")) {
return "Mac";
}
return "Unknown";
}
protected static boolean isWindows() {
String osName = System.getProperty("os.name");
logger.info("os.name" + osName);
if (osName.contains("windows"))
return true;
if (osName.contains("Windows"))
return true;
if (osName.contains("WINDOWS"))
return true;
return false;
}
protected static boolean isOSX() {
String osName = System.getProperty("os.name");
logger.info("os.name" + osName);
if (osName.contains("OSX"))
return true;
if (osName.contains("osx"))
return true;
if (osName.contains("mac"))
return true;
if (osName.contains("Mac"))
return true;
if (osName.contains("apple"))
return true;
if (osName.contains("Apple"))
return true;
if (osName.contains("Darwin"))
return true;
if (osName.contains("darwin"))
return true;
return false;
}
// public static void logger.info(String line) { logger.info(line); }
private static File logFile() {
validateUserDir();
String userDir = System.getProperty("user.dir");
File log = new File(userDir, "logs");
if (!log.exists())
log.mkdirs();
return new File(log, "browserlauncher.log");
}
/**
* get the runtime directory, creating it if create=true
*
* @param create if true, create the runtime directory if it does not exist
* @return the runtime directory, or null if it could not be created
* @since 0.0.19
*/
protected static File runtimeDirectory(boolean create, String override) {
String rtd = runtimeDirectory(override);
File rtdFile = new File(rtd);
if (create) {
if (!rtdFile.exists()) {
rtdFile.mkdir();
}
}
return new File(rtd);
}
/**
* get the correct runtime directory
*
* @return the runtime directory, or null if it could not be created or found
* @since 0.0.19
*/
protected static String runtimeDirectory(String override) {
// get the I2P_BROWSER_DIR environment variable
String rtd = System.getenv(override);
// if it is not null and not empty
if (rtd != null && !rtd.isEmpty()) {
// check if the file exists
File rtdFile = new File(rtd);
if (rtdFile.exists()) {
// if it does, return it
return rtd;
}
}
// obtain the PLUGIN environment variable
String plugin = System.getenv("PLUGIN");
if (plugin != null && !plugin.isEmpty()) {
File pluginDir = new File(plugin);
if (pluginDir.exists()) {
return pluginDir.toString();
}
}
String userDir = System.getProperty("user.dir");
if (userDir != null && !userDir.isEmpty()) {
File userDir1 = new File(userDir);
if (userDir1.exists()) {
return userDir1.toString();
}
}
String homeDir = System.getProperty("user.home");
if (homeDir != null && !homeDir.isEmpty()) {
File homeDir1 = new File(homeDir + "/.i2p");
if (homeDir1.exists()) {
return homeDir.toString();
}
File homeDir2 = new File(homeDir + "/i2p");
if (homeDir2.exists()) {
return homeDir2.toString();
}
}
return "";
}
/**
* get the profile directory, creating it if necessary
*
* @return the profile directory, or null if it could not be created
* @since 0.0.19
*/
protected static String profileDirectory(String envVar, String browser,
String base, boolean app) {
String pd = System.getenv(envVar);
if (pd != null && !pd.isEmpty()) {
File pdf = new File(pd);
if (pdf.exists() && pdf.isDirectory()) {
return pd;
}
}
String rtd = runtimeDirectory("");
return profileDir(rtd, browser, base, app);
}
protected static String profileDir(String file, String browser, String base,
boolean app) {
String appString = "";
if (app) {
appString = ".app";
}
File profileDir =
new File(file, "i2p." + browser + ".profile." + base + appString);
return profileDir.getAbsolutePath();
}
protected boolean unpackProfile(String profileDirectory, String browser,
String base) {
logger.info("Unpacking base profile to " + profileDirectory);
try {
final InputStream resources =
this.getClass().getClassLoader().getResourceAsStream(
"i2p." + browser + "." + base + ".profile.zip");
if (resources == null) {
logger.info("Could not find resources");
return false;
}
logger.info(resources.toString());
// InputStream corresponds to a zip file. Unzip it.
// Files.copy(r, new File(profileDirectory).toPath(),
// StandardCopyOption.REPLACE_EXISTING);
ZipInputStream zis = new ZipInputStream(resources);
ZipEntry entry;
// while there are entries I process them
while ((entry = zis.getNextEntry()) != null) {
logger.info("entry: " + entry.getName() + ", " + entry.getSize());
// consume all the data from this entry
if (entry.isDirectory()) {
logger.info("Creating directory: " + entry.getName());
File dir = new File(profileDirectory, entry.getName());
dir.mkdirs();
} else {
logger.info("Creating file: " + entry.getName());
File file = new File(profileDirectory, entry.getName());
file.createNewFile();
Files.copy(zis, file.toPath(), StandardCopyOption.REPLACE_EXISTING);
}
while (zis.available() > 0)
zis.read();
// I could close the entry, but getNextEntry does it automatically
// zis.closeEntry()
}
// loop through the Enumeration
} catch (Exception e) {
logger.info("Error copying profile files: " + e.getMessage());
return false;
}
return true;
}
protected static void copyDirectory(File sourceDirectory,
File destinationDirectory, String browser,
String base) throws IOException {
destinationDirectory = new File(destinationDirectory.toString().replace(
"i2p." + browser + "." + base + ".profile", ""));
if (!destinationDirectory.exists()) {
destinationDirectory.mkdir();
}
for (String f : sourceDirectory.list()) {
copyDirectoryCompatibilityMode(new File(sourceDirectory, f),
new File(destinationDirectory, f), browser,
base);
}
}
private static void
copyDirectoryCompatibilityMode(File source, File destination, String browser,
String base) throws IOException {
if (source.isDirectory()) {
copyDirectory(source, destination, browser, base);
} else {
copyFile(source, destination);
}
}
public static void copy(InputStream source, OutputStream target)
throws IOException {
byte[] buf = new byte[8192];
int length;
while ((length = source.read(buf)) != -1) {
target.write(buf, 0, length);
}
}
private static void copyFile(File sourceFile, File destinationFile)
throws IOException {
try (InputStream in = new FileInputStream(sourceFile);
OutputStream out = new FileOutputStream(destinationFile)) {
byte[] buf = new byte[1024];
int length;
while ((length = in.read(buf)) > 0) {
out.write(buf, 0, length);
}
}
}
public static boolean validateProfileFirstRun(String profileDirectory) {
File profileDir = new File(profileDirectory);
if (!profileDir.exists()) {
logger.info("Profile directory does not exist");
return false;
}
if (!profileDir.isDirectory()) {
logger.info("Profile directory is not a directory");
return false;
}
File frf = new File(profileDir, "first-run");
if (frf.exists()) {
frf.delete();
// is a first run
return true;
}
return false;
}
/**
* Waits for an HTTP proxy on port 4444 to be ready.
* Returns false on timeout of 200 seconds.
*
* @return true if the proxy is ready, false if it is not.
* @since 0.0.1
*/
public boolean waitForProxy() { return waitForProxy(CONFIGURED_TIMEOUT); }
/**
* Waits for an HTTP proxy on port 4444 to be ready.
* Returns false on timeout of the specified number of seconds.
*
* @param timeout the number of seconds to wait for the proxy to be ready.
* @return true if the proxy is ready, false if it is not.
* @since 0.0.1
*/
public boolean waitForProxy(int timeout) {
return waitForProxy(timeout, 4444);
}
/**
* Waits for an HTTP proxy on the specified port to be ready.
* Returns false on timeout of the specified number of seconds.
*
* @param timeout the number of seconds to wait for the proxy to be ready.
* @param port the port to wait for the proxy to be ready on.
* @return true if the proxy is ready, false if it is not.
* @since 0.0.1
*/
public boolean waitForProxy(int timeout, int port) {
return waitForProxy(timeout, port, "localhost");
}
/**
* Waits for an HTTP proxy on the specified port to be ready.
* Returns false on timeout of the specified number of seconds.
* If the timeout is zero or less, the check is disabled and always
* returns true.
*
* @param timeout the number of seconds to wait for the proxy to be ready.
* @param port the port to wait for the proxy to be ready on.
* @param host the host to wait for the proxy to be ready on.
* @return true if the proxy is ready, false if it is not.
* @since 0.0.1
*/
public boolean waitForProxy(int timeout, int port, String host) {
logger.info("waiting up to " + timeout + "seconds for a proxy");
if (timeout <= 0) {
return true;
}
for (int i = 0; i < timeout; i++) {
logger.info("Waiting for proxy");
if (checkifPortIsOccupied(port, host)) {
return true;
}
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
return false;
}
public boolean checkifPortIsOccupied(int port, String host) {
try {
Socket socket = new Socket(host, port);
socket.close();
return true;
} catch (IOException e) {
return false;
}
}
/**
* Alters the proxy timeout to customized value time, in seconds.
* May be zero.
*
* @param time
*/
public void setProxyTimeoutTime(int time) { CONFIGURED_TIMEOUT = time; }
/**
*
*/
protected static String join(String[] arr) {
StringBuilder val = new StringBuilder("");
for (int x = 0; x < arr.length; x++) {
val.append(" \"");
val.append(arr[x]);
val.append("\"");
}
return val.toString();
}
public static void sleep(int millis) {
try {
Thread.sleep(millis);
} catch (InterruptedException bad) {
bad.printStackTrace();
throw new RuntimeException(bad);
}
}
public static File searchFile(File file, String search) {
if (file.isDirectory()) {
File[] arr = file.listFiles();
for (File f : arr) {
File found = searchFile(f, search);
if (found != null)
return found;
}
} else {
if (file.getName().equals(search)) {
return file;
}
}
return null;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,345 +1,259 @@
package net.i2p.i2pfirefox;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
/**
* I2PFirefoxProfileBuilder.java
* Copyright (C) 2022 idk <hankhill19580@gmail.com>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the MIT License. See LICENSE.md for details.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* I2PFirefoxProfileBuilder is a class that builds a profile directory which
* contains the I2P browser profile for the Firefox browser family. It manages
* the base profile directory and copies it's contents to the active profile
* directory, which is actually used by Firefox.
*
* @author idk
* @since 0.0.1
*/
public class I2PFirefoxProfileBuilder extends I2PCommonBrowser {
private static boolean strict;
private static String userChromeCSS() {
String ret =
"@namespace url(\"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul\")\n";
public class I2PFirefoxProfileBuilder {
private static boolean strict;
/* only needed once */
ret += "@namespace html url(\" http : // www.w3.org/1999/xhtml\");\n";
ret += "#PersonalToolbar,\n";
ret += "#PanelUI-Button,\n";
ret += "#PanelUI-menu-button,\n";
ret += "#star-button,\n";
ret += "#forward-button,\n";
ret += "#home-button,\n";
ret += "#bookmarks-toolbar-button,\n";
ret += "#library-button,\n";
ret += "#sidebar-button,\n";
ret += "#pocket-button,\n";
ret += "#fxa-toolbar-menu-button,\n";
ret += "#reader-mode-button,\n";
ret += "#identity-icon {\n";
ret += " visibility: collapse;\n";
ret += "}\n";
ret += "\n";
ret += "#urlbar-background {\n";
ret += " background-color: black !important;\n";
ret += "}\n";
ret += "\n";
ret += "\n";
ret += "/* Remove back button circle */\n";
ret += "\n";
ret += "#back-button:not(:hover),\n";
ret += "#back-button:not(:hover)>.toolbarbutton-icon {\n";
ret += " background: transparent !important;\n";
ret += " border: none !important;\n";
ret += " box-shadow: none !important;\n";
ret += "}\n";
ret += "\n";
ret += "#back-button:hover,\n";
ret += "#back-button:hover>.toolbarbutton-icon {\n";
ret += " border: none !important;\n";
ret += " border-radius: 2px !important;\n";
ret += "}\n";
ret += "\n";
ret += "#urlbar-container {\n";
ret += " visibility: collapse !important;\n";
ret += "}\n";
ret += "\n";
ret += "#TabsToolbar-customization-target {\n";
ret += " min-width: 50vw;\n";
ret += " max-width: 50vw;\n";
ret += " width: 50vw;\n";
ret += "}\n";
ret += "\n";
ret += "#TabsToolbar {";
ret += " display: inherit;";
ret += "}";
ret += "\n";
ret += "toolbar {";
ret += " max-width: 50%;";
ret += "}";
ret += "\n";
ret += "#navigator-toolbox {";
ret += " display: inline-flex;";
ret += "}";
ret += "\n";
return ret;
}
/**
* get the profile directory, creating it if necessary
*
* @return the profile directory, or null if it could not be created
*/
// public static String profileDirectory() {
// return profileDirectory("I2P_FIREFOX_PROFILE", "firefox", false);
// }
/**
* get the profile directory, creating it if necessary
*
* @return the profile directory, or null if it could not be created
*/
public static String profileDirectory(boolean app, String base) {
return profileDirectory("I2P_FIREFOX_PROFILE", "firefox", base, app);
}
private static String baseProfileDir(String file, String base) {
File profileDir = new File(file, "i2p.firefox." + base + ".profile");
// make sure the directory exists
if (profileDir.exists()) {
return profileDir.getAbsolutePath();
} else {
// create the directory
I2PFirefoxProfileUnpacker unpacker = new I2PFirefoxProfileUnpacker();
if (!unpacker.unpackProfile(profileDir.getAbsolutePath(), base)) {
return null;
}
return profileDir.getAbsolutePath();
private static String profileDir(String file) {
File profileDir = new File(file, "i2p.firefox.profile");
return profileDir.getAbsolutePath();
}
}
/**
* get the base profile directory, creating it if necessary
*
* @return the base profile directory, or null if it could not be created
*/
public static String baseProfileDirectory(String base) {
String pd = System.getenv("I2P_FIREFOX_BASE_PROFILE");
if (pd != null && !pd.isEmpty()) {
File pdf = new File(pd);
if (pdf.exists() && pdf.isDirectory()) {
return pd;
} else {
I2PFirefoxProfileUnpacker unpacker = new I2PFirefoxProfileUnpacker();
if (!unpacker.unpackProfile(pdf.getAbsolutePath(), base)) {
return null;
/*
* get the profile directory, creating it if necessary
*
* @return the profile directory, or null if it could not be created
*/
public static String profileDirectory() {
String pd = System.getenv("I2P_FIREFOX_PROFILE");
if (pd != null && !pd.isEmpty()) {
File pdf = new File(pd);
if (pdf.exists() && pdf.isDirectory()) {
return pd;
}
}
}
String rtd = runtimeDirectory();
return profileDir(rtd);
}
String rtd = runtimeDirectory();
return baseProfileDir(rtd, base);
}
/**
* get the runtime directory, creating it if create=true
*
* @param create if true, create the runtime directory if it does not exist
* @return the runtime directory, or null if it could not be created
* @since 0.0.1
*/
public static File runtimeDirectory(boolean create) {
String rtd = runtimeDirectory();
return runtimeDirectory(create, rtd);
}
/**
* get the correct runtime directory
*
* @return the runtime directory, or null if it could not be created or found
* @since 0.0.1
*/
public static String runtimeDirectory() {
// get the I2P_FIREFOX_DIR environment variable
String rtd = System.getenv("I2P_FIREFOX_DIR");
// if it is not null and not empty
if (rtd != null && !rtd.isEmpty()) {
// check if the file exists
File rtdFile = new File(rtd);
if (rtdFile.exists()) {
// if it does, return it
return runtimeDirectory(rtd);
}
}
return runtimeDirectory("");
}
/**
* Copy the inert base profile directory to the runtime profile directory
*
* @since 0.0.1
*/
public static boolean copyBaseProfiletoProfile(String base, boolean app) {
String baseProfile = baseProfileDirectory(base);
String profile = profileDirectory(app, base);
logger.info("Copying base profile to profile directory: " + baseProfile +
" -> " + profile);
if (baseProfile.isEmpty() || profile.isEmpty()) {
return false;
}
File baseProfileDir = new File(baseProfile);
File profileDir = new File(profile);
if (!profileDir.exists()) {
try {
logger.info("Copying base profile to profile directory");
copyDirectory(baseProfileDir, profileDir, "firefox", base);
} catch (Exception e) {
logger.info("Error copying base profile to profile" + e);
return false;
}
logger.info("Copied base profile to profile directory");
}
// if user.js does not exist yet, make an empty one.
// if (!touch(profileDir.toString(), "user.js")) {
// return false;
//}
// if extensions does not exist yet, make an empty one.
// if (!mkExtensionsDir(profileDir.toString())){
// return false;
//}
return copyStrictOptions(base, app);
}
protected static boolean writeAppChrome(String profile) {
File dir = new File(profile, "chrome");
if (!dir.exists())
dir.mkdirs();
File f = new File(dir, "userChrome.css");
try {
Files.write(f.toPath(), userChromeCSS().getBytes());
} catch (IOException e) {
logger.warning(e.toString());
return false;
}
return true;
}
protected static boolean deleteAppChrome(String profile) {
File dir = new File(profile, "chrome");
if (!dir.exists())
return true;
File f = new File(dir, "userChrome.css");
if (f.exists())
f.delete();
return true;
}
/**
* Copy the strict options from the base profile to the profile
*
* @return true if successful, false otherwise
* @since 0.0.1
*/
public static boolean copyStrictOptions(String base, boolean app) {
logger.info("Checking strict options");
String baseProfile = baseProfileDirectory(base);
String profile = profileDirectory(app, base);
if (baseProfile.isEmpty() || profile.isEmpty()) {
logger.info("Empty paths");
return false;
}
File baseProfileDir = new File(baseProfile);
File profileDir = new File(profile);
setupUserChrome(profileDir, app);
if (!baseProfileDir.exists() || !profileDir.exists()) {
logger.info("Empty directories");
return false;
}
File baseOverrides = new File(baseProfile, "strict-overrides.js");
File userOverrides = new File(baseProfile, "user-overrides.js");
try {
if (baseOverrides.exists()) {
if (strict) {
logger.info("Enabling strict options");
Files.copy(baseOverrides.toPath(), userOverrides.toPath(),
StandardCopyOption.REPLACE_EXISTING);
return true;
private static String baseProfileDir(String file) {
File profileDir = new File(file, "i2p.firefox.base.profile");
// make sure the directory exists
if (profileDir.exists()) {
return profileDir.getAbsolutePath();
} else {
// create the directory
I2PFirefoxProfileUnpacker unpacker = new I2PFirefoxProfileUnpacker();
if (!unpacker.unpackProfile(profileDir.getAbsolutePath())) {
return null;
}
return profileDir.getAbsolutePath();
}
}
} catch (Exception e) {
logger.info("Error copying base profile to profile" + e);
return false;
}
logger.info("Done setting up fancy Firefox options");
return true;
}
public static void setupUserChrome(File profileDir, boolean app) {
File workingUserOverrides = new File(profileDir, "user-overrides.js");
logger.info(workingUserOverrides.getAbsolutePath());
if (workingUserOverrides.exists()) {
logger.info("Checking app mode settings");
if (app) {
logger.info("Setting profile to app mode");
I2PFirefoxProfileChecker.undoValue(
"toolkit.legacyUserProfileCustomizations.stylesheets\", false",
"toolkit.legacyUserProfileCustomizations.stylesheets\", true",
workingUserOverrides);
writeAppChrome(profileDir.toString());
} else {
logger.info("Taking profile out of app mode");
I2PFirefoxProfileChecker.undoValue(
"toolkit.legacyUserProfileCustomizations.stylesheets\", true",
"toolkit.legacyUserProfileCustomizations.stylesheets\", false",
workingUserOverrides);
deleteAppChrome(profileDir.toString());
}
/*
* get the base profile directory, creating it if necessary
*
* @return the base profile directory, or null if it could not be created
*/
public static String baseProfileDirectory() {
String pd = System.getenv("I2P_FIREFOX_BASE_PROFILE");
if (pd != null && !pd.isEmpty()) {
File pdf = new File(pd);
if (pdf.exists() && pdf.isDirectory()) {
return pd;
}else{
I2PFirefoxProfileUnpacker unpacker = new I2PFirefoxProfileUnpacker();
if (!unpacker.unpackProfile(pdf.getAbsolutePath())) {
return null;
}
}
}
String rtd = runtimeDirectory();
return baseProfileDir(rtd);
}
logger.info("Done setting up fancy Firefox options");
File workingPrefOverrides = new File(profileDir, "prefs.js");
logger.info(workingPrefOverrides.getAbsolutePath());
if (workingPrefOverrides.exists()) {
logger.info("Checking app mode settings");
if (app) {
logger.info("Setting profile to app mode");
I2PFirefoxProfileChecker.undoValue(
"toolkit.legacyUserProfileCustomizations.stylesheets\", false",
"toolkit.legacyUserProfileCustomizations.stylesheets\", true",
workingPrefOverrides);
writeAppChrome(profileDir.toString());
} else {
logger.info("Taking profile out of app mode");
I2PFirefoxProfileChecker.undoValue(
"toolkit.legacyUserProfileCustomizations.stylesheets\", true",
"toolkit.legacyUserProfileCustomizations.stylesheets\", false",
workingPrefOverrides);
deleteAppChrome(profileDir.toString());
}
/*
* get the runtime directory, creating it if create=true
*
* @param create if true, create the runtime directory if it does not exist
* @return the runtime directory, or null if it could not be created
* @since 0.0.1
*/
public static File runtimeDirectory(boolean create) {
String rtd = runtimeDirectory();
File rtdFile = new File(rtd);
if (create) {
if (!rtdFile.exists()) {
rtdFile.mkdir();
}
}
return new File(rtd);
}
}
/**
* Construct a new Profile Builder
*
* @since 0.0.1
*/
public I2PFirefoxProfileBuilder() { I2PFirefoxProfileBuilder.strict = false; }
/*
* get the correct runtime directory
*
* @return the runtime directory, or null if it could not be created or found
* @since 0.0.1
*/
public static String runtimeDirectory() {
// get the I2P_FIREFOX_DIR environment variable
String rtd = System.getenv("I2P_FIREFOX_DIR");
// if it is not null and not empty
if (rtd != null && !rtd.isEmpty()) {
// check if the file exists
File rtdFile = new File(rtd);
if (rtdFile.exists()) {
// if it does, return it
return rtd;
}
}
// obtain the PLUGIN environment variable
String plugin = System.getenv("PLUGIN");
if (plugin != null && !plugin.isEmpty()) {
File pluginDir = new File(plugin);
if (pluginDir.exists()) {
return pluginDir.toString();
}
}
String userDir = System.getProperty("user.dir");
if (userDir != null && !userDir.isEmpty()) {
File userDir1 = new File(userDir);
if (userDir1.exists()) {
return userDir1.toString();
}
}
String homeDir = System.getProperty("user.home");
if (homeDir != null && !homeDir.isEmpty()) {
File homeDir1 = new File(homeDir+"/.i2p");
if (homeDir1.exists()) {
return homeDir.toString();
}
File homeDir2 = new File(homeDir+"/i2p");
if (homeDir2.exists()) {
return homeDir2.toString();
}
}
return "";
}
/**
* Construct a new Profile Builder
* @param strict if true, the strict overrides will be copied to the profile
*
* @since 0.0.1
*/
public I2PFirefoxProfileBuilder(boolean strict) {
I2PFirefoxProfileBuilder.strict = strict;
}
/*
* Copy the inert base profile directory to the runtime profile directory
*
* @since 0.0.1
*/
public static boolean copyBaseProfiletoProfile() {
String baseProfile = baseProfileDirectory();
String profile = profileDirectory();
System.out.println("Copying base profile to profile directory: " + baseProfile + " -> " + profile);
if (baseProfile.isEmpty() || profile.isEmpty()) {
return false;
}
File baseProfileDir = new File(baseProfile);
File profileDir = new File(profile);
try {
System.out.println("Copying base profile to profile directory");
copyDirectory(baseProfileDir, profileDir);
} catch (Exception e) {
System.out.println("Error copying base profile to profile"+e);
return false;
}
System.out.println("Copied base profile to profile directory");
// if user.js does not exist yet, make an empty one.
//if (!touch(profileDir.toString(), "user.js")) {
//return false;
//}
// if extensions does not exist yet, make an empty one.
//if (!mkExtensionsDir(profileDir.toString())){
//return false;
//}
return copyStrictOptions();
}
private static void copyDirectory(File sourceDirectory, File destinationDirectory) throws IOException {
destinationDirectory = new File(destinationDirectory.toString().replace("i2p.firefox.base.profile", ""));
if (!destinationDirectory.exists()) {
destinationDirectory.mkdir();
}
for (String f : sourceDirectory.list()) {
copyDirectoryCompatibityMode(new File(sourceDirectory, f), new File(destinationDirectory, f));
}
}
public static void copyDirectoryCompatibityMode(File source, File destination) throws IOException {
if (source.isDirectory()) {
copyDirectory(source, destination);
} else {
copyFile(source, destination);
}
}
private static void copyFile(File sourceFile, File destinationFile) throws IOException {
try (InputStream in = new FileInputStream(sourceFile);
OutputStream out = new FileOutputStream(destinationFile)) {
byte[] buf = new byte[1024];
int length;
while ((length = in.read(buf)) > 0) {
out.write(buf, 0, length);
}
}
}
/*
* Copy the strict options from the base profile to the profile
*
* @return true if successful, false otherwise
* @since 0.0.1
*/
public static boolean copyStrictOptions() {
if (!strict){
return true;
}
String baseProfile = baseProfileDirectory();
String profile = profileDirectory();
if (baseProfile.isEmpty() || profile.isEmpty()) {
return false;
}
File baseProfileDir = new File(baseProfile);
File profileDir = new File(profile);
if (!baseProfileDir.exists() || !profileDir.exists()) {
return false;
}
File baseOverrides = new File(baseProfile, "strict-overrides.js");
File userOverrides = new File(baseProfile, "user-overrides.js");
if (!baseOverrides.exists()) {
return false;
}
try {
Files.copy(baseOverrides.toPath(), userOverrides.toPath(), StandardCopyOption.REPLACE_EXISTING);
} catch (Exception e) {
System.out.println("Error copying base profile to profile"+e);
return false;
}
// if user-overrides.js does not exist yet, make an empty one.
//if (!touch(profileDir.toString(), "user-overrides.js")) {
//return false;
//}
return true;
}
/*
* Construct a new Profile Builder
*
* @since 0.0.1
*/
public I2PFirefoxProfileBuilder() {
I2PFirefoxProfileBuilder.strict = false;
}
/*
* Construct a new Profile Builder
* @param strict if true, the strict overrides will be copied to the profile
*
* @since 0.0.1
*/
public I2PFirefoxProfileBuilder(boolean strict) {
I2PFirefoxProfileBuilder.strict = strict;
}
}

View File

@@ -1,220 +1,92 @@
package net.i2p.i2pfirefox;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
/**
* I2PFirefoxProfileChecker.java
* Copyright (C) 2022 idk <hankhill19580@gmail.com>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the MIT License. See LICENSE.md for details.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* I2PFirefoxProfileChecker is a class that checks if the Firefox profile
* directory exists and is valid.
*
* @author idk
* @since 0.0.1
*/
public class I2PFirefoxProfileChecker extends I2PCommonBrowser {
/**
* @param args unused
*/
public static void main(String[] args) {
String profileDirectory =
I2PFirefoxProfileBuilder.profileDirectory(false, "base");
if (profileDirectory == null) {
logger.info("No profile directory found");
return;
}
logger.info("Profile directory: " + profileDirectory);
boolean ok = validateProfileDirectory(profileDirectory);
if (ok) {
logger.info("Profile directory is valid");
} else {
logger.info("Profile directory is invalid");
}
}
/**
* Return true if the profile directory is valid.
*
* @param profileDirectory the profile directory to check
* @return true if the profile directory is valid, false otherwise
* @since 0.0.1
*/
public static boolean validateProfileDirectory(String profileDirectory) {
File profileDir = new File(profileDirectory);
if (!profileDir.exists()) {
logger.info("Profile directory does not exist");
return false;
}
if (!profileDir.isDirectory()) {
logger.info("Profile directory is not a directory");
return false;
}
if (!profileDir.canRead()) {
logger.info("Profile directory is not readable");
return false;
}
if (!profileDir.canWrite()) {
logger.info("Profile directory is not writable");
return false;
}
if (!validateFile(profileDir + "/prefs.js")) {
logger.info("prefs.js is not valid");
return false;
}
if (!validateFile(profileDir + "/user.js")) {
logger.info("user.js is not valid");
return false;
}
if (!validateExtensionDirectory(profileDir + "/extensions")) {
logger.info("extensions directory is invalid");
return false;
}
return deRestrictHTTPSAndSetupHomepage(profileDir.toString());
}
private static boolean deRestrictHTTPSAndSetupHomepage(String profile) {
// String profile = profileDirectory();
File profileDir = new File(profile);
if (profileDir.exists()) {
File prefOverrides = new File(profile, "prefs.js");
if (prefOverrides.exists()) {
undoHttpsOnlyMode(prefOverrides);
undoHomepage(prefOverrides);
}
File userSettings = new File(profile, "user.js");
if (userSettings.exists()) {
undoHttpsOnlyMode(userSettings);
undoHomepage(userSettings);
}
File userOverrides = new File(profile, "user-overrides.js");
if (userOverrides.exists()) {
undoHttpsOnlyMode(userOverrides);
undoHomepage(userOverrides);
}
}
return false;
}
private static boolean undoHttpsOnlyMode(File fileToBeModified) {
String oldString = "\"dom.security.https_only_mode\", true";
String newString = "\"dom.security.https_only_mode\", false";
return undoValue(oldString, newString, fileToBeModified);
}
private static boolean undoHomepage(File fileToBeModified) {
String oldString = "\"browser.startup.homepage\", true";
File file = new File("Student.txt");
String newString =
"\"browser.startup.homepage\", \"http://127.0.0.1:7657\"";
try {
try (Scanner scanner = new Scanner(file)) {
// now read the file line by line...
while (scanner.hasNextLine()) {
String line = scanner.nextLine();
if (line.contains("browser.startup.homepage")) {
oldString = line.toString();
return undoValue(oldString, newString, fileToBeModified);
}
public class I2PFirefoxProfileChecker {
public static void main(String[] args) {
String profileDirectory = I2PFirefoxProfileBuilder.profileDirectory();
if (profileDirectory == null) {
System.out.println("No profile directory found");
return;
}
System.out.println("Profile directory: " + profileDirectory);
boolean ok = validateProfileDirectory(profileDirectory);
if (ok) {
System.out.println("Profile directory is valid");
} else {
System.out.println("Profile directory is invalid");
}
}
public static boolean validateProfileDirectory(String profileDirectory) {
File profileDir = new File(profileDirectory);
if (!profileDir.exists()) {
System.out.println("Profile directory does not exist");
return false;
}
if (!profileDir.isDirectory()) {
System.out.println("Profile directory is not a directory");
return false;
}
if (!profileDir.canRead()) {
System.out.println("Profile directory is not readable");
return false;
}
if (!profileDir.canWrite()) {
System.out.println("Profile directory is not writable");
return false;
}
if (!validateFile(profileDir+"/prefs.js")){
System.out.println("prefs.js is not valid");
return false;
}
if (!validateFile(profileDir+"/user.js")){
System.out.println("user.js is not valid");
return false;
}
if (!validateExtensionDirectory(profileDir+"/extensions")){
System.out.println("extensions directory is invalid");
return false;
}
}
} catch (FileNotFoundException e) {
// handle this
}
return true;
}
public static boolean undoValue(String oldString, String newString,
File fileToBeModified) {
String oldContent = "";
BufferedReader reader = null;
FileWriter writer = null;
try {
reader = new BufferedReader(new FileReader(fileToBeModified));
String line = reader.readLine();
while (line != null) {
oldContent = oldContent + line + System.lineSeparator();
line = reader.readLine();
}
String newContent = oldContent.replaceAll(oldString, newString);
writer = new FileWriter(fileToBeModified);
writer.write(newContent);
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
reader.close();
writer.close();
return true;
} catch (IOException e) {
e.printStackTrace();
}
}
return false;
}
/**
* Return true if the file is valid.
*
* @param file the file to check
* @return true if the file is valid, false otherwise
* @since 0.0.1
*/
public static boolean validateFile(String file) {
File f = new File(file);
if (!f.exists()) {
logger.info("User JavaScript file does not exist");
return false;
public static boolean validateFile(String file) {
File f = new File(file);
if (!f.exists()) {
System.out.println("User JavaScript file does not exist");
return false;
}
if (!f.isFile()) {
System.out.println("User JavaScript file is not a file");
return false;
}
if (!f.canRead()) {
System.out.println("User JavaScript file is not readable");
return false;
}
if (!f.canWrite()) {
System.out.println("User JavaScript file is not writable");
return false;
}
return true;
}
if (!f.isFile()) {
logger.info("User JavaScript file is not a file");
return false;
public static boolean validateExtensionDirectory(String extensionDirectory) {
File extensionDir = new File(extensionDirectory);
if (!extensionDir.exists()) {
System.out.println("Extension directory does not exist");
return false;
}
if (!extensionDir.isDirectory()) {
System.out.println("Extension directory is not a directory");
return false;
}
if (!extensionDir.canRead()) {
System.out.println("Extension directory is not readable");
return false;
}
if (!extensionDir.canWrite()) {
System.out.println("Extension directory is not writable");
return false;
}
return true;
}
if (!f.canRead()) {
logger.info("User JavaScript file is not readable");
return false;
}
if (!f.canWrite()) {
logger.info("User JavaScript file is not writable");
return false;
}
return true;
}
/**
* Return true if the extension directory is valid.
*
* @param extensionDirectory the extension directory to check
* @return true if the extension directory is valid, false otherwise
* @since 0.0.1
*/
public static boolean validateExtensionDirectory(String extensionDirectory) {
File extensionDir = new File(extensionDirectory);
if (!extensionDir.exists()) {
logger.info("Extension directory does not exist");
return false;
}
if (!extensionDir.isDirectory()) {
logger.info("Extension directory is not a directory");
return false;
}
if (!extensionDir.canRead()) {
logger.info("Extension directory is not readable");
return false;
}
if (!extensionDir.canWrite()) {
logger.info("Extension directory is not writable");
return false;
}
return true;
}
}

View File

@@ -1,41 +1,70 @@
package net.i2p.i2pfirefox;
/**
* I2PFirefoxProfileUnpacker.java
* Copyright (C) 2022 idk <hankhill19580@gmail.com>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the MIT License. See LICENSE.md for details.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* I2PFirefoxProfileUnpacker is a class that unpacks the I2P Firefox profile
* from a zip file embedded in the `jar` file. The zip is unpacked to a base
* directory where it is left untouched, and the base profile is copied to the
* active profile directory.
*
* @author idk
* @since 0.0.1
*/
public class I2PFirefoxProfileUnpacker extends I2PCommonBrowser {
import java.io.File;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
public static void main(String[] args) {
String profileDirectory =
I2PFirefoxProfileBuilder.profileDirectory(false, "base");
if (profileDirectory == null) {
logger.info("No profile directory found");
return;
public class I2PFirefoxProfileUnpacker {
public static void main(String[] args) {
String profileDirectory = I2PFirefoxProfileBuilder.profileDirectory();
if (profileDirectory == null) {
System.out.println("No profile directory found");
return;
}
}
}
/**
* unpack the profile directory
*
* @return true if the profile directory was successfully unpacked
* @since 0.0.1
*/
public boolean unpackProfile(String profileDirectory, String base) {
return unpackProfile(profileDirectory, "firefox", base);
}
/*
* unpack the profile directory
*
* @return true if the profile directory was successfully unpacked
* @since 0.0.1
*/
public boolean unpackProfile(String profileDirectory) {
System.out.println("Unpacking base profile to " + profileDirectory);
try {
final InputStream resources = this.getClass().getClassLoader().getResourceAsStream("i2p.firefox.base.profile.zip");
if (resources == null) {
System.out.println("Could not find resources");
return false;
}
System.out.println(resources.toString());
// InputStream corresponds to a zip file. Unzip it.
//Files.copy(r, new File(profileDirectory).toPath(), StandardCopyOption.REPLACE_EXISTING);
ZipInputStream zis = new ZipInputStream(resources);
ZipEntry entry;
// while there are entries I process them
while ((entry = zis.getNextEntry()) != null)
{
System.out.println("entry: " + entry.getName() + ", " + entry.getSize());
// consume all the data from this entry
if (entry.isDirectory()) {
System.out.println("Creating directory: " + entry.getName());
File dir = new File(profileDirectory + "/" + entry.getName());
dir.mkdirs();
} else {
System.out.println("Creating file: " + entry.getName());
File file = new File(profileDirectory + "/" + entry.getName());
file.createNewFile();
Files.copy(zis, file.toPath(), StandardCopyOption.REPLACE_EXISTING);
}
while (zis.available() > 0)
zis.read();
// I could close the entry, but getNextEntry does it automatically
// zis.closeEntry()
}
// loop through the Enumeration
} catch (Exception e) {
System.out.println("Error copying profile files: " + e.getMessage());
return false;
}
return true;
}
}

View File

@@ -1,445 +0,0 @@
package net.i2p.i2pfirefox;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
import java.util.stream.Collectors;
/**
* I2PChromiumProfileChecker.java
* Copyright (C) 2022 idk <hankhill19580@gmail.com>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the MIT License. See LICENSE.md for details.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* I2PGenericUnsafeBrowser is a wrapper which sets common environment
* variables for the process controlled by a processbuilder.
*
* ALWAYS ALWAYS ALWAYS try the Firefox and Chromium specific launchers
* first.
*
* @author idk
* @since 0.0.18
*/
public class I2PGenericUnsafeBrowser extends I2PCommonBrowser {
private final int DEFAULT_TIMEOUT = 200;
public static String BROWSER = "";
private Process p = null;
// Ideally, EVERY browser in this list should honor http_proxy, https_proxy,
// ftp_proxy and no_proxy. in practice, this is going to be hard to guarantee.
// For now, we're just assuming. So don't use this until I understand the
// situation better, unless you think you know better.
private static String[] browsers() {
String genericPathsProp = prop.getProperty("generic.bins.unix");
if (genericPathsProp != null)
return genericPathsProp.split(",");
return new String[] {
// This debian script tries everything in $BROWSER, then
// gnome-www-browser
// and x-www-browser
// if X is running and www-browser otherwise. Those point to the user's
// preferred
// browser using the update-alternatives system.
"sensible-browser",
// another one that opens a preferred browser
"xdg-open",
// Try x-www-browser directly
"x-www-browser", "gnome-www-browser",
// general graphical browsers that aren't Firefox or Chromium based
"defaultbrowser", // puppy linux
"dillo", "seamonkey", "konqueror", "galeon", "surf",
// Text Mode Browsers only below here
"www-browser", "links", "lynx"};
}
public static void storeGenericDefaults() {
List<String> list = new ArrayList<String>();
list = Arrays.asList(browsers());
prop.setProperty("generic.bins.unix",
list.stream().collect(Collectors.joining(",")));
try (OutputStream fos = new FileOutputStream(
new File(runtimeDirectory(""), "browser.config"))) {
prop.store(fos, "Chromium Configuration Section");
} catch (IOException ioe) {
logger.warning(ioe.toString());
}
}
/**
* Obtains the default browser for the Windows platform, which by now should
* be Edgium in the worst-case scenario but in case it isn't, we can use this
* function to figure it out. It can find:
*
* 1. The current user's HTTPS default browser if they configured it to be
* non-default
* 2. The current user's HTTP default browser if they configured it to be
* non-default
* 3. Edgium if it's available
* 4. iexplore if it's not
*
* and it will return the first one we find in exactly that order.
*
* Adapted from:
* https://stackoverflow.com/questions/15852885/me...
*
* @param url containing full scheme, i.e. http://127.0.0.1:7657
* @return path to command[0] and target URL[1] to the default browser ready
* for execution, or null if not found
* @since 2.0.0
*/
static public String getDefaultWindowsBrowser() {
String defaultBrowser;
String key;
// User-Configured HTTPS Browser
key =
"HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\Shell\\Associations\\URLAssociations\\https\\UserChoice";
defaultBrowser = getDefaultOutOfRegistry(key);
if (defaultBrowser != null)
return defaultBrowser;
// User-Configure HTTP Browser
key =
"HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\Shell\\Associations\\URLAssociations\\http\\UserChoice";
defaultBrowser = getDefaultOutOfRegistry(key);
if (defaultBrowser != null)
return defaultBrowser;
// MSEdge on pretty much everything after Windows 7
key = "HKEY_CLASSES_ROOT\\MSEdgeHTM\\shell\\open\\command";
defaultBrowser = getDefaultOutOfRegistry(key);
if (defaultBrowser != null) {
return defaultBrowser;
}
// iexplore usually, depends on the Windows, sometimes Edge
key = "HKEY_CLASSES_ROOT\\http\\shell\\open\\command";
defaultBrowser = getDefaultOutOfRegistry(key);
if (defaultBrowser != null) {
return defaultBrowser;
}
defaultBrowser = "C:\\Program Files\\Internet Explorer\\iexplore.exe";
return defaultBrowser;
}
/**
* obtains a value matching a key contained in the windows registry at a
* path represented by hkeyquery
*
* @param hkeyquery registry entry to ask for.
* @param key key to retrieve value from
* @return either a registry "Default" value or null if one does not
* exist/is empty
* @since 2.0.0
*/
private static String registryQuery(String hkeyquery, String key) {
try {
// Get registry where we find the default browser
String[] cmd = {"REG", "QUERY", hkeyquery};
Process process = Runtime.getRuntime().exec(cmd);
Scanner kb = new Scanner(process.getInputStream());
while (kb.hasNextLine()) {
String line = kb.nextLine().trim();
if (line.startsWith(key)) {
String[] splitLine = line.split(" ");
kb.close();
String finalValue = splitLine[splitLine.length - 1].trim();
if (!finalValue.equals("")) {
return finalValue;
}
}
}
// Match wasn't found, still need to close Scanner
kb.close();
} catch (Exception e) {
logger.warning(e.toString());
}
return null;
}
/**
* If following a query back to the Default value doesn't work then what
* we have is a "ProgID" which will be registered in
* \HKEY_CLASSES_ROOT\%ProgId%, and will have an entry \shell\open\command,
* where \shell\open\command yields the value that contains the command it
* needs. This function takes a registry query in the same format as
* getDefaultOutOfRegistry but instead of looking for the default entry
*
* @param hkeyquery
* @return the command required to run the application referenced in
* hkeyquery, or null
* @since 2.0.0
*/
private static String followUserConfiguredBrowserToCommand(String hkeyquery) {
String progIdValue = registryQuery(hkeyquery, "ProgId");
return followProgIdToCommand(progIdValue);
}
/**
* Cross-references a progId obtained by
* followUserConfiguredBrowserToCommand against
* HKEY_CLASSES_ROOT\%ProgId%\shell\open\command, which holds the value of
* the command which we need to run to launch the default browser.
*
* @param hkeyquery
* @return the command required to run the application referenced in
* hkeyquery, or null
* @since 2.0.0
*/
private static String followProgIdToCommand(String progid) {
String hkeyquery =
"HKEY_CLASSES_ROOT\\" + progid + "\\shell\\open\\command";
String finalValue = registryQuery(hkeyquery, "(Default)");
if (finalValue != null) {
if (!finalValue.equals(""))
return finalValue;
}
return null;
}
/**
* obtains a default browsing command out of the Windows registry.
*
* @param hkeyquery registry entry to ask for.
* @return either a registry "Default" value or null if one does not
* exist/is empty
* @since 2.0.0
*/
private static String getDefaultOutOfRegistry(String hkeyquery) {
String defaultValue = registryQuery(hkeyquery, "(Default)");
if (defaultValue != null) {
if (!defaultValue.equals(""))
return defaultValue;
} else {
defaultValue = followUserConfiguredBrowserToCommand(hkeyquery);
if (defaultValue != null) {
if (!defaultValue.equals(""))
return defaultValue;
}
}
return null;
}
private static String scanAPath(String dir) {
for (String browser : browsers()) {
File test = new File(dir, browser);
if (test.exists()) {
return test.getAbsolutePath();
}
}
return "";
}
/**
* Find any browser in our list within a UNIX path
*
* @return
*/
public static String getAnyUnixBrowser() {
// read the PATH environment variable and split it by ":"
String[] path = System.getenv("PATH").split(":");
if (path != null && path.length > 0) {
for (String p : path) {
String f = scanAPath(p);
if (f != "") {
return f;
}
}
}
return "";
}
/**
* Find any usable browser and output the whole path
*
* @return
*/
public static String findUnsafeBrowserAnywhere() {
if (BROWSER != "") {
File f = new File(BROWSER);
if (f.exists())
return f.getAbsolutePath();
}
if (getOperatingSystem() == "Windows") {
return getDefaultWindowsBrowser();
}
return getAnyUnixBrowser();
}
//
public ProcessBuilder baseProcessBuilder(String[] args) {
String browser = findUnsafeBrowserAnywhere().split(" -")[0].trim();
if (browser == null)
System.exit(1);
if (browser.contains("edge.exe") || browser.contains("msedge.exe")) {
ArrayList<String> argsList = new ArrayList<String>(
Arrays.asList("--user-data-dir=" +
profileDirectory("", "generic", "unsafe", false)));
argsList.addAll(Arrays.asList(args));
args = argsList.toArray(args);
}
if (!browser.isEmpty()) {
int arglength = 0;
if (args != null)
arglength = args.length;
String[] newArgs = new String[arglength + 1];
newArgs[0] = browser;
if (args != null && arglength > 0) {
for (int i = 0; i < arglength; i++) {
newArgs[i + 1] = args[i];
}
}
ProcessBuilder pb =
new ProcessBuilder(newArgs).directory(runtimeDirectory(true));
pb.environment().put("http_proxy", "http://127.0.0.1:4444");
pb.environment().put("https_proxy", "http://127.0.0.1:4444");
pb.environment().put("ftp_proxy", "http://127.0.0.1:0");
pb.environment().put("all_proxy", "http://127.0.0.1:4444");
pb.environment().put("no_proxy", "http://127.0.0.1:7657");
pb.environment().put("HTTP_PROXY", "http://127.0.0.1:4444");
pb.environment().put("HTTPS_PROXY", "http://127.0.0.1:4444");
pb.environment().put("FTP_PROXY", "http://127.0.0.1:0");
pb.environment().put("ALL_PROXY", "http://127.0.0.1:4444");
pb.environment().put("NO_PROXY", "http://127.0.0.1:7657");
return pb;
} else {
logger.info("No Browser found.");
return new ProcessBuilder(args);
}
}
/**
* delete the runtime directory
*
* @return true if successful, false if not
*/
public static boolean deleteRuntimeDirectory() {
File rtd = runtimeDirectory(true);
if (rtd.exists()) {
rtd.delete();
return true;
}
return false;
}
/**
* get the runtime directory, creating it if create=true
*
* @param create if true, create the runtime directory if it does not exist
* @return the runtime directory, or null if it could not be created
* @since 0.0.18
*/
public static File runtimeDirectory(boolean create) {
String rtd = runtimeDirectory();
return runtimeDirectory(create, rtd);
}
/**
* get the correct runtime directory
*
* @return the runtime directory, or null if it could not be created or
* found
* @since 0.0.18
*/
public static String runtimeDirectory() {
// get the I2P_BROWSER_DIR environment variable
String rtd = System.getenv("I2P_BROWSER_DIR");
// if it is not null and not empty
if (rtd != null && !rtd.isEmpty()) {
// check if the file exists
File rtdFile = new File(rtd);
if (rtdFile.exists()) {
// if it does, return it
return rtd;
}
}
return runtimeDirectory("");
}
public Process launchAndDetatch(boolean privateWindow, String[] url) {
validateUserDir();
if (waitForProxy()) {
ProcessBuilder pb;
if (privateWindow) {
pb = baseProcessBuilder(url);
} else {
pb = baseProcessBuilder(url);
}
try {
logger.info(pb.command().toString());
p = pb.start();
logger.info("I2PBrowser");
sleep(2000);
return p;
} catch (Throwable e) {
logger.info(e.toString());
}
}
return null;
}
public void launch(boolean privateWindow, String[] url) {
if (waitForProxy()) {
p = launchAndDetatch(privateWindow, url);
try {
logger.info("Waiting for I2PBrowser to close...");
int exit = p.waitFor();
if (privateWindow) {
if (deleteRuntimeDirectory())
logger.info(
"Private browsing enforced, deleting runtime directory");
}
logger.info("I2PBrowser exited with value: " + exit);
} catch (Exception e) {
logger.info("Error: " + e.getMessage());
}
}
}
private static String ValidURL(String inUrl) {
String[] schemes = {"http", "https"};
for (String scheme : schemes) {
if (inUrl.startsWith(scheme)) {
logger.info("Valid URL: " + inUrl);
return inUrl;
}
}
return "";
}
//
public static void main(String[] args) {
validateUserDir();
boolean privateBrowsing = false;
logger.info("checking for private browsing");
ArrayList<String> visitURL = new ArrayList<String>();
if (args != null) {
if (args.length > 0) {
for (String arg : args) {
if (arg.equals("-private")) {
privateBrowsing = true;
logger.info(
"private browsing is true, profile will be discarded at end of session");
}
if (!arg.startsWith("-")) {
// check if it's a URL
visitURL.add(ValidURL(arg));
}
}
}
}
logger.info("I2PGenericUnsafeBrowser");
I2PGenericUnsafeBrowser i2pBrowser = new I2PGenericUnsafeBrowser();
i2pBrowser.launch(privateBrowsing,
visitURL.toArray(new String[visitURL.size()]));
}
}

View File

@@ -1,74 +0,0 @@
package net.i2p.i2pfirefox;
import java.io.File;
//import org.lobobrowser.main;
public class I2PPureJavaBrowser extends I2PCommonBrowser {
private final int DEFAULT_TIMEOUT = 200;
public static String BROWSER = "";
//
public ProcessBuilder baseProcessBuilder(String[] args) {
return null;
}
/**
* delete the runtime directory
*
* @return true if successful, false if not
*/
public static boolean deleteRuntimeDirectory() {
File rtd = runtimeDirectory(true);
if (rtd.exists()) {
rtd.delete();
return true;
}
return false;
}
/**
* get the runtime directory, creating it if create=true
*
* @param create if true, create the runtime directory if it does not exist
* @return the runtime directory, or null if it could not be created
* @since 0.0.18
*/
public static File runtimeDirectory(boolean create) {
String rtd = runtimeDirectory();
return runtimeDirectory(create, rtd);
}
/**
* get the correct runtime directory
*
* @return the runtime directory, or null if it could not be created or
* found
* @since 0.0.18
*/
public static String runtimeDirectory() {
// get the I2P_BROWSER_DIR environment variable
String rtd = System.getenv("I2P_BROWSER_DIR");
// if it is not null and not empty
if (rtd != null && !rtd.isEmpty()) {
// check if the file exists
File rtdFile = new File(rtd);
if (rtdFile.exists()) {
// if it does, return it
return rtd;
}
}
return runtimeDirectory("");
}
public Process launchAndDetatch(boolean privateWindow, String[] url) {
return null;
}
public void launch(boolean privateWindow, String[] url) {
}
public static void main(String[] args) {
}
}

50
src/jsp/WEB-INF/web.xml Normal file
View File

@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<!-- precompiled servlets -->
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<servlet-mapping>
<servlet-name>net.i2p.i2pfirefox.index_jsp</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>net.i2p.i2pfirefox.index_jsp</servlet-name>
<url-pattern>/index</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>net.i2p.i2pfirefox.index_jsp</servlet-name>
<url-pattern>/index.html</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>net.i2p.i2pfirefox.announce_jsp</servlet-name>
<url-pattern>/announce.php</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>net.i2p.i2pfirefox.announce_jsp</servlet-name>
<url-pattern>/announce</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>net.i2p.i2pfirefox.announce_jsp</servlet-name>
<url-pattern>/a</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>net.i2p.i2pfirefox.scrape_jsp</servlet-name>
<url-pattern>/scrape</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>net.i2p.i2pfirefox.scrape_jsp</servlet-name>
<url-pattern>/scrape.php</url-pattern>
</servlet-mapping>
</web-app>

23
src/jsp/index.jsp Normal file
View File

@@ -0,0 +1,23 @@
<%@page trimDirectiveWhitespaces="true"%>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<noscript><meta http-equiv="refresh" content="300;url=."></noscript>
<title>I2P Browser Manager</title>
<link href="/firefox.css" rel="stylesheet" type="text/css">
<link rel="icon" type="image/png" href="/favicon.png">
</head>
<body id="stats">
<div id="container">
<div id="panel">
<a href="/" title="Return to home page" alt="Return to home page"><span id="sitename">I2P Browser Manager</span></a><hr>
</p>
</p>
<span id="footer" class="version">I2P Browser Manager</span>
</div>
</div>
<script type="text/javascript">
</script>
</body>
</html>

View File

@@ -36,7 +36,6 @@ img {
left: 5%;
max-width: 60%;
display: inline;
padding-right: 2%;
}
.inline {
@@ -154,12 +153,5 @@ input {
#navbar {
float: right;
width: 15%;
}
#returnhome {
font-size: xxx-large;
display: inline;
}
h1 {
display: inline;
width: 10%;
}

8
test-chromium.sh Executable file
View File

@@ -0,0 +1,8 @@
#! /usr/bin/env sh
GITHUB_USER=eyedeekay
GITHUB_REPO=i2p.plugins.firefox
ant distclean
cd src && \
ant && cd ../
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PChromium

8
test.sh Executable file
View File

@@ -0,0 +1,8 @@
#! /usr/bin/env sh
GITHUB_USER=eyedeekay
GITHUB_REPO=i2p.plugins.firefox
ant distclean
cd src && \
ant && cd ../
./i2pbrowser.cmd

View File

@@ -1,35 +0,0 @@
#! /usr/bin/env sh
ant distclean
ant jar
rm -rf i2p.chromium.base.profile i2p.chromium.profile i2p.firefox.base.profile i2p.firefox.profile i2p.firefox.usability.profile tor-browser_en-US
echo "Testing Chromium with no private and no URL parameters."
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -nosystray -chromium 2> chrome.1.err 1> chrome.1.log
echo "Testing Chromium with local URL parameter."
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -nosystray -chromium "http://127.0.0.1:7657" 2> chrome.1.err 1> chrome.1.log
echo "Testing Chromium with remote URL parameter."
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -nosystray -chromium "http://idk.i2p" 2> chrome.2.err 1> chrome.2.log
echo "Testing Chromium with remote AND local URL parameter."
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -nosystray -chromium "http://127.0.0.1:7657" "http://idk.i2p" 2> fox.3.err 1> fox.3.log
echo "Testing Chromium with private browsing parameter"
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -nosystray -chromium -private "http://127.0.0.1:7657" 2> chrome.4.err 1> chrome.4.log
echo "Chromium tests completed"
sleep 2s
rm -rf i2p.chromium.base.profile i2p.chromium.profile
echo "Testing Chromium with no private and no URL parameters."
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -nosystray -chromium -usability 2> chrome.1.err 1> chrome.1.log
echo "Testing Chromium with local URL parameter."
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -nosystray -chromium -usability "http://127.0.0.1:7657" 2> chrome.1.err 1> chrome.1.log
echo "Testing Chromium with remote URL parameter."
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -nosystray -chromium -usability "http://idk.i2p" 2> chrome.2.err 1> chrome.2.log
echo "Testing Chromium with remote AND local URL parameter."
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -nosystray -chromium -usability "http://127.0.0.1:7657" "http://idk.i2p" 2> fox.3.err 1> fox.3.log
echo "Testing Chromium with private browsing parameter"
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -nosystray -chromium -usability -private "http://127.0.0.1:7657" 2> chrome.4.err 1> chrome.4.log
echo "Chromium Usability-Mode tests completed"
rm -rf i2p.chromium.base.profile i2p.chromium.profile i2p.firefox.base.profile i2p.firefox.profile i2p.firefox.usability.profile

View File

@@ -1,36 +0,0 @@
#! /usr/bin/env sh
ant distclean
ant jar
rm -rf i2p.chromium.base.profile i2p.chromium.profile i2p.firefox.base.profile i2p.firefox.profile i2p.firefox.usability.profile tor-browser_en-US
echo "Testing Firefox with no private and no URL parameters."
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -nosystray -firefox 2> fox.0.err 1> fox.0.log
echo "Testing Firefox with local URL parameter."
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -nosystray -firefox "http://127.0.0.1:7657" 2> fox.1.err 1> fox.1.log
echo "Testing Firefox with remote URL parameter."
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -nosystray -firefox "http://idk.i2p" 2> fox.2.err 1> fox.2.log
echo "Testing Firefox with remote AND local URL parameter."
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -nosystray -firefox "http://127.0.0.1:7657" "http://idk.i2p" 2> fox.3.err 1> fox.3.log
echo "Testing Firefox with private browsing parameter"
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -nosystray -firefox -private "http://127.0.0.1:7657" 2> fox.4.err 1> fox.4.log
echo "Firefox tests completed"
sleep 2s
rm -rf i2p.firefox.usability.profile i2p.firefox.profile
echo "Testing Firefox with no private and no URL parameters."
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -nosystray -firefox -usability 2> fox.0.err 1> fox.0.log
echo "Testing Firefox with local URL parameter."
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -nosystray -firefox -usability "http://127.0.0.1:7657" 2> fox.1.err 1> fox.1.log
echo "Testing Firefox with remote URL parameter."
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -nosystray -firefox -usability "http://idk.i2p" 2> fox.2.err 1> fox.2.log
echo "Testing Firefox with remote AND local URL parameter."
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -nosystray -firefox -usability "http://127.0.0.1:7657" "http://idk.i2p" 2> fox.3.err 1> fox.3.log
echo "Testing Firefox with private browsing parameter"
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -nosystray -firefox -usability -private "http://127.0.0.1:7657" 2> fox.4.err 1> fox.4.log
echo "Firefox Usability-Mode tests completed"
sleep 2s
rm -rf i2p.chromium.base.profile i2p.chromium.profile i2p.firefox.base.profile i2p.firefox.profile

View File

@@ -1,9 +0,0 @@
#! /usr/bin/env sh
ant distclean
ant jar
rm -rf i2p.chromium.base.profile i2p.chromium.profile i2p.firefox.base.profile i2p.firefox.profile i2p.firefox.usability.profile tor-browser_en-US
echo "Testing auto-selector with no private and no URL parameters."
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser 2> auto.0.err 1> auto.0.log

View File

@@ -1,19 +0,0 @@
#! /usr/bin/env sh
ant distclean
ant jar
rm -rf i2p.chromium.base.profile i2p.chromium.profile i2p.firefox.base.profile i2p.firefox.profile i2p.firefox.usability.profile
./etc/scripts/torbrowser.sh
echo "Testing Firefox with no private and no URL parameters."
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -nosystray -firefox 2> fox.0.err 1> fox.0.log
echo "Testing Firefox with local URL parameter."
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -nosystray -firefox "http://127.0.0.1:7657" 2> fox.1.err 1> fox.1.log
echo "Testing Firefox with remote URL parameter."
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -nosystray -firefox "http://idk.i2p" 2> fox.2.err 1> fox.2.log
echo "Testing Firefox with remote AND local URL parameter."
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -nosystray -firefox "http://127.0.0.1:7657" "http://idk.i2p" 2> fox.3.err 1> fox.3.log
echo "Testing Firefox with private browsing parameter"
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -nosystray -firefox -private "http://127.0.0.1:7657" 2> fox.4.err 1> fox.4.log

View File

@@ -1,15 +0,0 @@
#! /usr/bin/env sh
ant distclean
ant jar
echo "Testing UNSAFE auto-selector with no private and no URL parameters."
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PGenericUnsafeBrowser 2> gen.0.err 1> gen.0.log
echo "Testing UNSAFE auto-selector with local URL parameter."
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PGenericUnsafeBrowser "http://127.0.0.1:7657" 2> gen.1.err 1> gen.1.log
echo "Testing UNSAFE auto-selector with remote URL parameter."
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PGenericUnsafeBrowser "http://idk.i2p" 2> gen.2.err 1> gen.2.log
echo "Testing UNSAFE auto-selector with private browsing parameter"
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PGenericUnsafeBrowser -private "http://127.0.0.1:7657" 2> gen.3.err 1> gen.3.log
echo "UNSAFE browser tests complete"

View File

@@ -1,35 +0,0 @@
#! /usr/bin/env sh
ant distclean
ant jar
rm -rf i2p.chromium.base.profile i2p.chromium.profile i2p.firefox.base.profile i2p.firefox.profile i2p.firefox.usability.profile tor-browser_en-US
echo "Testing auto-selector with no private and no URL parameters."
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -nosystray 2> auto.0.err 1> auto.0.log
echo "Testing auto-selector with local URL parameter."
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -nosystray "http://127.0.0.1:7657" 2> auto.1.err 1> auto.1.log
echo "Testing auto-selector with remote URL parameter."
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -nosystray "http://idk.i2p" 2> auto.2.err 1> auto.2.log
echo "Testing auto-selector with remote AND local URL parameter."
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -nosystray "http://127.0.0.1:7657" "http://idk.i2p" 2> auto.3.err 1> auto.3.log
echo "Testing auto-selector with private browsing parameter"
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -nosystray -private "http://127.0.0.1:7657" 2> auto.4.err 1> auto.4.log
echo "Auto-Selector tests completed"
rm -rf i2p.chromium.base.profile i2p.chromium.profile i2p.firefox.base.profile i2p.firefox.profile i2p.firefox.usability.profile
echo "Testing UNSAFE auto-selector with no private and no URL parameters."
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -nosystray -generic 2> gen.0.err 1> gen.0.log
echo "Testing UNSAFE auto-selector with local URL parameter."
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -nosystray -generic "http://127.0.0.1:7657" 2> gen.1.err 1> gen.1.log
echo "Testing UNSAFE auto-selector with remote URL parameter."
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -nosystray -generic "http://idk.i2p" 2> gen.2.err 1> gen.2.log
echo "Testing UNSAFE auto-selector with remote AND local URL parameter."
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -nosystray -generic "http://127.0.0.1:7657" "http://idk.i2p" 2> gen.3.err 1> gen.3.log
echo "Testing UNSAFE auto-selector with private browsing parameter"
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -nosystray -generic -private "http://127.0.0.1:7657" 2> gen.4.err 1> gen.4.log
echo "UNSAFE browser tests complete"
rm -rf i2p.chromium.base.profile i2p.chromium.profile i2p.firefox.base.profile i2p.firefox.profile i2p.firefox.usability.profile

View File

@@ -1,16 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQIcBAABCgAGBQJjRyYHAAoJEOU9mJqeLUe/HbIQALBTyEB42g2+Dlufv8fvF2E2
549sCPbkFHzKaH8ECeKfiZZDuTfLUmNUbnYD1/lxJtaUDj+u56sSF5V6us3HBgYN
56Mh+miLv4Am9HEZXwCRtE/kRjbE3yuKjSqYpZkviPsK4PT1fBBg+aMtc8fUZk4y
3BQZsvynie1OH2Qlw4XHMZUbHP7VlEAZCUWZTk8ai+mmqegmjtDc2NMNtZ03BGi7
Rd5U03+9mmVQNiWcJZqZkzQg8x/tPQD0XmMH04mZ71dCukfsun+DykjVGUAktloj
9XJ1aq+c3s4r/GXXXJ4sEnDe1QNBPOgEH5SLSiSAwwl531i5Oh2sO1U2ILC/PsnM
MlZMbypMw2eVGIQgfXrWurWlSvKYw193Y7N4bjvvTQYkxmWWHegKtYj1Jmy5y4+q
KypLjwD7QxDViRiQp5v8vzFAQ/0pacwT6D+r7ugAIrk9jFnl5dnHBDuBNHTdjPOI
oyTnSFJkroMjpdzbDnta74FzyLBWMPPMD3L/LepJLW+iYcJDqDYCffTqCPDjJSco
UgD71EiDSyM77wMKqEFzHzbNdW1Tmd88LoDc/erK9akbX4Xkhve0N/HFr+99c5rH
5EzI2j/N3Kzwom/FYzT8saS5ljRdGD+APi7VKE9budDzlu0ZqIhK/zMIJ//JHi/O
rmxTcTn5TaTfAMGhQUi/
=yI0S
-----END PGP SIGNATURE-----

Binary file not shown.

View File

@@ -1,19 +0,0 @@
#! /usr/bin/env sh
. ./config.sh
jpackage \
--verbose \
--type exe \
--win-dir-chooser \
--win-help-url "https://geti2p.net" \
--win-menu \
--win-menu-group "I2P Browser Configurer" \
--win-shortcut \
--win-shortcut-prompt \
--win-per-user-install \
--license-file LICENSE.md \
--icon src/icon.png \
--name i2pbrowser \
--app-version "$GITHUB_TAG" \
--input src/build \
--main-jar i2pfirefox.jar \
--main-class net.i2p.i2pfirefox.I2PBrowser

View File

@@ -1,19 +0,0 @@
#! /usr/bin/env sh
. ./config.sh
mkdir -p tmp
cp -v LICENSE.md tmp/LICENSE.md
rm -rf i2pbrowser-portable
jpackage \
--verbose \
--type app-image \
--name i2pbrowser-portable \
--app-version "$GITHUB_TAG" \
--input src/build \
--main-jar i2pfirefox.jar \
--resource-dir tmp \
--icon src/icon.png \
--main-class net.i2p.i2pfirefox.I2PBrowser
rm -rf tmp
cp -v LICENSE.md i2pbrowser-portable/LICENSE.md
rm i2pbrowser-portable.zip -f
zip -r i2pbrowser-portable-${GITHUB_TAG}.zip i2pbrowser-portable

View File

@@ -1,36 +0,0 @@
#! /usr/bin/env sh
git pull --all
. ../i2p.firefox/config.sh
. ./config.sh
. "${HOME}/github-release-config.sh"
ant distclean jar
./windows.sh
./windows-exe.sh
./windows-portable.sh
msisum=$(sha256sum "i2pbrowser-${GITHUB_TAG}.msi")
github-release upload --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \
--tag "${GITHUB_TAG}" \
--label "I2P Browser launcher as a Jpackage inside of an MSI package. ${msisum}" \
--name "i2pbrowser.msi" \
--file "i2pbrowser-${GITHUB_TAG}.msi" \
--replace
echo "Uploaded MSI package"
exesum=$(sha256sum "i2pbrowser-${GITHUB_TAG}.exe")
github-release upload --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \
--tag "${GITHUB_TAG}" \
--label "I2P Browser launcher as a Jpackage inside of an EXE package. ${exesum}" \
--name "i2pbrowser.exe" \
--file "i2pbrowser-${GITHUB_TAG}.exe" \
--replace
echo "Uploaded EXE package"
zipsum=$(sha256sum "i2pbrowser-portable-${GITHUB_TAG}.zip")
github-release upload --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \
--tag "${GITHUB_TAG}" \
--label "I2P Browser launcher as a Jpackage inside of an zip to be run from a directory on Windows. ${zipsum}" \
--name "i2pbrowser-portable.zip" \
--file "i2pbrowser-portable-${GITHUB_TAG}.zip" \
--replace
echo "Uploaded Windows ZIP package"

View File

@@ -1,19 +0,0 @@
#! /usr/bin/env sh
. ./config.sh
jpackage \
--verbose \
--type msi \
--win-dir-chooser \
--win-help-url "https://geti2p.net" \
--win-menu \
--win-menu-group "I2P Browser Configurer" \
--win-shortcut \
--win-shortcut-prompt \
--win-per-user-install \
--license-file LICENSE.md \
--icon src/icon.png \
--name i2pbrowser \
--app-version "$GITHUB_TAG" \
--input src/build \
--main-jar i2pfirefox.jar \
--main-class net.i2p.i2pfirefox.I2PBrowser