Compare commits

...

83 Commits

Author SHA1 Message Date
idk
a7e47cfc15 update I2PCommonBrowser.html 2022-09-05 21:54:29 -04:00
idk
71060cd851 update CHANGES.html 2022-09-05 21:54:03 -04:00
idk
f3dc285ba6 update index.html 2022-09-05 21:53:59 -04:00
idk
bce2f0e286 Windows releaser too. 2022-09-05 21:53:24 -04:00
idk
8e70d9280c Windows releaser too. 2022-09-05 21:52:18 -04:00
idk
ea778bf5da never run inside Program Files, allow per-user install 2022-09-05 21:32:31 -04:00
idk
a3de60fcb1 fix releaser script 2022-09-05 21:28:36 -04:00
idk
459c16aec2 update I2PGenericUnsafeBrowser.html 2022-09-05 21:15:53 -04:00
idk
d35a60cc01 update I2PFirefox.html 2022-09-05 21:15:39 -04:00
idk
733c2b1cc0 update I2PCommonBrowser.html 2022-09-05 21:15:35 -04:00
idk
6b7ab66c99 update I2PChromium.html 2022-09-05 21:15:21 -04:00
idk
4647cd4a0b update I2PBrowser.html 2022-09-05 21:15:18 -04:00
idk
b47fb744c4 update CHANGES.html 2022-09-05 21:15:11 -04:00
idk
a179482b95 release 2022-09-05 21:14:59 -04:00
idk
0f44a3219b update index.html 2022-09-05 21:13:01 -04:00
idk
9c54e16978 debian package 2022-09-05 21:12:53 -04:00
idk
395e1c2c95 debian package 2022-09-05 21:12:10 -04:00
idk
d989337a9c set a default directory in some cases 2022-09-05 21:08:11 -04:00
idk
7dbfdd9cbf make everything distributable better 2022-09-05 18:43:02 -04:00
idk
6605220f4a make it so Windows can find things easier 2022-09-05 18:28:23 -04:00
idk
d0440dcc56 update gitignore 2022-09-05 18:26:00 -04:00
idk
4640cc528c Freestanding packages. Why the heck not. 2022-09-05 18:23:33 -04:00
idk
94e03d045b add support for a Debian package. Yeah a Debian package. 2022-09-05 17:50:04 -04:00
idk
b6a66cf96e update I2PFirefox.html 2022-09-05 10:21:30 -04:00
idk
91f44d29f7 update CHANGES.html 2022-09-05 10:20:59 -04:00
idk
9152da34c9 update index.html 2022-09-05 10:20:55 -04:00
idk
e49cd5d470 update changelog 2022-09-05 10:19:03 -04:00
idk
02c148ccbd always pass --new-instance to firefox 2022-09-05 10:16:52 -04:00
idk
5216ec40f4 update I2PGenericUnsafeBrowser.html 2022-09-05 00:41:31 -04:00
idk
65e67f661b update I2PFirefoxProfileChecker.html 2022-09-05 00:41:23 -04:00
idk
adfda72398 update I2PFirefox.html 2022-09-05 00:41:15 -04:00
idk
5f320087f0 update I2PCommonBrowser.html 2022-09-05 00:41:11 -04:00
idk
86c0c1b68b update I2PChromiumProfileChecker.html 2022-09-05 00:41:04 -04:00
idk
07cc177a95 update I2PChromium.html 2022-09-05 00:40:56 -04:00
idk
40299b00fc update I2PBrowser.html 2022-09-05 00:40:53 -04:00
idk
1c1e048c50 update index.html 2022-09-05 00:40:42 -04:00
idk
084ecb46ff update logging 2022-09-05 00:31:27 -04:00
idk
2b80b4151a move all logging to a proper logging system 2022-09-05 00:19:59 -04:00
idk
e43468c367 update I2PFirefox.html 2022-09-04 23:13:33 -04:00
idk
1f770c01ab update index.html 2022-09-04 23:12:22 -04:00
idk
4d79219358 bump again 2022-09-04 23:11:25 -04:00
idk
3725be1d5b update index.html 2022-09-04 21:24:26 -04:00
idk
5d1afd8dd4 bump 2022-09-04 21:19:35 -04:00
idk
6234ffdff1 fix missing semicolon 2022-09-04 21:13:40 -04:00
idk
8802f9448f update I2PFirefoxProfileBuilder.html 2022-09-04 11:02:30 -04:00
idk
31d654ef4f update I2PFirefox.html 2022-09-04 11:02:23 -04:00
idk
04894a0977 update I2PCommonBrowser.html 2022-09-04 11:02:17 -04:00
idk
a2733d8ffb update I2PChromium.html 2022-09-04 11:01:52 -04:00
idk
100fe7fd95 update index.html 2022-09-04 11:01:25 -04:00
idk
91964508d8 bump for release 2022-09-04 11:00:32 -04:00
idk
9d347bdfa2 first run just unpacks the profile and deletes the first-run file now, to prevent launch-and-close of browser on Windows 11 when running from NSIS 2022-09-04 10:59:35 -04:00
idk
93f6e01e53 add in first-run files to profiles 2022-09-04 09:36:15 -04:00
idk
03ea5ed52c update I2PGenericUnsafeBrowser.html 2022-09-03 22:04:59 -04:00
idk
78bf32bc06 update I2PFirefox.html 2022-09-03 22:04:38 -04:00
idk
4420222d7e update I2PChromium.html 2022-09-03 22:04:09 -04:00
idk
8a3b73599a update index.html 2022-09-03 22:03:43 -04:00
idk
68300d78ef release again 2022-09-03 21:41:41 -04:00
idk
b3fba0449c never check args.length and args != null on the same line 2022-09-03 21:38:20 -04:00
idk
437d0698c0 update USAGE.html 2022-09-02 18:36:11 -04:00
idk
5d504c96f3 update TODO.html 2022-09-02 18:36:05 -04:00
idk
895e7c39af update LICENSE.html 2022-09-02 18:36:00 -04:00
idk
7a0bbf0d22 update I2PGenericUnsafeBrowser.html 2022-09-02 18:35:54 -04:00
idk
99e33eb030 update I2PFirefoxProfileUnpacker.html 2022-09-02 18:35:49 -04:00
idk
73ab706e21 update I2PFirefoxProfileChecker.html 2022-09-02 18:35:43 -04:00
idk
9b177f17e7 update I2PFirefoxProfileBuilder.html 2022-09-02 18:35:38 -04:00
idk
88346f9d99 update I2PFirefox.html 2022-09-02 18:35:32 -04:00
idk
26a0fc6bf9 update I2PCommonBrowser.html 2022-09-02 18:35:27 -04:00
idk
5f279ea87a update I2PChromiumProfileUnpacker.html 2022-09-02 18:35:22 -04:00
idk
ce4deba206 update I2PChromiumProfileChecker.html 2022-09-02 18:35:16 -04:00
idk
78c379e0a9 update I2PChromiumProfileBuilder.html 2022-09-02 18:35:10 -04:00
idk
bfdd9a01a8 update I2PChromium.html 2022-09-02 18:35:04 -04:00
idk
7664107c7d update I2PBrowser.html 2022-09-02 18:34:59 -04:00
idk
61f8297fe9 update EXAMPLES.html 2022-09-02 18:34:53 -04:00
idk
0f538970d0 update CHANGES.html 2022-09-02 18:34:47 -04:00
idk
86f0ec3943 update index.html 2022-09-02 18:34:40 -04:00
idk
59f8d0edf9 unset https only mode during validation step for Firefox 2022-09-02 18:34:19 -04:00
idk
3d4f22676a unset https only mode during validation step for Firefox 2022-09-02 18:28:05 -04:00
idk
d0d0b5aca8 unset https only mode during validation step for Firefox 2022-09-02 18:25:27 -04:00
idk
998305ebe1 move release arg 2022-09-01 16:12:59 -04:00
idk
b1596d14bc update TODO.html 2022-09-01 16:06:25 -04:00
idk
6242346178 update TODO.md 2022-09-01 16:04:12 -04:00
idk
34ac0fb641 verbosity in releaser script 2022-09-01 15:49:07 -04:00
idk
7da10def01 delete jpackage before building jpackage 2022-09-01 15:44:04 -04:00
60 changed files with 1193 additions and 385 deletions

2
.gitignore vendored
View File

@ -13,3 +13,5 @@ src/build
*.err
*.log
i2pbrowser/
/i2pbrowser*.deb
/logs

View File

@ -115,6 +115,43 @@
</div>
</div>
</div>
<a id="returnhome" href="/">
/
</a>
<h2>
<a href="#mon-september-5" rel="nofollow">
<span></span>
</a>
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 Debian package.
</li>
<li>
Add support for building an MSI package.
</li>
</ul>
<h2>
<a href="#fri-september-2" rel="nofollow">
<span></span>
</a>
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>
<a href="#thu-september-1" rel="nofollow">
<span></span>
@ -297,10 +334,15 @@
</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 Code: (https://github.com/eyedeekay/i2p.plugins.firefox)
Source Repository: (https://github.com/eyedeekay/i2p.plugins.firefox)
</a>
</li>
</ul>

View File

@ -1,3 +1,17 @@
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 Debian 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
----------------

View File

@ -115,16 +115,24 @@
</div>
</div>
</div>
<a id="returnhome" href="/">
/
</a>
<p>
:; dir=$(CDPATH= cd -- &#34;$(dirname -- &#34;$0&#34;)&#34; &amp;&amp; pwd); java -cp &#34;$dir&#34;/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PChromium -private; exit $?
@ECHO OFF
java -cp %cd%/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PChromium -private
</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 Code: (https://github.com/eyedeekay/i2p.plugins.firefox)
Source Repository: (https://github.com/eyedeekay/i2p.plugins.firefox)
</a>
</li>
</ul>

View File

@ -115,6 +115,9 @@
</div>
</div>
</div>
<a id="returnhome" href="/">
/
</a>
<h1>
<a href="#class-i2pbrowser-src" rel="nofollow">
<span></span>
@ -146,6 +149,8 @@
<p>
Author: idk
<br>
Parent class: I2PCommonBrowser
<br>
package: net.i2p.i2pfirefox
</p>
<h2>
@ -534,7 +539,7 @@
<span></span>
</a>
launch
<a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L156" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L157" rel="nofollow">
[src]
</a>
</h3>
@ -564,7 +569,7 @@
<span></span>
</a>
launch
<a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L165" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L166" rel="nofollow">
[src]
</a>
</h3>
@ -590,7 +595,7 @@
<span></span>
</a>
ValidURL
<a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L167" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L168" rel="nofollow">
[src]
</a>
</h3>
@ -623,7 +628,7 @@
<span></span>
</a>
main
<a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L177" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L178" rel="nofollow">
[src]
</a>
</h3>
@ -652,10 +657,15 @@
| args | 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 Code: (https://github.com/eyedeekay/i2p.plugins.firefox)
Source Repository: (https://github.com/eyedeekay/i2p.plugins.firefox)
</a>
</li>
</ul>

View File

@ -7,6 +7,7 @@ Description:
> 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 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
Parent class: I2PCommonBrowser
package: net.i2p.i2pfirefox
## Dependencies
@ -152,7 +153,7 @@ This method has no parameters.
| url | String[] | |
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L156)
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L157)
+ Description: 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.
+ Access: public
@ -163,7 +164,7 @@ This method has no parameters.
| privateWindow | boolean | |
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L165)
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L166)
+ Description: 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.
+ Access: public
@ -172,7 +173,7 @@ This method has no parameters.
This method has no parameters.
### ValidURL [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L167)
### ValidURL [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L168)
+ Description:
+ Access: private
@ -184,7 +185,7 @@ This method has no parameters.
| inUrl | String | |
### main [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L177)
### main [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L178)
+ Description:
+ Access: public

View File

@ -115,6 +115,9 @@
</div>
</div>
</div>
<a id="returnhome" href="/">
/
</a>
<h1>
<a href="#class-i2pchromium-src" rel="nofollow">
<span></span>
@ -146,6 +149,8 @@
<p>
Author: idk
<br>
Parent class: I2PCommonBrowser
<br>
package: net.i2p.i2pfirefox
</p>
<h2>
@ -676,7 +681,7 @@
<span></span>
</a>
processBuilder
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L397" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L399" rel="nofollow">
[src]
</a>
</h3>
@ -706,7 +711,7 @@
<span></span>
</a>
waitForProxy
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L486" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L493" rel="nofollow">
[src]
</a>
</h3>
@ -732,7 +737,7 @@
<span></span>
</a>
waitForProxy
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L496" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L503" rel="nofollow">
[src]
</a>
</h3>
@ -762,7 +767,7 @@
<span></span>
</a>
waitForProxy
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L508" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L515" rel="nofollow">
[src]
</a>
</h3>
@ -794,7 +799,7 @@
<span></span>
</a>
waitForProxy
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L521" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L528" rel="nofollow">
[src]
</a>
</h3>
@ -828,7 +833,7 @@
<span></span>
</a>
checkifPortIsOccupied
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L534" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L541" rel="nofollow">
[src]
</a>
</h3>
@ -860,7 +865,7 @@
<span></span>
</a>
launchAndDetatch
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L544" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L551" rel="nofollow">
[src]
</a>
</h3>
@ -892,7 +897,7 @@
<span></span>
</a>
launch
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L589" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L598" rel="nofollow">
[src]
</a>
</h3>
@ -924,7 +929,7 @@
<span></span>
</a>
launch
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L612" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L623" rel="nofollow">
[src]
</a>
</h3>
@ -954,7 +959,7 @@
<span></span>
</a>
launch
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L621" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L632" rel="nofollow">
[src]
</a>
</h3>
@ -980,7 +985,7 @@
<span></span>
</a>
ValidURL
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L623" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L634" rel="nofollow">
[src]
</a>
</h3>
@ -1013,7 +1018,7 @@
<span></span>
</a>
main
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L633" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L644" rel="nofollow">
[src]
</a>
</h3>
@ -1046,7 +1051,7 @@
<span></span>
</a>
sleep
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L658" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L672" rel="nofollow">
[src]
</a>
</h3>
@ -1075,10 +1080,15 @@
| millis | int | |
</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 Code: (https://github.com/eyedeekay/i2p.plugins.firefox)
Source Repository: (https://github.com/eyedeekay/i2p.plugins.firefox)
</a>
</li>
</ul>

View File

@ -7,6 +7,7 @@ Description:
> I2PChromium.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
Parent class: I2PCommonBrowser
package: net.i2p.i2pfirefox
## Dependencies
@ -196,7 +197,7 @@ This method has no parameters.
| args | String[] | the arguments to pass to the Chromium binary. |
### processBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L397)
### processBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L399)
+ Description: Build a ProcessBuilder for the top Chromium binary and the default profile with a specific set of extended arguments.
+ Access: public
@ -207,7 +208,7 @@ This method has no parameters.
| args | String[] | the extended arguments to pass to the Chromium binary. |
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L486)
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L493)
+ Description: Waits for an HTTP proxy on port 4444 to be ready. Returns false on timeout of 200 seconds.
+ Access: public
@ -216,7 +217,7 @@ This method has no parameters.
This method has no parameters.
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L496)
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L503)
+ Description: Waits for an HTTP proxy on port 4444 to be ready. Returns false on timeout of the specified number of seconds.
+ Access: public
@ -227,7 +228,7 @@ This method has no parameters.
| timeout | int | the number of seconds to wait for the proxy to be ready. |
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L508)
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L515)
+ Description: Waits for an HTTP proxy on the specified port to be ready. Returns false on timeout of the specified number of seconds.
+ Access: public
@ -239,7 +240,7 @@ This method has no parameters.
| port | int | the port to wait for the proxy to be ready on. |
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L521)
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L528)
+ Description: Waits for an HTTP proxy on the specified port to be ready. Returns false on timeout of the specified number of seconds.
+ Access: public
@ -252,7 +253,7 @@ This method has no parameters.
| host | String | the host to wait for the proxy to be ready on. |
### checkifPortIsOccupied [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L534)
### checkifPortIsOccupied [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L541)
+ Description:
+ Access: private
@ -264,7 +265,7 @@ This method has no parameters.
| host | String | |
### launchAndDetatch [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L544)
### launchAndDetatch [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L551)
+ Description:
+ Access: public
@ -276,7 +277,7 @@ This method has no parameters.
| url | String[] | |
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L589)
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L598)
+ Description: Populates a profile directory with a proxy configuration. Waits for an HTTP proxy on the port 4444 to be ready. Launches Chromium with the profile directory.
+ Access: public
@ -288,7 +289,7 @@ This method has no parameters.
| url | String[] | |
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L612)
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L623)
+ Description: Populates a profile directory with a proxy configuration. Waits for an HTTP proxy on the port 4444 to be ready. Launches Chromium with the profile directory.
+ Access: public
@ -299,7 +300,7 @@ This method has no parameters.
| privateWindow | boolean | |
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L621)
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L632)
+ Description: Populates a profile directory with a proxy configuration. Waits for an HTTP proxy on the port 4444 to be ready. Launches Chromium with the profile directory.
+ Access: public
@ -308,7 +309,7 @@ This method has no parameters.
This method has no parameters.
### ValidURL [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L623)
### ValidURL [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L634)
+ Description:
+ Access: private
@ -320,7 +321,7 @@ This method has no parameters.
| inUrl | String | |
### main [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L633)
### main [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L644)
+ Description:
+ Access: public
@ -332,7 +333,7 @@ This method has no parameters.
| args | String[] | |
### sleep [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L658)
### sleep [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L672)
+ Description:
+ Access: private

View File

@ -115,6 +115,9 @@
</div>
</div>
</div>
<a id="returnhome" href="/">
/
</a>
<h1>
<a href="#class-i2pchromiumprofilebuilder-src" rel="nofollow">
<span></span>
@ -421,10 +424,15 @@
This method has no parameters.
</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 Code: (https://github.com/eyedeekay/i2p.plugins.firefox)
Source Repository: (https://github.com/eyedeekay/i2p.plugins.firefox)
</a>
</li>
</ul>

View File

@ -115,6 +115,9 @@
</div>
</div>
</div>
<a id="returnhome" href="/">
/
</a>
<h1>
<a href="#class-i2pchromiumprofilechecker-src" rel="nofollow">
<span></span>
@ -146,6 +149,8 @@
<p>
Author: idk
<br>
Parent class: I2PCommonBrowser
<br>
package: net.i2p.i2pfirefox
</p>
<h2>
@ -315,10 +320,15 @@
| extensionDirectory | String | the extension directory to check |
</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 Code: (https://github.com/eyedeekay/i2p.plugins.firefox)
Source Repository: (https://github.com/eyedeekay/i2p.plugins.firefox)
</a>
</li>
</ul>

View File

@ -7,6 +7,7 @@ Description:
> 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 that checks if the Chromium profile directory exists and is valid.
Author: idk
Parent class: I2PCommonBrowser
package: net.i2p.i2pfirefox
## Dependencies

View File

@ -115,6 +115,9 @@
</div>
</div>
</div>
<a id="returnhome" href="/">
/
</a>
<h1>
<a href="#class-i2pchromiumprofileunpacker-src" rel="nofollow">
<span></span>
@ -247,10 +250,15 @@
| mode | 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 Code: (https://github.com/eyedeekay/i2p.plugins.firefox)
Source Repository: (https://github.com/eyedeekay/i2p.plugins.firefox)
</a>
</li>
</ul>

View File

@ -115,6 +115,9 @@
</div>
</div>
</div>
<a id="returnhome" href="/">
/
</a>
<h1>
<a href="#class-i2pcommonbrowser-src" rel="nofollow">
<span></span>
@ -185,6 +188,15 @@
<li>
java.nio.file.StandardCopyOption
</li>
<li>
java.util.logging.FileHandler
</li>
<li>
java.util.logging.Logger
</li>
<li>
java.util.logging.SimpleFormatter
</li>
<li>
java.util.zip.ZipEntry
</li>
@ -194,10 +206,10 @@
</ul>
<br>
<h2>
<a href="#no-member-variables-in-this-class" rel="nofollow">
<a href="#member-variables" rel="nofollow">
<span></span>
</a>
No member variables in this class
Member Variables
</h2>
<h2>
<a href="#methods" rel="nofollow">
@ -205,12 +217,132 @@
</a>
Methods
</h2>
<h3>
<a href="#validateuserdir-src" rel="nofollow">
<span></span>
</a>
validateUserDir
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L52" 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>
This method has no parameters.
</p>
<h3>
<a href="#iswindows-src" rel="nofollow">
<span></span>
</a>
isWindows
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L98" rel="nofollow">
[src]
</a>
</h3>
<ul>
<li>
Description:
<br>
</li>
<li>
Access: private
<br>
</li>
<li>
Modifiers: static
</li>
<li>
return: boolean
<br>
</li>
</ul>
<p>
This method has no parameters.
</p>
<h3>
<a href="#println-src" rel="nofollow">
<span></span>
</a>
println
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L110" 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>
| line | String | |
</p>
<h3>
<a href="#logfile-src" rel="nofollow">
<span></span>
</a>
logFile
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L112" rel="nofollow">
[src]
</a>
</h3>
<ul>
<li>
Description:
<br>
</li>
<li>
Access: private
<br>
</li>
<li>
Modifiers: static
</li>
<li>
return: File
<br>
</li>
</ul>
<p>
This method has no parameters.
</p>
<h3>
<a href="#runtimedirectory-src" rel="nofollow">
<span></span>
</a>
runtimeDirectory
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L38" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L128" rel="nofollow">
[src]
</a>
</h3>
@ -245,7 +377,7 @@
<span></span>
</a>
runtimeDirectory
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L55" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L145" rel="nofollow">
[src]
</a>
</h3>
@ -278,7 +410,7 @@
<span></span>
</a>
profileDirectory
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L102" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L192" rel="nofollow">
[src]
</a>
</h3>
@ -313,7 +445,7 @@
<span></span>
</a>
profileDir
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L114" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L204" rel="nofollow">
[src]
</a>
</h3>
@ -348,7 +480,7 @@
<span></span>
</a>
unpackProfile
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L120" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L210" rel="nofollow">
[src]
</a>
</h3>
@ -382,7 +514,7 @@
<span></span>
</a>
copyDirectory
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L167" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L256" rel="nofollow">
[src]
</a>
</h3>
@ -421,7 +553,7 @@
<span></span>
</a>
copyDirectoryCompatibityMode
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L183" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L272" rel="nofollow">
[src]
</a>
</h3>
@ -460,7 +592,7 @@
<span></span>
</a>
copyFile
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L192" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L281" rel="nofollow">
[src]
</a>
</h3>
@ -490,11 +622,49 @@
<br>
| destinationFile | File | |
</p>
<h3>
<a href="#validateprofilefirstrun-src" rel="nofollow">
<span></span>
</a>
validateProfileFirstRun
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L292" 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>
| 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 Code: (https://github.com/eyedeekay/i2p.plugins.firefox)
Source Repository: (https://github.com/eyedeekay/i2p.plugins.firefox)
</a>
</li>
</ul>

View File

@ -24,16 +24,61 @@ package: net.i2p.i2pfirefox
<li>java.io.OutputStream</li>
<li>java.nio.file.Files</li>
<li>java.nio.file.StandardCopyOption</li>
<li>java.util.logging.FileHandler</li>
<li>java.util.logging.Logger</li>
<li>java.util.logging.SimpleFormatter</li>
<li>java.util.zip.ZipEntry</li>
<li>java.util.zip.ZipInputStream</li>
</ul>
</details>
## No member variables in this class
## Member Variables
## Methods
### runtimeDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L38)
### validateUserDir [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L52)
+ Description:
+ Access: public
+ Modifiers: static
+ return: void
This method has no parameters.
### isWindows [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L98)
+ Description:
+ Access: private
+ Modifiers: static
+ return: boolean
This method has no parameters.
### println [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L110)
+ Description:
+ Access: public
+ Modifiers: static
+ return: void
| Name | Type | Description |
| ----- | ----- | ----- |
| line | String | |
### logFile [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L112)
+ Description:
+ Access: private
+ Modifiers: static
+ return: File
This method has no parameters.
### runtimeDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L128)
+ Description: get the runtime directory creating it if create=true
+ Access: protected
@ -46,7 +91,7 @@ package: net.i2p.i2pfirefox
| override | String | |
### runtimeDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L55)
### runtimeDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L145)
+ Description: get the correct runtime directory
+ Access: protected
@ -58,7 +103,7 @@ package: net.i2p.i2pfirefox
| override | String | |
### profileDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L102)
### profileDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L192)
+ Description: get the profile directory creating it if necessary
+ Access: protected
@ -71,7 +116,7 @@ package: net.i2p.i2pfirefox
| browser | String | |
### profileDir [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L114)
### profileDir [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L204)
+ Description:
+ Access: protected
@ -84,7 +129,7 @@ package: net.i2p.i2pfirefox
| browser | String | |
### unpackProfile [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L120)
### unpackProfile [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L210)
+ Description:
+ Access: protected
@ -97,7 +142,7 @@ package: net.i2p.i2pfirefox
| base | String | |
### copyDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L167)
### copyDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L256)
+ Description:
+ Access: protected
@ -112,7 +157,7 @@ package: net.i2p.i2pfirefox
| base | String | |
### copyDirectoryCompatibityMode [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L183)
### copyDirectoryCompatibityMode [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L272)
+ Description:
+ Access: private
@ -127,7 +172,7 @@ package: net.i2p.i2pfirefox
| base | String | |
### copyFile [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L192)
### copyFile [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L281)
+ Description:
+ Access: private
@ -140,3 +185,15 @@ package: net.i2p.i2pfirefox
| destinationFile | File | |
### validateProfileFirstRun [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L292)
+ Description:
+ Access: public
+ Modifiers: static
+ return: boolean
| Name | Type | Description |
| ----- | ----- | ----- |
| profileDirectory | String | |

View File

@ -115,6 +115,9 @@
</div>
</div>
</div>
<a id="returnhome" href="/">
/
</a>
<h1>
<a href="#class-i2pfirefox-src" rel="nofollow">
<span></span>
@ -146,6 +149,8 @@
<p>
Author: idk
<br>
Parent class: I2PCommonBrowser
<br>
package: net.i2p.i2pfirefox
</p>
<h2>
@ -443,7 +448,7 @@
<span></span>
</a>
FIREFOX_FINDER
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L201" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L203" rel="nofollow">
[src]
</a>
</h3>
@ -472,7 +477,7 @@
<span></span>
</a>
getOperatingSystem
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L213" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L215" rel="nofollow">
[src]
</a>
</h3>
@ -501,7 +506,7 @@
<span></span>
</a>
onlyValidFirefoxes
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L235" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L237" rel="nofollow">
[src]
</a>
</h3>
@ -527,7 +532,7 @@
<span></span>
</a>
topFirefox
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L255" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L257" rel="nofollow">
[src]
</a>
</h3>
@ -553,7 +558,7 @@
<span></span>
</a>
topFirefox
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L284" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L286" rel="nofollow">
[src]
</a>
</h3>
@ -583,7 +588,7 @@
<span></span>
</a>
defaultProcessBuilder
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L302" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L304" rel="nofollow">
[src]
</a>
</h3>
@ -609,7 +614,7 @@
<span></span>
</a>
defaultProcessBuilder
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L314" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L316" rel="nofollow">
[src]
</a>
</h3>
@ -639,7 +644,7 @@
<span></span>
</a>
privateProcessBuilder
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L328" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L330" rel="nofollow">
[src]
</a>
</h3>
@ -665,7 +670,7 @@
<span></span>
</a>
privateProcessBuilder
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L341" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L343" rel="nofollow">
[src]
</a>
</h3>
@ -695,7 +700,7 @@
<span></span>
</a>
processBuilder
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L362" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L366" rel="nofollow">
[src]
</a>
</h3>
@ -725,7 +730,7 @@
<span></span>
</a>
waitForProxy
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L389" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L400" rel="nofollow">
[src]
</a>
</h3>
@ -751,7 +756,7 @@
<span></span>
</a>
waitForProxy
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L399" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L410" rel="nofollow">
[src]
</a>
</h3>
@ -781,7 +786,7 @@
<span></span>
</a>
waitForProxy
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L411" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L422" rel="nofollow">
[src]
</a>
</h3>
@ -813,7 +818,7 @@
<span></span>
</a>
waitForProxy
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L424" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L435" rel="nofollow">
[src]
</a>
</h3>
@ -847,7 +852,7 @@
<span></span>
</a>
checkifPortIsOccupied
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L437" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L449" rel="nofollow">
[src]
</a>
</h3>
@ -879,7 +884,7 @@
<span></span>
</a>
usabilityMode
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L447" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L459" rel="nofollow">
[src]
</a>
</h3>
@ -905,7 +910,7 @@
<span></span>
</a>
launchAndDetatch
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L454" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L466" rel="nofollow">
[src]
</a>
</h3>
@ -937,7 +942,7 @@
<span></span>
</a>
launch
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L500" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L514" rel="nofollow">
[src]
</a>
</h3>
@ -969,7 +974,7 @@
<span></span>
</a>
launch
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L522" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L538" rel="nofollow">
[src]
</a>
</h3>
@ -999,7 +1004,7 @@
<span></span>
</a>
launch
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L532" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L548" rel="nofollow">
[src]
</a>
</h3>
@ -1025,7 +1030,7 @@
<span></span>
</a>
ValidURL
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L534" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L550" rel="nofollow">
[src]
</a>
</h3>
@ -1058,7 +1063,7 @@
<span></span>
</a>
main
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L545" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L561" rel="nofollow">
[src]
</a>
</h3>
@ -1091,7 +1096,7 @@
<span></span>
</a>
sleep
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L571" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L590" rel="nofollow">
[src]
</a>
</h3>
@ -1120,10 +1125,15 @@
| millis | int | |
</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 Code: (https://github.com/eyedeekay/i2p.plugins.firefox)
Source Repository: (https://github.com/eyedeekay/i2p.plugins.firefox)
</a>
</li>
</ul>

View File

@ -7,6 +7,7 @@ Description:
> I2PFirefox.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
Parent class: I2PCommonBrowser
package: net.i2p.i2pfirefox
## Dependencies
@ -114,7 +115,7 @@ This method has no parameters.
This method has no parameters.
### FIREFOX_FINDER [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L201)
### FIREFOX_FINDER [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L203)
+ Description:
+ Access: private
@ -124,7 +125,7 @@ This method has no parameters.
This method has no parameters.
### getOperatingSystem [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L213)
### getOperatingSystem [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L215)
+ Description:
+ Access: private
@ -134,7 +135,7 @@ This method has no parameters.
This method has no parameters.
### onlyValidFirefoxes [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L235)
### onlyValidFirefoxes [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L237)
+ Description: Check our list of firefox paths for a valid firefox binary. Just an existence check for now but should check versions in the future.
+ Access: public
@ -143,7 +144,7 @@ This method has no parameters.
This method has no parameters.
### topFirefox [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L255)
### topFirefox [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L257)
+ Description: Return the best available Firefox from the list of Firefoxes we have.
+ Access: public
@ -152,7 +153,7 @@ This method has no parameters.
This method has no parameters.
### topFirefox [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L284)
### topFirefox [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L286)
+ Description: Return the best available Firefox from the list of Firefoxes we have. if override is passed it will be validated and if it validates it will be used.
+ Access: public
@ -163,7 +164,7 @@ This method has no parameters.
| overrideFirefox | String | |
### defaultProcessBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L302)
### defaultProcessBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L304)
+ Description: Build a ProcessBuilder for the top Firefox binary and the default profile.
+ Access: public
@ -172,7 +173,7 @@ This method has no parameters.
This method has no parameters.
### defaultProcessBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L314)
### defaultProcessBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L316)
+ Description: Build a ProcessBuilder for the top Firefox binary and the default profile.
+ Access: public
@ -183,7 +184,7 @@ This method has no parameters.
| args | String[] | the args to pass to the Firefox binary |
### privateProcessBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L328)
### privateProcessBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L330)
+ Description: Build a ProcessBuilder for the top Firefox binary and the default profile. Pass the --private-window flag to open a window.
+ Access: public
@ -192,7 +193,7 @@ This method has no parameters.
This method has no parameters.
### privateProcessBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L341)
### privateProcessBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L343)
+ Description: Build a ProcessBuilder for the top Firefox binary and the default profile. Pass the --private-window flag to open a window.
+ Access: public
@ -203,7 +204,7 @@ This method has no parameters.
| args | String[] | the arguments to pass to the Firefox binary |
### processBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L362)
### processBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L366)
+ Description: Build a ProcessBuilder for the top Firefox binary and the default profile with a specific set of extended arguments.
+ Access: public
@ -214,7 +215,7 @@ This method has no parameters.
| args | String[] | the extended arguments to pass to the Firefox binary. |
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L389)
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L400)
+ Description: Waits for an HTTP proxy on port 4444 to be ready. Returns false on timeout of 200 seconds.
+ Access: public
@ -223,7 +224,7 @@ This method has no parameters.
This method has no parameters.
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L399)
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L410)
+ Description: Waits for an HTTP proxy on port 4444 to be ready. Returns false on timeout of the specified number of seconds.
+ Access: public
@ -234,7 +235,7 @@ This method has no parameters.
| timeout | int | the number of seconds to wait for the proxy to be ready. |
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L411)
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L422)
+ Description: Waits for an HTTP proxy on the specified port to be ready. Returns false on timeout of the specified number of seconds.
+ Access: public
@ -246,7 +247,7 @@ This method has no parameters.
| port | int | the port to wait for the proxy to be ready on. |
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L424)
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L435)
+ Description: Waits for an HTTP proxy on the specified port to be ready. Returns false on timeout of the specified number of seconds.
+ Access: public
@ -259,7 +260,7 @@ This method has no parameters.
| host | String | the host to wait for the proxy to be ready on. |
### checkifPortIsOccupied [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L437)
### checkifPortIsOccupied [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L449)
+ Description:
+ Access: private
@ -271,7 +272,7 @@ This method has no parameters.
| host | String | |
### usabilityMode [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L447)
### usabilityMode [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L459)
+ Description:
+ Access: private
@ -280,7 +281,7 @@ This method has no parameters.
This method has no parameters.
### launchAndDetatch [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L454)
### launchAndDetatch [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L466)
+ Description:
+ Access: public
@ -292,7 +293,7 @@ This method has no parameters.
| url | String[] | |
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L500)
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L514)
+ Description: Populates a profile directory with a proxy configuration. Waits for an HTTP proxy on the port 4444 to be ready. Launches Firefox with the profile directory.
+ Access: public
@ -304,7 +305,7 @@ This method has no parameters.
| url | String[] | |
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L522)
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L538)
+ Description: Populates a profile directory with a proxy configuration. Waits for an HTTP proxy on the port 4444 to be ready. Launches Firefox with the profile directory.
+ Access: public
@ -315,7 +316,7 @@ This method has no parameters.
| privateWindow | boolean | |
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L532)
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L548)
+ Description: Populates a profile directory with a proxy configuration. Waits for an HTTP proxy on the port 4444 to be ready. Launches Firefox with the profile directory. Uses a semi-permanent profile.
+ Access: public
@ -324,7 +325,7 @@ This method has no parameters.
This method has no parameters.
### ValidURL [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L534)
### ValidURL [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L550)
+ Description:
+ Access: private
@ -336,7 +337,7 @@ This method has no parameters.
| inUrl | String | |
### main [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L545)
### main [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L561)
+ Description:
+ Access: public
@ -348,7 +349,7 @@ This method has no parameters.
| args | String[] | |
### sleep [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L571)
### sleep [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L590)
+ Description:
+ Access: private

View File

@ -115,6 +115,9 @@
</div>
</div>
</div>
<a id="returnhome" href="/">
/
</a>
<h1>
<a href="#class-i2pfirefoxprofilebuilder-src" rel="nofollow">
<span></span>
@ -406,7 +409,7 @@
<span></span>
</a>
copyStrictOptions
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L149" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L151" rel="nofollow">
[src]
</a>
</h3>
@ -435,10 +438,15 @@
| base | 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 Code: (https://github.com/eyedeekay/i2p.plugins.firefox)
Source Repository: (https://github.com/eyedeekay/i2p.plugins.firefox)
</a>
</li>
</ul>

View File

@ -103,7 +103,7 @@ This method has no parameters.
| base | String | |
### copyStrictOptions [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L149)
### copyStrictOptions [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L151)
+ Description: Copy the strict options from the base profile to the profile
+ Access: public

View File

@ -115,6 +115,9 @@
</div>
</div>
</div>
<a id="returnhome" href="/">
/
</a>
<h1>
<a href="#class-i2pfirefoxprofilechecker-src" rel="nofollow">
<span></span>
@ -146,6 +149,8 @@
<p>
Author: idk
<br>
Parent class: I2PCommonBrowser
<br>
package: net.i2p.i2pfirefox
</p>
<h2>
@ -165,9 +170,21 @@
<br>
<ul>
<br>
<li>
java.io.BufferedReader
</li>
<li>
java.io.File
</li>
<li>
java.io.FileReader
</li>
<li>
java.io.FileWriter
</li>
<li>
java.io.IOException
</li>
</ul>
<br>
<h2>
@ -187,7 +204,7 @@
<span></span>
</a>
main
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L26" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L30" rel="nofollow">
[src]
</a>
</h3>
@ -220,7 +237,7 @@
<span></span>
</a>
validateProfileDirectory
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L47" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L51" rel="nofollow">
[src]
</a>
</h3>
@ -248,12 +265,78 @@
<br>
| profileDirectory | String | the profile directory to check |
</p>
<h3>
<a href="#derestricthttps-src" rel="nofollow">
<span></span>
</a>
deRestrictHTTPS
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L84" rel="nofollow">
[src]
</a>
</h3>
<ul>
<li>
Description:
<br>
</li>
<li>
Access: private
<br>
</li>
<li>
Modifiers: static
</li>
<li>
return: boolean
<br>
</li>
</ul>
<p>
| Name | Type | Description |
<br>
| ----- | ----- | ----- |
<br>
| profile | String | |
</p>
<h3>
<a href="#undohttpsonlymode-src" rel="nofollow">
<span></span>
</a>
undoHttpsOnlyMode
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L104" rel="nofollow">
[src]
</a>
</h3>
<ul>
<li>
Description:
<br>
</li>
<li>
Access: private
<br>
</li>
<li>
Modifiers: static
</li>
<li>
return: boolean
<br>
</li>
</ul>
<p>
| Name | Type | Description |
<br>
| ----- | ----- | ----- |
<br>
| fileToBeModified | File | |
</p>
<h3>
<a href="#validatefile-src" rel="nofollow">
<span></span>
</a>
validateFile
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L86" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L140" rel="nofollow">
[src]
</a>
</h3>
@ -286,7 +369,7 @@
<span></span>
</a>
validateExtensionDirectory
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L113" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L167" rel="nofollow">
[src]
</a>
</h3>
@ -315,10 +398,15 @@
| extensionDirectory | String | the extension directory to check |
</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 Code: (https://github.com/eyedeekay/i2p.plugins.firefox)
Source Repository: (https://github.com/eyedeekay/i2p.plugins.firefox)
</a>
</li>
</ul>

View File

@ -7,6 +7,7 @@ Description:
> 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 that checks if the Firefox profile directory exists and is valid.
Author: idk
Parent class: I2PCommonBrowser
package: net.i2p.i2pfirefox
## Dependencies
@ -16,7 +17,11 @@ package: net.i2p.i2pfirefox
Show dependencies
</summary>
<ul>
<li>java.io.BufferedReader</li>
<li>java.io.File</li>
<li>java.io.FileReader</li>
<li>java.io.FileWriter</li>
<li>java.io.IOException</li>
</ul>
</details>
@ -24,7 +29,7 @@ package: net.i2p.i2pfirefox
## Methods
### main [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L26)
### main [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L30)
+ Description:
+ Access: public
@ -36,7 +41,7 @@ package: net.i2p.i2pfirefox
| args | String[] | |
### validateProfileDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L47)
### validateProfileDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L51)
+ Description: Return true if the profile directory is valid.
+ Access: public
@ -48,7 +53,31 @@ package: net.i2p.i2pfirefox
| profileDirectory | String | the profile directory to check |
### validateFile [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L86)
### deRestrictHTTPS [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L84)
+ Description:
+ Access: private
+ Modifiers: static
+ return: boolean
| Name | Type | Description |
| ----- | ----- | ----- |
| profile | String | |
### undoHttpsOnlyMode [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L104)
+ Description:
+ Access: private
+ Modifiers: static
+ return: boolean
| Name | Type | Description |
| ----- | ----- | ----- |
| fileToBeModified | File | |
### validateFile [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L140)
+ Description: Return true if the file is valid.
+ Access: public
@ -60,7 +89,7 @@ package: net.i2p.i2pfirefox
| file | String | the file to check |
### validateExtensionDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L113)
### validateExtensionDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L167)
+ Description: Return true if the extension directory is valid.
+ Access: public

View File

@ -115,6 +115,9 @@
</div>
</div>
</div>
<a id="returnhome" href="/">
/
</a>
<h1>
<a href="#class-i2pfirefoxprofileunpacker-src" rel="nofollow">
<span></span>
@ -251,10 +254,15 @@
| base | 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 Code: (https://github.com/eyedeekay/i2p.plugins.firefox)
Source Repository: (https://github.com/eyedeekay/i2p.plugins.firefox)
</a>
</li>
</ul>

View File

@ -115,6 +115,9 @@
</div>
</div>
</div>
<a id="returnhome" href="/">
/
</a>
<h1>
<a href="#class-i2pgenericunsafebrowser-src" rel="nofollow">
<span></span>
@ -404,7 +407,7 @@
<span></span>
</a>
deleteRuntimeDirectory
<a href="src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L226" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L229" rel="nofollow">
[src]
</a>
</h3>
@ -433,7 +436,7 @@
<span></span>
</a>
runtimeDirectory
<a href="src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L242" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L245" rel="nofollow">
[src]
</a>
</h3>
@ -466,7 +469,7 @@
<span></span>
</a>
runtimeDirectory
<a href="src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L253" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L256" rel="nofollow">
[src]
</a>
</h3>
@ -495,7 +498,7 @@
<span></span>
</a>
waitForProxy
<a href="src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L275" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L278" rel="nofollow">
[src]
</a>
</h3>
@ -521,7 +524,7 @@
<span></span>
</a>
waitForProxy
<a href="src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L285" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L288" rel="nofollow">
[src]
</a>
</h3>
@ -551,7 +554,7 @@
<span></span>
</a>
waitForProxy
<a href="src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L297" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L300" rel="nofollow">
[src]
</a>
</h3>
@ -583,7 +586,7 @@
<span></span>
</a>
waitForProxy
<a href="src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L311" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L314" rel="nofollow">
[src]
</a>
</h3>
@ -617,7 +620,7 @@
<span></span>
</a>
launchAndDetatch
<a href="src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L325" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L328" rel="nofollow">
[src]
</a>
</h3>
@ -649,7 +652,7 @@
<span></span>
</a>
launch
<a href="src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L346" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L350" rel="nofollow">
[src]
</a>
</h3>
@ -681,7 +684,7 @@
<span></span>
</a>
sleep
<a href="src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L364" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L367" rel="nofollow">
[src]
</a>
</h3>
@ -714,7 +717,7 @@
<span></span>
</a>
ValidURL
<a href="src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L372" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L375" rel="nofollow">
[src]
</a>
</h3>
@ -747,7 +750,7 @@
<span></span>
</a>
checkifPortIsOccupied
<a href="src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L382" rel="nofollow">
<a href="src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L385" rel="nofollow">
[src]
</a>
</h3>
@ -775,10 +778,15 @@
| host | 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 Code: (https://github.com/eyedeekay/i2p.plugins.firefox)
Source Repository: (https://github.com/eyedeekay/i2p.plugins.firefox)
</a>
</li>
</ul>

View File

@ -103,7 +103,7 @@ This method has no parameters.
This method has no parameters.
### deleteRuntimeDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L226)
### deleteRuntimeDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L229)
+ Description: delete the runtime directory
+ Access: public
@ -113,7 +113,7 @@ This method has no parameters.
This method has no parameters.
### runtimeDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L242)
### runtimeDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L245)
+ Description: get the runtime directory creating it if create=true
+ Access: public
@ -125,7 +125,7 @@ This method has no parameters.
| create | boolean | if true create the runtime directory if it does not exist |
### runtimeDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L253)
### runtimeDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L256)
+ Description: get the correct runtime directory
+ Access: public
@ -135,7 +135,7 @@ This method has no parameters.
This method has no parameters.
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L275)
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L278)
+ Description: Waits for an HTTP proxy on port 4444 to be ready. Returns false on timeout of 200 seconds.
+ Access: public
@ -144,7 +144,7 @@ This method has no parameters.
This method has no parameters.
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L285)
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L288)
+ Description: Waits for an HTTP proxy on port 4444 to be ready. Returns false on timeout of the specified number of seconds.
+ Access: public
@ -155,7 +155,7 @@ This method has no parameters.
| timeout | int | the number of seconds to wait for the proxy to be ready. |
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L297)
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L300)
+ Description: Waits for an HTTP proxy on the specified port to be ready. Returns false on timeout of the specified number of seconds.
+ Access: public
@ -167,7 +167,7 @@ This method has no parameters.
| port | int | the port to wait for the proxy to be ready on. |
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L311)
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L314)
+ Description: Waits for an HTTP proxy on the specified port to be ready. Returns false on timeout of the specified number of seconds.
+ Access: public
@ -180,7 +180,7 @@ This method has no parameters.
| host | String | the host to wait for the proxy to be ready on. |
### launchAndDetatch [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L325)
### launchAndDetatch [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L328)
+ Description:
+ Access: public
@ -192,7 +192,7 @@ This method has no parameters.
| url | String[] | |
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L346)
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L350)
+ Description:
+ Access: public
@ -204,7 +204,7 @@ This method has no parameters.
| url | String[] | |
### sleep [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L364)
### sleep [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L367)
+ Description:
+ Access: private
@ -216,7 +216,7 @@ This method has no parameters.
| millis | int | |
### ValidURL [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L372)
### ValidURL [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L375)
+ Description:
+ Access: private
@ -228,7 +228,7 @@ This method has no parameters.
| inUrl | String | |
### checkifPortIsOccupied [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L382)
### checkifPortIsOccupied [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L385)
+ Description:
+ Access: private

View File

@ -115,6 +115,9 @@
</div>
</div>
</div>
<a id="returnhome" href="/">
/
</a>
<p>
Copyright 2022 idk (hankhill19580@gmail.com)
</p>
@ -1215,10 +1218,15 @@ under certain conditions; type `show c&#39; for details.
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 Code: (https://github.com/eyedeekay/i2p.plugins.firefox)
Source Repository: (https://github.com/eyedeekay/i2p.plugins.firefox)
</a>
</li>
</ul>

View File

@ -115,6 +115,9 @@
</div>
</div>
</div>
<a id="returnhome" href="/">
/
</a>
<h1>
<a href="#to-do-list" rel="nofollow">
<span></span>
@ -122,17 +125,6 @@
To-Do List:
</h1>
<ol>
<li>
Don&#39;t Repeat Yourself. Move all functions that all profiles have in common
to a common class and then have them all inherit that class.
</li>
<li>
Offer
<code>
-usability
</code>
flag which sets an alternative extension loadout.
</li>
<li>
Decide on an GUI component for launching the browser/variants with the choices:
<ul>
@ -155,10 +147,15 @@
</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 Code: (https://github.com/eyedeekay/i2p.plugins.firefox)
Source Repository: (https://github.com/eyedeekay/i2p.plugins.firefox)
</a>
</li>
</ul>

View File

@ -1,12 +1,9 @@
To-Do List:
===========
1. Don't Repeat Yourself. Move all functions that all profiles have in common
to a common class and then have them all inherit that class.
2. Offer `-usability` flag which sets an alternative extension loadout.
3. Decide on an GUI component for launching the browser/variants with the choices:
1. Decide on an GUI component for launching the browser/variants with the choices:
- Launch $firefox_variant in I2P Mode
- Launch $chromium_variant in I2P Mode
- Launch system default browser in I2P Mode(Potentially Unsafe!)
4. Registry-based discovery of Firefox variants
5. Registry-based discovery of Chrome variants
2. Registry-based discovery of Firefox variants
3. Registry-based discovery of Chrome variants

View File

@ -115,6 +115,9 @@
</div>
</div>
</div>
<a id="returnhome" href="/">
/
</a>
<h1>
<a href="#example-commands" rel="nofollow">
<span></span>
@ -188,10 +191,15 @@ java -cp %cd%/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PChromium -private
</pre>
</div>
<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 Code: (https://github.com/eyedeekay/i2p.plugins.firefox)
Source Repository: (https://github.com/eyedeekay/i2p.plugins.firefox)
</a>
</li>
</ul>

View File

@ -298,6 +298,12 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="src/build/i2pfirefox.jar"/>
<arg value="i2pfirefox.cmd"/>
<arg value="i2pchromium.cmd"/>
<arg value="i2pfirefox-private.cmd"/>
<arg value="i2pchromium-private.cmd"/>
<arg value="i2pfirefox-usability.cmd"/>
<arg value="i2pchromium-usability.cmd"/>
<arg value="i2pfirefox-usability-private.cmd"/>
<arg value="i2pchromium-usability-private.cmd"/>
<arg value="LICENSE.md"/>
<arg value="README.md"/>
</exec>
@ -311,7 +317,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<delete dir="plugin/eepsite/docroot/torrents/" />
<!-- get version number -->
<buildnumber file="scripts/build.number" />
<property name="release.number" value="0.0.19" />
<property name="release.number" value="0.0.28" />
<!-- make the update xpi2p -->
<!-- this contains everything except i2ptunnel.config -->
@ -418,14 +424,21 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
</exec>
<exec executable="rm" failonerror="true" dir="src">
<exec executable="rm" failonerror="true">
<arg value="-rf" />
<arg value="i2pbrowser.zip" />
</exec>
<exec executable="zip" failonerror="true" dir="src">
<exec executable="zip" failonerror="true">
<arg value="-r"/>
<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>
</project>

6
config.sh Executable file
View File

@ -0,0 +1,6 @@
#! /usr/bin/env sh
export GITHUB_USER=eyedeekay
export GITHUB_REPO=i2p.plugins.firefox
export GITHUB_NAME="Add support for Debian and Windows packages"
export GITHUB_DESCRIPTION=$(cat CHANGES.md)
export GITHUB_TAG=0.0.28

16
debian.sh Executable file
View File

@ -0,0 +1,16 @@
#! /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 \
--app-version "$GITHUB_TAG" \
--input src/build \
--main-jar i2pfirefox.jar \
--main-class net.i2p.i2pfirefox.I2PBrowser

View File

@ -115,6 +115,9 @@
</div>
</div>
</div>
<a id="returnhome" href="/">
/
</a>
<h1>
<a href="#i2p-plugins-firefox" rel="nofollow">
<span></span>
@ -465,10 +468,15 @@ if (i2pIsRunning()) {
TODO: Summarize differences
</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 Code: (https://github.com/eyedeekay/i2p.plugins.firefox)
Source Repository: (https://github.com/eyedeekay/i2p.plugins.firefox)
</a>
</li>
</ul>

View File

@ -1,16 +1,12 @@
#! /usr/bin/env sh
GITHUB_USER=eyedeekay
GITHUB_REPO=i2p.plugins.firefox
GITHUB_NAME="That includes a -usability flag with an alternative extension loadout. Use with caution for now."
GITHUB_DESCRIPTION=$(cat CHANGES.md)
GITHUB_TAG=0.0.19
ant distclean
. ./config.sh
ant distclean clangFmt
./javadoc.sh
NUMLINE=`grep release.number build.xml | head -n 1`
sed -i "s|$NUMLINE| <property name=\"release.number\" value=\"$GITHUB_TAG\" />|g" build.xml
edgar && git push --all
ant jar freeZip jpackage
ant jar freeZip jpackage debian
github-release release --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \
--name "${GITHUB_NAME}" \
@ -22,6 +18,7 @@ github-release edit --user "${GITHUB_USER}" \
--name "${GITHUB_NAME}" \
--description "${GITHUB_DESCRIPTION}" \
--tag "${GITHUB_TAG}"; true
echo "Relase $GITHUB_TAG setup"
github-release upload --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \
--tag "${GITHUB_TAG}" \
@ -29,6 +26,7 @@ github-release upload --user "${GITHUB_USER}" \
--name "i2pfirefox.jar" \
--file "src/build/i2pfirefox.jar" \
--replace
echo "Uploaded jar"
github-release upload --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \
--tag "${GITHUB_TAG}" \
@ -36,12 +34,22 @@ github-release upload --user "${GITHUB_USER}" \
--name "i2pfirefox.zip" \
--file "i2pfirefox.zip" \
--replace
echo "Uploaded freestanding zip"
github-release upload --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \
--tag "${GITHUB_TAG}" \
--name "i2pbrowser-nojava.zip" \
--label "I2P Browser launcher as a Jpackage, does not require a JVM, Linux Only for now unless you BYO." \
--name "i2pbrowser.zip" \
--file "i2pbrowser.zip" \
--replace
--replace
echo "Uploaded jpackage zip"
github-release upload --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \
--tag "${GITHUB_TAG}" \
--label "I2P Browser launcher as a Jpackage inside of a Debian package." \
--name "i2pbrowser_${GITHUB_TAG}_.deb" \
--file "i2pbrowser_${GITHUB_TAG}_amd64.deb" \
--replace
echo "Uploaded debian zip"
git pull github --tags
git push --all

View File

@ -8,3 +8,8 @@
#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; }

Binary file not shown.

View File

@ -0,0 +1,5 @@
This browser profile is entirely composed of the work of Free Software developers.
The licenses for the sub-projects may be found in the extensions directories themselves.
i2p.chromium.usabilty.profile/extensions/i2pchrome.js/
i2p.chromium.usabilty.profile/extensions/noscript.js/

View File

@ -1,6 +0,0 @@
TODO:
Licensing work! This is probably mostly done, but I need to double-check it to make sure
the T&C are the same from all of these extensions are the same as for their Firefox versions
since I did the licensing review already. Since the license is included with the unpacked
extensions, we're almost certainly good.

View File

View File

@ -0,0 +1,7 @@
This browser profile is entirely composed of the work of Free Software developers.
The licenses for the sub-projects may be found in the extensions directories themselves.
i2p.chromium.usabilty.profile/extensions/i2pchrome.js/
i2p.chromium.usabilty.profile/extensions/jshelter.js
i2p.chromium.usabilty.profile/extensions/localcdn.js
i2p.chromium.usabilty.profile/extensions/ublock.js

View File

@ -1,6 +0,0 @@
TODO:
Licensing work! This is probably mostly done, but I need to double-check it to make sure
the T&C are the same from all of these extensions are the same as for their Firefox versions
since I did the licensing review already. Since the license is included with the unpacked
extensions, we're almost certainly good.

Binary file not shown.

View File

View File

@ -60,6 +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);

View File

@ -60,6 +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);

View File

@ -20,7 +20,7 @@ import java.util.ArrayList;
* @author idk
* @since 0.0.16
*/
public class I2PBrowser {
public class I2PBrowser extends I2PCommonBrowser {
private final I2PFirefox i2pFirefox = new I2PFirefox();
private final I2PChromium i2pChromium = new I2PChromium();
private final I2PGenericUnsafeBrowser i2pGeneral =
@ -32,17 +32,17 @@ public class I2PBrowser {
public boolean usability = false;
private void launchFirefox(boolean privateWindow, String[] url) {
System.out.println("I2PFirefox");
println("I2PFirefox");
I2PFirefox.usability = usability;
i2pFirefox.launch(privateWindow, url);
}
private void launchChromium(boolean privateWindow, String[] url) {
System.out.println("I2PChromium");
println("I2PChromium");
I2PChromiumProfileBuilder.usability = usability;
i2pChromium.launch(privateWindow, url);
}
private void launchGeneric(boolean privateWindow, String[] url) {
System.out.println("I2PChromium");
println("I2PChromium");
i2pGeneral.launch(privateWindow, url);
}
@ -112,6 +112,7 @@ public class I2PBrowser {
* @since 0.0.17
*/
public void launch(boolean privateWindow, String[] url) {
validateUserDir();
if (generic)
this.launchGeneric(privateWindow, url);
if ((chromium && firefox) || (!chromium && !firefox)) {
@ -175,26 +176,29 @@ public class I2PBrowser {
}
public static void main(String[] args) {
validateUserDir();
boolean privateBrowsing = false;
System.out.println("I2PBrowser");
println("I2PBrowser");
I2PBrowser i2pBrowser = new I2PBrowser();
ArrayList<String> visitURL = new ArrayList<String>();
if (args != null && args.length > 0) {
for (String arg : args) {
if (arg.equals("-private")) {
privateBrowsing = true;
}
if (arg.equals("-chromium")) {
i2pBrowser.chromium = true;
}
if (arg.equals("-firefox")) {
i2pBrowser.firefox = true;
}
if (arg.equals("-usability")) {
i2pBrowser.usability = true;
}
if (!arg.startsWith("-")) {
visitURL.add(ValidURL(arg));
if (args != null) {
if (args.length > 0) {
for (String arg : args) {
if (arg.equals("-private")) {
privateBrowsing = true;
}
if (arg.equals("-chromium")) {
i2pBrowser.chromium = true;
}
if (arg.equals("-firefox")) {
i2pBrowser.firefox = true;
}
if (arg.equals("-usability")) {
i2pBrowser.usability = true;
}
if (!arg.startsWith("-")) {
visitURL.add(ValidURL(arg));
}
}
}
}

View File

@ -19,7 +19,7 @@ import java.util.ArrayList;
* @author idk
* @since 0.0.1
*/
public class I2PChromium {
public class I2PChromium extends I2PCommonBrowser {
private final String[] CHROMIUM_SEARCH_PATHS = CHROMIUM_FINDER();
private final int DEFAULT_TIMEOUT = 200;
private Process p = null;
@ -35,7 +35,7 @@ public class I2PChromium {
for (String path : CHROMIUM_SEARCH_PATHS) {
File f = new File(path);
if (f.exists()) {
System.out.println("Found Chromium at " + path);
println("Found Chromium at " + path);
return;
}
}
@ -44,7 +44,7 @@ public class I2PChromium {
for (String path : CHROMIUM_SEARCH_PATHS) {
File f = new File(path);
if (f.exists()) {
System.out.println("Found Chromium at " + path);
println("Found Chromium at " + path);
return;
}
}
@ -250,10 +250,10 @@ public class I2PChromium {
for (String chrome : chromees) {
File chromeFile = new File(chrome);
if (chromeFile.exists()) {
System.out.println("Found valid chromium at " + chrome);
println("Found valid chromium at " + chrome);
validChromiums.add(chrome);
}
System.out.println("chrome at " + chrome + "does not exist");
println("chrome at " + chrome + "does not exist");
}
return validChromiums.toArray(new String[validChromiums.size()]);
}
@ -353,9 +353,11 @@ public class I2PChromium {
// return processBuilder(new String[]{});
ArrayList<String> argList = new ArrayList<String>();
argList.add("--incognito");
if (args != null && args.length > 0) {
for (String arg : args) {
argList.add(arg);
if (args != null) {
if (args.length > 0) {
for (String arg : args) {
argList.add(arg);
}
}
}
return processBuilder(argList.toArray(new String[argList.size()]));
@ -397,7 +399,10 @@ public class I2PChromium {
public ProcessBuilder processBuilder(String[] args) {
String chrome = topChromium();
if (!chrome.isEmpty()) {
String[] newArgs = new String[args.length + 32];
int arglength = 0;
if (args != null)
arglength = args.length;
String[] newArgs = new String[arglength + 32];
newArgs[0] = chrome;
newArgs[1] =
"--user-data-dir=" + I2PChromiumProfileBuilder.profileDirectory();
@ -463,15 +468,17 @@ public class I2PChromium {
+","+
new
File(I2PChromiumProfileBuilder.profileDirectory(),"extensions/scriptsafe.js").getAbsolutePath();*/
if (args.length > 0) {
for (int i = 0; i < args.length; i++) {
newArgs[i + 32] = args[i];
if (args != null) {
if (arglength > 0) {
for (int i = 0; i < arglength; i++) {
newArgs[i + 32] = args[i];
}
}
}
return new ProcessBuilder(newArgs).directory(
I2PChromiumProfileBuilder.runtimeDirectory(true));
} else {
System.out.println("No Chromium found.");
println("No Chromium found.");
return new ProcessBuilder(args);
}
}
@ -542,22 +549,24 @@ public class I2PChromium {
}
public Process launchAndDetatch(boolean privateWindow, String[] url) {
validateUserDir();
if (waitForProxy()) {
String profileDirectory = I2PChromiumProfileBuilder.profileDirectory();
if (I2PChromiumProfileChecker.validateProfileDirectory(
profileDirectory)) {
System.out.println("Valid profile directory: " + profileDirectory);
println("Valid profile directory: " + profileDirectory);
} else {
System.out.println("Invalid profile directory: " + profileDirectory +
" rebuilding...");
println("Invalid profile directory: " + profileDirectory +
" rebuilding...");
if (!I2PChromiumProfileBuilder.copyBaseProfiletoProfile()) {
System.out.println("Failed to rebuild profile directory: " +
profileDirectory);
println("Failed to rebuild profile directory: " + profileDirectory);
return null;
} else {
System.out.println("Rebuilt profile directory: " + profileDirectory);
println("Rebuilt profile directory: " + profileDirectory);
}
}
if (validateProfileFirstRun(profileDirectory))
return null;
ProcessBuilder pb = null;
if (privateWindow) {
pb = this.privateProcessBuilder(url);
@ -589,13 +598,15 @@ public class I2PChromium {
public void launch(boolean privateWindow, String[] url) {
if (waitForProxy()) {
p = launchAndDetatch(privateWindow, url);
System.out.println("I2PChromium");
if (p == null)
return;
println("I2PChromium");
try {
System.out.println("Waiting for I2PChromium to close...");
println("Waiting for I2PChromium to close...");
int exit = p.waitFor();
System.out.println("I2PChromium exited with value: " + exit);
println("I2PChromium exited with value: " + exit);
} catch (Exception e) {
System.out.println("Error: " + e.getMessage());
println("Error: " + e.getMessage());
}
}
}
@ -631,24 +642,27 @@ public class I2PChromium {
}
public static void main(String[] args) {
validateUserDir();
boolean privateBrowsing = false;
System.out.println("I2PChromium");
println("I2PChromium");
I2PChromium i2pChromium = new I2PChromium();
System.out.println("checking for private browsing");
println("checking for private browsing");
ArrayList<String> visitURL = new ArrayList<String>();
if (args != null && args.length > 0) {
for (String arg : args) {
if (arg.equals("-private")) {
privateBrowsing = true;
System.out.println(
"private browsing is true, profile will be discarded at end of session");
}
if (arg.equals("-usability")) {
I2PChromiumProfileBuilder.usability = true;
}
if (!arg.startsWith("-")) {
// check if it's a URL
visitURL.add(ValidURL(arg));
if (args != null) {
if (args.length > 0) {
for (String arg : args) {
if (arg.equals("-private")) {
privateBrowsing = true;
println(
"private browsing is true, profile will be discarded at end of session");
}
if (arg.equals("-usability")) {
I2PChromiumProfileBuilder.usability = true;
}
if (!arg.startsWith("-")) {
// check if it's a URL
visitURL.add(ValidURL(arg));
}
}
}
}

View File

@ -120,22 +120,23 @@ public class I2PChromiumProfileBuilder extends I2PCommonBrowser {
public static boolean copyBaseProfiletoProfile() {
String baseProfile = baseProfileDirectory(usabilityMode());
String profile = profileDirectory();
System.out.println("Copying base profile to profile directory: " +
baseProfile + " -> " + profile);
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, "chromium", usabilityMode());
} catch (Exception e) {
System.out.println("Error copying base profile to profile" + e);
return false;
if (!profileDir.exists()) {
try {
println("Copying base profile to profile directory");
copyDirectory(baseProfileDir, profileDir, "chromium", usabilityMode());
} catch (Exception e) {
println("Error copying base profile to profile" + e);
return false;
}
}
System.out.println("Copied base profile to profile directory");
println("Copied base profile to profile directory");
return true;
}

View File

@ -18,7 +18,7 @@ import java.io.File;
* @author idk
* @since 0.0.1
*/
public class I2PChromiumProfileChecker {
public class I2PChromiumProfileChecker extends I2PCommonBrowser {
/**
* Output feedback if the profile directory is valid or invalid
*
@ -29,15 +29,15 @@ public class I2PChromiumProfileChecker {
public static void main(String[] args) {
String profileDirectory = I2PChromiumProfileBuilder.profileDirectory();
if (profileDirectory == null) {
System.out.println("No profile directory found");
println("No profile directory found");
return;
}
System.out.println("Profile directory: " + profileDirectory);
println("Profile directory: " + profileDirectory);
boolean ok = validateProfileDirectory(profileDirectory);
if (ok) {
System.out.println("Profile directory is valid");
println("Profile directory is valid");
} else {
System.out.println("Profile directory is invalid");
println("Profile directory is invalid");
}
}
/**
@ -50,23 +50,23 @@ public class I2PChromiumProfileChecker {
public static boolean validateProfileDirectory(String profileDirectory) {
File profileDir = new File(profileDirectory);
if (!profileDir.exists()) {
System.out.println("Profile directory does not exist");
println("Profile directory does not exist");
return false;
}
if (!profileDir.isDirectory()) {
System.out.println("Profile directory is not a directory");
println("Profile directory is not a directory");
return false;
}
if (!profileDir.canRead()) {
System.out.println("Profile directory is not readable");
println("Profile directory is not readable");
return false;
}
if (!profileDir.canWrite()) {
System.out.println("Profile directory is not writable");
println("Profile directory is not writable");
return false;
}
if (!validateExtensionDirectory(profileDir + "/extensions")) {
System.out.println("extensions directory is invalid");
println("extensions directory is invalid");
return false;
}
return true;
@ -81,19 +81,19 @@ public class I2PChromiumProfileChecker {
public static boolean validateFile(String file) {
File f = new File(file);
if (!f.exists()) {
System.out.println("User JavaScript file does not exist");
println("User JavaScript file does not exist");
return false;
}
if (!f.isFile()) {
System.out.println("User JavaScript file is not a file");
println("User JavaScript file is not a file");
return false;
}
if (!f.canRead()) {
System.out.println("User JavaScript file is not readable");
println("User JavaScript file is not readable");
return false;
}
if (!f.canWrite()) {
System.out.println("User JavaScript file is not writable");
println("User JavaScript file is not writable");
return false;
}
return true;
@ -108,19 +108,19 @@ public class I2PChromiumProfileChecker {
public static boolean validateExtensionDirectory(String extensionDirectory) {
File extensionDir = new File(extensionDirectory);
if (!extensionDir.exists()) {
System.out.println("Extension directory does not exist");
println("Extension directory does not exist");
return false;
}
if (!extensionDir.isDirectory()) {
System.out.println("Extension directory is not a directory");
println("Extension directory is not a directory");
return false;
}
if (!extensionDir.canRead()) {
System.out.println("Extension directory is not readable");
println("Extension directory is not readable");
return false;
}
if (!extensionDir.canWrite()) {
System.out.println("Extension directory is not writable");
println("Extension directory is not writable");
return false;
}
return true;

View File

@ -23,7 +23,7 @@ public class I2PChromiumProfileUnpacker extends I2PCommonBrowser {
public static void main(String[] args) {
String profileDirectory = I2PChromiumProfileBuilder.profileDirectory();
if (profileDirectory == null) {
System.out.println("No profile directory found");
println("No profile directory found");
return;
}
}
@ -35,7 +35,7 @@ public class I2PChromiumProfileUnpacker extends I2PCommonBrowser {
* @since 0.0.1
*/
public boolean unpackProfile(String profileDirectory, String mode) {
System.out.println("Unpacking base profile to " + profileDirectory);
println("Unpacking base profile to " + profileDirectory);
return unpackProfile(profileDirectory, "chromium", mode);
}
}

View File

@ -8,6 +8,9 @@ import java.io.InputStream;
import java.io.OutputStream;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
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;
@ -27,6 +30,93 @@ import java.util.zip.ZipInputStream;
*/
public class I2PCommonBrowser {
static Logger logger = Logger.getLogger("browserlauncher");
static FileHandler fh;
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();
}
}
public static void validateUserDir() {
println("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);
println("user.dir testing !" + userHomeFile.getAbsolutePath() + ".equals(" +
userDirFile.getAbsolutePath() + ")");
if (!userDirFile.getAbsolutePath().contains("Program Files")) {
if (!userDirFile.getAbsolutePath().equals(
userHomeFile.getAbsolutePath())) {
println("user.dir is not inconvenient");
if (userDirFile.exists()) {
println("user.dir exists");
if (userDirFile.isDirectory()) {
println("user.dir is a directory");
if (userDirFile.canWrite()) {
println("user.dir is writable");
return;
} else {
println("user.dir is not writable");
}
}
{ println("user.dir is not actually a directory"); }
} else {
println("user.dir does not exist");
}
} else {
println("user.dir should not be the same as user.home");
}
} else {
println("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()) {
println(
"default path exists and is not a directory, get it out of the way");
println(defaultPathFile.getAbsolutePath());
}
System.setProperty("user.dir", defaultPathFile.getAbsolutePath());
}
private static boolean isWindows() {
String osName = System.getProperty("os.name");
println("os.name" + osName);
if (osName.contains("windows"))
return true;
if (osName.contains("Windows"))
return true;
if (osName.contains("WINDOWS"))
return true;
return false;
}
public static void println(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
@ -118,16 +208,16 @@ public class I2PCommonBrowser {
protected boolean unpackProfile(String profileDirectory, String browser,
String base) {
System.out.println("Unpacking base profile to " + profileDirectory);
println("Unpacking base profile to " + profileDirectory);
try {
final InputStream resources =
this.getClass().getClassLoader().getResourceAsStream(
"i2p." + browser + "." + base + ".profile.zip");
if (resources == null) {
System.out.println("Could not find resources");
println("Could not find resources");
return false;
}
System.out.println(resources.toString());
println(resources.toString());
// InputStream corresponds to a zip file. Unzip it.
// Files.copy(r, new File(profileDirectory).toPath(),
// StandardCopyOption.REPLACE_EXISTING);
@ -135,15 +225,14 @@ public class I2PCommonBrowser {
ZipEntry entry;
// while there are entries I process them
while ((entry = zis.getNextEntry()) != null) {
System.out.println("entry: " + entry.getName() + ", " +
entry.getSize());
println("entry: " + entry.getName() + ", " + entry.getSize());
// consume all the data from this entry
if (entry.isDirectory()) {
System.out.println("Creating directory: " + entry.getName());
println("Creating directory: " + entry.getName());
File dir = new File(profileDirectory + "/" + entry.getName());
dir.mkdirs();
} else {
System.out.println("Creating file: " + entry.getName());
println("Creating file: " + entry.getName());
File file = new File(profileDirectory + "/" + entry.getName());
file.createNewFile();
Files.copy(zis, file.toPath(), StandardCopyOption.REPLACE_EXISTING);
@ -156,7 +245,7 @@ public class I2PCommonBrowser {
// loop through the Enumeration
} catch (Exception e) {
System.out.println("Error copying profile files: " + e.getMessage());
println("Error copying profile files: " + e.getMessage());
return false;
}
return true;
@ -199,4 +288,23 @@ public class I2PCommonBrowser {
}
}
}
public static boolean validateProfileFirstRun(String profileDirectory) {
File profileDir = new File(profileDirectory);
if (!profileDir.exists()) {
println("Profile directory does not exist");
return false;
}
if (!profileDir.isDirectory()) {
println("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;
}
}

View File

@ -19,7 +19,7 @@ import java.util.ArrayList;
* @author idk
* @since 0.0.1
*/
public class I2PFirefox {
public class I2PFirefox extends I2PCommonBrowser {
private final String[] FIREFOX_SEARCH_PATHS = FIREFOX_FINDER();
private final int DEFAULT_TIMEOUT = 200;
private Process p = null;
@ -36,7 +36,7 @@ public class I2PFirefox {
for (String path : FIREFOX_SEARCH_PATHS) {
File f = new File(path);
if (f.exists()) {
System.out.println("Found Firefox at " + path);
println("Found Firefox at " + path);
return;
}
}
@ -184,6 +184,8 @@ public class I2PFirefox {
// list the files in the user.dir directory
if (userFiles != null) {
for (File userFile : userFiles) {
if (userFile.isDirectory())
continue;
if (userFile.getName().equals("firefox") ||
userFile.getName().equals("firefox-bin") ||
userFile.getName().equals("firefox-esr") ||
@ -238,10 +240,10 @@ public class I2PFirefox {
for (String firefox : firefoxes) {
File firefoxFile = new File(firefox);
if (firefoxFile.exists()) {
System.out.println("Found valid firefox at " + firefox);
println("Found valid firefox at " + firefox);
validFirefoxes.add(firefox);
}
System.out.println("firefox at " + firefox + "does not exist");
println("firefox at " + firefox + "does not exist");
}
return validFirefoxes.toArray(new String[validFirefoxes.size()]);
}
@ -341,9 +343,11 @@ public class I2PFirefox {
public ProcessBuilder privateProcessBuilder(String[] args) {
ArrayList<String> argList = new ArrayList<String>();
argList.add("--private-window");
if (args != null && args.length > 0) {
for (String arg : args) {
argList.add(arg);
if (args != null) {
if (args.length > 0) {
for (String arg : args) {
argList.add(arg);
}
}
}
return processBuilder(argList.toArray(new String[argList.size()]));
@ -362,19 +366,26 @@ public class I2PFirefox {
public ProcessBuilder processBuilder(String[] args) {
String firefox = topFirefox();
if (!firefox.isEmpty()) {
String[] newArgs = new String[args.length + 3];
int arglength = 0;
if (args != null)
arglength = args.length;
String[] newArgs = new String[arglength + 5];
newArgs[0] = firefox;
newArgs[1] = "--profile";
newArgs[2] = I2PFirefoxProfileBuilder.profileDirectory();
if (args != null && args.length > 0) {
for (int i = 0; i < args.length; i++) {
newArgs[i + 3] = args[i];
newArgs[1] = "-attach-console";
newArgs[2] = "--new-instance";
newArgs[3] = "--profile";
newArgs[4] = I2PFirefoxProfileBuilder.profileDirectory();
if (args != null) {
if (arglength > 0) {
for (int i = 0; i < arglength; i++) {
newArgs[i + 5] = args[i];
}
}
}
return new ProcessBuilder(newArgs).directory(
I2PFirefoxProfileBuilder.runtimeDirectory(true));
} else {
System.out.println("No Firefox found.");
println("No Firefox found.");
return new ProcessBuilder(args);
}
}
@ -423,6 +434,7 @@ public class I2PFirefox {
*/
public boolean waitForProxy(int timeout, int port, String host) {
for (int i = 0; i < timeout; i++) {
println("Waiting for proxy");
if (checkifPortIsOccupied(port, host)) {
return true;
}
@ -452,22 +464,24 @@ public class I2PFirefox {
}
public Process launchAndDetatch(boolean privateWindow, String[] url) {
validateUserDir();
if (waitForProxy()) {
String profileDirectory = I2PFirefoxProfileBuilder.profileDirectory();
if (I2PFirefoxProfileChecker.validateProfileDirectory(profileDirectory)) {
System.out.println("Valid profile directory: " + profileDirectory);
println("Valid profile directory: " + profileDirectory);
} else {
System.out.println("Invalid profile directory: " + profileDirectory +
" rebuilding...");
println("Invalid profile directory: " + profileDirectory +
" rebuilding...");
if (!I2PFirefoxProfileBuilder.copyBaseProfiletoProfile(
usabilityMode())) {
System.out.println("Failed to rebuild profile directory: " +
profileDirectory);
println("Failed to rebuild profile directory: " + profileDirectory);
return null;
} else {
System.out.println("Rebuilt profile directory: " + profileDirectory);
println("Rebuilt profile directory: " + profileDirectory);
}
}
if (validateProfileFirstRun(profileDirectory))
return null;
ProcessBuilder pb;
if (privateWindow) {
pb = privateProcessBuilder(url);
@ -477,7 +491,7 @@ public class I2PFirefox {
try {
System.out.println(pb.command());
p = pb.start();
System.out.println("I2PFirefox");
println("I2PFirefox");
sleep(2000);
return p;
} catch (Throwable e) {
@ -500,12 +514,14 @@ public class I2PFirefox {
public void launch(boolean privateWindow, String[] url) {
if (waitForProxy()) {
p = launchAndDetatch(privateWindow, url);
if (p == null)
return;
try {
System.out.println("Waiting for I2PFirefox to close...");
println("Waiting for I2PFirefox to close...");
int exit = p.waitFor();
System.out.println("I2PFirefox exited with value: " + exit);
println("I2PFirefox exited with value: " + exit);
} catch (Exception e) {
System.out.println("Error: " + e.getMessage());
println("Error: " + e.getMessage());
}
}
}
@ -535,7 +551,7 @@ public class I2PFirefox {
String[] schemes = {"http", "https"};
for (String scheme : schemes) {
if (inUrl.startsWith(scheme)) {
System.out.println("Valid URL: " + inUrl);
println("Valid URL: " + inUrl);
return inUrl;
}
}
@ -543,26 +559,29 @@ public class I2PFirefox {
}
public static void main(String[] args) {
validateUserDir();
boolean privateBrowsing = false;
System.out.println("checking for private browsing");
println("checking for private browsing");
ArrayList<String> visitURL = new ArrayList<String>();
if (args != null && args.length > 0) {
for (String arg : args) {
if (arg.equals("-private")) {
privateBrowsing = true;
System.out.println(
"private browsing is true, profile will be discarded at end of session");
}
if (arg.equals("-usability")) {
usability = true;
}
if (!arg.startsWith("-")) {
// check if it's a URL
visitURL.add(ValidURL(arg));
if (args != null) {
if (args.length > 0) {
for (String arg : args) {
if (arg.equals("-private")) {
privateBrowsing = true;
println(
"private browsing is true, profile will be discarded at end of session");
}
if (arg.equals("-usability")) {
usability = true;
}
if (!arg.startsWith("-")) {
// check if it's a URL
visitURL.add(ValidURL(arg));
}
}
}
}
System.out.println("I2PFirefox");
println("I2PFirefox");
I2PFirefox i2pFirefox = new I2PFirefox();
i2pFirefox.launch(privateBrowsing,
visitURL.toArray(new String[visitURL.size()]));

View File

@ -112,22 +112,24 @@ public class I2PFirefoxProfileBuilder extends I2PCommonBrowser {
public static boolean copyBaseProfiletoProfile(String base) {
String baseProfile = baseProfileDirectory(base);
String profile = profileDirectory();
System.out.println("Copying base profile to profile directory: " +
baseProfile + " -> " + profile);
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, "firefox", base);
} catch (Exception e) {
System.out.println("Error copying base profile to profile" + e);
return false;
if (!profileDir.exists()) {
try {
println("Copying base profile to profile directory");
copyDirectory(baseProfileDir, profileDir, "firefox", base);
} catch (Exception e) {
println("Error copying base profile to profile" + e);
return false;
}
println("Copied base profile to profile directory");
}
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;
@ -169,7 +171,7 @@ public class I2PFirefoxProfileBuilder extends I2PCommonBrowser {
Files.copy(baseOverrides.toPath(), userOverrides.toPath(),
StandardCopyOption.REPLACE_EXISTING);
} catch (Exception e) {
System.out.println("Error copying base profile to profile" + e);
println("Error copying base profile to profile" + e);
return false;
}
// if user-overrides.js does not exist yet, make an empty one.

View File

@ -1,6 +1,10 @@
package net.i2p.i2pfirefox;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
/**
* I2PFirefoxProfileChecker.java
@ -18,7 +22,7 @@ import java.io.File;
* @author idk
* @since 0.0.1
*/
public class I2PFirefoxProfileChecker {
public class I2PFirefoxProfileChecker extends I2PCommonBrowser {
/**
* @param args unused
@ -26,15 +30,15 @@ public class I2PFirefoxProfileChecker {
public static void main(String[] args) {
String profileDirectory = I2PFirefoxProfileBuilder.profileDirectory();
if (profileDirectory == null) {
System.out.println("No profile directory found");
println("No profile directory found");
return;
}
System.out.println("Profile directory: " + profileDirectory);
println("Profile directory: " + profileDirectory);
boolean ok = validateProfileDirectory(profileDirectory);
if (ok) {
System.out.println("Profile directory is valid");
println("Profile directory is valid");
} else {
System.out.println("Profile directory is invalid");
println("Profile directory is invalid");
}
}
/**
@ -47,34 +51,84 @@ public class I2PFirefoxProfileChecker {
public static boolean validateProfileDirectory(String profileDirectory) {
File profileDir = new File(profileDirectory);
if (!profileDir.exists()) {
System.out.println("Profile directory does not exist");
println("Profile directory does not exist");
return false;
}
if (!profileDir.isDirectory()) {
System.out.println("Profile directory is not a directory");
println("Profile directory is not a directory");
return false;
}
if (!profileDir.canRead()) {
System.out.println("Profile directory is not readable");
println("Profile directory is not readable");
return false;
}
if (!profileDir.canWrite()) {
System.out.println("Profile directory is not writable");
println("Profile directory is not writable");
return false;
}
if (!validateFile(profileDir + "/prefs.js")) {
System.out.println("prefs.js is not valid");
println("prefs.js is not valid");
return false;
}
if (!validateFile(profileDir + "/user.js")) {
System.out.println("user.js is not valid");
println("user.js is not valid");
return false;
}
if (!validateExtensionDirectory(profileDir + "/extensions")) {
System.out.println("extensions directory is invalid");
println("extensions directory is invalid");
return false;
}
return true;
return deRestrictHTTPS(profileDir.toString());
}
private static boolean deRestrictHTTPS(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);
}
File userSettings = new File(profile, "user.js");
if (userSettings.exists()) {
undoHttpsOnlyMode(userSettings);
}
File userOverrides = new File(profile, "user-overrides.js");
if (userOverrides.exists()) {
undoHttpsOnlyMode(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";
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.
@ -86,19 +140,19 @@ public class I2PFirefoxProfileChecker {
public static boolean validateFile(String file) {
File f = new File(file);
if (!f.exists()) {
System.out.println("User JavaScript file does not exist");
println("User JavaScript file does not exist");
return false;
}
if (!f.isFile()) {
System.out.println("User JavaScript file is not a file");
println("User JavaScript file is not a file");
return false;
}
if (!f.canRead()) {
System.out.println("User JavaScript file is not readable");
println("User JavaScript file is not readable");
return false;
}
if (!f.canWrite()) {
System.out.println("User JavaScript file is not writable");
println("User JavaScript file is not writable");
return false;
}
return true;
@ -113,19 +167,19 @@ public class I2PFirefoxProfileChecker {
public static boolean validateExtensionDirectory(String extensionDirectory) {
File extensionDir = new File(extensionDirectory);
if (!extensionDir.exists()) {
System.out.println("Extension directory does not exist");
println("Extension directory does not exist");
return false;
}
if (!extensionDir.isDirectory()) {
System.out.println("Extension directory is not a directory");
println("Extension directory is not a directory");
return false;
}
if (!extensionDir.canRead()) {
System.out.println("Extension directory is not readable");
println("Extension directory is not readable");
return false;
}
if (!extensionDir.canWrite()) {
System.out.println("Extension directory is not writable");
println("Extension directory is not writable");
return false;
}
return true;

View File

@ -23,7 +23,7 @@ public class I2PFirefoxProfileUnpacker extends I2PCommonBrowser {
public static void main(String[] args) {
String profileDirectory = I2PFirefoxProfileBuilder.profileDirectory();
if (profileDirectory == null) {
System.out.println("No profile directory found");
println("No profile directory found");
return;
}
}

View File

@ -192,10 +192,13 @@ public class I2PGenericUnsafeBrowser extends I2PCommonBrowser {
public ProcessBuilder baseProcessBuilder(String[] args) {
String browser = findUnsafeBrowserAnywhere();
if (!browser.isEmpty()) {
String[] newArgs = new String[args.length + 1];
int arglength = 0;
if (args != null)
arglength = args.length;
String[] newArgs = new String[arglength + 1];
newArgs[0] = browser;
if (args != null && args.length > 0) {
for (int i = 0; i < args.length; i++) {
if (args != null && arglength > 0) {
for (int i = 0; i < arglength; i++) {
newArgs[i + 1] = args[i];
}
}
@ -213,7 +216,7 @@ public class I2PGenericUnsafeBrowser extends I2PCommonBrowser {
pb.environment().put("NO_PROXY", "http://127.0.0.1:7657");
return pb;
} else {
System.out.println("No Browser found.");
println("No Browser found.");
return new ProcessBuilder(args);
}
}
@ -323,6 +326,7 @@ public class I2PGenericUnsafeBrowser extends I2PCommonBrowser {
}
public Process launchAndDetatch(boolean privateWindow, String[] url) {
validateUserDir();
if (waitForProxy()) {
ProcessBuilder pb;
if (privateWindow) {
@ -333,7 +337,7 @@ public class I2PGenericUnsafeBrowser extends I2PCommonBrowser {
try {
System.out.println(pb.command());
p = pb.start();
System.out.println("I2PBrowser");
println("I2PBrowser");
sleep(2000);
return p;
} catch (Throwable e) {
@ -347,16 +351,15 @@ public class I2PGenericUnsafeBrowser extends I2PCommonBrowser {
if (waitForProxy()) {
p = launchAndDetatch(privateWindow, url);
try {
System.out.println("Waiting for I2PBrowser to close...");
println("Waiting for I2PBrowser to close...");
int exit = p.waitFor();
if (privateWindow) {
if (deleteRuntimeDirectory())
System.out.println(
"Private browsing enforced, deleting runtime directory");
println("Private browsing enforced, deleting runtime directory");
}
System.out.println("I2PBrowser exited with value: " + exit);
println("I2PBrowser exited with value: " + exit);
} catch (Exception e) {
System.out.println("Error: " + e.getMessage());
println("Error: " + e.getMessage());
}
}
}
@ -373,7 +376,7 @@ public class I2PGenericUnsafeBrowser extends I2PCommonBrowser {
String[] schemes = {"http", "https"};
for (String scheme : schemes) {
if (inUrl.startsWith(scheme)) {
System.out.println("Valid URL: " + inUrl);
println("Valid URL: " + inUrl);
return inUrl;
}
}
@ -391,23 +394,26 @@ public class I2PGenericUnsafeBrowser extends I2PCommonBrowser {
//
public static void main(String[] args) {
validateUserDir();
boolean privateBrowsing = false;
System.out.println("checking for private browsing");
println("checking for private browsing");
ArrayList<String> visitURL = new ArrayList<String>();
if (args != null && args.length > 0) {
for (String arg : args) {
if (arg.equals("-private")) {
privateBrowsing = true;
System.out.println(
"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));
if (args != null) {
if (args.length > 0) {
for (String arg : args) {
if (arg.equals("-private")) {
privateBrowsing = true;
println(
"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));
}
}
}
}
System.out.println("I2PGenericUnsafeBrowser");
println("I2PGenericUnsafeBrowser");
I2PGenericUnsafeBrowser i2pBrowser = new I2PGenericUnsafeBrowser();
i2pBrowser.launch(privateBrowsing,
visitURL.toArray(new String[visitURL.size()]));

View File

@ -155,3 +155,10 @@ input {
float: right;
width: 15%;
}
#returnhome {
font-size: xxx-large;
display: inline;
}
h1 {
display: inline;
}

15
windows-release.sh Executable file
View File

@ -0,0 +1,15 @@
#! /usr/bin/env sh
git pull --all
. ../i2p.firefox/config.sh
. ./config.sh
. "${HOME}/github-release-config.sh"
ant distclean jar jpackage
./windows.sh
github-release upload --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \
--tag "${GITHUB_TAG}" \
--label "I2P Browser launcher as a Jpackage inside of an MSI package." \
--name "i2pbrowser_${GITHUB_TAG}.msi" \
--file "i2pbrowser_${GITHUB_TAG}.msi" \
--replace
echo "Uploaded Windows MSI package"

18
windows.sh Executable file
View File

@ -0,0 +1,18 @@
#! /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 \
--name i2pbrowser \
--app-version "$GITHUB_TAG" \
--input src/build \
--main-jar i2pfirefox.jar \
--main-class net.i2p.i2pfirefox.I2PBrowser