Compare commits
155 Commits
Author | SHA1 | Date | |
---|---|---|---|
186604d7c4 | |||
116144bc18 | |||
a0b7383afd | |||
89f407c171 | |||
b942668af8 | |||
231cb6aa02 | |||
f011e8c85b | |||
af3a99d314 | |||
47b296ce66 | |||
e5799fb837 | |||
655bc45035 | |||
4e51986e02 | |||
ccdd1dc33a | |||
7c7d175c10 | |||
be7155a88f | |||
0473572933 | |||
e0b1eabfee | |||
7d7cffd843 | |||
c9eacd23d3 | |||
d2a1a69d69 | |||
2c28435f7e | |||
fcbda43ca5 | |||
491c7124b7 | |||
2788c000c4 | |||
928d2b2761 | |||
47a3845f96 | |||
f5a7c25aa8 | |||
c48db5046a | |||
05e2dee979 | |||
b719d69d23 | |||
f438b6c292 | |||
53669601fc | |||
5886cf69a2 | |||
6da5998660 | |||
939acd2857 | |||
259e9aea66 | |||
b80787d7ba | |||
1060e6959d | |||
370b547272 | |||
67c487ceb7 | |||
f3bf7a928f | |||
daf642f145 | |||
f7fa3c3eca | |||
b638c4a140 | |||
d77e531867 | |||
1b06f8f296 | |||
158b1cecfe | |||
ba9ee25941 | |||
596bb77102 | |||
7b10fc640d | |||
cc54b85188 | |||
0a814a5e50 | |||
8c66473d88 | |||
30dacc7005 | |||
8e4409a02a | |||
66031ea4c0 | |||
29c6158048 | |||
4d4325a032 | |||
e95f5ceb8f | |||
16f32e97e3 | |||
ae87e04ec7 | |||
c0766b1eb0 | |||
0c56acde13 | |||
82730621ae | |||
932d14e1d7 | |||
1be56efa34 | |||
22bd6ec799 | |||
ab5d73fb40 | |||
3e0002d424 | |||
0a67ca0e1c | |||
174342bce1 | |||
f94fd15e5b | |||
849fc3fdf3 | |||
0329e4f06f | |||
fa83389e73 | |||
9182ceeb5c | |||
343919bef6 | |||
7defc6b137 | |||
a3be32d39a | |||
d88383037e | |||
f889b8fc94 | |||
ce8ec78beb | |||
c6c555cb1c | |||
d4cc2c1d45 | |||
46afb304a5 | |||
35b00a886e | |||
2a4a601176 | |||
a8573b79f9 | |||
5024666f9e | |||
f7fddfdb4b | |||
398bfe4ef1 | |||
f380df9075 | |||
b90c09c17f | |||
6b90f5548a | |||
45f6a1c96b | |||
dca4ffa7e9 | |||
c883f035d5 | |||
de082ceba2 | |||
396ebef9b1 | |||
18e42da0d7 | |||
682a9487ae | |||
9747a456ce | |||
2c608ccbc5 | |||
ef9c5fcb2c | |||
ac3d5a34fb | |||
41d7c188f8 | |||
4e254d59c3 | |||
629162372e | |||
b1bfd39327 | |||
3ee2c7a10d | |||
44ce1d2ed2 | |||
7cef932d3d | |||
c063eae03c | |||
7f9bcbe1c0 | |||
e023469b93 | |||
0cf817bb09 | |||
865c0fca84 | |||
6ecd993531 | |||
b6ab50c337 | |||
3ad98b38ab | |||
8ba4651e32 | |||
3e5b9c049d | |||
e5d36aff8f | |||
fa3fa165b1 | |||
5211c6d7e0 | |||
ce6a31166b | |||
842f4bb992 | |||
5fefdab16d | |||
53d4cf8146 | |||
6daeaf8297 | |||
8645f69067 | |||
4f22360b2f | |||
ccfe0af3f6 | |||
3b204871bf | |||
1f7854b35e | |||
89acc78048 | |||
31291214e2 | |||
2875197bc8 | |||
2bb8d35ed2 | |||
e9424ee482 | |||
2f3fb18eac | |||
51ecaaf1d9 | |||
11f32c211b | |||
6417dba4f5 | |||
4090df0148 | |||
154eec9e01 | |||
365c5ac6e8 | |||
bcb0919efa | |||
2f9b0e3686 | |||
62167a118a | |||
82ccb9c47f | |||
120f92d626 | |||
2c7b9a8fea | |||
20fd681f46 | |||
31c7096edc |
5
.gitignore
vendored
@ -6,5 +6,8 @@ src/i2p.firefox.base.profile.zip
|
||||
generated/
|
||||
i2p.chromium.base.profile
|
||||
i2p.firefox.base.profile
|
||||
i2p.chromium/profile
|
||||
i2p.chromium.profile
|
||||
i2p.firefox.profile
|
||||
src/build
|
||||
*.err
|
||||
*.log
|
111
CHANGES.html
@ -27,6 +27,16 @@
|
||||
CHANGES
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="EXAMPLES.html">
|
||||
EXAMPLES
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PBrowser.html">
|
||||
I2PBrowser
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromium.html">
|
||||
I2PChromium
|
||||
@ -67,11 +77,21 @@
|
||||
I2PFirefoxProfileUnpacker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PGenericUnsafeBrowser.html">
|
||||
I2PGenericUnsafeBrowser
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="LICENSE.html">
|
||||
LICENSE
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="USAGE.html">
|
||||
USAGE
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<br>
|
||||
<a href="#hidenav">
|
||||
@ -81,6 +101,91 @@
|
||||
</div>
|
||||
</div>
|
||||
<h2>
|
||||
<a href="#sun-august-28" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
Sun, August 28
|
||||
</h2>
|
||||
<ul>
|
||||
<li>
|
||||
Adds support for generically configuring a browser with environment variables.
|
||||
</li>
|
||||
<li>
|
||||
Bugfix for MSEdgium support
|
||||
</li>
|
||||
<li>
|
||||
Add detachable version of launchers
|
||||
</li>
|
||||
</ul>
|
||||
<h2>
|
||||
<a href="#sat-august-27" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
Sat, August 27
|
||||
</h2>
|
||||
<ul>
|
||||
<li>
|
||||
Added support for passing a URL as a parameter to the cli's
|
||||
</li>
|
||||
<li>
|
||||
revised test.sh
|
||||
</li>
|
||||
</ul>
|
||||
<h2>
|
||||
<a href="#mon-august-22" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
Mon, August 22
|
||||
</h2>
|
||||
<ul>
|
||||
<li>
|
||||
Completes support for auto-selecting
|
||||
<em>
|
||||
either
|
||||
</em>
|
||||
a Firefox or Chrome instance, automatically
|
||||
</li>
|
||||
</ul>
|
||||
<h2>
|
||||
<a href="#sat-august-21" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
Sat, August 21
|
||||
</h2>
|
||||
<ul>
|
||||
<li>
|
||||
Adds support for passing the -private flag to start Firefox with --private-window and Chromium --incognito
|
||||
</li>
|
||||
</ul>
|
||||
<h2>
|
||||
<a href="#fri-august-20" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
Fri, August 20
|
||||
</h2>
|
||||
<ul>
|
||||
<li>
|
||||
Chromium is now a first-class citizen
|
||||
</li>
|
||||
</ul>
|
||||
<h2>
|
||||
<a href="#fri-august-19" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
Fri, August 19
|
||||
</h2>
|
||||
<ul>
|
||||
<li>
|
||||
Adds the ability to pass --private-window to Firefoxes and --incognito to Chromiums
|
||||
</li>
|
||||
<li>
|
||||
Switch Tor Browser to the top of the order on Windows to match i2p.firefox behavior
|
||||
</li>
|
||||
</ul>
|
||||
<h2>
|
||||
<a href="#mon-august-8" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
Mon, August 8
|
||||
</h2>
|
||||
<ul>
|
||||
@ -92,6 +197,9 @@
|
||||
</li>
|
||||
</ul>
|
||||
<h2>
|
||||
<a href="#sun-august-7" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
Sun, August 7
|
||||
</h2>
|
||||
<ul>
|
||||
@ -115,6 +223,9 @@
|
||||
</li>
|
||||
</ul>
|
||||
<h2>
|
||||
<a href="#saturday-august-6" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
Saturday, August 6
|
||||
</h2>
|
||||
<ul>
|
||||
|
34
CHANGES.md
@ -1,3 +1,37 @@
|
||||
Sun, August 28
|
||||
--------------
|
||||
|
||||
- Adds support for generically configuring a browser with environment variables.
|
||||
- Bugfix for MSEdgium support
|
||||
- Add detachable version of launchers
|
||||
|
||||
Sat, August 27
|
||||
--------------
|
||||
|
||||
- Added support for passing a URL as a parameter to the cli's
|
||||
- revised test.sh
|
||||
|
||||
Mon, August 22
|
||||
--------------
|
||||
|
||||
- Completes support for auto-selecting *either* a Firefox or Chrome instance, automatically
|
||||
|
||||
Sat, August 21
|
||||
--------------
|
||||
|
||||
- Adds support for passing the -private flag to start Firefox with --private-window and Chromium --incognito
|
||||
|
||||
Fri, August 20
|
||||
--------------
|
||||
|
||||
- Chromium is now a first-class citizen
|
||||
|
||||
Fri, August 19
|
||||
--------------
|
||||
|
||||
- Adds the ability to pass --private-window to Firefoxes and --incognito to Chromiums
|
||||
- Switch Tor Browser to the top of the order on Windows to match i2p.firefox behavior
|
||||
|
||||
Mon, August 8
|
||||
-------------
|
||||
|
||||
|
973
EXAMPLES.html
Normal file
@ -0,0 +1,973 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
i2p.plugins.fire...
|
||||
</title>
|
||||
<meta name="author" content="eyedeekay" />
|
||||
<meta name="description" content="i2p.plugins.firefox" />
|
||||
<meta name="keywords" content="main" />
|
||||
<link rel="stylesheet" type="text/css" href="style.css" />
|
||||
<link rel="stylesheet" type="text/css" href="showhider.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="navbar">
|
||||
<a href="#shownav">
|
||||
Show navigation
|
||||
</a>
|
||||
<div id="shownav">
|
||||
<div id="hidenav">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="index.html">
|
||||
index
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="CHANGES.html">
|
||||
CHANGES
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="EXAMPLES.html">
|
||||
EXAMPLES
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PBrowser.html">
|
||||
I2PBrowser
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromium.html">
|
||||
I2PChromium
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromiumProfileBuilder.html">
|
||||
I2PChromiumProfileBuilder
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromiumProfileChecker.html">
|
||||
I2PChromiumProfileChecker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromiumProfileUnpacker.html">
|
||||
I2PChromiumProfileUnpacker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PFirefox.html">
|
||||
I2PFirefox
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PFirefoxProfileBuilder.html">
|
||||
I2PFirefoxProfileBuilder
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PFirefoxProfileChecker.html">
|
||||
I2PFirefoxProfileChecker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PFirefoxProfileUnpacker.html">
|
||||
I2PFirefoxProfileUnpacker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PGenericUnsafeBrowser.html">
|
||||
I2PGenericUnsafeBrowser
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="LICENSE.html">
|
||||
LICENSE
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="USAGE.html">
|
||||
USAGE
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<br>
|
||||
<a href="#hidenav">
|
||||
Hide Navigation
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
:; dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd); java -cp "$dir"/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>
|
||||
<a href="#show">
|
||||
Show license
|
||||
</a>
|
||||
<div id="show">
|
||||
<div id="hide">
|
||||
<pre><code> Copyright 2022 idk (hankhill19580@gmail.com)
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
========================================================================
|
||||
Includes code from zzzot:
|
||||
|
||||
Copyright 2010 zzz (zzz@mail.i2p)
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
========================================================================
|
||||
Includes code from Jetty 5.1.15:
|
||||
|
||||
Copyright 199-2004 Mort Bay Consulting Pty. Ltd.
|
||||
------------------------------------------------------------------------
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019 idk
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
HTTPS Everwyhere:
|
||||
Copyright © 2010-2012 Mike Perry <mikeperry@fscked.org>
|
||||
Peter Eckersley <pde@eff.org>
|
||||
and many others
|
||||
(Licensed GPL v2+)
|
||||
|
||||
Incorporating code from NoScript,
|
||||
Copyright © 2004-2007 Giorgio Maone <g.maone@informaction.com>
|
||||
Licensed GPL v2+
|
||||
|
||||
Incorporating code from Convergence
|
||||
Copyright © Moxie Marlinspike
|
||||
Licensed GPL v3+
|
||||
|
||||
Incorporating code from URI.js
|
||||
Copyright © Rodney Rehm
|
||||
Licensed MIT, GPL V3
|
||||
|
||||
Incorporating code from js-lru
|
||||
Copyright © 2010 Rasmus Andersson
|
||||
Licensed MIT
|
||||
|
||||
The build system incorporates code from Python 2.6,
|
||||
Copyright © 2001-2006 Python Software Foundation
|
||||
Python Software Foundation License Version 2
|
||||
|
||||
Net License: GPL v3+ (complete tree)
|
||||
GPL v2+ (if Moxie's NSS.js is absent)
|
||||
|
||||
|
||||
Text of MIT License:
|
||||
====================
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
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. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019 idk
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
HTTPS Everwyhere:
|
||||
Copyright © 2010-2012 Mike Perry <mikeperry@fscked.org>
|
||||
Peter Eckersley <pde@eff.org>
|
||||
and many others
|
||||
(Licensed GPL v2+)
|
||||
|
||||
Incorporating code from NoScript,
|
||||
Copyright © 2004-2007 Giorgio Maone <g.maone@informaction.com>
|
||||
Licensed GPL v2+
|
||||
|
||||
Incorporating code from Convergence
|
||||
Copyright © Moxie Marlinspike
|
||||
Licensed GPL v3+
|
||||
|
||||
Incorporating code from URI.js
|
||||
Copyright © Rodney Rehm
|
||||
Licensed MIT, GPL V3
|
||||
|
||||
Incorporating code from js-lru
|
||||
Copyright © 2010 Rasmus Andersson
|
||||
Licensed MIT
|
||||
|
||||
The build system incorporates code from Python 2.6,
|
||||
Copyright © 2001-2006 Python Software Foundation
|
||||
Python Software Foundation License Version 2
|
||||
|
||||
Net License: GPL v3+ (complete tree)
|
||||
GPL v2+ (if Moxie's NSS.js is absent)
|
||||
|
||||
|
||||
Text of MIT License:
|
||||
====================
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
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. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
</code></pre>
|
||||
<a href="#hide">
|
||||
Hide license
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe>
|
||||
</div>
|
||||
<div>
|
||||
<a href="https://geti2p.net/">
|
||||
<img src="i2plogo.png"></img>
|
||||
I2P
|
||||
</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
3
EXAMPLES.md
Normal file
@ -0,0 +1,3 @@
|
||||
:; dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd); java -cp "$dir"/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PChromium -private; exit $?
|
||||
@ECHO OFF
|
||||
java -cp %cd%/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PChromium -private
|
1486
I2PBrowser.html
Normal file
192
I2PBrowser.md
Normal file
@ -0,0 +1,192 @@
|
||||
# Class I2PBrowser [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java)
|
||||
|
||||
> */
|
||||
|
||||
Access: public
|
||||
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
|
||||
package: net.i2p.i2pfirefox
|
||||
|
||||
## Dependencies
|
||||
|
||||
<details>
|
||||
<summary>
|
||||
Show dependencies
|
||||
</summary>
|
||||
<ul>
|
||||
<li>java.util.ArrayList</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
## Member Variables
|
||||
|
||||
#### I2PFirefox i2pFirefox [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L)
|
||||
|
||||
>
|
||||
|
||||
+ Access: private
|
||||
+ Modifiers: final
|
||||
|
||||
#### I2PChromium i2pChromium [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L)
|
||||
|
||||
>
|
||||
|
||||
+ Access: private
|
||||
+ Modifiers: final
|
||||
|
||||
#### I2PGenericUnsafeBrowser i2pGeneral [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L)
|
||||
|
||||
>
|
||||
|
||||
+ Access: private
|
||||
+ Modifiers: final
|
||||
|
||||
#### boolean firefox [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L)
|
||||
|
||||
>
|
||||
|
||||
+ Access: public
|
||||
|
||||
#### boolean chromium [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L)
|
||||
|
||||
>
|
||||
|
||||
+ Access: public
|
||||
|
||||
#### boolean generic [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L)
|
||||
|
||||
>
|
||||
|
||||
+ Access: public
|
||||
|
||||
#### boolean chromiumFirst [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L)
|
||||
|
||||
>
|
||||
|
||||
+ Access: public
|
||||
|
||||
## Methods
|
||||
|
||||
### launchFirefox [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L32)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
+ return: void
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| privateWindow | boolean | |
|
||||
| url | String[] | |
|
||||
|
||||
|
||||
### launchChromium [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L36)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
+ return: void
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| privateWindow | boolean | |
|
||||
| url | String[] | |
|
||||
|
||||
|
||||
### launchGeneric [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L40)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
+ return: void
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| privateWindow | boolean | |
|
||||
| url | String[] | |
|
||||
|
||||
|
||||
### setBrowser [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L62)
|
||||
|
||||
+ Description:
|
||||
+ Access: public
|
||||
+ return: void
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| browserPath | String | |
|
||||
|
||||
|
||||
### hasChromium [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L72)
|
||||
|
||||
+ Description: Return true if there is a Chromium available
|
||||
+ Access: public
|
||||
+ return: true if Chromium is available false otherwise
|
||||
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### hasFirefox [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L89)
|
||||
|
||||
+ Description: Return true if there is a Firefox variant available
|
||||
+ Access: public
|
||||
+ return: true if Firefox variant is available false otherwise
|
||||
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L108)
|
||||
|
||||
+ 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
|
||||
+ return: void
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| privateWindow | boolean | |
|
||||
| url | String[] | |
|
||||
|
||||
|
||||
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L149)
|
||||
|
||||
+ 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
|
||||
+ return: void
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| privateWindow | boolean | |
|
||||
|
||||
|
||||
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L160)
|
||||
|
||||
+ 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
|
||||
+ return: void
|
||||
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### ValidURL [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L164)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
+ Modifiers: static
|
||||
+ return: String
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| inUrl | String | |
|
||||
|
||||
|
||||
### main [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L174)
|
||||
|
||||
+ Description:
|
||||
+ Access: public
|
||||
+ Modifiers: static
|
||||
+ return: void
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| args | String[] | |
|
||||
|
||||
|
1782
I2PChromium.html
190
I2PChromium.md
@ -1,8 +1,12 @@
|
||||
# Class I2PChromium [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java)
|
||||
|
||||
>
|
||||
> */
|
||||
|
||||
Access: public
|
||||
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
|
||||
package: net.i2p.i2pfirefox
|
||||
|
||||
## Dependencies
|
||||
@ -35,9 +39,15 @@ package: net.i2p.i2pfirefox
|
||||
+ Access: private
|
||||
+ Modifiers: final
|
||||
|
||||
#### Process p [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L)
|
||||
|
||||
>
|
||||
|
||||
+ Access: private
|
||||
|
||||
## Methods
|
||||
|
||||
### FIND_CHROMIUM_SEARCH_PATHS_UNIX [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L31)
|
||||
### FIND_CHROMIUM_SEARCH_PATHS_UNIX [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L45)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
@ -47,7 +57,7 @@ package: net.i2p.i2pfirefox
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### FIND_CHROMIUM_SEARCH_PATHS_OSX [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L44)
|
||||
### FIND_CHROMIUM_SEARCH_PATHS_OSX [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L58)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
@ -57,7 +67,7 @@ This method has no parameters.
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### FIND_CHROMIUM_SEARCH_PATHS_WINDOWS [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L57)
|
||||
### FIND_CHROMIUM_SEARCH_PATHS_WINDOWS [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L71)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
@ -67,7 +77,7 @@ This method has no parameters.
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### FIND_ALL_CHROMIUM_SEARCH_PATHS [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L87)
|
||||
### FIND_ALL_CHROMIUM_SEARCH_PATHS [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L100)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
@ -77,7 +87,7 @@ This method has no parameters.
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### FIND_CHROMIUM_SEARCH_PATHS [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L107)
|
||||
### FIND_CHROMIUM_SEARCH_PATHS [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L120)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
@ -87,7 +97,7 @@ This method has no parameters.
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### NEARBY_CHROMIUM_SEARCH_PATHS [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L121)
|
||||
### NEARBY_CHROMIUM_SEARCH_PATHS [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L134)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
@ -97,7 +107,7 @@ This method has no parameters.
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### CHROMIUM_FINDER [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L165)
|
||||
### CHROMIUM_FINDER [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L178)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
@ -107,7 +117,7 @@ This method has no parameters.
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### getOperatingSystem [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L177)
|
||||
### getOperatingSystem [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L190)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
@ -117,101 +127,132 @@ This method has no parameters.
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### onlyValidChromiums [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L199)
|
||||
### onlyValidChromiums [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L212)
|
||||
|
||||
+ Description:
|
||||
+ Description: Check our list of chrome paths for a valid chrome binary. Just an existence check for now but should check versions in the future.
|
||||
+ Access: public
|
||||
+ return: String[]
|
||||
+ return: a list of usable Chromiums or an empty list if none are found.
|
||||
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### topChromium [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L217)
|
||||
### topChromium [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L232)
|
||||
|
||||
+ Description:
|
||||
+ Description: Return the best available Chromium from the list of Chromiums we have.
|
||||
+ Access: public
|
||||
+ return: String
|
||||
+ return: the path to the best available Chromium or null if none are found.
|
||||
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### topChromium [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L246)
|
||||
### topChromium [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L261)
|
||||
|
||||
+ Description:
|
||||
+ Description: Return the best available Chromium from the list of Chromiums we have. if override is passed it will be validated and if it validates it will be used.
|
||||
+ Access: public
|
||||
+ return: String
|
||||
+ return: the path to the best available Chromium or null if none are found.
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| overrideChromium | String | |
|
||||
|
||||
|
||||
### defaultProcessBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L264)
|
||||
### defaultProcessBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L279)
|
||||
|
||||
+ Description:
|
||||
+ Description: Build a ProcessBuilder for the top Chromium binary and the default profile.
|
||||
+ Access: public
|
||||
+ return: ProcessBuilder
|
||||
+ return: a ProcessBuilder for the top Chromium binary and the default profile.
|
||||
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### processBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L301)
|
||||
### defaultProcessBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L292)
|
||||
|
||||
+ Description:
|
||||
+ Description: Build a ProcessBuilder for the top Chromium binary and the default profile. @args the arguments to pass to the Chromium binary
|
||||
+ Access: public
|
||||
+ return: ProcessBuilder
|
||||
+ return: a ProcessBuilder for the top Chromium binary and the default profile.
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| args | String[] | |
|
||||
|
||||
|
||||
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L340)
|
||||
### privateProcessBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L305)
|
||||
|
||||
+ Description:
|
||||
+ Description: Build a ProcessBuilder for the top Chromium binary and the default profile.
|
||||
+ Access: public
|
||||
+ return: boolean
|
||||
+ return: a ProcessBuilder for the top Chromium binary and the default profile. Always passes the --incognito flag.
|
||||
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L352)
|
||||
### privateProcessBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L318)
|
||||
|
||||
+ Description:
|
||||
+ Description: Build a ProcessBuilder for the top Chromium binary and the default profile.
|
||||
+ Access: public
|
||||
+ return: boolean
|
||||
+ return: a ProcessBuilder for the top Chromium binary and the default profile. Always passes the --incognito flag.
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| timeout | int | |
|
||||
| args | String[] | the arguments to pass to the Chromium binary. |
|
||||
|
||||
|
||||
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L364)
|
||||
### processBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L363)
|
||||
|
||||
+ Description:
|
||||
+ Description: Build a ProcessBuilder for the top Chromium binary and the default profile with a specific set of extended arguments.
|
||||
+ Access: public
|
||||
+ return: boolean
|
||||
+ return: a ProcessBuilder for the top Chromium binary and default profile with a specific set of extended arguments.
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| timeout | int | |
|
||||
| port | int | |
|
||||
| args | String[] | the extended arguments to pass to the Chromium binary. |
|
||||
|
||||
|
||||
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L377)
|
||||
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L410)
|
||||
|
||||
+ Description:
|
||||
+ Description: Waits for an HTTP proxy on port 4444 to be ready. Returns false on timeout of 200 seconds.
|
||||
+ Access: public
|
||||
+ return: boolean
|
||||
+ return: true if the proxy is ready false if it is not.
|
||||
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L422)
|
||||
|
||||
+ Description: Waits for an HTTP proxy on port 4444 to be ready. Returns false on timeout of the specified number of seconds.
|
||||
+ Access: public
|
||||
+ return: true if the proxy is ready false if it is not.
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| timeout | int | |
|
||||
| port | int | |
|
||||
| host | String | |
|
||||
| timeout | int | the number of seconds to wait for the proxy to be ready. |
|
||||
|
||||
|
||||
### checkifPortIsOccupied [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L390)
|
||||
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L434)
|
||||
|
||||
+ 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
|
||||
+ return: true if the proxy is ready false if it is not.
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| timeout | int | the number of seconds to wait for the proxy to be ready. |
|
||||
| port | int | the port to wait for the proxy to be ready on. |
|
||||
|
||||
|
||||
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L447)
|
||||
|
||||
+ 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
|
||||
+ return: true if the proxy is ready false if it is not.
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| timeout | int | the number of seconds to wait for the proxy to be ready. |
|
||||
| port | int | the port to wait for the proxy to be ready on. |
|
||||
| host | String | the host to wait for the proxy to be ready on. |
|
||||
|
||||
|
||||
### checkifPortIsOccupied [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L460)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
@ -223,16 +264,63 @@ This method has no parameters.
|
||||
| host | String | |
|
||||
|
||||
|
||||
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L408)
|
||||
### launchAndDetatch [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L471)
|
||||
|
||||
+ Description:
|
||||
+ Access: public
|
||||
+ return: Process
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| privateWindow | boolean | |
|
||||
| url | String[] | |
|
||||
|
||||
|
||||
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L512)
|
||||
|
||||
+ 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
|
||||
+ return: void
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| privateWindow | boolean | |
|
||||
| url | String[] | |
|
||||
|
||||
|
||||
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L534)
|
||||
|
||||
+ 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
|
||||
+ return: void
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| privateWindow | boolean | |
|
||||
|
||||
|
||||
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L545)
|
||||
|
||||
+ 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
|
||||
+ return: void
|
||||
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### main [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L441)
|
||||
### ValidURL [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L549)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
+ Modifiers: static
|
||||
+ return: String
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| inUrl | String | |
|
||||
|
||||
|
||||
### main [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L559)
|
||||
|
||||
+ Description:
|
||||
+ Access: public
|
||||
@ -244,3 +332,15 @@ This method has no parameters.
|
||||
| args | String[] | |
|
||||
|
||||
|
||||
### sleep [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L579)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
+ Modifiers: static
|
||||
+ return: void
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| millis | int | |
|
||||
|
||||
|
||||
|
@ -1,8 +1,12 @@
|
||||
# Class I2PChromiumProfileBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java)
|
||||
|
||||
>
|
||||
> */
|
||||
|
||||
Access: public
|
||||
Description:
|
||||
> I2PChromiumProfileBuilder.java Copyright C 2022 idk <hankhill19580@gmail.com> This program is free software: you can redistribute it and/or modify it under the terms of the MIT License. See LICENSE.md for details. This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. I2PChromiumProfileBuilder is a that builds a profile directory which contains the I2P browser profile for the Chromium browser family. It manages the base profile directory and copies it's contents to the active profile directory which is actually used by Chromium.
|
||||
|
||||
Author: idk
|
||||
package: net.i2p.i2pfirefox
|
||||
|
||||
## Dependencies
|
||||
@ -34,7 +38,7 @@ package: net.i2p.i2pfirefox
|
||||
|
||||
## Methods
|
||||
|
||||
### profileDir [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L15)
|
||||
### profileDir [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L33)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
@ -46,9 +50,9 @@ package: net.i2p.i2pfirefox
|
||||
| file | String | |
|
||||
|
||||
|
||||
### profileDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L25)
|
||||
### profileDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L43)
|
||||
|
||||
+ Description:
|
||||
+ Description: get the profile directory creating it if necessary
|
||||
+ Access: public
|
||||
+ Modifiers: static
|
||||
+ return: String
|
||||
@ -56,7 +60,7 @@ package: net.i2p.i2pfirefox
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### baseProfileDir [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L37)
|
||||
### baseProfileDir [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L55)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
@ -68,9 +72,9 @@ This method has no parameters.
|
||||
| file | String | |
|
||||
|
||||
|
||||
### baseProfileDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L57)
|
||||
### baseProfileDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L75)
|
||||
|
||||
+ Description:
|
||||
+ Description: get the base profile directory creating it if necessary
|
||||
+ Access: public
|
||||
+ Modifiers: static
|
||||
+ return: String
|
||||
@ -78,31 +82,31 @@ This method has no parameters.
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### runtimeDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L81)
|
||||
### runtimeDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L99)
|
||||
|
||||
+ Description:
|
||||
+ Description: get the runtime directory creating it if create=true
|
||||
+ Access: public
|
||||
+ Modifiers: static
|
||||
+ return: File
|
||||
+ return: the runtime directory or null if it could not be created
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| create | boolean | |
|
||||
| create | boolean | if true create the runtime directory if it does not exist |
|
||||
|
||||
|
||||
### runtimeDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L98)
|
||||
### runtimeDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L116)
|
||||
|
||||
+ Description:
|
||||
+ Description: get the correct runtime directory
|
||||
+ Access: public
|
||||
+ Modifiers: static
|
||||
+ return: String
|
||||
+ return: the runtime directory or null if it could not be created or found
|
||||
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### copyBaseProfiletoProfile [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L144)
|
||||
### copyBaseProfiletoProfile [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L162)
|
||||
|
||||
+ Description:
|
||||
+ Description: Copy the inert base profile directory to the runtime profile directory
|
||||
+ Access: public
|
||||
+ Modifiers: static
|
||||
+ return: boolean
|
||||
@ -110,7 +114,7 @@ This method has no parameters.
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### copyDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L174)
|
||||
### copyDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L192)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
@ -123,7 +127,7 @@ This method has no parameters.
|
||||
| destinationDirectory | File | |
|
||||
|
||||
|
||||
### copyDirectoryCompatibityMode [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L184)
|
||||
### copyDirectoryCompatibityMode [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L202)
|
||||
|
||||
+ Description:
|
||||
+ Access: public
|
||||
@ -136,7 +140,7 @@ This method has no parameters.
|
||||
| destination | File | |
|
||||
|
||||
|
||||
### copyFile [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L192)
|
||||
### copyFile [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L210)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
@ -149,12 +153,12 @@ This method has no parameters.
|
||||
| destinationFile | File | |
|
||||
|
||||
|
||||
### copyStrictOptions [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L209)
|
||||
### copyStrictOptions [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L227)
|
||||
|
||||
+ Description:
|
||||
+ Description: Copy the strict options from the base profile to the profile
|
||||
+ Access: public
|
||||
+ Modifiers: static
|
||||
+ return: boolean
|
||||
+ return: true if successful false otherwise
|
||||
|
||||
This method has no parameters.
|
||||
|
||||
|
@ -1,251 +1,311 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
i2p.plugins.fire...
|
||||
</title>
|
||||
<meta name="author" content="eyedeekay" />
|
||||
<meta name="description" content="i2p.plugins.firefox" />
|
||||
<meta name="keywords" content="main" />
|
||||
<link rel="stylesheet" type="text/css" href="style.css" />
|
||||
<link rel="stylesheet" type="text/css" href="showhider.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="navbar">
|
||||
<a href="#shownav">
|
||||
Show navigation
|
||||
</a>
|
||||
<div id="shownav">
|
||||
<div id="hidenav">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="index.html">
|
||||
index
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="CHANGES.html">
|
||||
CHANGES
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromium.html">
|
||||
I2PChromium
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromiumProfileBuilder.html">
|
||||
I2PChromiumProfileBuilder
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromiumProfileChecker.html">
|
||||
I2PChromiumProfileChecker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromiumProfileUnpacker.html">
|
||||
I2PChromiumProfileUnpacker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PFirefox.html">
|
||||
I2PFirefox
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PFirefoxProfileBuilder.html">
|
||||
I2PFirefoxProfileBuilder
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PFirefoxProfileChecker.html">
|
||||
I2PFirefoxProfileChecker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PFirefoxProfileUnpacker.html">
|
||||
I2PFirefoxProfileUnpacker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="LICENSE.html">
|
||||
LICENSE
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<br>
|
||||
<a href="#hidenav">
|
||||
Hide Navigation
|
||||
<head>
|
||||
<title>
|
||||
i2p.plugins.fire...
|
||||
</title>
|
||||
<meta name="author" content="eyedeekay" />
|
||||
<meta name="description" content="i2p.plugins.firefox" />
|
||||
<meta name="keywords" content="main" />
|
||||
<link rel="stylesheet" type="text/css" href="style.css" />
|
||||
<link rel="stylesheet" type="text/css" href="showhider.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="navbar">
|
||||
<a href="#shownav">
|
||||
Show navigation
|
||||
</a>
|
||||
<div id="shownav">
|
||||
<div id="hidenav">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="index.html">
|
||||
index
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<a href="CHANGES.html">
|
||||
CHANGES
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="EXAMPLES.html">
|
||||
EXAMPLES
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PBrowser.html">
|
||||
I2PBrowser
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromium.html">
|
||||
I2PChromium
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromiumProfileBuilder.html">
|
||||
I2PChromiumProfileBuilder
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromiumProfileChecker.html">
|
||||
I2PChromiumProfileChecker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromiumProfileUnpacker.html">
|
||||
I2PChromiumProfileUnpacker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PFirefox.html">
|
||||
I2PFirefox
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PFirefoxProfileBuilder.html">
|
||||
I2PFirefoxProfileBuilder
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PFirefoxProfileChecker.html">
|
||||
I2PFirefoxProfileChecker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PFirefoxProfileUnpacker.html">
|
||||
I2PFirefoxProfileUnpacker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PGenericUnsafeBrowser.html">
|
||||
I2PGenericUnsafeBrowser
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="LICENSE.html">
|
||||
LICENSE
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="USAGE.html">
|
||||
USAGE
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<br>
|
||||
<a href="#hidenav">
|
||||
Hide Navigation
|
||||
</a>
|
||||
</div>
|
||||
<h1>
|
||||
Class I2PChromiumProfileChecker
|
||||
<a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java" rel="nofollow">
|
||||
[src]
|
||||
</a>
|
||||
</h1>
|
||||
<blockquote></blockquote>
|
||||
<p>
|
||||
Access: public
|
||||
<br/>
|
||||
package: net.i2p.i2pfirefox
|
||||
</p>
|
||||
<h2>
|
||||
Dependencies
|
||||
</h2>
|
||||
<p>
|
||||
<details>
|
||||
<br/>
|
||||
<summary>
|
||||
<br/>
|
||||
Show dependencies
|
||||
<br/>
|
||||
</summary>
|
||||
<br/>
|
||||
<ul>
|
||||
<br/>
|
||||
<li>
|
||||
java.io.File
|
||||
</li>
|
||||
</ul>
|
||||
<br/>
|
||||
</details>
|
||||
</p>
|
||||
<h2>
|
||||
No member variables in this class
|
||||
</h2>
|
||||
<h2>
|
||||
Methods
|
||||
</h2>
|
||||
<h3>
|
||||
main
|
||||
<a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L6" rel="nofollow">
|
||||
[src]
|
||||
</a>
|
||||
</h3>
|
||||
<ul>
|
||||
<li>
|
||||
Description:
|
||||
<br/>
|
||||
</li>
|
||||
<li>
|
||||
Access: public
|
||||
<br/>
|
||||
</li>
|
||||
<li>
|
||||
Modifiers: static
|
||||
</li>
|
||||
<li>
|
||||
return: void
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
| Name | Type | Description |
|
||||
<br/>
|
||||
| —– | —– | —– |
|
||||
<br/>
|
||||
| args | String[] | |
|
||||
</p>
|
||||
<h3>
|
||||
validateProfileDirectory
|
||||
<a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L20" rel="nofollow">
|
||||
[src]
|
||||
</a>
|
||||
</h3>
|
||||
<ul>
|
||||
<li>
|
||||
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>
|
||||
<h3>
|
||||
validateFile
|
||||
<a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L44" 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/>
|
||||
| file | String | |
|
||||
</p>
|
||||
<h3>
|
||||
validateExtensionDirectory
|
||||
<a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L64" rel="nofollow">
|
||||
[src]
|
||||
</a>
|
||||
</h3>
|
||||
<ul>
|
||||
<li>
|
||||
Description:
|
||||
<br/>
|
||||
</li>
|
||||
<li>
|
||||
Access: public
|
||||
<br/>
|
||||
</li>
|
||||
<li>
|
||||
Modifiers: static
|
||||
</li>
|
||||
<li>
|
||||
return: boolean
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
| Name | Type | Description |
|
||||
<br/>
|
||||
| —– | —– | —– |
|
||||
<br/>
|
||||
| extensionDirectory | String | |
|
||||
</p>
|
||||
<div>
|
||||
<a href="#show">
|
||||
Show license
|
||||
</a>
|
||||
<div id="show">
|
||||
<div id="hide">
|
||||
<pre><code> Copyright 2022 idk (hankhill19580@gmail.com)
|
||||
</div>
|
||||
</div>
|
||||
<h1>
|
||||
<a href="#class-i2pchromiumprofilechecker-src" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
Class I2PChromiumProfileChecker
|
||||
<a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java" rel="nofollow">
|
||||
[src]
|
||||
</a>
|
||||
</h1>
|
||||
<blockquote>
|
||||
<p>
|
||||
*/
|
||||
</p>
|
||||
</blockquote>
|
||||
<p>
|
||||
Access: public
|
||||
<br>
|
||||
Description:
|
||||
</p>
|
||||
<blockquote>
|
||||
<p>
|
||||
I2PChromiumProfileChecker.java Copyright C 2022 idk
|
||||
<a href="mailto:hankhill19580@gmail.com" rel="nofollow">
|
||||
hankhill19580@gmail.com
|
||||
</a>
|
||||
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.
|
||||
</p>
|
||||
</blockquote>
|
||||
<p>
|
||||
Author: idk
|
||||
<br>
|
||||
package: net.i2p.i2pfirefox
|
||||
</p>
|
||||
<h2>
|
||||
<a href="#dependencies" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
Dependencies
|
||||
</h2>
|
||||
<p>
|
||||
<details>
|
||||
<br>
|
||||
<summary>
|
||||
</p>
|
||||
<pre><code>Show dependencies
|
||||
</code></pre>
|
||||
<p>
|
||||
<br>
|
||||
<ul>
|
||||
<br>
|
||||
<li>
|
||||
java.io.File
|
||||
</li>
|
||||
</ul>
|
||||
<br>
|
||||
<h2>
|
||||
<a href="#no-member-variables-in-this-class" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
No member variables in this class
|
||||
</h2>
|
||||
<h2>
|
||||
<a href="#methods" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
Methods
|
||||
</h2>
|
||||
<h3>
|
||||
<a href="#main-src" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
main
|
||||
<a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L29" rel="nofollow">
|
||||
[src]
|
||||
</a>
|
||||
</h3>
|
||||
<ul>
|
||||
<li>
|
||||
Description: Output feedback if the profile directory is valid or invalid @description Output feedback if the profile directory is valid or invalid @args unused
|
||||
<br>
|
||||
</li>
|
||||
<li>
|
||||
Access: public
|
||||
<br>
|
||||
</li>
|
||||
<li>
|
||||
Modifiers: static
|
||||
</li>
|
||||
<li>
|
||||
return: void
|
||||
<br>
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
| Name | Type | Description |
|
||||
<br>
|
||||
| ----- | ----- | ----- |
|
||||
<br>
|
||||
| args | String[] | |
|
||||
</p>
|
||||
<h3>
|
||||
<a href="#validateprofiledirectory-src" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
validateProfileDirectory
|
||||
<a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L50" rel="nofollow">
|
||||
[src]
|
||||
</a>
|
||||
</h3>
|
||||
<ul>
|
||||
<li>
|
||||
Description: Return true if the profile directory is valid.
|
||||
<br>
|
||||
</li>
|
||||
<li>
|
||||
Access: public
|
||||
<br>
|
||||
</li>
|
||||
<li>
|
||||
Modifiers: static
|
||||
</li>
|
||||
<li>
|
||||
return: true if the profile directory is valid false otherwise
|
||||
<br>
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
| Name | Type | Description |
|
||||
<br>
|
||||
| ----- | ----- | ----- |
|
||||
<br>
|
||||
| profileDirectory | String | the profile directory to check |
|
||||
</p>
|
||||
<h3>
|
||||
<a href="#validatefile-src" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
validateFile
|
||||
<a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L81" rel="nofollow">
|
||||
[src]
|
||||
</a>
|
||||
</h3>
|
||||
<ul>
|
||||
<li>
|
||||
Description: Return true if the file is valid.
|
||||
<br>
|
||||
</li>
|
||||
<li>
|
||||
Access: public
|
||||
<br>
|
||||
</li>
|
||||
<li>
|
||||
Modifiers: static
|
||||
</li>
|
||||
<li>
|
||||
return: true if the file is valid false otherwise
|
||||
<br>
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
| Name | Type | Description |
|
||||
<br>
|
||||
| ----- | ----- | ----- |
|
||||
<br>
|
||||
| file | String | the file to check |
|
||||
</p>
|
||||
<h3>
|
||||
<a href="#validateextensiondirectory-src" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
validateExtensionDirectory
|
||||
<a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L108" rel="nofollow">
|
||||
[src]
|
||||
</a>
|
||||
</h3>
|
||||
<ul>
|
||||
<li>
|
||||
Description: Return true if the extension directory is valid.
|
||||
<br>
|
||||
</li>
|
||||
<li>
|
||||
Access: public
|
||||
<br>
|
||||
</li>
|
||||
<li>
|
||||
Modifiers: static
|
||||
</li>
|
||||
<li>
|
||||
return: true if the extension directory is valid false otherwise
|
||||
<br>
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
| Name | Type | Description |
|
||||
<br>
|
||||
| ----- | ----- | ----- |
|
||||
<br>
|
||||
| extensionDirectory | String | the extension directory to check |
|
||||
</p>
|
||||
<div>
|
||||
<a href="#show">
|
||||
Show license
|
||||
</a>
|
||||
<div id="show">
|
||||
<div id="hide">
|
||||
<pre><code> Copyright 2022 idk (hankhill19580@gmail.com)
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@ -1088,20 +1148,18 @@ consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
</code></pre>
|
||||
<a href="#hide">
|
||||
Hide license
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe>
|
||||
</div>
|
||||
<div>
|
||||
<a href="https://geti2p.net/">
|
||||
<img src="i2plogo.png"></img>
|
||||
I2P
|
||||
<a href="#hide">
|
||||
Hide license
|
||||
</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe>
|
||||
</div>
|
||||
<div>
|
||||
<a href="https://geti2p.net/">
|
||||
<img src="i2plogo.png"></img>
|
||||
I2P
|
||||
</a>
|
||||
</div>
|
@ -1,8 +1,12 @@
|
||||
# Class I2PChromiumProfileChecker [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java)
|
||||
|
||||
>
|
||||
> */
|
||||
|
||||
Access: public
|
||||
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
|
||||
package: net.i2p.i2pfirefox
|
||||
|
||||
## Dependencies
|
||||
@ -20,9 +24,9 @@ package: net.i2p.i2pfirefox
|
||||
|
||||
## Methods
|
||||
|
||||
### main [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L6)
|
||||
### main [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L29)
|
||||
|
||||
+ Description:
|
||||
+ Description: Output feedback if the profile directory is valid or invalid @description Output feedback if the profile directory is valid or invalid @args unused
|
||||
+ Access: public
|
||||
+ Modifiers: static
|
||||
+ return: void
|
||||
@ -32,39 +36,39 @@ package: net.i2p.i2pfirefox
|
||||
| args | String[] | |
|
||||
|
||||
|
||||
### validateProfileDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L20)
|
||||
### validateProfileDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L50)
|
||||
|
||||
+ Description:
|
||||
+ Description: Return true if the profile directory is valid.
|
||||
+ Access: public
|
||||
+ Modifiers: static
|
||||
+ return: boolean
|
||||
+ return: true if the profile directory is valid false otherwise
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| profileDirectory | String | |
|
||||
| profileDirectory | String | the profile directory to check |
|
||||
|
||||
|
||||
### validateFile [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L44)
|
||||
### validateFile [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L81)
|
||||
|
||||
+ Description:
|
||||
+ Description: Return true if the file is valid.
|
||||
+ Access: public
|
||||
+ Modifiers: static
|
||||
+ return: boolean
|
||||
+ return: true if the file is valid false otherwise
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| file | String | |
|
||||
| file | String | the file to check |
|
||||
|
||||
|
||||
### validateExtensionDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L64)
|
||||
### validateExtensionDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L108)
|
||||
|
||||
+ Description:
|
||||
+ Description: Return true if the extension directory is valid.
|
||||
+ Access: public
|
||||
+ Modifiers: static
|
||||
+ return: boolean
|
||||
+ return: true if the extension directory is valid false otherwise
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| extensionDirectory | String | |
|
||||
| extensionDirectory | String | the extension directory to check |
|
||||
|
||||
|
||||
|
@ -1,203 +1,257 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
i2p.plugins.fire...
|
||||
</title>
|
||||
<meta name="author" content="eyedeekay" />
|
||||
<meta name="description" content="i2p.plugins.firefox" />
|
||||
<meta name="keywords" content="main" />
|
||||
<link rel="stylesheet" type="text/css" href="style.css" />
|
||||
<link rel="stylesheet" type="text/css" href="showhider.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="navbar">
|
||||
<a href="#shownav">
|
||||
Show navigation
|
||||
</a>
|
||||
<div id="shownav">
|
||||
<div id="hidenav">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="index.html">
|
||||
index
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="CHANGES.html">
|
||||
CHANGES
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromium.html">
|
||||
I2PChromium
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromiumProfileBuilder.html">
|
||||
I2PChromiumProfileBuilder
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromiumProfileChecker.html">
|
||||
I2PChromiumProfileChecker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromiumProfileUnpacker.html">
|
||||
I2PChromiumProfileUnpacker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PFirefox.html">
|
||||
I2PFirefox
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PFirefoxProfileBuilder.html">
|
||||
I2PFirefoxProfileBuilder
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PFirefoxProfileChecker.html">
|
||||
I2PFirefoxProfileChecker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PFirefoxProfileUnpacker.html">
|
||||
I2PFirefoxProfileUnpacker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="LICENSE.html">
|
||||
LICENSE
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<br>
|
||||
<a href="#hidenav">
|
||||
Hide Navigation
|
||||
<head>
|
||||
<title>
|
||||
i2p.plugins.fire...
|
||||
</title>
|
||||
<meta name="author" content="eyedeekay" />
|
||||
<meta name="description" content="i2p.plugins.firefox" />
|
||||
<meta name="keywords" content="main" />
|
||||
<link rel="stylesheet" type="text/css" href="style.css" />
|
||||
<link rel="stylesheet" type="text/css" href="showhider.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="navbar">
|
||||
<a href="#shownav">
|
||||
Show navigation
|
||||
</a>
|
||||
<div id="shownav">
|
||||
<div id="hidenav">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="index.html">
|
||||
index
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<a href="CHANGES.html">
|
||||
CHANGES
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="EXAMPLES.html">
|
||||
EXAMPLES
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PBrowser.html">
|
||||
I2PBrowser
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromium.html">
|
||||
I2PChromium
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromiumProfileBuilder.html">
|
||||
I2PChromiumProfileBuilder
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromiumProfileChecker.html">
|
||||
I2PChromiumProfileChecker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromiumProfileUnpacker.html">
|
||||
I2PChromiumProfileUnpacker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PFirefox.html">
|
||||
I2PFirefox
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PFirefoxProfileBuilder.html">
|
||||
I2PFirefoxProfileBuilder
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PFirefoxProfileChecker.html">
|
||||
I2PFirefoxProfileChecker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PFirefoxProfileUnpacker.html">
|
||||
I2PFirefoxProfileUnpacker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PGenericUnsafeBrowser.html">
|
||||
I2PGenericUnsafeBrowser
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="LICENSE.html">
|
||||
LICENSE
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="USAGE.html">
|
||||
USAGE
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<br>
|
||||
<a href="#hidenav">
|
||||
Hide Navigation
|
||||
</a>
|
||||
</div>
|
||||
<h1>
|
||||
Class I2PChromiumProfileUnpacker
|
||||
<a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileUnpacker.java" rel="nofollow">
|
||||
[src]
|
||||
</a>
|
||||
</h1>
|
||||
<blockquote></blockquote>
|
||||
<p>
|
||||
Access: public
|
||||
<br/>
|
||||
package: net.i2p.i2pfirefox
|
||||
</p>
|
||||
<h2>
|
||||
Dependencies
|
||||
</h2>
|
||||
<p>
|
||||
<details>
|
||||
<br/>
|
||||
<summary>
|
||||
<br/>
|
||||
Show dependencies
|
||||
<br/>
|
||||
</summary>
|
||||
<br/>
|
||||
<ul>
|
||||
<br/>
|
||||
<li>
|
||||
java.io.File
|
||||
</li>
|
||||
<li>
|
||||
java.io.InputStream
|
||||
</li>
|
||||
<li>
|
||||
java.nio.file.Files
|
||||
</li>
|
||||
<li>
|
||||
java.nio.file.StandardCopyOption
|
||||
</li>
|
||||
<li>
|
||||
java.util.zip.ZipEntry
|
||||
</li>
|
||||
<li>
|
||||
java.util.zip.ZipInputStream
|
||||
</li>
|
||||
</ul>
|
||||
<br/>
|
||||
</details>
|
||||
</p>
|
||||
<h2>
|
||||
No member variables in this class
|
||||
</h2>
|
||||
<h2>
|
||||
Methods
|
||||
</h2>
|
||||
<h3>
|
||||
main
|
||||
<a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileUnpacker.java#L12" rel="nofollow">
|
||||
[src]
|
||||
</a>
|
||||
</h3>
|
||||
<ul>
|
||||
<li>
|
||||
Description:
|
||||
<br/>
|
||||
</li>
|
||||
<li>
|
||||
Access: public
|
||||
<br/>
|
||||
</li>
|
||||
<li>
|
||||
Modifiers: static
|
||||
</li>
|
||||
<li>
|
||||
return: void
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
| Name | Type | Description |
|
||||
<br/>
|
||||
| —– | —– | —– |
|
||||
<br/>
|
||||
| args | String[] | |
|
||||
</p>
|
||||
<h3>
|
||||
unpackProfile
|
||||
<a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileUnpacker.java#L27" rel="nofollow">
|
||||
[src]
|
||||
</a>
|
||||
</h3>
|
||||
<ul>
|
||||
<li>
|
||||
Description:
|
||||
<br/>
|
||||
</li>
|
||||
<li>
|
||||
Access: public
|
||||
<br/>
|
||||
</li>
|
||||
<li>
|
||||
return: boolean
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
| Name | Type | Description |
|
||||
<br/>
|
||||
| —– | —– | —– |
|
||||
<br/>
|
||||
| profileDirectory | String | |
|
||||
</p>
|
||||
<div>
|
||||
<a href="#show">
|
||||
Show license
|
||||
</a>
|
||||
<div id="show">
|
||||
<div id="hide">
|
||||
<pre><code> Copyright 2022 idk (hankhill19580@gmail.com)
|
||||
</div>
|
||||
</div>
|
||||
<h1>
|
||||
<a href="#class-i2pchromiumprofileunpacker-src" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
Class I2PChromiumProfileUnpacker
|
||||
<a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileUnpacker.java" rel="nofollow">
|
||||
[src]
|
||||
</a>
|
||||
</h1>
|
||||
<blockquote>
|
||||
<p>
|
||||
*/
|
||||
</p>
|
||||
</blockquote>
|
||||
<p>
|
||||
Access: public
|
||||
<br>
|
||||
Description:
|
||||
</p>
|
||||
<blockquote>
|
||||
<p>
|
||||
I2PChromiumProfileUnpacker.java Copyright C 2022 idk
|
||||
<a href="mailto:hankhill19580@gmail.com" rel="nofollow">
|
||||
hankhill19580@gmail.com
|
||||
</a>
|
||||
This program is free software: you can redistribute it and/or modify it under the terms of the MIT License. See LICENSE.md for details. This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. I2PChromiumProfileUnpacker is a that unpacks the Chromium profile zip file into the Chromium base profile directory. This is not used by the Chromium browser instance it's unpacked to the disk to be copied to the active profile directory.
|
||||
</p>
|
||||
</blockquote>
|
||||
<p>
|
||||
Author: idk
|
||||
<br>
|
||||
package: net.i2p.i2pfirefox
|
||||
</p>
|
||||
<h2>
|
||||
<a href="#dependencies" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
Dependencies
|
||||
</h2>
|
||||
<p>
|
||||
<details>
|
||||
<br>
|
||||
<summary>
|
||||
</p>
|
||||
<pre><code>Show dependencies
|
||||
</code></pre>
|
||||
<p>
|
||||
<br>
|
||||
<ul>
|
||||
<br>
|
||||
<li>
|
||||
java.io.File
|
||||
</li>
|
||||
<li>
|
||||
java.io.InputStream
|
||||
</li>
|
||||
<li>
|
||||
java.nio.file.Files
|
||||
</li>
|
||||
<li>
|
||||
java.nio.file.StandardCopyOption
|
||||
</li>
|
||||
<li>
|
||||
java.util.zip.ZipEntry
|
||||
</li>
|
||||
<li>
|
||||
java.util.zip.ZipInputStream
|
||||
</li>
|
||||
</ul>
|
||||
<br>
|
||||
<h2>
|
||||
<a href="#no-member-variables-in-this-class" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
No member variables in this class
|
||||
</h2>
|
||||
<h2>
|
||||
<a href="#methods" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
Methods
|
||||
</h2>
|
||||
<h3>
|
||||
<a href="#main-src" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
main
|
||||
<a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileUnpacker.java#L29" rel="nofollow">
|
||||
[src]
|
||||
</a>
|
||||
</h3>
|
||||
<ul>
|
||||
<li>
|
||||
Description:
|
||||
<br>
|
||||
</li>
|
||||
<li>
|
||||
Access: public
|
||||
<br>
|
||||
</li>
|
||||
<li>
|
||||
Modifiers: static
|
||||
</li>
|
||||
<li>
|
||||
return: void
|
||||
<br>
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
| Name | Type | Description |
|
||||
<br>
|
||||
| ----- | ----- | ----- |
|
||||
<br>
|
||||
| args | String[] | |
|
||||
</p>
|
||||
<h3>
|
||||
<a href="#unpackprofile-src" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
unpackProfile
|
||||
<a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileUnpacker.java#L44" rel="nofollow">
|
||||
[src]
|
||||
</a>
|
||||
</h3>
|
||||
<ul>
|
||||
<li>
|
||||
Description: unpack the profile directory
|
||||
<br>
|
||||
</li>
|
||||
<li>
|
||||
Access: public
|
||||
<br>
|
||||
</li>
|
||||
<li>
|
||||
return: true if the profile directory was successfully unpacked
|
||||
<br>
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
| Name | Type | Description |
|
||||
<br>
|
||||
| ----- | ----- | ----- |
|
||||
<br>
|
||||
| profileDirectory | String | |
|
||||
</p>
|
||||
<div>
|
||||
<a href="#show">
|
||||
Show license
|
||||
</a>
|
||||
<div id="show">
|
||||
<div id="hide">
|
||||
<pre><code> Copyright 2022 idk (hankhill19580@gmail.com)
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@ -1040,20 +1094,18 @@ consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
</code></pre>
|
||||
<a href="#hide">
|
||||
Hide license
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe>
|
||||
</div>
|
||||
<div>
|
||||
<a href="https://geti2p.net/">
|
||||
<img src="i2plogo.png"></img>
|
||||
I2P
|
||||
<a href="#hide">
|
||||
Hide license
|
||||
</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe>
|
||||
</div>
|
||||
<div>
|
||||
<a href="https://geti2p.net/">
|
||||
<img src="i2plogo.png"></img>
|
||||
I2P
|
||||
</a>
|
||||
</div>
|
@ -1,8 +1,12 @@
|
||||
# Class I2PChromiumProfileUnpacker [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileUnpacker.java)
|
||||
|
||||
>
|
||||
> */
|
||||
|
||||
Access: public
|
||||
Description:
|
||||
> I2PChromiumProfileUnpacker.java Copyright C 2022 idk <hankhill19580@gmail.com> This program is free software: you can redistribute it and/or modify it under the terms of the MIT License. See LICENSE.md for details. This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. I2PChromiumProfileUnpacker is a that unpacks the Chromium profile zip file into the Chromium base profile directory. This is not used by the Chromium browser instance it's unpacked to the disk to be copied to the active profile directory.
|
||||
|
||||
Author: idk
|
||||
package: net.i2p.i2pfirefox
|
||||
|
||||
## Dependencies
|
||||
@ -25,7 +29,7 @@ package: net.i2p.i2pfirefox
|
||||
|
||||
## Methods
|
||||
|
||||
### main [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileUnpacker.java#L12)
|
||||
### main [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileUnpacker.java#L29)
|
||||
|
||||
+ Description:
|
||||
+ Access: public
|
||||
@ -37,11 +41,11 @@ package: net.i2p.i2pfirefox
|
||||
| args | String[] | |
|
||||
|
||||
|
||||
### unpackProfile [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileUnpacker.java#L27)
|
||||
### unpackProfile [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileUnpacker.java#L44)
|
||||
|
||||
+ Description:
|
||||
+ Description: unpack the profile directory
|
||||
+ Access: public
|
||||
+ return: boolean
|
||||
+ return: true if the profile directory was successfully unpacked
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
|
1782
I2PFirefox.html
190
I2PFirefox.md
@ -1,8 +1,12 @@
|
||||
# Class I2PFirefox [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java)
|
||||
|
||||
>
|
||||
> */
|
||||
|
||||
Access: public
|
||||
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
|
||||
package: net.i2p.i2pfirefox
|
||||
|
||||
## Dependencies
|
||||
@ -35,9 +39,15 @@ package: net.i2p.i2pfirefox
|
||||
+ Access: private
|
||||
+ Modifiers: final
|
||||
|
||||
#### Process p [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L)
|
||||
|
||||
>
|
||||
|
||||
+ Access: private
|
||||
|
||||
## Methods
|
||||
|
||||
### FIND_FIREFOX_SEARCH_PATHS_UNIX [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L30)
|
||||
### FIND_FIREFOX_SEARCH_PATHS_UNIX [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L45)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
@ -47,7 +57,7 @@ package: net.i2p.i2pfirefox
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### FIND_FIREFOX_SEARCH_PATHS_OSX [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L43)
|
||||
### FIND_FIREFOX_SEARCH_PATHS_OSX [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L58)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
@ -57,7 +67,7 @@ This method has no parameters.
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### FIND_FIREFOX_SEARCH_PATHS_WINDOWS [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L56)
|
||||
### FIND_FIREFOX_SEARCH_PATHS_WINDOWS [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L71)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
@ -67,7 +77,7 @@ This method has no parameters.
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### FIND_ALL_FIREFOX_SEARCH_PATHS [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L84)
|
||||
### FIND_ALL_FIREFOX_SEARCH_PATHS [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L107)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
@ -77,7 +87,7 @@ This method has no parameters.
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### FIND_FIREFOX_SEARCH_PATHS [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L104)
|
||||
### FIND_FIREFOX_SEARCH_PATHS [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L127)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
@ -87,7 +97,7 @@ This method has no parameters.
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### NEARBY_FIREFOX_SEARCH_PATHS [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L118)
|
||||
### NEARBY_FIREFOX_SEARCH_PATHS [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L141)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
@ -97,7 +107,7 @@ This method has no parameters.
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### FIREFOX_FINDER [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L162)
|
||||
### FIREFOX_FINDER [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L185)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
@ -107,7 +117,7 @@ This method has no parameters.
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### getOperatingSystem [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L174)
|
||||
### getOperatingSystem [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L197)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
@ -117,101 +127,132 @@ This method has no parameters.
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### onlyValidFirefoxes [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L196)
|
||||
### onlyValidFirefoxes [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L219)
|
||||
|
||||
+ Description:
|
||||
+ 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
|
||||
+ return: String[]
|
||||
+ return: a list of usable Firefoxes or an empty list if none are found.
|
||||
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### topFirefox [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L214)
|
||||
### topFirefox [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L239)
|
||||
|
||||
+ Description:
|
||||
+ Description: Return the best available Firefox from the list of Firefoxes we have.
|
||||
+ Access: public
|
||||
+ return: String
|
||||
+ return: the path to the best available Firefox or null if none are found.
|
||||
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### topFirefox [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L243)
|
||||
### topFirefox [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L268)
|
||||
|
||||
+ Description:
|
||||
+ 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
|
||||
+ return: String
|
||||
+ return: the path to the best available Firefox or null if none are found.
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| overrideFirefox | String | |
|
||||
|
||||
|
||||
### defaultProcessBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L261)
|
||||
### defaultProcessBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L286)
|
||||
|
||||
+ Description:
|
||||
+ Description: Build a ProcessBuilder for the top Firefox binary and the default profile.
|
||||
+ Access: public
|
||||
+ return: ProcessBuilder
|
||||
+ return: a ProcessBuilder for the top Firefox binary and the default profile.
|
||||
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### processBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L275)
|
||||
### defaultProcessBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L298)
|
||||
|
||||
+ Description:
|
||||
+ Description: Build a ProcessBuilder for the top Firefox binary and the default profile.
|
||||
+ Access: public
|
||||
+ return: ProcessBuilder
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| args | String[] | |
|
||||
| args | String[] | the args to pass to the Firefox binary |
|
||||
|
||||
|
||||
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L298)
|
||||
### privateProcessBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L312)
|
||||
|
||||
+ Description:
|
||||
+ Description: Build a ProcessBuilder for the top Firefox binary and the default profile. Pass the --private-window flag to open a window.
|
||||
+ Access: public
|
||||
+ return: boolean
|
||||
+ return: a ProcessBuilder for the top Firefox binary and the default profile.
|
||||
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L310)
|
||||
### privateProcessBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L326)
|
||||
|
||||
+ Description:
|
||||
+ Description: Build a ProcessBuilder for the top Firefox binary and the default profile. Pass the --private-window flag to open a window.
|
||||
+ Access: public
|
||||
+ return: boolean
|
||||
+ return: ProcessBuilder
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| timeout | int | |
|
||||
| args | String[] | the arguments to pass to the Firefox binary |
|
||||
|
||||
|
||||
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L322)
|
||||
### processBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L347)
|
||||
|
||||
+ Description:
|
||||
+ Description: Build a ProcessBuilder for the top Firefox binary and the default profile with a specific set of extended arguments.
|
||||
+ Access: public
|
||||
+ return: boolean
|
||||
+ return: a ProcessBuilder for the top Firefox binary and default profile with a specific set of extended arguments.
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| timeout | int | |
|
||||
| port | int | |
|
||||
| args | String[] | the extended arguments to pass to the Firefox binary. |
|
||||
|
||||
|
||||
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L335)
|
||||
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L373)
|
||||
|
||||
+ Description:
|
||||
+ Description: Waits for an HTTP proxy on port 4444 to be ready. Returns false on timeout of 200 seconds.
|
||||
+ Access: public
|
||||
+ return: boolean
|
||||
+ return: true if the proxy is ready false if it is not.
|
||||
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L385)
|
||||
|
||||
+ Description: Waits for an HTTP proxy on port 4444 to be ready. Returns false on timeout of the specified number of seconds.
|
||||
+ Access: public
|
||||
+ return: true if the proxy is ready false if it is not.
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| timeout | int | |
|
||||
| port | int | |
|
||||
| host | String | |
|
||||
| timeout | int | the number of seconds to wait for the proxy to be ready. |
|
||||
|
||||
|
||||
### checkifPortIsOccupied [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L348)
|
||||
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L397)
|
||||
|
||||
+ 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
|
||||
+ return: true if the proxy is ready false if it is not.
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| timeout | int | the number of seconds to wait for the proxy to be ready. |
|
||||
| port | int | the port to wait for the proxy to be ready on. |
|
||||
|
||||
|
||||
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L410)
|
||||
|
||||
+ 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
|
||||
+ return: true if the proxy is ready false if it is not.
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| timeout | int | the number of seconds to wait for the proxy to be ready. |
|
||||
| port | int | the port to wait for the proxy to be ready on. |
|
||||
| host | String | the host to wait for the proxy to be ready on. |
|
||||
|
||||
|
||||
### checkifPortIsOccupied [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L423)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
@ -223,16 +264,63 @@ This method has no parameters.
|
||||
| host | String | |
|
||||
|
||||
|
||||
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L366)
|
||||
### launchAndDetatch [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L434)
|
||||
|
||||
+ Description:
|
||||
+ Access: public
|
||||
+ return: Process
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| privateWindow | boolean | |
|
||||
| url | String[] | |
|
||||
|
||||
|
||||
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L476)
|
||||
|
||||
+ 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
|
||||
+ return: void
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| privateWindow | boolean | |
|
||||
| url | String[] | |
|
||||
|
||||
|
||||
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L497)
|
||||
|
||||
+ 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
|
||||
+ return: void
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| privateWindow | boolean | |
|
||||
|
||||
|
||||
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L509)
|
||||
|
||||
+ 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
|
||||
+ return: void
|
||||
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### main [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L399)
|
||||
### ValidURL [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L513)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
+ Modifiers: static
|
||||
+ return: String
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| inUrl | String | |
|
||||
|
||||
|
||||
### main [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L524)
|
||||
|
||||
+ Description:
|
||||
+ Access: public
|
||||
@ -244,3 +332,15 @@ This method has no parameters.
|
||||
| args | String[] | |
|
||||
|
||||
|
||||
### sleep [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L545)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
+ Modifiers: static
|
||||
+ return: void
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| millis | int | |
|
||||
|
||||
|
||||
|
@ -1,8 +1,12 @@
|
||||
# Class I2PFirefoxProfileBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java)
|
||||
|
||||
>
|
||||
> */
|
||||
|
||||
Access: public
|
||||
Description:
|
||||
> I2PFirefoxProfileBuilder.java Copyright C 2022 idk <hankhill19580@gmail.com> This program is free software: you can redistribute it and/or modify it under the terms of the MIT License. See LICENSE.md for details. This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. I2PFirefoxProfileBuilder is a that builds a profile directory which contains the I2P browser profile for the Firefox browser family. It manages the base profile directory and copies it's contents to the active profile directory which is actually used by Firefox.
|
||||
|
||||
Author: idk
|
||||
package: net.i2p.i2pfirefox
|
||||
|
||||
## Dependencies
|
||||
@ -34,7 +38,7 @@ package: net.i2p.i2pfirefox
|
||||
|
||||
## Methods
|
||||
|
||||
### profileDir [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L15)
|
||||
### profileDir [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L33)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
@ -46,9 +50,9 @@ package: net.i2p.i2pfirefox
|
||||
| file | String | |
|
||||
|
||||
|
||||
### profileDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L25)
|
||||
### profileDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L43)
|
||||
|
||||
+ Description:
|
||||
+ Description: get the profile directory creating it if necessary
|
||||
+ Access: public
|
||||
+ Modifiers: static
|
||||
+ return: String
|
||||
@ -56,7 +60,7 @@ package: net.i2p.i2pfirefox
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### baseProfileDir [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L37)
|
||||
### baseProfileDir [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L55)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
@ -68,9 +72,9 @@ This method has no parameters.
|
||||
| file | String | |
|
||||
|
||||
|
||||
### baseProfileDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L57)
|
||||
### baseProfileDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L75)
|
||||
|
||||
+ Description:
|
||||
+ Description: get the base profile directory creating it if necessary
|
||||
+ Access: public
|
||||
+ Modifiers: static
|
||||
+ return: String
|
||||
@ -78,31 +82,31 @@ This method has no parameters.
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### runtimeDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L81)
|
||||
### runtimeDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L99)
|
||||
|
||||
+ Description:
|
||||
+ Description: get the runtime directory creating it if create=true
|
||||
+ Access: public
|
||||
+ Modifiers: static
|
||||
+ return: File
|
||||
+ return: the runtime directory or null if it could not be created
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| create | boolean | |
|
||||
| create | boolean | if true create the runtime directory if it does not exist |
|
||||
|
||||
|
||||
### runtimeDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L98)
|
||||
### runtimeDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L116)
|
||||
|
||||
+ Description:
|
||||
+ Description: get the correct runtime directory
|
||||
+ Access: public
|
||||
+ Modifiers: static
|
||||
+ return: String
|
||||
+ return: the runtime directory or null if it could not be created or found
|
||||
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### copyBaseProfiletoProfile [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L144)
|
||||
### copyBaseProfiletoProfile [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L162)
|
||||
|
||||
+ Description:
|
||||
+ Description: Copy the inert base profile directory to the runtime profile directory
|
||||
+ Access: public
|
||||
+ Modifiers: static
|
||||
+ return: boolean
|
||||
@ -110,7 +114,7 @@ This method has no parameters.
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### copyDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L174)
|
||||
### copyDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L192)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
@ -123,7 +127,7 @@ This method has no parameters.
|
||||
| destinationDirectory | File | |
|
||||
|
||||
|
||||
### copyDirectoryCompatibityMode [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L184)
|
||||
### copyDirectoryCompatibityMode [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L202)
|
||||
|
||||
+ Description:
|
||||
+ Access: public
|
||||
@ -136,7 +140,7 @@ This method has no parameters.
|
||||
| destination | File | |
|
||||
|
||||
|
||||
### copyFile [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L192)
|
||||
### copyFile [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L210)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
@ -149,12 +153,12 @@ This method has no parameters.
|
||||
| destinationFile | File | |
|
||||
|
||||
|
||||
### copyStrictOptions [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L209)
|
||||
### copyStrictOptions [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L227)
|
||||
|
||||
+ Description:
|
||||
+ Description: Copy the strict options from the base profile to the profile
|
||||
+ Access: public
|
||||
+ Modifiers: static
|
||||
+ return: boolean
|
||||
+ return: true if successful false otherwise
|
||||
|
||||
This method has no parameters.
|
||||
|
||||
|
@ -1,251 +1,311 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
i2p.plugins.fire...
|
||||
</title>
|
||||
<meta name="author" content="eyedeekay" />
|
||||
<meta name="description" content="i2p.plugins.firefox" />
|
||||
<meta name="keywords" content="main" />
|
||||
<link rel="stylesheet" type="text/css" href="style.css" />
|
||||
<link rel="stylesheet" type="text/css" href="showhider.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="navbar">
|
||||
<a href="#shownav">
|
||||
Show navigation
|
||||
</a>
|
||||
<div id="shownav">
|
||||
<div id="hidenav">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="index.html">
|
||||
index
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="CHANGES.html">
|
||||
CHANGES
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromium.html">
|
||||
I2PChromium
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromiumProfileBuilder.html">
|
||||
I2PChromiumProfileBuilder
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromiumProfileChecker.html">
|
||||
I2PChromiumProfileChecker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromiumProfileUnpacker.html">
|
||||
I2PChromiumProfileUnpacker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PFirefox.html">
|
||||
I2PFirefox
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PFirefoxProfileBuilder.html">
|
||||
I2PFirefoxProfileBuilder
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PFirefoxProfileChecker.html">
|
||||
I2PFirefoxProfileChecker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PFirefoxProfileUnpacker.html">
|
||||
I2PFirefoxProfileUnpacker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="LICENSE.html">
|
||||
LICENSE
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<br>
|
||||
<a href="#hidenav">
|
||||
Hide Navigation
|
||||
<head>
|
||||
<title>
|
||||
i2p.plugins.fire...
|
||||
</title>
|
||||
<meta name="author" content="eyedeekay" />
|
||||
<meta name="description" content="i2p.plugins.firefox" />
|
||||
<meta name="keywords" content="main" />
|
||||
<link rel="stylesheet" type="text/css" href="style.css" />
|
||||
<link rel="stylesheet" type="text/css" href="showhider.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="navbar">
|
||||
<a href="#shownav">
|
||||
Show navigation
|
||||
</a>
|
||||
<div id="shownav">
|
||||
<div id="hidenav">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="index.html">
|
||||
index
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<a href="CHANGES.html">
|
||||
CHANGES
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="EXAMPLES.html">
|
||||
EXAMPLES
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PBrowser.html">
|
||||
I2PBrowser
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromium.html">
|
||||
I2PChromium
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromiumProfileBuilder.html">
|
||||
I2PChromiumProfileBuilder
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromiumProfileChecker.html">
|
||||
I2PChromiumProfileChecker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromiumProfileUnpacker.html">
|
||||
I2PChromiumProfileUnpacker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PFirefox.html">
|
||||
I2PFirefox
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PFirefoxProfileBuilder.html">
|
||||
I2PFirefoxProfileBuilder
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PFirefoxProfileChecker.html">
|
||||
I2PFirefoxProfileChecker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PFirefoxProfileUnpacker.html">
|
||||
I2PFirefoxProfileUnpacker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PGenericUnsafeBrowser.html">
|
||||
I2PGenericUnsafeBrowser
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="LICENSE.html">
|
||||
LICENSE
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="USAGE.html">
|
||||
USAGE
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<br>
|
||||
<a href="#hidenav">
|
||||
Hide Navigation
|
||||
</a>
|
||||
</div>
|
||||
<h1>
|
||||
Class I2PFirefoxProfileChecker
|
||||
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java" rel="nofollow">
|
||||
[src]
|
||||
</a>
|
||||
</h1>
|
||||
<blockquote></blockquote>
|
||||
<p>
|
||||
Access: public
|
||||
<br/>
|
||||
package: net.i2p.i2pfirefox
|
||||
</p>
|
||||
<h2>
|
||||
Dependencies
|
||||
</h2>
|
||||
<p>
|
||||
<details>
|
||||
<br/>
|
||||
<summary>
|
||||
<br/>
|
||||
Show dependencies
|
||||
<br/>
|
||||
</summary>
|
||||
<br/>
|
||||
<ul>
|
||||
<br/>
|
||||
<li>
|
||||
java.io.File
|
||||
</li>
|
||||
</ul>
|
||||
<br/>
|
||||
</details>
|
||||
</p>
|
||||
<h2>
|
||||
No member variables in this class
|
||||
</h2>
|
||||
<h2>
|
||||
Methods
|
||||
</h2>
|
||||
<h3>
|
||||
main
|
||||
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L6" rel="nofollow">
|
||||
[src]
|
||||
</a>
|
||||
</h3>
|
||||
<ul>
|
||||
<li>
|
||||
Description:
|
||||
<br/>
|
||||
</li>
|
||||
<li>
|
||||
Access: public
|
||||
<br/>
|
||||
</li>
|
||||
<li>
|
||||
Modifiers: static
|
||||
</li>
|
||||
<li>
|
||||
return: void
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
| Name | Type | Description |
|
||||
<br/>
|
||||
| —– | —– | —– |
|
||||
<br/>
|
||||
| args | String[] | |
|
||||
</p>
|
||||
<h3>
|
||||
validateProfileDirectory
|
||||
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L20" rel="nofollow">
|
||||
[src]
|
||||
</a>
|
||||
</h3>
|
||||
<ul>
|
||||
<li>
|
||||
Description:
|
||||
<br/>
|
||||
</li>
|
||||
<li>
|
||||
Access: public
|
||||
<br/>
|
||||
</li>
|
||||
<li>
|
||||
Modifiers: static
|
||||
</li>
|
||||
<li>
|
||||
return: boolean
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
| Name | Type | Description |
|
||||
<br/>
|
||||
| —– | —– | —– |
|
||||
<br/>
|
||||
| profileDirectory | String | |
|
||||
</p>
|
||||
<h3>
|
||||
validateFile
|
||||
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L52" 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/>
|
||||
| file | String | |
|
||||
</p>
|
||||
<h3>
|
||||
validateExtensionDirectory
|
||||
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L72" rel="nofollow">
|
||||
[src]
|
||||
</a>
|
||||
</h3>
|
||||
<ul>
|
||||
<li>
|
||||
Description:
|
||||
<br/>
|
||||
</li>
|
||||
<li>
|
||||
Access: public
|
||||
<br/>
|
||||
</li>
|
||||
<li>
|
||||
Modifiers: static
|
||||
</li>
|
||||
<li>
|
||||
return: boolean
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
| Name | Type | Description |
|
||||
<br/>
|
||||
| —– | —– | —– |
|
||||
<br/>
|
||||
| extensionDirectory | String | |
|
||||
</p>
|
||||
<div>
|
||||
<a href="#show">
|
||||
Show license
|
||||
</a>
|
||||
<div id="show">
|
||||
<div id="hide">
|
||||
<pre><code> Copyright 2022 idk (hankhill19580@gmail.com)
|
||||
</div>
|
||||
</div>
|
||||
<h1>
|
||||
<a href="#class-i2pfirefoxprofilechecker-src" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
Class I2PFirefoxProfileChecker
|
||||
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java" rel="nofollow">
|
||||
[src]
|
||||
</a>
|
||||
</h1>
|
||||
<blockquote>
|
||||
<p>
|
||||
*/
|
||||
</p>
|
||||
</blockquote>
|
||||
<p>
|
||||
Access: public
|
||||
<br>
|
||||
Description:
|
||||
</p>
|
||||
<blockquote>
|
||||
<p>
|
||||
I2PFirefoxProfileChecker.java Copyright C 2022 idk
|
||||
<a href="mailto:hankhill19580@gmail.com" rel="nofollow">
|
||||
hankhill19580@gmail.com
|
||||
</a>
|
||||
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.
|
||||
</p>
|
||||
</blockquote>
|
||||
<p>
|
||||
Author: idk
|
||||
<br>
|
||||
package: net.i2p.i2pfirefox
|
||||
</p>
|
||||
<h2>
|
||||
<a href="#dependencies" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
Dependencies
|
||||
</h2>
|
||||
<p>
|
||||
<details>
|
||||
<br>
|
||||
<summary>
|
||||
</p>
|
||||
<pre><code>Show dependencies
|
||||
</code></pre>
|
||||
<p>
|
||||
<br>
|
||||
<ul>
|
||||
<br>
|
||||
<li>
|
||||
java.io.File
|
||||
</li>
|
||||
</ul>
|
||||
<br>
|
||||
<h2>
|
||||
<a href="#no-member-variables-in-this-class" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
No member variables in this class
|
||||
</h2>
|
||||
<h2>
|
||||
<a href="#methods" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
Methods
|
||||
</h2>
|
||||
<h3>
|
||||
<a href="#main-src" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
main
|
||||
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L26" rel="nofollow">
|
||||
[src]
|
||||
</a>
|
||||
</h3>
|
||||
<ul>
|
||||
<li>
|
||||
Description:
|
||||
<br>
|
||||
</li>
|
||||
<li>
|
||||
Access: public
|
||||
<br>
|
||||
</li>
|
||||
<li>
|
||||
Modifiers: static
|
||||
</li>
|
||||
<li>
|
||||
return: void
|
||||
<br>
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
| Name | Type | Description |
|
||||
<br>
|
||||
| ----- | ----- | ----- |
|
||||
<br>
|
||||
| args | String[] | |
|
||||
</p>
|
||||
<h3>
|
||||
<a href="#validateprofiledirectory-src" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
validateProfileDirectory
|
||||
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L47" rel="nofollow">
|
||||
[src]
|
||||
</a>
|
||||
</h3>
|
||||
<ul>
|
||||
<li>
|
||||
Description: Return true if the profile directory is valid.
|
||||
<br>
|
||||
</li>
|
||||
<li>
|
||||
Access: public
|
||||
<br>
|
||||
</li>
|
||||
<li>
|
||||
Modifiers: static
|
||||
</li>
|
||||
<li>
|
||||
return: true if the profile directory is valid false otherwise
|
||||
<br>
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
| Name | Type | Description |
|
||||
<br>
|
||||
| ----- | ----- | ----- |
|
||||
<br>
|
||||
| profileDirectory | String | the profile directory to check |
|
||||
</p>
|
||||
<h3>
|
||||
<a href="#validatefile-src" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
validateFile
|
||||
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L86" rel="nofollow">
|
||||
[src]
|
||||
</a>
|
||||
</h3>
|
||||
<ul>
|
||||
<li>
|
||||
Description: Return true if the file is valid.
|
||||
<br>
|
||||
</li>
|
||||
<li>
|
||||
Access: public
|
||||
<br>
|
||||
</li>
|
||||
<li>
|
||||
Modifiers: static
|
||||
</li>
|
||||
<li>
|
||||
return: true if the file is valid false otherwise
|
||||
<br>
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
| Name | Type | Description |
|
||||
<br>
|
||||
| ----- | ----- | ----- |
|
||||
<br>
|
||||
| file | String | the file to check |
|
||||
</p>
|
||||
<h3>
|
||||
<a href="#validateextensiondirectory-src" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
validateExtensionDirectory
|
||||
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L113" rel="nofollow">
|
||||
[src]
|
||||
</a>
|
||||
</h3>
|
||||
<ul>
|
||||
<li>
|
||||
Description: Return true if the extension directory is valid.
|
||||
<br>
|
||||
</li>
|
||||
<li>
|
||||
Access: public
|
||||
<br>
|
||||
</li>
|
||||
<li>
|
||||
Modifiers: static
|
||||
</li>
|
||||
<li>
|
||||
return: true if the extension directory is valid false otherwise
|
||||
<br>
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
| Name | Type | Description |
|
||||
<br>
|
||||
| ----- | ----- | ----- |
|
||||
<br>
|
||||
| extensionDirectory | String | the extension directory to check |
|
||||
</p>
|
||||
<div>
|
||||
<a href="#show">
|
||||
Show license
|
||||
</a>
|
||||
<div id="show">
|
||||
<div id="hide">
|
||||
<pre><code> Copyright 2022 idk (hankhill19580@gmail.com)
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@ -1088,20 +1148,18 @@ consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
</code></pre>
|
||||
<a href="#hide">
|
||||
Hide license
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe>
|
||||
</div>
|
||||
<div>
|
||||
<a href="https://geti2p.net/">
|
||||
<img src="i2plogo.png"></img>
|
||||
I2P
|
||||
<a href="#hide">
|
||||
Hide license
|
||||
</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe>
|
||||
</div>
|
||||
<div>
|
||||
<a href="https://geti2p.net/">
|
||||
<img src="i2plogo.png"></img>
|
||||
I2P
|
||||
</a>
|
||||
</div>
|
@ -1,8 +1,12 @@
|
||||
# Class I2PFirefoxProfileChecker [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java)
|
||||
|
||||
>
|
||||
> */
|
||||
|
||||
Access: public
|
||||
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
|
||||
package: net.i2p.i2pfirefox
|
||||
|
||||
## Dependencies
|
||||
@ -20,7 +24,7 @@ package: net.i2p.i2pfirefox
|
||||
|
||||
## Methods
|
||||
|
||||
### main [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L6)
|
||||
### main [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L26)
|
||||
|
||||
+ Description:
|
||||
+ Access: public
|
||||
@ -32,39 +36,39 @@ package: net.i2p.i2pfirefox
|
||||
| args | String[] | |
|
||||
|
||||
|
||||
### validateProfileDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L20)
|
||||
### validateProfileDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L47)
|
||||
|
||||
+ Description:
|
||||
+ Description: Return true if the profile directory is valid.
|
||||
+ Access: public
|
||||
+ Modifiers: static
|
||||
+ return: boolean
|
||||
+ return: true if the profile directory is valid false otherwise
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| profileDirectory | String | |
|
||||
| profileDirectory | String | the profile directory to check |
|
||||
|
||||
|
||||
### validateFile [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L52)
|
||||
### validateFile [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L86)
|
||||
|
||||
+ Description:
|
||||
+ Description: Return true if the file is valid.
|
||||
+ Access: public
|
||||
+ Modifiers: static
|
||||
+ return: boolean
|
||||
+ return: true if the file is valid false otherwise
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| file | String | |
|
||||
| file | String | the file to check |
|
||||
|
||||
|
||||
### validateExtensionDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L72)
|
||||
### validateExtensionDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L113)
|
||||
|
||||
+ Description:
|
||||
+ Description: Return true if the extension directory is valid.
|
||||
+ Access: public
|
||||
+ Modifiers: static
|
||||
+ return: boolean
|
||||
+ return: true if the extension directory is valid false otherwise
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| extensionDirectory | String | |
|
||||
| extensionDirectory | String | the extension directory to check |
|
||||
|
||||
|
||||
|
@ -1,203 +1,261 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
i2p.plugins.fire...
|
||||
</title>
|
||||
<meta name="author" content="eyedeekay" />
|
||||
<meta name="description" content="i2p.plugins.firefox" />
|
||||
<meta name="keywords" content="main" />
|
||||
<link rel="stylesheet" type="text/css" href="style.css" />
|
||||
<link rel="stylesheet" type="text/css" href="showhider.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="navbar">
|
||||
<a href="#shownav">
|
||||
Show navigation
|
||||
</a>
|
||||
<div id="shownav">
|
||||
<div id="hidenav">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="index.html">
|
||||
index
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="CHANGES.html">
|
||||
CHANGES
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromium.html">
|
||||
I2PChromium
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromiumProfileBuilder.html">
|
||||
I2PChromiumProfileBuilder
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromiumProfileChecker.html">
|
||||
I2PChromiumProfileChecker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromiumProfileUnpacker.html">
|
||||
I2PChromiumProfileUnpacker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PFirefox.html">
|
||||
I2PFirefox
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PFirefoxProfileBuilder.html">
|
||||
I2PFirefoxProfileBuilder
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PFirefoxProfileChecker.html">
|
||||
I2PFirefoxProfileChecker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PFirefoxProfileUnpacker.html">
|
||||
I2PFirefoxProfileUnpacker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="LICENSE.html">
|
||||
LICENSE
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<br>
|
||||
<a href="#hidenav">
|
||||
Hide Navigation
|
||||
<head>
|
||||
<title>
|
||||
i2p.plugins.fire...
|
||||
</title>
|
||||
<meta name="author" content="eyedeekay" />
|
||||
<meta name="description" content="i2p.plugins.firefox" />
|
||||
<meta name="keywords" content="main" />
|
||||
<link rel="stylesheet" type="text/css" href="style.css" />
|
||||
<link rel="stylesheet" type="text/css" href="showhider.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="navbar">
|
||||
<a href="#shownav">
|
||||
Show navigation
|
||||
</a>
|
||||
<div id="shownav">
|
||||
<div id="hidenav">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="index.html">
|
||||
index
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<a href="CHANGES.html">
|
||||
CHANGES
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="EXAMPLES.html">
|
||||
EXAMPLES
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PBrowser.html">
|
||||
I2PBrowser
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromium.html">
|
||||
I2PChromium
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromiumProfileBuilder.html">
|
||||
I2PChromiumProfileBuilder
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromiumProfileChecker.html">
|
||||
I2PChromiumProfileChecker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromiumProfileUnpacker.html">
|
||||
I2PChromiumProfileUnpacker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PFirefox.html">
|
||||
I2PFirefox
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PFirefoxProfileBuilder.html">
|
||||
I2PFirefoxProfileBuilder
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PFirefoxProfileChecker.html">
|
||||
I2PFirefoxProfileChecker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PFirefoxProfileUnpacker.html">
|
||||
I2PFirefoxProfileUnpacker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PGenericUnsafeBrowser.html">
|
||||
I2PGenericUnsafeBrowser
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="LICENSE.html">
|
||||
LICENSE
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="USAGE.html">
|
||||
USAGE
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<br>
|
||||
<a href="#hidenav">
|
||||
Hide Navigation
|
||||
</a>
|
||||
</div>
|
||||
<h1>
|
||||
Class I2PFirefoxProfileUnpacker
|
||||
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileUnpacker.java" rel="nofollow">
|
||||
[src]
|
||||
</a>
|
||||
</h1>
|
||||
<blockquote></blockquote>
|
||||
<p>
|
||||
Access: public
|
||||
<br/>
|
||||
package: net.i2p.i2pfirefox
|
||||
</p>
|
||||
<h2>
|
||||
Dependencies
|
||||
</h2>
|
||||
<p>
|
||||
<details>
|
||||
<br/>
|
||||
<summary>
|
||||
<br/>
|
||||
Show dependencies
|
||||
<br/>
|
||||
</summary>
|
||||
<br/>
|
||||
<ul>
|
||||
<br/>
|
||||
<li>
|
||||
java.io.File
|
||||
</li>
|
||||
<li>
|
||||
java.io.InputStream
|
||||
</li>
|
||||
<li>
|
||||
java.nio.file.Files
|
||||
</li>
|
||||
<li>
|
||||
java.nio.file.StandardCopyOption
|
||||
</li>
|
||||
<li>
|
||||
java.util.zip.ZipEntry
|
||||
</li>
|
||||
<li>
|
||||
java.util.zip.ZipInputStream
|
||||
</li>
|
||||
</ul>
|
||||
<br/>
|
||||
</details>
|
||||
</p>
|
||||
<h2>
|
||||
No member variables in this class
|
||||
</h2>
|
||||
<h2>
|
||||
Methods
|
||||
</h2>
|
||||
<h3>
|
||||
main
|
||||
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileUnpacker.java#L12" rel="nofollow">
|
||||
[src]
|
||||
</a>
|
||||
</h3>
|
||||
<ul>
|
||||
<li>
|
||||
Description:
|
||||
<br/>
|
||||
</li>
|
||||
<li>
|
||||
Access: public
|
||||
<br/>
|
||||
</li>
|
||||
<li>
|
||||
Modifiers: static
|
||||
</li>
|
||||
<li>
|
||||
return: void
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
| Name | Type | Description |
|
||||
<br/>
|
||||
| —– | —– | —– |
|
||||
<br/>
|
||||
| args | String[] | |
|
||||
</p>
|
||||
<h3>
|
||||
unpackProfile
|
||||
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileUnpacker.java#L27" rel="nofollow">
|
||||
[src]
|
||||
</a>
|
||||
</h3>
|
||||
<ul>
|
||||
<li>
|
||||
Description:
|
||||
<br/>
|
||||
</li>
|
||||
<li>
|
||||
Access: public
|
||||
<br/>
|
||||
</li>
|
||||
<li>
|
||||
return: boolean
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
| Name | Type | Description |
|
||||
<br/>
|
||||
| —– | —– | —– |
|
||||
<br/>
|
||||
| profileDirectory | String | |
|
||||
</p>
|
||||
<div>
|
||||
<a href="#show">
|
||||
Show license
|
||||
</a>
|
||||
<div id="show">
|
||||
<div id="hide">
|
||||
<pre><code> Copyright 2022 idk (hankhill19580@gmail.com)
|
||||
</div>
|
||||
</div>
|
||||
<h1>
|
||||
<a href="#class-i2pfirefoxprofileunpacker-src" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
Class I2PFirefoxProfileUnpacker
|
||||
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileUnpacker.java" rel="nofollow">
|
||||
[src]
|
||||
</a>
|
||||
</h1>
|
||||
<blockquote>
|
||||
<p>
|
||||
*/
|
||||
</p>
|
||||
</blockquote>
|
||||
<p>
|
||||
Access: public
|
||||
<br>
|
||||
Description:
|
||||
</p>
|
||||
<blockquote>
|
||||
<p>
|
||||
I2PFirefoxProfileUnpacker.java Copyright C 2022 idk
|
||||
<a href="mailto:hankhill19580@gmail.com" rel="nofollow">
|
||||
hankhill19580@gmail.com
|
||||
</a>
|
||||
This program is free software: you can redistribute it and/or modify it under the terms of the MIT License. See LICENSE.md for details. This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. I2PFirefoxProfileUnpacker is a that unpacks the I2P Firefox profile from a zip file embedded in the
|
||||
<code>
|
||||
jar
|
||||
</code>
|
||||
file. The zip is unpacked to a base directory where it is left untouched and the base profile is copied to the active profile directory.
|
||||
</p>
|
||||
</blockquote>
|
||||
<p>
|
||||
Author: idk
|
||||
<br>
|
||||
package: net.i2p.i2pfirefox
|
||||
</p>
|
||||
<h2>
|
||||
<a href="#dependencies" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
Dependencies
|
||||
</h2>
|
||||
<p>
|
||||
<details>
|
||||
<br>
|
||||
<summary>
|
||||
</p>
|
||||
<pre><code>Show dependencies
|
||||
</code></pre>
|
||||
<p>
|
||||
<br>
|
||||
<ul>
|
||||
<br>
|
||||
<li>
|
||||
java.io.File
|
||||
</li>
|
||||
<li>
|
||||
java.io.InputStream
|
||||
</li>
|
||||
<li>
|
||||
java.nio.file.Files
|
||||
</li>
|
||||
<li>
|
||||
java.nio.file.StandardCopyOption
|
||||
</li>
|
||||
<li>
|
||||
java.util.zip.ZipEntry
|
||||
</li>
|
||||
<li>
|
||||
java.util.zip.ZipInputStream
|
||||
</li>
|
||||
</ul>
|
||||
<br>
|
||||
<h2>
|
||||
<a href="#no-member-variables-in-this-class" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
No member variables in this class
|
||||
</h2>
|
||||
<h2>
|
||||
<a href="#methods" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
Methods
|
||||
</h2>
|
||||
<h3>
|
||||
<a href="#main-src" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
main
|
||||
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileUnpacker.java#L30" rel="nofollow">
|
||||
[src]
|
||||
</a>
|
||||
</h3>
|
||||
<ul>
|
||||
<li>
|
||||
Description:
|
||||
<br>
|
||||
</li>
|
||||
<li>
|
||||
Access: public
|
||||
<br>
|
||||
</li>
|
||||
<li>
|
||||
Modifiers: static
|
||||
</li>
|
||||
<li>
|
||||
return: void
|
||||
<br>
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
| Name | Type | Description |
|
||||
<br>
|
||||
| ----- | ----- | ----- |
|
||||
<br>
|
||||
| args | String[] | |
|
||||
</p>
|
||||
<h3>
|
||||
<a href="#unpackprofile-src" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
unpackProfile
|
||||
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileUnpacker.java#L45" rel="nofollow">
|
||||
[src]
|
||||
</a>
|
||||
</h3>
|
||||
<ul>
|
||||
<li>
|
||||
Description: unpack the profile directory
|
||||
<br>
|
||||
</li>
|
||||
<li>
|
||||
Access: public
|
||||
<br>
|
||||
</li>
|
||||
<li>
|
||||
return: true if the profile directory was successfully unpacked
|
||||
<br>
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
| Name | Type | Description |
|
||||
<br>
|
||||
| ----- | ----- | ----- |
|
||||
<br>
|
||||
| profileDirectory | String | |
|
||||
</p>
|
||||
<div>
|
||||
<a href="#show">
|
||||
Show license
|
||||
</a>
|
||||
<div id="show">
|
||||
<div id="hide">
|
||||
<pre><code> Copyright 2022 idk (hankhill19580@gmail.com)
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@ -1040,20 +1098,18 @@ consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
</code></pre>
|
||||
<a href="#hide">
|
||||
Hide license
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe>
|
||||
</div>
|
||||
<div>
|
||||
<a href="https://geti2p.net/">
|
||||
<img src="i2plogo.png"></img>
|
||||
I2P
|
||||
<a href="#hide">
|
||||
Hide license
|
||||
</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe>
|
||||
</div>
|
||||
<div>
|
||||
<a href="https://geti2p.net/">
|
||||
<img src="i2plogo.png"></img>
|
||||
I2P
|
||||
</a>
|
||||
</div>
|
@ -1,8 +1,12 @@
|
||||
# Class I2PFirefoxProfileUnpacker [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileUnpacker.java)
|
||||
|
||||
>
|
||||
> */
|
||||
|
||||
Access: public
|
||||
Description:
|
||||
> I2PFirefoxProfileUnpacker.java Copyright C 2022 idk <hankhill19580@gmail.com> This program is free software: you can redistribute it and/or modify it under the terms of the MIT License. See LICENSE.md for details. This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. I2PFirefoxProfileUnpacker is a that unpacks the I2P Firefox profile from a zip file embedded in the `jar` file. The zip is unpacked to a base directory where it is left untouched and the base profile is copied to the active profile directory.
|
||||
|
||||
Author: idk
|
||||
package: net.i2p.i2pfirefox
|
||||
|
||||
## Dependencies
|
||||
@ -25,7 +29,7 @@ package: net.i2p.i2pfirefox
|
||||
|
||||
## Methods
|
||||
|
||||
### main [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileUnpacker.java#L12)
|
||||
### main [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileUnpacker.java#L30)
|
||||
|
||||
+ Description:
|
||||
+ Access: public
|
||||
@ -37,11 +41,11 @@ package: net.i2p.i2pfirefox
|
||||
| args | String[] | |
|
||||
|
||||
|
||||
### unpackProfile [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileUnpacker.java#L27)
|
||||
### unpackProfile [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileUnpacker.java#L45)
|
||||
|
||||
+ Description:
|
||||
+ Description: unpack the profile directory
|
||||
+ Access: public
|
||||
+ return: boolean
|
||||
+ return: true if the profile directory was successfully unpacked
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
|
1623
I2PGenericUnsafeBrowser.html
Normal file
241
I2PGenericUnsafeBrowser.md
Normal file
@ -0,0 +1,241 @@
|
||||
# Class I2PGenericUnsafeBrowser [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java)
|
||||
|
||||
>
|
||||
|
||||
Access: public
|
||||
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. I2PGenericUnsafeBrowser is a wrapper which sets common environment variables for the process controlled by a processbuilder. ALWAYS ALWAYS ALWAYS try the Firefox and Chromium specific launchers first.
|
||||
|
||||
Author: idk
|
||||
package: net.i2p.i2pfirefox
|
||||
|
||||
## Dependencies
|
||||
|
||||
<details>
|
||||
<summary>
|
||||
Show dependencies
|
||||
</summary>
|
||||
<ul>
|
||||
<li>java.io.File</li>
|
||||
<li>java.io.IOException</li>
|
||||
<li>java.net.Socket</li>
|
||||
<li>java.util.ArrayList</li>
|
||||
<li>java.util.Scanner</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
## Member Variables
|
||||
|
||||
#### int DEFAULT_TIMEOUT [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L)
|
||||
|
||||
>
|
||||
|
||||
+ Access: private
|
||||
+ Modifiers: final
|
||||
|
||||
#### String BROWSER [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L)
|
||||
|
||||
>
|
||||
|
||||
+ Access: public
|
||||
+ Modifiers: static
|
||||
|
||||
#### Process p [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L)
|
||||
|
||||
>
|
||||
|
||||
+ Access: private
|
||||
|
||||
## Methods
|
||||
|
||||
### getDefaultWindowsBrowser [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L92)
|
||||
|
||||
+ Description: Obtains the default browser for the Windows platform which by now should be Edgium in the worst-case scenario but in case it isn't we can use this function to figure it out. It can find: 1. The current user's HTTPS default browser if they configured it to be non-default 2. The current user's HTTP default browser if they configured it to be non-default 3. Edgium if it's available 4. iexplore if it's not and it will return the first one we find in exactly that order. Adapted from: and from:
|
||||
+ Access: public
|
||||
+ Modifiers: static
|
||||
+ return: String
|
||||
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### getDefaultOutOfRegistry [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L116)
|
||||
|
||||
+ Description: obtains information out of the Windows registry.
|
||||
+ Access: public
|
||||
+ Modifiers: static
|
||||
+ return: String
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| hkeyquery | String | registry entry to ask for. |
|
||||
|
||||
|
||||
### scanAPath [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L139)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
+ Modifiers: static
|
||||
+ return: String
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| dir | String | |
|
||||
|
||||
|
||||
### getAnyUnixBrowser [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L154)
|
||||
|
||||
+ Description: Find any browser in our list within a UNIX path
|
||||
+ Access: public
|
||||
+ Modifiers: static
|
||||
+ return: String
|
||||
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### findUnsafeBrowserAnywhere [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L173)
|
||||
|
||||
+ Description: Find any usable browser and output the whole path
|
||||
+ Access: public
|
||||
+ Modifiers: static
|
||||
+ return: String
|
||||
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### deleteRuntimeDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L220)
|
||||
|
||||
+ Description: delete the runtime directory
|
||||
+ Access: public
|
||||
+ Modifiers: static
|
||||
+ return: boolean
|
||||
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### runtimeDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L236)
|
||||
|
||||
+ Description: get the runtime directory creating it if create=true
|
||||
+ Access: public
|
||||
+ Modifiers: static
|
||||
+ return: the runtime directory or null if it could not be created
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| create | boolean | if true create the runtime directory if it does not exist |
|
||||
|
||||
|
||||
### runtimeDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L253)
|
||||
|
||||
+ Description: get the correct runtime directory
|
||||
+ Access: public
|
||||
+ Modifiers: static
|
||||
+ return: the runtime directory or null if it could not be created or found
|
||||
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L301)
|
||||
|
||||
+ Description: Waits for an HTTP proxy on port 4444 to be ready. Returns false on timeout of 200 seconds.
|
||||
+ Access: public
|
||||
+ return: true if the proxy is ready false if it is not.
|
||||
|
||||
This method has no parameters.
|
||||
|
||||
|
||||
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L313)
|
||||
|
||||
+ Description: Waits for an HTTP proxy on port 4444 to be ready. Returns false on timeout of the specified number of seconds.
|
||||
+ Access: public
|
||||
+ return: true if the proxy is ready false if it is not.
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| timeout | int | the number of seconds to wait for the proxy to be ready. |
|
||||
|
||||
|
||||
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L325)
|
||||
|
||||
+ 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
|
||||
+ return: true if the proxy is ready false if it is not.
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| timeout | int | the number of seconds to wait for the proxy to be ready. |
|
||||
| port | int | the port to wait for the proxy to be ready on. |
|
||||
|
||||
|
||||
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L339)
|
||||
|
||||
+ 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
|
||||
+ return: true if the proxy is ready false if it is not.
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| timeout | int | the number of seconds to wait for the proxy to be ready. |
|
||||
| port | int | the port to wait for the proxy to be ready on. |
|
||||
| host | String | the host to wait for the proxy to be ready on. |
|
||||
|
||||
|
||||
### launchAndDetatch [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L354)
|
||||
|
||||
+ Description:
|
||||
+ Access: public
|
||||
+ return: Process
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| privateWindow | boolean | |
|
||||
| url | String[] | |
|
||||
|
||||
|
||||
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L375)
|
||||
|
||||
+ Description:
|
||||
+ Access: public
|
||||
+ return: void
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| privateWindow | boolean | |
|
||||
| url | String[] | |
|
||||
|
||||
|
||||
### sleep [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L392)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
+ Modifiers: static
|
||||
+ return: void
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| millis | int | |
|
||||
|
||||
|
||||
### ValidURL [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L400)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
+ Modifiers: static
|
||||
+ return: String
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| inUrl | String | |
|
||||
|
||||
|
||||
### checkifPortIsOccupied [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L410)
|
||||
|
||||
+ Description:
|
||||
+ Access: private
|
||||
+ return: boolean
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----- | ----- | ----- |
|
||||
| port | int | |
|
||||
| host | String | |
|
||||
|
||||
|
1572
LICENSE.html
67
README.md
@ -4,6 +4,41 @@ A port of the batch scripts from i2p.firefox to Java.
|
||||
|
||||
## Getting started
|
||||
|
||||
### Using a Binary
|
||||
|
||||
```sh
|
||||
|
||||
mkdir ~/tmp-i2pfirefox && cd ~/tmp-i2pfirefox
|
||||
wget https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/0.0.10/i2pfirefox.zip
|
||||
unzip i2pfirefox.zip
|
||||
./i2pfirefox.cmd
|
||||
|
||||
#or if you want to use a Chromium
|
||||
|
||||
./i2pchromium.cmd
|
||||
```
|
||||
|
||||
### Build Dependencies
|
||||
|
||||
You will need `ant`, `java` and for building the Chromium profile, a Go application
|
||||
called `crx3` which is used to interact with the Chrome app store. I've been using Java 17
|
||||
on Debian mostly, on Debian and Ubuntu, install the dependencies with:
|
||||
|
||||
```sh
|
||||
sudo apt-get install openjdk-17* ant golang-go
|
||||
go install github.com/mediabuyerbot/go-crx3/crx3@latest
|
||||
```
|
||||
|
||||
For Fedora, use Yum, for Arch use pacman or something else but make sure to tell everyone
|
||||
about it. Once you have that installed, when building, make sure to add `$GOPATH/bin/`
|
||||
to your `$PATH`.
|
||||
|
||||
```sh
|
||||
export PATH=$PATH:$HOME/go/bin
|
||||
```
|
||||
|
||||
Will almost always work.
|
||||
|
||||
### Building
|
||||
|
||||
This is not actually a plugin yet, but it will be soon. The important bit is the jar.
|
||||
@ -12,9 +47,7 @@ produces the jar as a by-product, or you can:
|
||||
|
||||
```sh
|
||||
|
||||
cd src
|
||||
ant
|
||||
cd ..
|
||||
ant jar
|
||||
```
|
||||
|
||||
To build just the jar. You'll know it worked if you can:
|
||||
@ -31,6 +64,7 @@ add a UI element that triggers something along the lines of this:
|
||||
|
||||
```java
|
||||
|
||||
// Firefox Example
|
||||
if (i2pIsRunning()) {
|
||||
logger.warning("I2P is already running");
|
||||
System.out.println("I2PFirefox");
|
||||
@ -39,4 +73,31 @@ if (i2pIsRunning()) {
|
||||
}
|
||||
```
|
||||
|
||||
```java
|
||||
|
||||
// Chromium Example
|
||||
if (i2pIsRunning()) {
|
||||
logger.warning("I2P is already running");
|
||||
System.out.println("I2PChromium");
|
||||
I2PChromium i2pChromium = new I2PChromium();
|
||||
i2pChromium.launch();
|
||||
}
|
||||
```
|
||||
|
||||
```java
|
||||
|
||||
// Auto-Select Example, chooses Firefox first, then Chromium
|
||||
if (i2pIsRunning()) {
|
||||
logger.warning("I2P is already running");
|
||||
System.out.println("I2PBrowser");
|
||||
I2PBrowser i2pBrowser = new I2PBrowser();
|
||||
/*
|
||||
* toggle chromium to the top of the order by doing:
|
||||
I2PBrowser.chromiumFirst = true;
|
||||
*
|
||||
*/
|
||||
i2pBrowser.launch(privateBrowsing);
|
||||
}
|
||||
```
|
||||
|
||||
to add a browser management tool to it.
|
||||
|
1040
USAGE.html
Normal file
58
USAGE.md
Normal file
@ -0,0 +1,58 @@
|
||||
Example Commands:
|
||||
=================
|
||||
|
||||
These scripts are designed so that they can be executed on both Windows and Unix.
|
||||
|
||||
The top command is for Unixes and should work on most POSIX shells. After it runs, the script will terminate preventing Windows commands from running.
|
||||
|
||||
The second and third command is for Windows and won't be reachable on Linux(because the top command will be run and the script will exit).
|
||||
|
||||
Both determine the path to the script, use it to find the jar file, and execute a single command.
|
||||
|
||||
Auto-Select in Persistent Mode
|
||||
|
||||
```sh
|
||||
:; dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd); java -cp "$dir"/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser; exit $?
|
||||
@ECHO OFF
|
||||
java -cp %cd%/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser
|
||||
```
|
||||
|
||||
Auto-Select in Private Browsing Mode
|
||||
|
||||
```sh
|
||||
:; dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd); java -cp "$dir"/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -private; exit $?
|
||||
@ECHO OFF
|
||||
java -cp %cd%/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -private
|
||||
```
|
||||
|
||||
Firefox in Persistent Mode
|
||||
|
||||
```sh
|
||||
:; dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd); java -cp "$dir"/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PFirefox; exit $?
|
||||
@ECHO OFF
|
||||
java -cp %cd%/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PFirefox
|
||||
```
|
||||
|
||||
Firefox in Private Browsing Mode
|
||||
|
||||
```sh
|
||||
:; dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd); java -cp "$dir"/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PFirefox -private; exit $?
|
||||
@ECHO OFF
|
||||
java -cp %cd%/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PFirefox -private
|
||||
```
|
||||
|
||||
Chromium in Persistent Mode
|
||||
|
||||
```sh
|
||||
:; dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd); java -cp "$dir"/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PChromium; exit $?
|
||||
@ECHO OFF
|
||||
java -cp %cd%/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PChromium
|
||||
```
|
||||
|
||||
Chromium in Private Browsing Mode
|
||||
|
||||
```sh
|
||||
:; dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd); java -cp "$dir"/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PChromium -private; exit $?
|
||||
@ECHO OFF
|
||||
java -cp %cd%/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PChromium -private
|
||||
```
|
199
build.xml
@ -8,7 +8,167 @@
|
||||
<ant dir="src" target="build" />
|
||||
</target>
|
||||
|
||||
<target name="jar" >
|
||||
<target name="examples" >
|
||||
<exec executable="echo">
|
||||
<redirector output="USAGE.md"/>
|
||||
<arg value="Example Commands:" />
|
||||
</exec>
|
||||
<exec executable="echo">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="=================" />
|
||||
</exec>
|
||||
<exec executable="echo">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="" />
|
||||
</exec>
|
||||
<exec executable="printf">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="These scripts are designed so that they can be executed on both Windows and Unix.\n\nThe top command is for Unixes and should work on most POSIX shells. After it runs, the script will terminate preventing Windows commands from running.\n\nThe second and third command is for Windows and won't be reachable on
|
||||
Linux(because the top command will be run and the script will exit).\n\nBoth determine the path to the script, use it to find the jar file, and execute a single command.\n\n" />
|
||||
</exec>
|
||||
<exec executable="echo">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="Auto-Select in Persistent Mode" />
|
||||
</exec>
|
||||
<exec executable="echo">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="" />
|
||||
</exec>
|
||||
<exec executable="echo">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="```sh" />
|
||||
</exec>
|
||||
<exec executable="cat">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="i2pbrowser.cmd" />
|
||||
</exec>
|
||||
<exec executable="echo">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="```" />
|
||||
</exec>
|
||||
<exec executable="echo">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="" />
|
||||
</exec>
|
||||
<exec executable="echo">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="Auto-Select in Private Browsing Mode" />
|
||||
</exec>
|
||||
<exec executable="echo">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="" />
|
||||
</exec>
|
||||
<exec executable="echo">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="```sh" />
|
||||
</exec>
|
||||
<exec executable="cat">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="i2pbrowser-private.cmd" />
|
||||
</exec>
|
||||
<exec executable="echo">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="```" />
|
||||
</exec>
|
||||
<exec executable="echo">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="" />
|
||||
</exec>
|
||||
<exec executable="echo">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="Firefox in Persistent Mode" />
|
||||
</exec>
|
||||
<exec executable="echo">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="" />
|
||||
</exec>
|
||||
<exec executable="echo">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="```sh" />
|
||||
</exec>
|
||||
<exec executable="cat">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="i2pfirefox.cmd" />
|
||||
</exec>
|
||||
<exec executable="echo">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="```" />
|
||||
</exec>
|
||||
<exec executable="echo">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="" />
|
||||
</exec>
|
||||
<exec executable="echo">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="Firefox in Private Browsing Mode" />
|
||||
</exec>
|
||||
<exec executable="echo">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="" />
|
||||
</exec>
|
||||
<exec executable="echo">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="```sh" />
|
||||
</exec>
|
||||
<exec executable="cat">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="i2pfirefox-private.cmd" />
|
||||
</exec>
|
||||
<exec executable="echo">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="```" />
|
||||
</exec>
|
||||
<exec executable="echo">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="" />
|
||||
</exec>
|
||||
<exec executable="echo">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="Chromium in Persistent Mode" />
|
||||
</exec>
|
||||
<exec executable="echo">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="" />
|
||||
</exec>
|
||||
<exec executable="echo">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="```sh" />
|
||||
</exec>
|
||||
<exec executable="cat">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="i2pchromium.cmd" />
|
||||
</exec>
|
||||
<exec executable="echo">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="```" />
|
||||
</exec>
|
||||
<exec executable="echo">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="" />
|
||||
</exec>
|
||||
<exec executable="echo">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="Chromium in Private Browsing Mode" />
|
||||
</exec>
|
||||
<exec executable="echo">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="" />
|
||||
</exec>
|
||||
<exec executable="echo">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="```sh" />
|
||||
</exec>
|
||||
<exec executable="cat">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="i2pchromium-private.cmd" />
|
||||
</exec>
|
||||
<exec executable="echo">
|
||||
<redirector output="USAGE.md" append="true"/>
|
||||
<arg value="```" />
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="jar" depends="distclean,i2pFirefoxBaseProfileZip,i2pChromiumBaseProfileZip">
|
||||
<ant dir="src" target="jar" />
|
||||
</target>
|
||||
|
||||
@ -24,6 +184,39 @@
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="i2pChromiumBaseProfile">
|
||||
<exec executable="crx3" failonerror="true">
|
||||
<arg value="download"/>
|
||||
<arg value="ikdjcmomgldfciocnpekfndklkfgglpe" />
|
||||
<arg value="-u=true"/>
|
||||
<arg value="-o" />
|
||||
<arg value="src/i2p.chromium.base.profile/extensions/i2pchrome.js.crx" />
|
||||
</exec>
|
||||
<!--
|
||||
TODO: I don't want to deal with licensing issues while on a headfull of cold
|
||||
medicine and COVID. SO for now I'm only including a plugin written by a person
|
||||
who I'm pretty sure isn't going to sue me for it(me). In order to more closely
|
||||
mirror the behavior of the Firefox profile, we should at least include a script
|
||||
blocking plugin, such as ScriptSafe. uBlock was also suggested and I tend to
|
||||
agree. However, since we have to load extensions unpacked, they won't be updated
|
||||
automatically. This is probably good for working against fingerprinting but it's
|
||||
also more work should a plugin have a security vulnerability.
|
||||
<exec executable="crx3" failonerror="true">
|
||||
<arg value="download"/>
|
||||
<arg value="cjpalhdlnbpafiamejdnhcphjbkeiagm" />
|
||||
<arg value="-u=true"/>
|
||||
<arg value="-o" />
|
||||
<arg value="src/i2p.chromium.base.profile/extensions/ublock.js.crx" />
|
||||
</exec>
|
||||
<exec executable="crx3" failonerror="true">
|
||||
<arg value="download"/>
|
||||
<arg value="oiigbmnaadbkfbmpbfijlflahbdbdgdf" />
|
||||
<arg value="-u=true"/>
|
||||
<arg value="-o" />
|
||||
<arg value="src/i2p.chromium.base.profile/extensions/scriptsafe.js.crx" />
|
||||
</exec>-->
|
||||
</target>
|
||||
|
||||
<target name="i2pChromiumBaseProfileZip">
|
||||
<exec executable="rm" failonerror="false" dir="src">
|
||||
<arg value="-rf" />
|
||||
@ -43,8 +236,10 @@
|
||||
</exec>
|
||||
<exec executable="zip" failonerror="true">
|
||||
<arg value="-r"/>
|
||||
<arg value="i2pfirefox.zip"/>
|
||||
<arg value="src/build/i2pfirefox.jar"/>
|
||||
<arg value="i2pbrowser.cmd"/>
|
||||
<arg value="i2pfirefox.cmd"/>
|
||||
<arg value="i2pchromium.cmd"/>
|
||||
<arg value="LICENSE.md"/>
|
||||
<arg value="README.md"/>
|
||||
</exec>
|
||||
|
3
i2pbrowser-private.cmd
Executable file
@ -0,0 +1,3 @@
|
||||
:; dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd); java -cp "$dir"/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -private; exit $?
|
||||
@ECHO OFF
|
||||
java -cp %cd%/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -private
|
@ -1,3 +1,3 @@
|
||||
:; dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd); java -cp "$dir"/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PFirefox; exit $?
|
||||
:; dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd); java -cp "$dir"/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser; exit $?
|
||||
@ECHO OFF
|
||||
java -cp %cd%/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PFirefox
|
||||
java -cp %cd%/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser
|
3
i2pchromium-private.cmd
Executable file
@ -0,0 +1,3 @@
|
||||
:; dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd); java -cp "$dir"/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PChromium -private; exit $?
|
||||
@ECHO OFF
|
||||
java -cp %cd%/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PChromium -private
|
3
i2pchromium.cmd
Executable file
@ -0,0 +1,3 @@
|
||||
:; dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd); java -cp "$dir"/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PChromium; exit $?
|
||||
@ECHO OFF
|
||||
java -cp %cd%/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PChromium
|
3
i2pfirefox-private.cmd
Executable file
@ -0,0 +1,3 @@
|
||||
:; dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd); java -cp "$dir"/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PFirefox -private; exit $?
|
||||
@ECHO OFF
|
||||
java -cp %cd%/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PFirefox -private
|
3
i2pfirefox.cmd
Executable file
@ -0,0 +1,3 @@
|
||||
:; dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd); java -cp "$dir"/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PFirefox; exit $?
|
||||
@ECHO OFF
|
||||
java -cp %cd%/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PFirefox
|
146
index.html
@ -27,6 +27,16 @@
|
||||
CHANGES
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="EXAMPLES.html">
|
||||
EXAMPLES
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PBrowser.html">
|
||||
I2PBrowser
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PChromium.html">
|
||||
I2PChromium
|
||||
@ -67,11 +77,21 @@
|
||||
I2PFirefoxProfileUnpacker
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="I2PGenericUnsafeBrowser.html">
|
||||
I2PGenericUnsafeBrowser
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="LICENSE.html">
|
||||
LICENSE
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="USAGE.html">
|
||||
USAGE
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<br>
|
||||
<a href="#hidenav">
|
||||
@ -81,15 +101,89 @@
|
||||
</div>
|
||||
</div>
|
||||
<h1>
|
||||
<a href="#i2p-plugins-firefox" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
i2p.plugins.firefox
|
||||
</h1>
|
||||
<p>
|
||||
A port of the batch scripts from i2p.firefox to Java.
|
||||
</p>
|
||||
<h2>
|
||||
<a href="#getting-started" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
Getting started
|
||||
</h2>
|
||||
<h3>
|
||||
<a href="#using-a-binary" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
Using a Binary
|
||||
</h3>
|
||||
<div>
|
||||
<pre>
|
||||
mkdir ~/tmp-i2pfirefox && cd ~/tmp-i2pfirefox
|
||||
wget https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/0.0.10/i2pfirefox.zip
|
||||
unzip i2pfirefox.zip
|
||||
./i2pfirefox.cmd
|
||||
|
||||
#or if you want to use a Chromium
|
||||
|
||||
./i2pchromium.cmd
|
||||
</pre>
|
||||
</div>
|
||||
<h3>
|
||||
<a href="#build-dependencies" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
Build Dependencies
|
||||
</h3>
|
||||
<p>
|
||||
You will need
|
||||
<code>
|
||||
ant
|
||||
</code>
|
||||
,
|
||||
<code>
|
||||
java
|
||||
</code>
|
||||
and for building the Chromium profile, a Go application
|
||||
called
|
||||
<code>
|
||||
crx3
|
||||
</code>
|
||||
which is used to interact with the Chrome app store. I've been using Java 17
|
||||
on Debian mostly, on Debian and Ubuntu, install the dependencies with:
|
||||
</p>
|
||||
<div>
|
||||
<pre>sudo apt-get install openjdk-17* ant golang-go
|
||||
go install github.com/mediabuyerbot/go-crx3/crx3@latest
|
||||
</pre>
|
||||
</div>
|
||||
<p>
|
||||
For Fedora, use Yum, for Arch use pacman or something else but make sure to tell everyone
|
||||
about it. Once you have that installed, when building, make sure to add
|
||||
<code>
|
||||
$GOPATH/bin/
|
||||
</code>
|
||||
to your
|
||||
<code>
|
||||
$PATH
|
||||
</code>
|
||||
.
|
||||
</p>
|
||||
<div>
|
||||
<pre>export PATH=$PATH:$HOME/go/bin
|
||||
</pre>
|
||||
</div>
|
||||
<p>
|
||||
Will almost always work.
|
||||
</p>
|
||||
<h3>
|
||||
<a href="#building" rel="nofollow">
|
||||
<span></span>
|
||||
</a>
|
||||
Building
|
||||
</h3>
|
||||
<p>
|
||||
@ -97,17 +191,19 @@
|
||||
To generate that, you can either generate the full plugin, which will not work but
|
||||
produces the jar as a by-product, or you can:
|
||||
</p>
|
||||
<pre><code>
|
||||
cd src
|
||||
ant
|
||||
cd ..
|
||||
</code></pre>
|
||||
<div>
|
||||
<pre>
|
||||
ant jar
|
||||
</pre>
|
||||
</div>
|
||||
<p>
|
||||
To build just the jar. You’ll know it worked if you can:
|
||||
To build just the jar. You'll know it worked if you can:
|
||||
</p>
|
||||
<pre><code>
|
||||
<div>
|
||||
<pre>
|
||||
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PFirefox
|
||||
</code></pre>
|
||||
</pre>
|
||||
</div>
|
||||
<p>
|
||||
and a new Firefox instance comes up with a fresh profile, ready-to-use for I2P browsing.
|
||||
</p>
|
||||
@ -115,14 +211,44 @@ java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PFirefox
|
||||
The cooler thing you can do with it is add it to an I2P distribution and somewhere in it,
|
||||
add a UI element that triggers something along the lines of this:
|
||||
</p>
|
||||
<pre><code>
|
||||
<div>
|
||||
<pre>
|
||||
// Firefox Example
|
||||
if (i2pIsRunning()) {
|
||||
logger.warning("I2P is already running");
|
||||
System.out.println("I2PFirefox");
|
||||
I2PFirefox i2pFirefox = new I2PFirefox();
|
||||
i2pFirefox.launch();
|
||||
}
|
||||
</code></pre>
|
||||
</pre>
|
||||
</div>
|
||||
<div>
|
||||
<pre>
|
||||
// Chromium Example
|
||||
if (i2pIsRunning()) {
|
||||
logger.warning("I2P is already running");
|
||||
System.out.println("I2PChromium");
|
||||
I2PChromium i2pChromium = new I2PChromium();
|
||||
i2pChromium.launch();
|
||||
}
|
||||
</pre>
|
||||
</div>
|
||||
<div>
|
||||
<pre>
|
||||
// Auto-Select Example, chooses Firefox first, then Chromium
|
||||
if (i2pIsRunning()) {
|
||||
logger.warning("I2P is already running");
|
||||
System.out.println("I2PBrowser");
|
||||
I2PBrowser i2pBrowser = new I2PBrowser();
|
||||
/*
|
||||
* toggle chromium to the top of the order by doing:
|
||||
I2PBrowser.chromiumFirst = true;
|
||||
*
|
||||
*/
|
||||
i2pBrowser.launch(privateBrowsing);
|
||||
}
|
||||
</pre>
|
||||
</div>
|
||||
<p>
|
||||
to add a browser management tool to it.
|
||||
</p>
|
||||
|
12
release.sh
@ -2,17 +2,23 @@
|
||||
|
||||
GITHUB_USER=eyedeekay
|
||||
GITHUB_REPO=i2p.plugins.firefox
|
||||
GITHUB_NAME="With a launcher script so you can run it without typing the full java command"
|
||||
GITHUB_NAME="That is capable of handling URL arguments passed on the terminal"
|
||||
GITHUB_DESCRIPTION=$(cat CHANGES.md)
|
||||
GITHUB_TAG=0.0.6
|
||||
GITHUB_TAG=0.0.18
|
||||
ant distclean
|
||||
ant jar freeZip
|
||||
./javadoc.sh
|
||||
github-release release --user "${GITHUB_USER}" \
|
||||
--repo "${GITHUB_REPO}" \
|
||||
--name "${GITHUB_NAME}" \
|
||||
--description "${GITHUB_DESCRIPTION}" \
|
||||
--tag "${GITHUB_TAG}"
|
||||
--tag "${GITHUB_TAG}"; true
|
||||
sleep 2s
|
||||
github-release edit --user "${GITHUB_USER}" \
|
||||
--repo "${GITHUB_REPO}" \
|
||||
--name "${GITHUB_NAME}" \
|
||||
--description "${GITHUB_DESCRIPTION}" \
|
||||
--tag "${GITHUB_TAG}"; true
|
||||
github-release upload --user "${GITHUB_USER}" \
|
||||
--repo "${GITHUB_REPO}" \
|
||||
--tag "${GITHUB_TAG}" \
|
||||
|
172
report.log
@ -1,172 +0,0 @@
|
||||
|
||||
Generating documentation from src/java/net/i2p/i2pfirefox/
|
||||
|
||||
[1;32mJavadoc errors for class [0mI2PChromiumProfileChecker
|
||||
File: [34msrc/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java[0m
|
||||
[33m Missing description for method [0mmain (Line: 6)
|
||||
[33m Javadoc parameter not found [0margs in method: main (Line: 6)
|
||||
[33m Missing description for method [0mvalidateProfileDirectory (Line: 20)
|
||||
[33m Javadoc parameter not found [0mprofileDirectory in method: validateProfileDirectory (Line: 20)
|
||||
[33m Missing description for method [0mvalidateFile (Line: 44)
|
||||
[33m Javadoc parameter not found [0mfile in method: validateFile (Line: 44)
|
||||
[33m Missing description for method [0mvalidateExtensionDirectory (Line: 64)
|
||||
[33m Javadoc parameter not found [0mextensionDirectory in method: validateExtensionDirectory (Line: 64)
|
||||
|
||||
[1;32mJavadoc errors for class [0mI2PFirefoxProfileChecker
|
||||
File: [34msrc/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java[0m
|
||||
[33m Missing description for method [0mmain (Line: 6)
|
||||
[33m Javadoc parameter not found [0margs in method: main (Line: 6)
|
||||
[33m Missing description for method [0mvalidateProfileDirectory (Line: 20)
|
||||
[33m Javadoc parameter not found [0mprofileDirectory in method: validateProfileDirectory (Line: 20)
|
||||
[33m Missing description for method [0mvalidateFile (Line: 52)
|
||||
[33m Javadoc parameter not found [0mfile in method: validateFile (Line: 52)
|
||||
[33m Missing description for method [0mvalidateExtensionDirectory (Line: 72)
|
||||
[33m Javadoc parameter not found [0mextensionDirectory in method: validateExtensionDirectory (Line: 72)
|
||||
|
||||
[1;32mJavadoc errors for class [0mI2PFirefoxProfileBuilder
|
||||
File: [34msrc/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java[0m
|
||||
[33m Missing description for member variable [0mstrict (Line: )
|
||||
[33m Missing description for method [0mprofileDir (Line: 15)
|
||||
[33m Javadoc parameter not found [0mfile in method: profileDir (Line: 15)
|
||||
[33m Missing description for method [0mprofileDirectory (Line: 25)
|
||||
[33m Missing description for method [0mbaseProfileDir (Line: 37)
|
||||
[33m Javadoc parameter not found [0mfile in method: baseProfileDir (Line: 37)
|
||||
[33m Missing description for method [0mbaseProfileDirectory (Line: 57)
|
||||
[33m Missing description for method [0mruntimeDirectory (Line: 81)
|
||||
[33m Javadoc parameter not found [0mcreate in method: runtimeDirectory (Line: 81)
|
||||
[33m Missing description for method [0mruntimeDirectory (Line: 98)
|
||||
[33m Missing description for method [0mcopyBaseProfiletoProfile (Line: 144)
|
||||
[33m Missing description for method [0mcopyDirectory (Line: 174)
|
||||
[33m Javadoc parameter not found [0msourceDirectory in method: copyDirectory (Line: 174)
|
||||
[33m Javadoc parameter not found [0mdestinationDirectory in method: copyDirectory (Line: 174)
|
||||
[33m Missing description for method [0mcopyDirectoryCompatibityMode (Line: 184)
|
||||
[33m Javadoc parameter not found [0msource in method: copyDirectoryCompatibityMode (Line: 184)
|
||||
[33m Javadoc parameter not found [0mdestination in method: copyDirectoryCompatibityMode (Line: 184)
|
||||
[33m Missing description for method [0mcopyFile (Line: 192)
|
||||
[33m Javadoc parameter not found [0msourceFile in method: copyFile (Line: 192)
|
||||
[33m Javadoc parameter not found [0mdestinationFile in method: copyFile (Line: 192)
|
||||
[33m Missing description for method [0mcopyStrictOptions (Line: 209)
|
||||
[33m Missing description for method [0m (Line: 246)
|
||||
[33m Missing description for method [0m (Line: 256)
|
||||
[33m Javadoc parameter not found [0mstrict in method: (Line: 256)
|
||||
|
||||
[1;32mJavadoc errors for class [0mI2PChromium
|
||||
File: [34msrc/java/net/i2p/i2pfirefox/I2PChromium.java[0m
|
||||
[33m Missing description for member variable [0mString[] CHROMIUM_SEARCH_PATHS (Line: )
|
||||
[33m Missing return type for member variable [0mString[] CHROMIUM_SEARCH_PATHS (Line: )
|
||||
[33m Missing description for member variable [0mint DEFAULT_TIMEOUT (Line: )
|
||||
[33m Missing return type for member variable [0mint DEFAULT_TIMEOUT (Line: )
|
||||
[33m Missing description for method [0m (Line: 20)
|
||||
[33m Missing description for method [0mFIND_CHROMIUM_SEARCH_PATHS_UNIX (Line: 31)
|
||||
[33m Missing description for method [0mFIND_CHROMIUM_SEARCH_PATHS_OSX (Line: 44)
|
||||
[33m Missing description for method [0mFIND_CHROMIUM_SEARCH_PATHS_WINDOWS (Line: 57)
|
||||
[33m Missing description for method [0mFIND_ALL_CHROMIUM_SEARCH_PATHS (Line: 87)
|
||||
[33m Missing description for method [0mFIND_CHROMIUM_SEARCH_PATHS (Line: 107)
|
||||
[33m Missing description for method [0mNEARBY_CHROMIUM_SEARCH_PATHS (Line: 121)
|
||||
[33m Missing description for method [0mCHROMIUM_FINDER (Line: 165)
|
||||
[33m Missing description for method [0mgetOperatingSystem (Line: 177)
|
||||
[33m Missing description for method [0monlyValidChromiums (Line: 199)
|
||||
[33m Missing description for method [0mtopChromium (Line: 217)
|
||||
[33m Missing description for method [0mtopChromium (Line: 246)
|
||||
[33m Javadoc parameter not found [0moverrideChromium in method: topChromium (Line: 246)
|
||||
[33m Missing description for method [0mdefaultProcessBuilder (Line: 264)
|
||||
[33m Missing description for method [0mprocessBuilder (Line: 301)
|
||||
[33m Javadoc parameter not found [0margs in method: processBuilder (Line: 301)
|
||||
[33m Missing description for method [0mwaitForProxy (Line: 340)
|
||||
[33m Missing description for method [0mwaitForProxy (Line: 352)
|
||||
[33m Javadoc parameter not found [0mtimeout in method: waitForProxy (Line: 352)
|
||||
[33m Missing description for method [0mwaitForProxy (Line: 364)
|
||||
[33m Javadoc parameter not found [0mtimeout in method: waitForProxy (Line: 364)
|
||||
[33m Javadoc parameter not found [0mport in method: waitForProxy (Line: 364)
|
||||
[33m Missing description for method [0mwaitForProxy (Line: 377)
|
||||
[33m Javadoc parameter not found [0mtimeout in method: waitForProxy (Line: 377)
|
||||
[33m Javadoc parameter not found [0mport in method: waitForProxy (Line: 377)
|
||||
[33m Javadoc parameter not found [0mhost in method: waitForProxy (Line: 377)
|
||||
[33m Missing description for method [0mcheckifPortIsOccupied (Line: 390)
|
||||
[33m Javadoc parameter not found [0mport in method: checkifPortIsOccupied (Line: 390)
|
||||
[33m Javadoc parameter not found [0mhost in method: checkifPortIsOccupied (Line: 390)
|
||||
[33m Missing description for method [0mlaunch (Line: 408)
|
||||
[33m Missing description for method [0mmain (Line: 441)
|
||||
[33m Javadoc parameter not found [0margs in method: main (Line: 441)
|
||||
|
||||
[1;32mJavadoc errors for class [0mI2PFirefoxProfileUnpacker
|
||||
File: [34msrc/java/net/i2p/i2pfirefox/I2PFirefoxProfileUnpacker.java[0m
|
||||
[33m Missing description for method [0mmain (Line: 12)
|
||||
[33m Javadoc parameter not found [0margs in method: main (Line: 12)
|
||||
[33m Missing description for method [0munpackProfile (Line: 27)
|
||||
[33m Javadoc parameter not found [0mprofileDirectory in method: unpackProfile (Line: 27)
|
||||
|
||||
[1;32mJavadoc errors for class [0mI2PChromiumProfileUnpacker
|
||||
File: [34msrc/java/net/i2p/i2pfirefox/I2PChromiumProfileUnpacker.java[0m
|
||||
[33m Missing description for method [0mmain (Line: 12)
|
||||
[33m Javadoc parameter not found [0margs in method: main (Line: 12)
|
||||
[33m Missing description for method [0munpackProfile (Line: 27)
|
||||
[33m Javadoc parameter not found [0mprofileDirectory in method: unpackProfile (Line: 27)
|
||||
|
||||
[1;32mJavadoc errors for class [0mI2PChromiumProfileBuilder
|
||||
File: [34msrc/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java[0m
|
||||
[33m Missing description for member variable [0mstrict (Line: )
|
||||
[33m Missing description for method [0mprofileDir (Line: 15)
|
||||
[33m Javadoc parameter not found [0mfile in method: profileDir (Line: 15)
|
||||
[33m Missing description for method [0mprofileDirectory (Line: 25)
|
||||
[33m Missing description for method [0mbaseProfileDir (Line: 37)
|
||||
[33m Javadoc parameter not found [0mfile in method: baseProfileDir (Line: 37)
|
||||
[33m Missing description for method [0mbaseProfileDirectory (Line: 57)
|
||||
[33m Missing description for method [0mruntimeDirectory (Line: 81)
|
||||
[33m Javadoc parameter not found [0mcreate in method: runtimeDirectory (Line: 81)
|
||||
[33m Missing description for method [0mruntimeDirectory (Line: 98)
|
||||
[33m Missing description for method [0mcopyBaseProfiletoProfile (Line: 144)
|
||||
[33m Missing description for method [0mcopyDirectory (Line: 174)
|
||||
[33m Javadoc parameter not found [0msourceDirectory in method: copyDirectory (Line: 174)
|
||||
[33m Javadoc parameter not found [0mdestinationDirectory in method: copyDirectory (Line: 174)
|
||||
[33m Missing description for method [0mcopyDirectoryCompatibityMode (Line: 184)
|
||||
[33m Javadoc parameter not found [0msource in method: copyDirectoryCompatibityMode (Line: 184)
|
||||
[33m Javadoc parameter not found [0mdestination in method: copyDirectoryCompatibityMode (Line: 184)
|
||||
[33m Missing description for method [0mcopyFile (Line: 192)
|
||||
[33m Javadoc parameter not found [0msourceFile in method: copyFile (Line: 192)
|
||||
[33m Javadoc parameter not found [0mdestinationFile in method: copyFile (Line: 192)
|
||||
[33m Missing description for method [0mcopyStrictOptions (Line: 209)
|
||||
[33m Missing description for method [0m (Line: 246)
|
||||
[33m Missing description for method [0m (Line: 256)
|
||||
[33m Javadoc parameter not found [0mstrict in method: (Line: 256)
|
||||
|
||||
[1;32mJavadoc errors for class [0mI2PFirefox
|
||||
File: [34msrc/java/net/i2p/i2pfirefox/I2PFirefox.java[0m
|
||||
[33m Missing description for member variable [0mString[] FIREFOX_SEARCH_PATHS (Line: )
|
||||
[33m Missing return type for member variable [0mString[] FIREFOX_SEARCH_PATHS (Line: )
|
||||
[33m Missing description for member variable [0mint DEFAULT_TIMEOUT (Line: )
|
||||
[33m Missing return type for member variable [0mint DEFAULT_TIMEOUT (Line: )
|
||||
[33m Missing description for method [0m (Line: 19)
|
||||
[33m Missing description for method [0mFIND_FIREFOX_SEARCH_PATHS_UNIX (Line: 30)
|
||||
[33m Missing description for method [0mFIND_FIREFOX_SEARCH_PATHS_OSX (Line: 43)
|
||||
[33m Missing description for method [0mFIND_FIREFOX_SEARCH_PATHS_WINDOWS (Line: 56)
|
||||
[33m Missing description for method [0mFIND_ALL_FIREFOX_SEARCH_PATHS (Line: 84)
|
||||
[33m Missing description for method [0mFIND_FIREFOX_SEARCH_PATHS (Line: 104)
|
||||
[33m Missing description for method [0mNEARBY_FIREFOX_SEARCH_PATHS (Line: 118)
|
||||
[33m Missing description for method [0mFIREFOX_FINDER (Line: 162)
|
||||
[33m Missing description for method [0mgetOperatingSystem (Line: 174)
|
||||
[33m Missing description for method [0monlyValidFirefoxes (Line: 196)
|
||||
[33m Missing description for method [0mtopFirefox (Line: 214)
|
||||
[33m Missing description for method [0mtopFirefox (Line: 243)
|
||||
[33m Javadoc parameter not found [0moverrideFirefox in method: topFirefox (Line: 243)
|
||||
[33m Missing description for method [0mdefaultProcessBuilder (Line: 261)
|
||||
[33m Missing description for method [0mprocessBuilder (Line: 275)
|
||||
[33m Javadoc parameter not found [0margs in method: processBuilder (Line: 275)
|
||||
[33m Missing description for method [0mwaitForProxy (Line: 298)
|
||||
[33m Missing description for method [0mwaitForProxy (Line: 310)
|
||||
[33m Javadoc parameter not found [0mtimeout in method: waitForProxy (Line: 310)
|
||||
[33m Missing description for method [0mwaitForProxy (Line: 322)
|
||||
[33m Javadoc parameter not found [0mtimeout in method: waitForProxy (Line: 322)
|
||||
[33m Javadoc parameter not found [0mport in method: waitForProxy (Line: 322)
|
||||
[33m Missing description for method [0mwaitForProxy (Line: 335)
|
||||
[33m Javadoc parameter not found [0mtimeout in method: waitForProxy (Line: 335)
|
||||
[33m Javadoc parameter not found [0mport in method: waitForProxy (Line: 335)
|
||||
[33m Javadoc parameter not found [0mhost in method: waitForProxy (Line: 335)
|
||||
[33m Missing description for method [0mcheckifPortIsOccupied (Line: 348)
|
||||
[33m Javadoc parameter not found [0mport in method: checkifPortIsOccupied (Line: 348)
|
||||
[33m Javadoc parameter not found [0mhost in method: checkifPortIsOccupied (Line: 348)
|
||||
[33m Missing description for method [0mlaunch (Line: 366)
|
||||
[33m Missing description for method [0mmain (Line: 399)
|
||||
[33m Javadoc parameter not found [0margs in method: main (Line: 399)
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
#Build Number for ANT. Do not edit!
|
||||
#Sun Aug 07 20:17:38 EDT 2022
|
||||
build.number=85
|
||||
#Sat Aug 27 18:59:34 EDT 2022
|
||||
build.number=89
|
||||
|
@ -43,6 +43,7 @@
|
||||
<target name="jar" depends="builddep, compile">
|
||||
<jar destfile="build/i2pfirefox.jar" basedir="./build/obj" includes="**/*.class" >
|
||||
<fileset file="i2p.firefox.base.profile.zip" />
|
||||
<fileset file="i2p.chromium.base.profile.zip" />
|
||||
</jar>
|
||||
</target>
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
put extensions here.
|
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019 idk
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
@ -0,0 +1,64 @@
|
||||
default: zip
|
||||
|
||||
install: uninstall
|
||||
mkdir -p /usr/share/webext/i2pchrome.js@eyedeekay.github.io \
|
||||
/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/
|
||||
cp -rv options /usr/share/webext/i2pchrome.js@eyedeekay.github.io/options
|
||||
cp -rv icons /usr/share/webext/i2pchrome.js@eyedeekay.github.io/icons
|
||||
cp -rv _locales /usr/share/webext/i2pchrome.js@eyedeekay.github.io/_locales
|
||||
cp background.js /usr/share/webext/i2pchrome.js@eyedeekay.github.io
|
||||
cp proxy.js /usr/share/webext/i2pchrome.js@eyedeekay.github.io
|
||||
cp info.js /usr/share/webext/i2pchrome.js@eyedeekay.github.io
|
||||
cp content.js /usr/share/webext/i2pchrome.js@eyedeekay.github.io
|
||||
cp info.css /usr/share/webext/i2pchrome.js@eyedeekay.github.io
|
||||
cp window.html /usr/share/webext/i2pchrome.js@eyedeekay.github.io
|
||||
cp manifest.json /usr/share/webext/i2pchrome.js@eyedeekay.github.io/
|
||||
cp README.md /usr/share/webext/i2pchrome.js@eyedeekay.github.io
|
||||
cp LICENSE /usr/share/webext/i2pchrome.js@eyedeekay.github.io
|
||||
ln -sf /usr/share/webext/i2pchrome.js@eyedeekay.github.io \
|
||||
/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/i2pchrome.js@eyedeekay.github.io
|
||||
|
||||
uninstall:
|
||||
rm -rf /usr/share/webext/i2pchrome.js@eyedeekay.github.io \
|
||||
/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/i2pchrome.js@eyedeekay.github.io
|
||||
|
||||
clobber:
|
||||
rm -f ../i2pchrome.js.zip ../i2p_proxy*.xpi
|
||||
|
||||
VERSION=1.29
|
||||
|
||||
xpi:
|
||||
mv ~/Downloads/i2p_proxy-$(VERSION)-an+fx.xpi ../i2pchrome.js@eyedeekay.github.io.xpi
|
||||
|
||||
cp:
|
||||
cp ../i2pchrome.js@eyedeekay.github.io.xpi ./i2pchrome.js@eyedeekay.github.io.xpi
|
||||
|
||||
version:
|
||||
sed -i 's|$(shell grep "\"version\": " manifest.json)| \"version\": \"$(VERSION)\",|g' manifest.json
|
||||
|
||||
zip: version
|
||||
zip --exclude="./i2pchrome.js@eyedeekay.github.io.xpi" \
|
||||
--exclude="i2pchrome.js.png" -r -FS ../i2pchrome.js.zip *
|
||||
|
||||
profile-install:
|
||||
cp ./i2pchrome.js@eyedeekay.github.io.xpi $(HOME)/.mozilla/firefox/firefox.profile.i2p/firefox.profile.i2p/extensions
|
||||
cp ./i2pchrome.js@eyedeekay.github.io.xpi $(HOME)/.mozilla/firefox/.firefox.profile.i2p.default/extensions
|
||||
|
||||
to-profile:
|
||||
cp ./i2pchrome.js@eyedeekay.github.io.xpi /usr/local/lib/firefox.profile.i2p/firefox.profile.i2p/extensions/
|
||||
|
||||
pi: profile-install
|
||||
|
||||
DESC="A simple plugin for configuring an i2p browser."
|
||||
|
||||
release:
|
||||
gothub release -u eyedeekay -r i2pchrome.js -t $(VERSION) -n $(VERSION) -d $(DESC)
|
||||
|
||||
upload:
|
||||
gothub upload -u eyedeekay -r i2pchrome.js -t $(VERSION) -n "i2pchrome.js@eyedeekay.github.io.xpi" -f "../i2pchrome.js@eyedeekay.github.io.xpi"
|
||||
|
||||
fmt:
|
||||
#cleancss -O1 all -O2 all --format beautify home.css -o .home.css && mv .home.css home.css
|
||||
#cleancss -O1 all -O2 all --format beautify info.css -o .info.css && mv .info.css info.css
|
||||
find . -path ./node_modules -prune -o -name '*.js' -exec prettier --write {} \;
|
||||
find . -path ./node_modules -prune -o -name '*.json' -exec prettier --write {} \;
|
@ -0,0 +1,2 @@
|
||||
I2P Plugin For Chromium Persona
|
||||
===============================
|
@ -0,0 +1,66 @@
|
||||
{
|
||||
"extensionName": {
|
||||
"message": "i2pchrome.js",
|
||||
"description": "Name of the extension."
|
||||
},
|
||||
"extensionDescription": {
|
||||
"message": "Set up a browser to use the i2p http proxy automatically",
|
||||
"description": "Description of the extension."
|
||||
},
|
||||
"titlePreface": {
|
||||
"message": "I2P Browser - ",
|
||||
"description": "Preface for the browser titlebar"
|
||||
},
|
||||
"titlePrefacePrivate": {
|
||||
"message": "I2P Browser (Private) - ",
|
||||
"description": "Preface for the browser titlebar"
|
||||
},
|
||||
"resetMessage": {
|
||||
"message": "Reset Tunnel",
|
||||
"description": "Message for the Reset Tunnel button"
|
||||
},
|
||||
"infoTitle": {
|
||||
"message": "I2P Help",
|
||||
"description": "Title for the help menu"
|
||||
},
|
||||
"infoMessage": {
|
||||
"message": "You are now free to browse the eepWeb! Your browser is now configured to browse anonymously on the I2P network. As you browse, your traffic will be routed through other network nodes to disguise it's origin, both from the server and from the nodes themselves.",
|
||||
"description": "Help Message"
|
||||
},
|
||||
"helpMessage": {
|
||||
"message": "Get additional help",
|
||||
"description": "Help Message"
|
||||
},
|
||||
"newsMessage": {
|
||||
"message": "Visit the I2P Blog to learn the latest about i2p.",
|
||||
"description": "Help Message"
|
||||
},
|
||||
"forumMessage": {
|
||||
"message": "Visit the I2P Forum to learn more or ask for assistance",
|
||||
"description": "Help Message"
|
||||
},
|
||||
"clearData": {
|
||||
"message": "Clear all browsing data",
|
||||
"description": "Help Message"
|
||||
},
|
||||
"hostText": {
|
||||
"message": "Host: ",
|
||||
"description": "Host for the HTTP or SOCKS5 Proxy"
|
||||
},
|
||||
"portText": {
|
||||
"message": "Port: ",
|
||||
"description": "Port for the HTTP or SOCKS5 Proxy"
|
||||
},
|
||||
"controlHelpText": {
|
||||
"message": "These options will be inert if used with the default i2p HTTP or SOCKS proxy.",
|
||||
"description": "Help for configuring the options for the Reset Tunnel button"
|
||||
},
|
||||
"controlHostText": {
|
||||
"message": "Control Host: ",
|
||||
"description": "Host for the Reset Tunnel button"
|
||||
},
|
||||
"controlPortText": {
|
||||
"message": "Control Port: ",
|
||||
"description": "Port for the Reset Tunnel button"
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
[{"description":"treehash per file","signed_content":{"payload":"eyJjb250ZW50X2hhc2hlcyI6W3siYmxvY2tfc2l6ZSI6NDA5NiwiZGlnZXN0Ijoic2hhMjU2IiwiZmlsZXMiOlt7InBhdGgiOiJMSUNFTlNFIiwicm9vdF9oYXNoIjoiTTVJb3kyR21yTExkazZaTllkNVJTMGpNM1VvNjlmWnVkT01OY1FfMkNodyJ9LHsicGF0aCI6Ik1ha2VmaWxlIiwicm9vdF9oYXNoIjoiR1MxYW40UEluMGZ2dnFCOUZCOXpqV1JCYjNDdWtQeFdDV09WOE1jU0N3ayJ9LHsicGF0aCI6IlJFQURNRS5tZCIsInJvb3RfaGFzaCI6ImdWd3B6TlpscVlGVm9LZVpWdTVKLXVaelhySTdQYlFtR2tic3NlR1cwNW8ifSx7InBhdGgiOiJfbG9jYWxlcy9lbi9tZXNzYWdlcy5qc29uIiwicm9vdF9oYXNoIjoiaDEzM2pHZXRsWGk2Z3RCbVNfYU5uUHY5cHhsTWhlaE51VHBtcEkyWVJoVSJ9LHsicGF0aCI6ImJhY2tncm91bmQuanMiLCJyb290X2hhc2giOiI0cWxYaDFOZGlGYWNpNGh0RGw3dGtKTkJsdWFfd0F5YTBib1JDMnh6QlA0In0seyJwYXRoIjoiYnJvd3Nlci1wb2x5ZmlsbC5qcyIsInJvb3RfaGFzaCI6IjFoWlVuR2JXeldjNmVBYmo3cUI2WGFPVGxBdk1BMU9aeDJoUDA0dF9zYVEifSx7InBhdGgiOiJjb250ZW50LmpzIiwicm9vdF9oYXNoIjoiYXgxZnpWUThpc05DWXh5UW5sWkRNbmNPRENnSWZQRFZRTzkzSkhYMmoyZyJ9LHsicGF0aCI6ImRldmVsb3Blci5wbmciLCJyb290X2hhc2giOiJ2ZGZwWTVwNDJNb2oybXFCeURLZFlvamFVSzhLYnFBZUkzNVJhTzQxbjNZIn0seyJwYXRoIjoiZGlyZWN0b3J5LnBuZyIsInJvb3RfaGFzaCI6Imk1eVhuTlJlWnBRT0w2VUxKUTNITjhxWkRxWEt4dUROWHBuUGt0Y0xBX1kifSx7InBhdGgiOiJkb25lLnBuZyIsInJvb3RfaGFzaCI6IjllTXctbmp5ZVpKYlU4a2xkZVlwQjdrTzFDMFloOXo1RHlfVFM4N00yd0kifSx7InBhdGgiOiJleHRlbnNpb25zLnBuZyIsInJvb3RfaGFzaCI6InVtZ2RfSFp6Rm1aRVZVT3NSWkFKOHg5ZG02QkU3UUlRQ002aFhNNXdMbWMifSx7InBhdGgiOiJmaW5pc2hlZC5wbmciLCJyb290X2hhc2giOiJuQ3Z6VFFQR0xpRHJCeUhuU001X0hzVVF3ak81VDAtM0phaXJ3VlF0Skd3In0seyJwYXRoIjoiaG9tZS5jc3MiLCJyb290X2hhc2giOiJDaUFNRVlfSFJKRHhsSHdiZmhFLTdDaGtrX1JzSFpnRVQzaHM3QWVZRVpJIn0seyJwYXRoIjoiaG9tZS5odG1sIiwicm9vdF9oYXNoIjoick1iOC1WZG4tWjhjVVlMeUNNbl9fZksta3NPVFJpR205bGk1WnJ1SHBBWSJ9LHsicGF0aCI6ImkycHNldHByb3h5LmpzLnBuZyIsInJvb3RfaGFzaCI6InlJamN1YmlBYTVTMWpsVGJhZGJkZV9qLXlIQ0FqREpCaDhUdHdWQUN5U1EifSx7InBhdGgiOiJpY29ucy90b29waWUucG5nIiwicm9vdF9oYXNoIjoiM3haaVZISTNtUU9jMFJHU1lnWFIxUXV3Z0xlNlZSVURsZWFvNVZwN0lfQSJ9LHsicGF0aCI6ImluZm8uY3NzIiwicm9vdF9oYXNoIjoialBsQVduNUs4Ulc3RnhvaGR4cF9HVndnN1ZBTWdvWXExZml0X0tRbzlSSSJ9LHsicGF0aCI6ImluZm8uanMiLCJyb290X2hhc2giOiJpSWtfZUdyTXdYdEFKTUpHVnpLUlhaRTg4ZWVHTjBrMGtEYTRuMTVLb2s4In0seyJwYXRoIjoibWFuYWdlci5wbmciLCJyb290X2hhc2giOiJyMC1kQ1BrVkpueHkyNDFwdzQwS3lIOWJEenM1TjhEdnY0NHJxQVhJSE9rIn0seyJwYXRoIjoibWFuaWZlc3QuanNvbiIsInJvb3RfaGFzaCI6ImVkcUt1WFNNTUFqS0dVNFlQV1dyUFFPYzBMRDhwVHRoRGZUVWtEVXdOZXcifSx7InBhdGgiOiJvcHRpb25zL29wdGlvbnMuY3NzIiwicm9vdF9oYXNoIjoiNmZQYlZCMTNoN2Q3NkNvY3VDNU5KN3ZqOE9HQ0I2ZVk0cEVETHJ6U3FKYyJ9LHsicGF0aCI6Im9wdGlvbnMvb3B0aW9ucy5odG1sIiwicm9vdF9oYXNoIjoiNkRFQnhvVWFSb2RETVBSODFnMGp3QTVNTTBmVXhuNmpXeXZzaHYzZ2dqUSJ9LHsicGF0aCI6Im9wdGlvbnMvb3B0aW9ucy5qcyIsInJvb3RfaGFzaCI6IjJSLXIyVlVFRzhRalZMdHFzVHlKbXBEM28zRXdGVjdFLUlyVk9qSmJWVE0ifSx7InBhdGgiOiJwZW9wbGUucG5nIiwicm9vdF9oYXNoIjoia0ZnbjdiTWU0WVJUSkViRXFvSTJZWEd5UnNLZlBpVUpwUXV6Y3l0YXhtYyJ9LHsicGF0aCI6InBsdWdpbnMucG5nIiwicm9vdF9oYXNoIjoiYkpnZkF1VUF1QnprVV9MRXdQVHZVYlF5dGYwQm4xSTV1TmFsOEtyU0hjcyJ9LHsicGF0aCI6InByaXZhY3kuanMiLCJyb290X2hhc2giOiJMTWZOdmRTWXMtVjh0YWpPbVplTDhjZ3hKUldKVmdnaVhqX3o0XzZkVzRzIn0seyJwYXRoIjoicHJveHkuanMiLCJyb290X2hhc2giOiJyVnhjQ2VvcDk1dmhLX3oxZGk5MHplOUd3M0steWgxdF8xMlViZTVsNG5nIn0seyJwYXRoIjoic2hhZGVzLnBuZyIsInJvb3RfaGFzaCI6IjhrQ1Z2QktuaWtMZVZtQnVMa01WNEZzNlQtWklieGoxMFZJS3lHRUtVNDAifSx7InBhdGgiOiJzeW5jLnBuZyIsInJvb3RfaGFzaCI6IjV6d1ZVWkdYMnlsRGN5d1hjdzJpaUR0N28yX1F2ajNPaHIwWG5QWEl5RnMifSx7InBhdGgiOiJ1bnBhY2tlZC5wbmciLCJyb290X2hhc2giOiJLUUZ3YXFIdU8yT01HZTZNNXd5ZG1xcnJwbkNEdW9yUFU3aVc3QVhRMmdJIn0seyJwYXRoIjoid2luZG93Lmh0bWwiLCJyb290X2hhc2giOiJBVU5OU1BqLVJabXYtRS13NnhXcXl5LS1iRVhsMkM5OEl4VDJEdWVGZDZRIn1dLCJmb3JtYXQiOiJ0cmVlaGFzaCIsImhhc2hfYmxvY2tfc2l6ZSI6NDA5Nn1dLCJpdGVtX2lkIjoiaWtkamNtb21nbGRmY2lvY25wZWtmbmRrbGtmZ2dscGUiLCJpdGVtX3ZlcnNpb24iOiIxLjI5IiwicHJvdG9jb2xfdmVyc2lvbiI6MX0","signatures":[{"header":{"kid":"publisher"},"protected":"eyJhbGciOiJSUzI1NiJ9","signature":"MnagjSc3N-RaPvxHuzypCDuVFz-JbwCW1LKcg4HqS5M-T9KkEH5NoNa9ipUdWBkwrSF0sFAU-jHUSHQ6Ht75SH3wROOS0chVQf7dYw7KjZMHLd-LAAIBygApS8DNrWE931b5XM-vh_F3VYlbvziiL1roW7OAZgoIUy_MPQ07Ynbfl0K-UyVXeUJY9qzYGCRdKFG_wsvajIGM1Y60aw66MKs2zKLarwLCRqKAN_A31nzYBm-QjoUPSK4jnzAm5Lv24oVfsWJNXmJ8nPQO3pRCF8AT0rA8ue2cEqA3zSLOkHQupmmLSmjBKBPMmPtFJCgeKvzPajo32JuAaCkWokhiwQ"},{"header":{"kid":"webstore"},"protected":"eyJhbGciOiJSUzI1NiJ9","signature":"P02kDKuZmltr_huxTnsbIzMzERDvbdwsce3ZbEJjWbE7n01TXoQr7Z62LtqZMcau2m78A-eydRwMQ6TnpvFxNoHIDFOA9d4mGdfhSwTSR4-rGJa3cSo_66VznYzMAVzfssW4_o1iTksdOtbebQCQ5TS7f2bNe1AQMx7lTDoiskVaFNeY2adByacpQp2yXWHAx9K_98hG1J-njNvokairY0ZdaJcR76pN2v9W-D8A6Wvaxy4WeAXZyFoJy_eFNjP4yG-6nZ1OtxirQ7kiDx1fKtvcDx2hEBC5noaMXygVZszAsvrrMgkhlsb1bBdptAJRPUAXXXjp6Ijk2U6z8S-V0g"}]}}]
|
@ -0,0 +1,54 @@
|
||||
function platformCallback(platformInfo) {
|
||||
if (platformInfo.PlatformOs == "android") {
|
||||
console.log("android detected");
|
||||
return true;
|
||||
} else {
|
||||
console.log("desktop detected");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function isDroid() {
|
||||
return chrome.runtime.getPlatformInfo(platformCallback);
|
||||
}
|
||||
|
||||
function isLocalHost(url) {
|
||||
//var x = new RegExp("/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/")
|
||||
var r = false; ///(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/.test(url)
|
||||
if (r == false) {
|
||||
r = url.indexOf("://localhost:") != -1;
|
||||
}
|
||||
if (r == false) {
|
||||
r = url.indexOf("://127.0.0.1:") != -1;
|
||||
}
|
||||
console.log("localhost:", r, "on url", url);
|
||||
return r;
|
||||
}
|
||||
|
||||
function isRouterHost(url) {
|
||||
var controlPort = 7657; //getControlPort();
|
||||
var r = false;
|
||||
if (r == false) {
|
||||
r = url.indexOf("://localhost:" + controlPort) != -1;
|
||||
}
|
||||
if (r == false) {
|
||||
r = url.indexOf("://127.0.0.1:" + controlPort) != -1;
|
||||
}
|
||||
console.log("routerhost:", r, "on url", url);
|
||||
return r;
|
||||
}
|
||||
|
||||
chrome.webRequest.onBeforeRequest.addListener(
|
||||
function (details) {
|
||||
let localhost = isLocalHost(details.url);
|
||||
let routerhost = isRouterHost(details.url);
|
||||
console.log("localhost: ", localhost, "routerhost: ", routerhost);
|
||||
if (localhost) {
|
||||
if (!routerhost) {
|
||||
return { cancel: true };
|
||||
}
|
||||
}
|
||||
},
|
||||
{ urls: ["<all_urls>"] },
|
||||
["blocking"]
|
||||
);
|
@ -0,0 +1,19 @@
|
||||
/*var infoTitle = document.getElementById("text-section-header");
|
||||
infoTitle.textContent = chrome.i18n.getMessage("infoTitle");
|
||||
*/
|
||||
/*var infoMessage = document.getElementById("text-section-helptext");
|
||||
infoMessage.textContent = chrome.i18n.getMessage("infoMessage");
|
||||
|
||||
var helpMessage = document.getElementById("window-create-forum-panel");
|
||||
helpMessage.textContent = chrome.i18n.getMessage("forumMessage");*/
|
||||
/*
|
||||
var helpMessage = document.getElementById('window-create-help-panel');
|
||||
helpMessage.textContent = chrome.i18n.getMessage("helpMessage")
|
||||
*/
|
||||
/*
|
||||
var newsMessage = document.getElementById("window-create-news-panel");
|
||||
newsMessage.textContent = chrome.i18n.getMessage("newsMessage");
|
||||
|
||||
var clearData = document.getElementByID("clear-chrome-data");
|
||||
cleardata.textContent = chrome.i18n.getMessage("clearData");
|
||||
*/
|
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 41 KiB |
BIN
src/i2p.chromium.base.profile/extensions/i2pchrome.js/done.png
Normal file
After Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 47 KiB |
After Width: | Height: | Size: 42 KiB |
290
src/i2p.chromium.base.profile/extensions/i2pchrome.js/home.css
Normal file
@ -0,0 +1,290 @@
|
||||
* {
|
||||
padding: 0;
|
||||
margin: 0
|
||||
}
|
||||
html {
|
||||
height: 100%
|
||||
}
|
||||
a,
|
||||
button {
|
||||
color: #3b6bbf;
|
||||
text-decoration: none;
|
||||
font-weight: 700;
|
||||
word-wrap: break-word;
|
||||
outline: 0
|
||||
}
|
||||
.applicationDesc {
|
||||
color: #81888f;
|
||||
text-decoration: none;
|
||||
font-weight: 700;
|
||||
word-wrap: break-word;
|
||||
outline: 0
|
||||
}
|
||||
.applicationDesc:hover,
|
||||
a:hover,
|
||||
button:hover {
|
||||
color: #495057;
|
||||
text-decoration: none;
|
||||
font-weight: 700;
|
||||
word-wrap: break-word;
|
||||
outline: 0
|
||||
}
|
||||
button {
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
color: #3b6bbf;
|
||||
text-decoration: none;
|
||||
font-weight: 700;
|
||||
word-wrap: break-word;
|
||||
outline: 0
|
||||
}
|
||||
body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
font-family: "Droid Sans","Noto Sans",Ubuntu,"Segoe UI","Lucida Grande",Verdana,Helvetica,sans-serif;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
color: #495057;
|
||||
background-attachment: fixed;
|
||||
background-size: 100% 100%;
|
||||
text-decoration: none;
|
||||
font-weight: 700;
|
||||
word-wrap: break-word;
|
||||
outline: 0
|
||||
}
|
||||
.background {
|
||||
background-color: #f8f8ff;
|
||||
height: 100%
|
||||
}
|
||||
p {
|
||||
line-height: 32px;
|
||||
font-size: 17px;
|
||||
font-family: "Droid Sans","Noto Sans",Ubuntu,"Segoe UI","Lucida Grande",Verdana,Helvetica,sans-serif;
|
||||
text-decoration: none;
|
||||
color: #495057;
|
||||
font-weight: 700;
|
||||
word-wrap: break-word;
|
||||
outline: 0
|
||||
}
|
||||
.content {
|
||||
min-height: 3rem;
|
||||
padding: 1rem;
|
||||
margin: 1.5rem;
|
||||
display: inline-block;
|
||||
border: 1px solid #d9d9d6;
|
||||
border-radius: 2px;
|
||||
box-shadow: inset 0 0 0 1px #fff,0 0 1px #ccc;
|
||||
background: #f8f8ff;
|
||||
min-width: 95%
|
||||
}
|
||||
.application-info,
|
||||
.extended-info {
|
||||
min-height: 3rem;
|
||||
padding: 1rem;
|
||||
margin-top: 1.5rem;
|
||||
display: inline-block;
|
||||
border: 1px solid #d9d9d6;
|
||||
border-radius: 2px;
|
||||
box-shadow: inset 0 0 0 1px #fff,0 0 1px #ccc;
|
||||
background: #f8f8ff;
|
||||
min-width: 95%
|
||||
}
|
||||
h1 {
|
||||
margin-right: auto;
|
||||
font-family: "Droid Sans","Noto Sans",Ubuntu,"Segoe UI","Lucida Grande",Verdana,Helvetica,sans-serif;
|
||||
font-weight: 600;
|
||||
font-size: 32px;
|
||||
text-transform: uppercase;
|
||||
color: #41465f;
|
||||
border: 1px solid #dee2e6;
|
||||
border-radius: 2px 2px 0 0;
|
||||
width: 90%;
|
||||
padding-left: 5%
|
||||
}
|
||||
h2,
|
||||
h3 {
|
||||
margin-right: auto;
|
||||
font-family: "Droid Sans","Noto Sans",Ubuntu,"Segoe UI","Lucida Grande",Verdana,Helvetica,sans-serif;
|
||||
font-weight: 600;
|
||||
font-size: 25px;
|
||||
text-transform: uppercase;
|
||||
color: #41465f;
|
||||
border: 1px solid #dee2e6;
|
||||
border-radius: 2px 2px 0 0;
|
||||
width: 90%;
|
||||
padding-left: 5%
|
||||
}
|
||||
h4 {
|
||||
margin-right: auto;
|
||||
font-family: "Droid Sans","Noto Sans",Ubuntu,"Segoe UI","Lucida Grande",Verdana,Helvetica,sans-serif;
|
||||
font-weight: 600;
|
||||
font-size: 20px!important;
|
||||
text-transform: uppercase;
|
||||
color: #41465f;
|
||||
border: 1px solid #dee2e6;
|
||||
border-radius: 2px 2px 0 0;
|
||||
width: 90%;
|
||||
padding-left: 5%
|
||||
}
|
||||
.showhider {
|
||||
margin-right: auto;
|
||||
font-family: "Droid Sans","Noto Sans",Ubuntu,"Segoe UI","Lucida Grande",Verdana,Helvetica,sans-serif;
|
||||
text-transform: uppercase;
|
||||
background: 0 0!important;
|
||||
border: none;
|
||||
padding: 0!important;
|
||||
width: 90%;
|
||||
color: #3b6bbf;
|
||||
text-decoration: none;
|
||||
font-weight: 700;
|
||||
word-wrap: break-word;
|
||||
outline: 0;
|
||||
text-align: left
|
||||
}
|
||||
#links .showhider {
|
||||
font-size: 25px
|
||||
}
|
||||
.section-header {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
margin-bottom: 80px
|
||||
}
|
||||
ul {
|
||||
margin-left: 2rem;
|
||||
list-style: none
|
||||
}
|
||||
li {
|
||||
min-height: 3rem;
|
||||
padding: .5rem;
|
||||
background: #dee2e6;
|
||||
border: 1px solid #dee2e6;
|
||||
width: 64%;
|
||||
min-width: 64%;
|
||||
border-radius: 2px;
|
||||
box-shadow: inset 0 0 0 1px #fff,0 0 1px #ccc;
|
||||
margin: .5rem .5rem .5rem 32%
|
||||
}
|
||||
#readyness {
|
||||
min-height: 5rem;
|
||||
padding: .5rem;
|
||||
margin: .5rem;
|
||||
width: 42%;
|
||||
min-width: 42%;
|
||||
background: #dee2e6;
|
||||
text-align: center!important;
|
||||
border: 1px solid #dee2e6;
|
||||
border-radius: 2px;
|
||||
box-shadow: inset 0 0 0 1px #fff,0 0 1px #ccc
|
||||
}
|
||||
#onboarding {
|
||||
min-height: 5rem;
|
||||
padding: .5rem;
|
||||
margin: .5rem;
|
||||
width: 42%;
|
||||
min-width: 42%;
|
||||
font-size: 2rem;
|
||||
background: #a48fe1;
|
||||
text-align: center!important;
|
||||
border: 1px solid #a48fe1;
|
||||
border-radius: 2px;
|
||||
box-shadow: inset 0 0 0 1px #fff,0 0 1px #ccc
|
||||
}
|
||||
#i2pbrowser-description {
|
||||
width: 50%;
|
||||
min-width: 50%;
|
||||
min-height: 5rem;
|
||||
padding: .5rem;
|
||||
display: inline;
|
||||
background: #dee2e6;
|
||||
float: right;
|
||||
border: 1px solid #dee2e6;
|
||||
border-radius: 2px;
|
||||
box-shadow: inset 0 0 0 1px #fff,0 0 1px #ccc
|
||||
}
|
||||
#applicationExplain,
|
||||
#controlExplain,
|
||||
#linksExplain {
|
||||
min-height: 5rem;
|
||||
padding: .5rem;
|
||||
margin: .5rem;
|
||||
width: 30%;
|
||||
min-width: 30%;
|
||||
background: #dee2e6;
|
||||
float: left;
|
||||
text-align: center!important;
|
||||
border: 1px solid #dee2e6;
|
||||
border-radius: 2px;
|
||||
box-shadow: inset 0 0 0 1px #fff,0 0 1px #ccc
|
||||
}
|
||||
#proxyReady {
|
||||
min-height: 3rem;
|
||||
padding: .5rem;
|
||||
margin: .2rem;
|
||||
width: 38%;
|
||||
min-width: 38%;
|
||||
display: inline;
|
||||
background: #d9d9d6;
|
||||
float: right;
|
||||
text-align: center!important;
|
||||
border: 1px solid #d9d9d6;
|
||||
border-radius: 2px;
|
||||
box-shadow: inset 0 0 0 1px #fff,0 0 1px #ccc
|
||||
}
|
||||
#proxyUnready {
|
||||
min-height: 3rem;
|
||||
padding: .5rem;
|
||||
margin: .2rem;
|
||||
width: 38%;
|
||||
min-width: 38%;
|
||||
display: inline;
|
||||
float: right;
|
||||
text-align: center!important;
|
||||
border: 1px solid #ffc56d;
|
||||
border-radius: 2px;
|
||||
background: #ffc56d;
|
||||
box-shadow: inset 0 0 0 1px #fff,0 0 1px #ccc
|
||||
}
|
||||
#consoleOn {
|
||||
min-height: 3rem;
|
||||
padding: .5rem;
|
||||
margin: .2rem;
|
||||
width: 38%;
|
||||
min-width: 38%;
|
||||
display: inline;
|
||||
float: left;
|
||||
text-align: center!important;
|
||||
border: 1px solid #f7e59a;
|
||||
border-radius: 2px;
|
||||
background: #f7e59a;
|
||||
box-shadow: inset 0 0 0 1px #fff,0 0 1px #ccc
|
||||
}
|
||||
.onboardingContent {
|
||||
font-size: .8rem!important;
|
||||
text-align: left;
|
||||
display: none
|
||||
}
|
||||
#proxy-check {
|
||||
visibility: hidden
|
||||
}
|
||||
#info-content {
|
||||
display: none
|
||||
}
|
||||
.consoleOn:hover #proxy-check,
|
||||
.proxyReady:hover #proxy-check {
|
||||
visibility: visible;
|
||||
opacity: 1
|
||||
}
|
||||
img {
|
||||
max-width: 100%
|
||||
}
|
||||
img.readyness {
|
||||
height: 100%;
|
||||
width: auto
|
||||
}
|
||||
@media only screen and (max-width: 399px) {
|
||||
.application-info {
|
||||
display: none
|
||||
}
|
||||
}
|
@ -0,0 +1,94 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="home.css"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!--<div>-->
|
||||
<script src="home.js" type="text/javascript"></script>
|
||||
<script src="content.js" type="text/javascript"></script>
|
||||
<div class='background'>
|
||||
<div class='content'>
|
||||
<div class='section-header'>
|
||||
<h1 id="text-section-header">I2P Browsing</h1>
|
||||
</div>
|
||||
<div id="i2pbrowser-version"></div>
|
||||
<div id="i2pbrowser-description">
|
||||
<p id="description">I2P in Private Browsing is a webextension to secure and enhance your I2P use in the browser.</p>
|
||||
<p id="beta">This is an experimental product.</p>
|
||||
</div>
|
||||
<div id="readyness">
|
||||
<div id="consoleOn" class="hideIfI2PConsoleOff">
|
||||
<img class="readyness" src="http://proxy.i2p/themes/console/images/local_up.png" alt="Proxy is not ready."/>
|
||||
<span id="proxy-check">Proxy is ready.</span>
|
||||
</div>
|
||||
<!--<div id="proxyUnready" class="hideIfI2PProxyOn">The proxy is not ready yet.</div>-->
|
||||
<div id="proxyReady" class="hideIfI2PProxyOff">
|
||||
<img class="readyness" src="http://proxy.i2p/themes/console/images/local_up.png" alt="Proxy is not ready."/>
|
||||
<span id="proxy-check">Proxy is ready.</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id="onboarding" class="hideIfI2PConsoleOff">
|
||||
<h3 id="onboardingTitle">New to I2P? Learn more here.</h3>
|
||||
<h4 id="onboardingZero"><button id="onboardingButtonZero" class="showhider" onclick="flipVisibility('onboardingContentZero')">Protect your Privacy</button></h4>
|
||||
<p id="onboardingContentZero" class="onboardingContent">I2P Browser allows you to surf the internet using the private and secure I2P network. When using it, you are protected against tracking, surveillance, and censorship as a first-class participant in the I2P network. I2P Browser isolates cookies and deletes your browser history after your session. These modifications ensure your privacy and security are protected in the browser.</p>
|
||||
<h4 id="onboardingOne"><button id="onboardingButtonOne" class="showhider" onclick="flipVisibility('onboardingContentOne')">Configure your Experience</button></h4>
|
||||
<p id="onboardingContentOne" class="onboardingContent">We also provide you with additional settings for bumping up your browser security. Our Security Settings allow you to block elements that could be used to attack your computer. Click below to see what the different options do. Note: By default, NoScript and HTTPS Everywhere are not included on the toolbar, but you can customize your toolbar to add them. With all the security and privacy features provided by I2P, your experience while browsing the internet may be a little different. Things may be a bit slower, and depending on your security level, some elements may not work or load. You may also be asked to prove you are a human and not a robot.</p>
|
||||
<h4 id="onboardingTwo"><button id="onboardingButtonTwo" class="showhider" onclick="flipVisibility('onboardingContentTwo')">Share Files</button></h4>
|
||||
<p id="onboardingContentTwo" class="onboardingContent">I2P is capable of using peer-to-peer applications like BitTorrent, protecting your identity when you share files. Our anonymous bittorrent client is available in the browser.</p>
|
||||
<h4 id="onboardingThree"><button id="onboardingButtonThree" class="showhider" onclick="flipVisibility('onboardingContentThree')">Hidden e-mail</button></h4>
|
||||
<p id="onboardingContentThree" class="onboardingContent">There is also an anonymous e-mail service available inside of I2P, which is accessible from our browser via the menu directly below.</p>
|
||||
<h4 id="onboardingFour"><button id="onboardingButtonFour" class="showhider" onclick="flipVisibility('onboardingContentFour')">Experience Tips</button></h4>
|
||||
<p id="onboardingContentFour" class="onboardingContent">With all the security and privacy features provided by I2P, your experience while browsing the internet may be a little different. Things may be a bit slower, and depending on your security level, some elements may not work or load. You may also be asked to prove you are a human and not a robot.</p>
|
||||
</div>
|
||||
<!--<p class="hideIfI2POn">&aboutI2p.warn_not_running; <a href="about:i2p">&aboutI2p.refresh_text;</a> &aboutI2p.reccommend_not_running;</p>-->
|
||||
<div class="application-info">
|
||||
<p class="hideIfI2PConsoleOff">
|
||||
<h3 id="applicationHeader">Applications</h3>
|
||||
<p id="applicationExplain">These applications use I2P to provide them with security and privacy.</p>
|
||||
<ul>
|
||||
<li class="application">
|
||||
<a id="window-visit-i2ptunnel" class="applicationName" target="_blank" href="http://127.0.0.1:7657/i2ptunnel">Hidden Services Manager </a>
|
||||
<span id="i2ptunnel" class="applicationDesc">I2P has a web-based interface for configuring .i2p services like web sites, to set up your own web sites, go here:</span>
|
||||
</li>
|
||||
<li class="application">
|
||||
<a id="window-visit-susimail" class="applicationName" target="_blank" href="http://127.0.0.1:7657/susimail">E-Mail </a>
|
||||
<span id="susimail" class="applicationDesc">I2P also bundles a webmail client which can be used to access in-I2P e-mail. To use it, go here:</span>
|
||||
</li>
|
||||
<li class="application">
|
||||
<a id="window-visit-snark" class="applicationName" target="_blank" href="http://127.0.0.1:7657/i2psnark">BitTorrent </a>
|
||||
<span id="snark" class="applicationDesc">I2P is capable of anonymous Peer-to-Peer file sharing, to use the built-in bittorrent client go here:</span>
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
<div class="extended-info">
|
||||
<h3 id="links"><button id="fliplinks" class="showhider">Links</button></h3>
|
||||
<div id="info-content">
|
||||
<p id="linksExplain">If you want to get more information about I2P, you can visit these links.</p>
|
||||
<p>
|
||||
<ul>
|
||||
<li>
|
||||
<a id="window-visit-webpage" href="https://eyedeekay.github.io/I2P-Confiuration-for-Chromium/">Homepage: </a>
|
||||
<span id="webpage" class="applicationDesc">More information is available here.</span>
|
||||
</li>
|
||||
<li>
|
||||
<a id="window-visit-sources" href="https://github.com/eyedeekay/I2P-Confiuration-for-Chromium">Source Code: </a>
|
||||
<span id="sources" class="applicationDesc">Browse the source or contribute here.</span>
|
||||
</li>
|
||||
<li>
|
||||
<a id="window-visit-releases" href="https://github.com/eyedeekay/I2P-Confiuration-for-Chromium">Releases: </a>
|
||||
<span id="releases" class="applicationDesc">Check for new releases here.</span>
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--</div>-->
|
||||
</body>
|
||||
</html>
|
After Width: | Height: | Size: 357 KiB |
After Width: | Height: | Size: 54 KiB |
@ -0,0 +1,54 @@
|
||||
body,
|
||||
html {
|
||||
width: 50rem
|
||||
}
|
||||
a {
|
||||
margin: 10px
|
||||
}
|
||||
.panel {
|
||||
margin: 5px
|
||||
}
|
||||
span.identity {
|
||||
width: 100px;
|
||||
display: inline-block;
|
||||
margin-left: 1em
|
||||
}
|
||||
figcaption {
|
||||
display: inline
|
||||
}
|
||||
.section-header {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
margin-bottom: 8px
|
||||
}
|
||||
p {
|
||||
font-size: 12px
|
||||
}
|
||||
h1 {
|
||||
font-size: 25px
|
||||
}
|
||||
h2,
|
||||
h3 {
|
||||
font-size: 18px
|
||||
}
|
||||
h4 {
|
||||
font-size: 13px!important
|
||||
}
|
||||
#links .showhider {
|
||||
font-size: 18px
|
||||
}
|
||||
#onboarding {
|
||||
font-size: 2rem
|
||||
}
|
||||
img.readyness {
|
||||
height: 2rem
|
||||
}
|
||||
#proxyUnready {
|
||||
min-height: 2rem
|
||||
}
|
||||
#proxyReady {
|
||||
min-height: 2rem
|
||||
}
|
||||
#consoleOn {
|
||||
min-height: 2rem
|
||||
}
|
123
src/i2p.chromium.base.profile/extensions/i2pchrome.js/info.js
Normal file
@ -0,0 +1,123 @@
|
||||
document.addEventListener("click", (clickEvent) => {
|
||||
if (clickEvent.target.id === "window-create-help-panel") {
|
||||
let createData = {
|
||||
type: "panel",
|
||||
incognito: true,
|
||||
};
|
||||
let creating = chrome.tabs.create(createData);
|
||||
creating.then(() => {
|
||||
console.log("The help panel has been created");
|
||||
});
|
||||
} else if (clickEvent.target.id === "window-create-news-panel") {
|
||||
let createData = {
|
||||
type: "panel",
|
||||
incognito: true,
|
||||
};
|
||||
let creating = chrome.tabs.create(createData);
|
||||
creating.then(() => {
|
||||
console.log("The news panel has been created");
|
||||
});
|
||||
} else if (clickEvent.target.id === "generate-fresh-tunnel") {
|
||||
function refreshIdentity() {
|
||||
console.log("Generating new identity");
|
||||
const Http = new XMLHttpRequest();
|
||||
const url = "http://" + controlHost + ":" + controlPort;
|
||||
Http.open("GET", url);
|
||||
Http.send();
|
||||
Http.onreadystatechange = (event) => {
|
||||
console.log(Http.responseText);
|
||||
};
|
||||
}
|
||||
refreshIdentity();
|
||||
} else if (clickEvent.target.id === "window-preface-title") {
|
||||
console.log("attempting to create homepage tab");
|
||||
goHome();
|
||||
} else if (clickEvent.target.id === "window-visit-homepage") {
|
||||
console.log("attempting to create homepage tab");
|
||||
goHome();
|
||||
} else if (clickEvent.target.id === "window-visit-readme") {
|
||||
console.log("attempting to create readme tab");
|
||||
goIndex();
|
||||
} else if (clickEvent.target.id === "window-visit-i2ptunnel") {
|
||||
console.log("attempting to create i2ptunnel tab");
|
||||
goTunnel();
|
||||
} else if (clickEvent.target.id === "window-visit-susimail") {
|
||||
console.log("attempting to create susimail tab");
|
||||
goMail();
|
||||
} else if (clickEvent.target.id === "window-visit-snark") {
|
||||
console.log("attempting to create snark tab");
|
||||
goSnark();
|
||||
} else if (clickEvent.target.id === "clear-chrome-data") {
|
||||
forgetBrowsingData();
|
||||
} else if (clickEvent.target.id === "check-i2p-control") {
|
||||
//echo("I2P Router Detected", "panel-section-i2pcontrol-check");
|
||||
} else if (clickEvent.target.id === "enable-web-rtc") {
|
||||
if (clickEvent.target.checked) {
|
||||
chrome.runtime.sendMessage({ rtc: "enableWebRTC" });
|
||||
} else {
|
||||
chrome.runtime.sendMessage({ rtc: "disableWebRTC" });
|
||||
}
|
||||
checkPeerConnection();
|
||||
return;
|
||||
} else if (clickEvent.target.id === "disable-history") {
|
||||
if (clickEvent.target.checked) {
|
||||
chrome.runtime.sendMessage({ history: "disableHistory" });
|
||||
} else {
|
||||
chrome.runtime.sendMessage({ history: "enableHistory" });
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
clickEvent.preventDefault();
|
||||
});
|
||||
|
||||
function proxyReadiness() {
|
||||
console.log(this.responseText);
|
||||
}
|
||||
|
||||
control_host = "localhost";
|
||||
control_port = "7657";
|
||||
|
||||
function onTabCreated() {
|
||||
console.log("Tab Created");
|
||||
}
|
||||
|
||||
function goIndex() {
|
||||
let createData = {
|
||||
url: "index.html",
|
||||
};
|
||||
console.log("visiting readme");
|
||||
let creating = chrome.tabs.create(createData);
|
||||
}
|
||||
|
||||
function goHome() {
|
||||
let createData = {
|
||||
url: "home.html",
|
||||
};
|
||||
console.log("visiting homepage");
|
||||
let creating = chrome.tabs.create(createData);
|
||||
}
|
||||
|
||||
function goTunnel() {
|
||||
let createData = {
|
||||
url: "http://" + control_host + ":" + control_port + "/i2ptunnel",
|
||||
};
|
||||
console.log("visiting i2ptunnel");
|
||||
let creating = chrome.tabs.create(createData);
|
||||
}
|
||||
|
||||
function goMail() {
|
||||
let createData = {
|
||||
url: "http://" + control_host + ":" + control_port + "/susimail",
|
||||
};
|
||||
console.log("visiting mail");
|
||||
let creating = chrome.tabs.create(createData);
|
||||
}
|
||||
|
||||
function goSnark() {
|
||||
let createData = {
|
||||
url: "http://" + control_host + ":" + control_port + "/i2psnark",
|
||||
};
|
||||
console.log("visiting snark");
|
||||
let creating = chrome.tabs.create(createData);
|
||||
}
|
After Width: | Height: | Size: 7.8 KiB |
@ -0,0 +1,43 @@
|
||||
{
|
||||
"update_url": "https://clients2.google.com/service/update2/crx",
|
||||
|
||||
"permissions": [
|
||||
"browsingData",
|
||||
"notifications",
|
||||
"proxy",
|
||||
"privacy",
|
||||
"storage",
|
||||
"webRequest",
|
||||
"webRequestBlocking",
|
||||
"*://127.0.0.1/*",
|
||||
"*://localhost/*",
|
||||
"<all_urls>"
|
||||
],
|
||||
"manifest_version": 2,
|
||||
"name": "__MSG_extensionName__",
|
||||
"version": "1.29",
|
||||
"description": "__MSG_extensionDescription__",
|
||||
"homepage_url": "https://github.com/eyedeekay/I2P-Configuration-For-Chromium",
|
||||
"icons": {
|
||||
"48": "icons/toopie.png"
|
||||
},
|
||||
"browser_action": {
|
||||
"browser_style": true,
|
||||
"default_icon": "icons/toopie.png",
|
||||
"default_title": "__MSG_extensionName__",
|
||||
"default_popup": "window.html"
|
||||
},
|
||||
"options_ui": {
|
||||
"page": "options/options.html"
|
||||
},
|
||||
"background": {
|
||||
"scripts": [
|
||||
"browser-polyfill.js",
|
||||
"background.js",
|
||||
"proxy.js",
|
||||
"info.js",
|
||||
"privacy.js"
|
||||
]
|
||||
},
|
||||
"default_locale": "en"
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
body {
|
||||
width: 25em;
|
||||
font-family: "Open Sans Light", sans-serif;
|
||||
font-size: 0.9em;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
section.scheme-options {
|
||||
padding: 0.5em 0;
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
#clear-button {
|
||||
margin: 0 1.3em 1em 0;
|
||||
}
|
||||
|
||||
section.scheme-options input,
|
||||
section.scheme-options>select,
|
||||
#clear-button {
|
||||
float: right;
|
||||
}
|
||||
|
||||
label {
|
||||
display: block;
|
||||
padding: 0.2em 0;
|
||||
}
|
||||
|
||||
label:hover {
|
||||
background-color: #EAEFF2;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 1.2em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
html, body {
|
||||
width: 350px;
|
||||
}
|
||||
|
||||
a {
|
||||
margin: 10px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.panel {
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
span.identity {
|
||||
width: 100px;
|
||||
display: inline-block;
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
.control-options {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.identity-options {
|
||||
display: none;
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="options.css"/>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<section class="scheme-options">
|
||||
<span class="title">Proxy Scheme:</span>
|
||||
<select id="proxy_scheme">
|
||||
<option value="http" selected="selected">HTTP</option>
|
||||
<option value="socks5">SOCKS5</option>
|
||||
</select>
|
||||
</section>
|
||||
|
||||
<section class="scheme-options proxy-options">
|
||||
<div class="title" >Proxy Options</div>
|
||||
|
||||
<label id="portText">Host: </label>
|
||||
<input type="text" data="host" id="host" value="127.0.0.1"/>
|
||||
<br>
|
||||
<label id="hostText">Port: </label>
|
||||
<input type="text" data="port" id="port" value="4444"/>
|
||||
|
||||
</section>
|
||||
<section class="scheme-options identity-options">
|
||||
<div class="panel">
|
||||
<div id="identity-list">Identity list?</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="scheme-options control-options">
|
||||
<div class="title" >Controller Options</div>
|
||||
<p id="controlHelpText"> These options will be inert if used with the default i2p HTTP or SOCKS
|
||||
proxy. </p>
|
||||
<label id="controlPortText">Control Host: </label>
|
||||
<input type="text" data="controlhost" id="controlhost" value="127.0.0.1"/>
|
||||
<br>
|
||||
<label id="controlHostText">Control Port: </label>
|
||||
<input type="text" data="controlport" id="controlport" value="4444"/>
|
||||
|
||||
</section>
|
||||
|
||||
<input type="button" value="Save preferences" id="save-button"/>
|
||||
|
||||
<script src="options.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -0,0 +1,193 @@
|
||||
function isDroid() {
|
||||
var gettingInfo = browser.runtime.getPlatformInfo();
|
||||
gettingInfo.then((got) => {
|
||||
if (got.os == "android") {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function SetHostText() {
|
||||
var hostid = document.getElementById("hostText");
|
||||
hostid.textContent = chrome.i18n.getMessage("hostText");
|
||||
}
|
||||
|
||||
function SetPortText() {
|
||||
var portid = document.getElementById("portText");
|
||||
portid.textContent = chrome.i18n.getMessage("portText");
|
||||
}
|
||||
|
||||
function SetControlHostText() {
|
||||
var controlhostid = document.getElementById("controlHostText");
|
||||
controlhostid.textContent = chrome.i18n.getMessage("controlHostText");
|
||||
}
|
||||
|
||||
function setupProxy() {
|
||||
var Host = getHost();
|
||||
var Port = getPort();
|
||||
var Scheme = getScheme();
|
||||
var config = {
|
||||
mode: "fixed_servers",
|
||||
rules: {
|
||||
singleProxy: {
|
||||
scheme: Scheme,
|
||||
host: Host,
|
||||
port: parseInt(Port),
|
||||
},
|
||||
},
|
||||
};
|
||||
chrome.proxy.settings.set(
|
||||
{
|
||||
value: config,
|
||||
scope: "regular",
|
||||
},
|
||||
function () {}
|
||||
);
|
||||
}
|
||||
|
||||
function SetControlPortText() {
|
||||
var controlportid = document.getElementById("controlPortText");
|
||||
controlportid.textContent = chrome.i18n.getMessage("controlPortText");
|
||||
}
|
||||
|
||||
function SetControlHelpText() {
|
||||
var portid = document.getElementById("controlHelpText");
|
||||
portid.textContent = chrome.i18n.getMessage("controlHelpText");
|
||||
}
|
||||
|
||||
function getScheme() {
|
||||
const proxy_scheme = document.querySelector("#proxy_scheme");
|
||||
console.log("Got i2p proxy scheme:", proxy_scheme.value);
|
||||
if (proxy_scheme == "HTTP") {
|
||||
return "http";
|
||||
}
|
||||
if (proxy_scheme == "SOCKS") {
|
||||
return "socks";
|
||||
}
|
||||
return proxy_scheme.value;
|
||||
}
|
||||
|
||||
function getHost() {
|
||||
proxy_host = document.getElementById("host").value;
|
||||
console.log("Got i2p proxy host:", proxy_host);
|
||||
if (proxy_host == undefined) {
|
||||
return "127.0.0.1";
|
||||
}
|
||||
return proxy_host;
|
||||
}
|
||||
|
||||
function getPort() {
|
||||
proxy_port = document.getElementById("port").value;
|
||||
console.log("Got i2p proxy port:", proxy_port);
|
||||
if (proxy_port == undefined) {
|
||||
return "4444";
|
||||
}
|
||||
return proxy_port;
|
||||
}
|
||||
|
||||
function getControlHost() {
|
||||
control_host = document.getElementById("controlhost").value;
|
||||
console.log("Got i2p control host:", control_host);
|
||||
if (control_host == undefined) {
|
||||
return "127.0.0.1";
|
||||
}
|
||||
return control_host;
|
||||
}
|
||||
|
||||
function getControlPort() {
|
||||
control_port = document.getElementById("controlport").value;
|
||||
console.log("Got i2p control port:", control_port);
|
||||
if (control_port == undefined) {
|
||||
return "4444";
|
||||
}
|
||||
return control_port;
|
||||
}
|
||||
|
||||
function checkStoredSettings(storedSettings) {
|
||||
let defaultSettings = {};
|
||||
if (!storedSettings.proxy_scheme) {
|
||||
defaultSettings["proxy_scheme"] = "http";
|
||||
}
|
||||
if (!storedSettings.proxy_host) {
|
||||
defaultSettings["proxy_host"] = "127.0.0.1";
|
||||
}
|
||||
if (!storedSettings.proxy_port) {
|
||||
defaultSettings["proxy_port"] = 4444;
|
||||
}
|
||||
if (!storedSettings.control_host) {
|
||||
defaultSettings["control_host"] = "127.0.0.1";
|
||||
}
|
||||
if (!storedSettings.control_port) {
|
||||
defaultSettings["control_port"] = 4444;
|
||||
}
|
||||
chrome.storage.local.set(defaultSettings);
|
||||
}
|
||||
|
||||
function onError(e) {
|
||||
console.error(e);
|
||||
}
|
||||
|
||||
function storeSettings() {
|
||||
let proxy_scheme = getScheme();
|
||||
let proxy_host = getHost();
|
||||
let proxy_port = getPort();
|
||||
let control_host = getControlHost();
|
||||
let control_port = getControlPort();
|
||||
chrome.storage.local.set({
|
||||
proxy_scheme,
|
||||
proxy_host,
|
||||
proxy_port,
|
||||
control_host,
|
||||
control_port,
|
||||
});
|
||||
console.log("storing proxy scheme:", proxy_scheme);
|
||||
console.log("storing proxy host:", proxy_host);
|
||||
console.log("storing proxy port:", proxy_port);
|
||||
console.log("storing control host:", control_host);
|
||||
console.log("storing control port:", control_port);
|
||||
setupProxy();
|
||||
}
|
||||
|
||||
function updateUI(restoredSettings) {
|
||||
const selectList = document.querySelector("#proxy_scheme");
|
||||
selectList.value = restoredSettings.proxy_scheme;
|
||||
console.log("showing proxy scheme:", selectList.value);
|
||||
|
||||
const hostitem = document.getElementById("host");
|
||||
hostitem.value = restoredSettings.proxy_host;
|
||||
console.log("showing proxy host:", hostitem.value);
|
||||
|
||||
const portitem = document.getElementById("port");
|
||||
portitem.value = restoredSettings.proxy_port;
|
||||
console.log("showing proxy port:", portitem.value);
|
||||
|
||||
const controlhostitem = document.getElementById("controlhost");
|
||||
controlhostitem.value = restoredSettings.control_host;
|
||||
console.log("showing control host:", controlhostitem.value);
|
||||
|
||||
const controlportitem = document.getElementById("controlport");
|
||||
controlportitem.value = restoredSettings.control_port;
|
||||
console.log("showing control port:", controlportitem.value);
|
||||
|
||||
SetHostText();
|
||||
SetPortText();
|
||||
SetControlHostText();
|
||||
SetControlPortText();
|
||||
SetControlHelpText();
|
||||
setupProxy();
|
||||
}
|
||||
|
||||
function onError(e) {
|
||||
console.error(e);
|
||||
}
|
||||
chrome.storage.local.get(function (got) {
|
||||
checkStoredSettings(got);
|
||||
updateUI(got);
|
||||
});
|
||||
|
||||
const saveButton = document.querySelector("#save-button");
|
||||
saveButton.addEventListener("click", storeSettings);
|
||||
|
||||
//EXPERIMENTAL: Open in I2P Tab
|
BIN
src/i2p.chromium.base.profile/extensions/i2pchrome.js/people.png
Normal file
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 21 KiB |
277
src/i2p.chromium.base.profile/extensions/i2pchrome.js/privacy.js
Normal file
@ -0,0 +1,277 @@
|
||||
var titlepref = chrome.i18n.getMessage("titlePreface");
|
||||
|
||||
/* This disables protected content, which is a form of digital restrictions
|
||||
management dependent on identifying information */
|
||||
function disableDigitalRestrictionsManagement(platformInfo) {
|
||||
if (platformInfo.PlatformOs == "android") {
|
||||
chrome.privacy.websites.protectedContentEnabled.set({ value: false });
|
||||
} else if (platformInfo.PlatformOs == "windows") {
|
||||
chrome.privacy.websites.protectedContentEnabled.set({ value: false });
|
||||
}
|
||||
}
|
||||
|
||||
function getBrowser() {
|
||||
if (typeof chrome !== "undefined") {
|
||||
if (typeof browser !== "undefined") {
|
||||
return "Firefox";
|
||||
} else {
|
||||
return "Chrome";
|
||||
}
|
||||
} else {
|
||||
return "Chrome";
|
||||
} /* else {
|
||||
return "Edge";
|
||||
}*/
|
||||
}
|
||||
|
||||
function setAllPrivacy() {
|
||||
chrome.privacy.network.networkPredictionEnabled.set({ value: false });
|
||||
if (getBrowser() == "Chrome") {
|
||||
chrome.privacy.services.alternateErrorPagesEnabled.set({ value: false });
|
||||
chrome.privacy.services.autofillEnabled.set({ value: false });
|
||||
chrome.privacy.services.passwordSavingEnabled.set({ value: false });
|
||||
chrome.privacy.services.safeBrowsingEnabled.set({ value: false });
|
||||
chrome.privacy.services.safeBrowsingExtendedReportingEnabled.set({
|
||||
value: false,
|
||||
});
|
||||
chrome.privacy.services.searchSuggestEnabled.set({ value: false });
|
||||
chrome.privacy.services.spellingServiceEnabled.set({ value: false });
|
||||
chrome.privacy.services.translationServiceEnabled.set({ value: false });
|
||||
chrome.privacy.websites.thirdPartyCookiesAllowed.set({ value: false });
|
||||
chrome.privacy.websites.doNotTrackEnabled.set({ value: true });
|
||||
chrome.privacy.websites.hyperlinkAuditingEnabled.set({ value: false });
|
||||
chrome.privacy.websites.referrersEnabled.set({ value: false });
|
||||
//chrome.privacy.services.hotwordSearchEnabled.set({ value: false });
|
||||
} else {
|
||||
browser.privacy.websites.hyperlinkAuditingEnabled.set({ value: false });
|
||||
browser.privacy.websites.firstPartyIsolate.set({ value: true });
|
||||
browser.privacy.websites.resistFingerprinting.set({ value: true });
|
||||
// browser.privacy.websites.thirdPartyCookiesAllowed.set({ value: false });
|
||||
browser.privacy.websites.trackingProtectionMode.set({ value: true });
|
||||
browser.privacy.websites.cookieConfig.set({
|
||||
value: {
|
||||
behavior: "reject_third_party",
|
||||
nonPersistentCookies: true,
|
||||
},
|
||||
});
|
||||
browser.privacy.network.networkPredictionEnabled.set({ value: false });
|
||||
}
|
||||
return chrome.runtime.getPlatformInfo(disableDigitalRestrictionsManagement);
|
||||
}
|
||||
|
||||
setAllPrivacy();
|
||||
|
||||
function ResetPeerConnection() {
|
||||
AssurePeerConnection();
|
||||
}
|
||||
|
||||
function EnablePeerConnection() {
|
||||
AssurePeerConnection();
|
||||
console.log("Enabled WebRTC");
|
||||
}
|
||||
|
||||
function AssurePeerConnection() {
|
||||
chrome.privacy.network.webRTCIPHandlingPolicy.set({
|
||||
value: "disable_non_proxied_udp",
|
||||
});
|
||||
}
|
||||
|
||||
chrome.tabs.onCreated.addListener(AssurePeerConnection);
|
||||
|
||||
var defaultSettings = {
|
||||
since: "forever",
|
||||
dataTypes: ["downloads", "passwords", "formData", "localStorage", "history"],
|
||||
};
|
||||
|
||||
function onError(therror) {
|
||||
console.error(therror);
|
||||
}
|
||||
|
||||
function forgetBrowsingData(storedSettings) {
|
||||
function getSince(selectedSince) {
|
||||
if (selectedSince === "forever") {
|
||||
return 0;
|
||||
}
|
||||
|
||||
const times = {
|
||||
hour: () => 1000 * 60 * 60,
|
||||
day: () => 1000 * 60 * 60 * 24,
|
||||
week: () => 1000 * 60 * 60 * 24 * 7,
|
||||
};
|
||||
|
||||
const sinceMilliseconds = times[selectedSince].call();
|
||||
return Date.now() - sinceMilliseconds;
|
||||
}
|
||||
|
||||
function getTypes(selectedTypes) {
|
||||
let dataTypes = {};
|
||||
for (let item of selectedTypes) {
|
||||
dataTypes[item] = true;
|
||||
}
|
||||
return dataTypes;
|
||||
}
|
||||
|
||||
const since = getSince(defaultSettings.since);
|
||||
const dataTypes = getTypes(defaultSettings.dataTypes);
|
||||
|
||||
function notify() {
|
||||
let dataTypesString = Object.keys(dataTypes).join(", ");
|
||||
let sinceString = new Date(since).toLocaleString();
|
||||
chrome.notifications.create({
|
||||
type: "basic",
|
||||
title: "Removed browsing data",
|
||||
message: `Removed ${dataTypesString}\n for I2P Browsing`,
|
||||
});
|
||||
}
|
||||
|
||||
function deepCleanHistory(historyItems) {
|
||||
console.log("Deep cleaning history");
|
||||
for (let item of historyItems) {
|
||||
if (i2pHost(item.url)) {
|
||||
chrome.history.deleteUrl({
|
||||
url: item.url,
|
||||
});
|
||||
chrome.browsingData.removeCache({});
|
||||
console.log("cleared Cache");
|
||||
chrome.browsingData
|
||||
.removePasswords({
|
||||
hostnames: [i2pHostName(item.url)],
|
||||
since,
|
||||
})
|
||||
.then(onContextGotLog);
|
||||
console.log("cleared Passwords");
|
||||
chrome.browsingData
|
||||
.removeDownloads({
|
||||
hostnames: [i2pHostName(item.url)],
|
||||
since,
|
||||
})
|
||||
.then(onContextGotLog);
|
||||
console.log("cleared Downloads");
|
||||
chrome.browsingData
|
||||
.removeFormData({
|
||||
hostnames: [i2pHostName(item.url)],
|
||||
since,
|
||||
})
|
||||
.then(onContextGotLog);
|
||||
console.log("cleared Form Data");
|
||||
chrome.browsingData
|
||||
.removeLocalStorage({
|
||||
hostnames: [i2pHostName(item.url)],
|
||||
since,
|
||||
})
|
||||
.then(onContextGotLog);
|
||||
console.log("cleared Local Storage");
|
||||
|
||||
let contexts = chrome.contextualIdentities.query({
|
||||
name: titlepref,
|
||||
});
|
||||
|
||||
function deepCleanCookies(cookies) {
|
||||
for (let cookie of cookies) {
|
||||
var removing = chrome.cookies.remove({
|
||||
firstPartyDomain: cookie.firstPartyDomain,
|
||||
name: cookie.name,
|
||||
url: item.url,
|
||||
});
|
||||
removing.then(onContextGotLog, onError);
|
||||
}
|
||||
console.log("Cleared cookies");
|
||||
}
|
||||
|
||||
function deepCleanContext(cookieStoreIds) {
|
||||
for (let cookieStoreId of cookieStoreIds) {
|
||||
var removing = chrome.cookies.getAll({
|
||||
firstPartyDomain: null,
|
||||
storeId: cookieStoreId.cookieStoreId,
|
||||
});
|
||||
removing.then(deepCleanCookies, onError);
|
||||
}
|
||||
}
|
||||
|
||||
contexts.then(deepCleanContext, onError);
|
||||
}
|
||||
}
|
||||
notify();
|
||||
}
|
||||
|
||||
var searching = chrome.history.search({
|
||||
text: "i2p",
|
||||
startTime: 0,
|
||||
});
|
||||
|
||||
searching.then(deepCleanHistory);
|
||||
|
||||
setAllPrivacy();
|
||||
ResetPeerConnection();
|
||||
}
|
||||
|
||||
function i2pHostName(url) {
|
||||
let hostname = "";
|
||||
if (url.indexOf("://") > -1) {
|
||||
hostname = url.split("/")[2];
|
||||
} else {
|
||||
hostname = url.split("/")[0];
|
||||
}
|
||||
return hostname;
|
||||
}
|
||||
|
||||
function i2pHost(url) {
|
||||
let hostname = i2pHostName(url);
|
||||
return hostname.endsWith(".i2p");
|
||||
}
|
||||
|
||||
function onContextGotLog(contexts) {
|
||||
if (contexts !== null) {
|
||||
for (let context of contexts) {
|
||||
console.log(context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
chrome.runtime.onMessage.addListener(message);
|
||||
|
||||
function enableHistory() {
|
||||
function checkStoredSettings(storedSettings) {
|
||||
storedSettings["disable_history"] = false;
|
||||
console.log(storedSettings);
|
||||
function enablehistory(settings) {
|
||||
console.log("Store History:", settings);
|
||||
}
|
||||
let setting = chrome.storage.local.set(storedSettings);
|
||||
setting.then(enablehistory);
|
||||
}
|
||||
const gettingStoredSettings = chrome.storage.local.get();
|
||||
gettingStoredSettings.then(checkStoredSettings, onError);
|
||||
}
|
||||
|
||||
function disableHistory() {
|
||||
function checkStoredSettings(storedSettings) {
|
||||
storedSettings["disable_history"] = true;
|
||||
console.log(storedSettings);
|
||||
function enablehistory(settings) {
|
||||
console.log("Store History:", settings);
|
||||
}
|
||||
var setting = chrome.storage.local.set(storedSettings);
|
||||
setting.then(enablehistory);
|
||||
}
|
||||
const gettingStoredSettings = chrome.storage.local.get();
|
||||
gettingStoredSettings.then(checkStoredSettings, onError);
|
||||
}
|
||||
|
||||
function message(recieved) {
|
||||
console.log(recieved);
|
||||
if (recieved.rtc === "enableWebRTC") {
|
||||
console.log("enableWebRTC");
|
||||
EnablePeerConnection();
|
||||
} else if (recieved.rtc === "disableWebRTC") {
|
||||
console.log("disableWebRTC");
|
||||
ResetPeerConnection();
|
||||
}
|
||||
if (recieved.history === "enableHistory") {
|
||||
console.log("enableHistory");
|
||||
enableHistory();
|
||||
} else if (recieved.history === "disableHistory") {
|
||||
console.log("disableHistory");
|
||||
disableHistory();
|
||||
}
|
||||
}
|
161
src/i2p.chromium.base.profile/extensions/i2pchrome.js/proxy.js
Normal file
@ -0,0 +1,161 @@
|
||||
function platformCallback(platformInfo) {
|
||||
if (platformInfo.PlatformOs == "android") {
|
||||
console.log("android detected");
|
||||
return true;
|
||||
} else {
|
||||
console.log("desktop detected");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function isDroid() {
|
||||
return chrome.runtime.getPlatformInfo(platformCallback);
|
||||
}
|
||||
|
||||
//chrome.privacy.network.peerConnectionEnabled.set({value: false});
|
||||
|
||||
chrome.privacy.network.networkPredictionEnabled.set({ value: false });
|
||||
chrome.privacy.network.webRTCIPHandlingPolicy.set({
|
||||
value: "disable_non_proxied_udp",
|
||||
});
|
||||
|
||||
console.log("Preliminarily disabled WebRTC.");
|
||||
|
||||
function shouldProxyRequest(requestInfo) {
|
||||
return requestInfo.parentFrameId != -1;
|
||||
}
|
||||
|
||||
function handleProxyRequest(requestInfo) {
|
||||
console.log(`Proxying: ${requestInfo.url}`);
|
||||
console.log(" ", getScheme(), getHost(), ":", getPort());
|
||||
return { type: getScheme(), host: getHost(), port: getPort() };
|
||||
}
|
||||
|
||||
var proxy_scheme = "HTTP";
|
||||
|
||||
function getScheme() {
|
||||
if (proxy_scheme == undefined) {
|
||||
proxy_scheme = "http";
|
||||
}
|
||||
if (proxy_scheme == "HTTP") {
|
||||
proxy_scheme = "http";
|
||||
}
|
||||
if (proxy_scheme == "SOCKS") {
|
||||
proxy_scheme = "socks";
|
||||
}
|
||||
console.log("Got i2p proxy scheme:", proxy_scheme);
|
||||
return proxy_scheme;
|
||||
}
|
||||
|
||||
var proxy_host = "127.0.0.1";
|
||||
|
||||
function getHost() {
|
||||
if (proxy_host == undefined) {
|
||||
proxy_host = "127.0.0.1";
|
||||
}
|
||||
console.log("Got i2p proxy host:", proxy_host);
|
||||
return proxy_host;
|
||||
}
|
||||
|
||||
var proxy_port = "4444";
|
||||
|
||||
function getPort() {
|
||||
if (proxy_port == undefined) {
|
||||
proxy_port = "4444";
|
||||
}
|
||||
console.log("Got i2p proxy port:", proxy_port);
|
||||
return proxy_port;
|
||||
}
|
||||
|
||||
var control_port = "7657";
|
||||
|
||||
function getControlPort() {
|
||||
if (control_port == undefined) {
|
||||
return "7657";
|
||||
}
|
||||
console.log("Got i2p control port:", control_port);
|
||||
return control_port;
|
||||
}
|
||||
|
||||
function getBrowser() {
|
||||
if (typeof chrome !== "undefined") {
|
||||
if (typeof browser !== "undefined") {
|
||||
return "Firefox";
|
||||
} else {
|
||||
return "Chrome";
|
||||
}
|
||||
} else {
|
||||
return "Chrome";
|
||||
}
|
||||
/* else {
|
||||
return "Edge";
|
||||
}*/
|
||||
}
|
||||
|
||||
function setupProxy() {
|
||||
var Host = getHost();
|
||||
var Port = getPort();
|
||||
var Scheme = getScheme();
|
||||
var config = {
|
||||
mode: "fixed_servers",
|
||||
rules: {
|
||||
singleProxy: {
|
||||
scheme: Scheme,
|
||||
host: Host,
|
||||
port: parseInt(Port),
|
||||
},
|
||||
},
|
||||
};
|
||||
chrome.proxy.settings.set({
|
||||
value: config,
|
||||
scope: "regular",
|
||||
},
|
||||
function() {}
|
||||
);
|
||||
}
|
||||
|
||||
setupProxy();
|
||||
|
||||
function checkStoredSettings(storedSettings) {
|
||||
let defaultSettings = {};
|
||||
if (!storedSettings.proxy_scheme) {
|
||||
defaultSettings["proxy_scheme"] = "http";
|
||||
}
|
||||
if (!storedSettings.proxy_host) {
|
||||
defaultSettings["proxy_host"] = "127.0.0.1";
|
||||
}
|
||||
if (!storedSettings.proxy_port) {
|
||||
defaultSettings["proxy_port"] = 4444;
|
||||
}
|
||||
if (!storedSettings.control_host) {
|
||||
defaultSettings["control_host"] = "127.0.0.1";
|
||||
}
|
||||
if (!storedSettings.control_port) {
|
||||
defaultSettings["control_port"] = 4444;
|
||||
}
|
||||
chrome.storage.local.set(defaultSettings);
|
||||
}
|
||||
|
||||
function update(restoredSettings) {
|
||||
proxy_scheme = restoredSettings.proxy_scheme;
|
||||
console.log("restoring proxy scheme:", proxy_scheme);
|
||||
proxy_host = restoredSettings.proxy_host;
|
||||
console.log("restoring proxy host:", proxy_host);
|
||||
proxy_port = restoredSettings.proxy_port;
|
||||
console.log("restoring proxy port:", proxy_port);
|
||||
control_host = restoredSettings.control_host;
|
||||
console.log("restoring control host:", control_host);
|
||||
control_port = restoredSettings.control_port;
|
||||
console.log("restoring control port:", control_port);
|
||||
}
|
||||
|
||||
chrome.storage.local.get(function(got) {
|
||||
checkStoredSettings(got);
|
||||
update(got);
|
||||
setupProxy();
|
||||
});
|
||||
|
||||
chrome.windows.onCreated.addListener(() => {
|
||||
const gettingStoredSettings = chrome.storage.local.get();
|
||||
gettingStoredSettings.then(setupProxy, onError);
|
||||
});
|
BIN
src/i2p.chromium.base.profile/extensions/i2pchrome.js/shades.png
Normal file
After Width: | Height: | Size: 62 KiB |
BIN
src/i2p.chromium.base.profile/extensions/i2pchrome.js/sync.png
Normal file
After Width: | Height: | Size: 130 KiB |
After Width: | Height: | Size: 29 KiB |
@ -0,0 +1,86 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="home.css"/>
|
||||
<link rel="stylesheet" href="info.css"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="panel">
|
||||
<div class="section-header panel-section panel-section-header">
|
||||
<div id="text-section-header" class="text-section-header"><h1>The Invisible Internet Browser</h1></div>
|
||||
</div>
|
||||
<div class="panel-section-separator"></div>
|
||||
<div id="i2pbrowser-version"></div>
|
||||
<div id="i2pbrowser-description">
|
||||
<p id="description">You are now able to use I2P in this browser.</p>
|
||||
<p id="beta">It is experimental.</p>
|
||||
</div>
|
||||
<div id="readyness">
|
||||
<img class="readyness" src="http://proxy.i2p/themes/console/images/local_up.png" alt="Proxy is not ready."/>
|
||||
<span id="proxy-check">Proxy is ready.</span>
|
||||
<img class="readyness" src="http://proxy.i2p/themes/console/images/local_up.png" alt="Proxy is not ready."/>
|
||||
<span id="proxy-check">Proxy is ready.</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-section-separator"></div>
|
||||
<div class="browser-info">
|
||||
<p class="hideIfI2PConsoleOff">
|
||||
<h3 id="controlHeader">Controls</h3>
|
||||
<p id="controlExplain">These controls are used to tailor your I2P Browsing Experience</p>
|
||||
<ul>
|
||||
<li class="application">
|
||||
<a id="clear-browser-data" href="#">Clear Browsing Data: </a>
|
||||
<span id="clear-desc" class="applicationDesc">Use this to erase your browsing data.</span>
|
||||
</li>
|
||||
<li class="application">
|
||||
<a id="window-visit-readme" href="#">READ ME!</a>
|
||||
<span id="readme" class="applicationDesc">If you didn't read the instructions, you may be using this extension incorrectly! Do you remember creating an "I2P Browsing Mode" profile? Click here to make sure!</span>
|
||||
</li>
|
||||
<!--<li class="application">
|
||||
<input type="checkbox" id="disable-history" name="disablehistory" value="history">
|
||||
<label for="disable-history">Disable History in I2P Tabs</label>
|
||||
<span id="histDesc" class="applicationDesc">History is automatically cleared when your I2P tabs are closed. If you want to clear history as you go, check this box.</span>
|
||||
</li>-->
|
||||
</ul>
|
||||
</p>
|
||||
</p>
|
||||
</div>
|
||||
<div class="panel-section-separator"></div>
|
||||
<div class="application-info">
|
||||
<p class="hideIfI2PConsoleOff">
|
||||
<h3 id="applicationHeader">Applications</h3>
|
||||
<p id="applicationExplain">These applications use I2P to provide them with security and privacy.</p>
|
||||
<ul>
|
||||
<li class="application">
|
||||
<button id="window-visit-homepage" target="_blank" class="applicationName window-visit-homepage" href="#">Home Page</button>
|
||||
<span id="abouthome" class="applicationDesc">For more information about this extension, go here:</span>
|
||||
</li>
|
||||
<li class="application">
|
||||
<button id="window-visit-i2ptunnel" target="_blank" class="applicationName">Hidden Services Manager</button>
|
||||
<span id="i2ptunnel" class="applicationDesc">I2P has a web-based interface for configuring .i2p services like web sites, to set up your own web sites, go here:</span>
|
||||
</li>
|
||||
<li class="application">
|
||||
<button id="window-visit-susimail" target="_blank" class="applicationName">E-Mail</button>
|
||||
<span id="susimail" class="applicationDesc">I2P also bundles a webmail client which can be used to access in-I2P e-mail. To use it, go here:</span>
|
||||
</li>
|
||||
<li class="application">
|
||||
<button id="window-visit-snark" target="_blank" class="applicationName">BitTorrent</button>
|
||||
<span id="snark" class="applicationDesc">I2P is capable of anonymous Peer-to-Peer file sharing, to use the built-in bittorrent client go here:</span>
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<script src="context.js"></script>
|
||||
<script src="privacy.js"></script>
|
||||
<script src="info.js"></script>
|
||||
<script src="content.js" crossorigin="anonymous"></script>
|
||||
<script src="i2pcontrol/i2pcontrol.js"></script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
@ -517,7 +517,7 @@ user_pref("security.mixed_content.block_display_content", true);
|
||||
* [SETTING] Privacy & Security>HTTPS-Only Mode (and manage exceptions)
|
||||
* [TEST] http://example.com [upgrade]
|
||||
* [TEST] http://httpforever.com/ [no upgrade] ***/
|
||||
user_pref("dom.security.https_only_mode", true); // [FF76+]
|
||||
user_pref("dom.security.https_only_mode", false); // [FF76+]
|
||||
// user_pref("dom.security.https_only_mode_pbm", true); // [FF80+]
|
||||
/* 1245: enable HTTPS-Only mode for local resources [FF77+] ***/
|
||||
// user_pref("dom.security.https_only_mode.upgrade_local", true);
|
||||
|
198
src/java/net/i2p/i2pfirefox/I2PBrowser.java
Normal file
@ -0,0 +1,198 @@
|
||||
package net.i2p.i2pfirefox;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* I2PBrowser.java
|
||||
* Copyright (C) 2022 idk <hankhill19580@gmail.com>
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the MIT License. See LICENSE.md for details.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* @description I2PBrowser is a class that is used to open a browser window to the I2P network.
|
||||
* It automatically detects the operating system and available browsers, and selects
|
||||
* the best one to use, with Tor Browser at the top for Firefox and Brave at the top
|
||||
* for Chrome.
|
||||
*
|
||||
* @author idk
|
||||
* @since 0.0.16
|
||||
*/
|
||||
public class I2PBrowser {
|
||||
private final I2PFirefox i2pFirefox = new I2PFirefox();
|
||||
private final I2PChromium i2pChromium = new I2PChromium();
|
||||
private final I2PGenericUnsafeBrowser i2pGeneral = new I2PGenericUnsafeBrowser();
|
||||
public boolean firefox = false;
|
||||
public boolean chromium = false;
|
||||
public boolean generic = false;
|
||||
public boolean chromiumFirst = false;
|
||||
|
||||
private void launchFirefox(boolean privateWindow, String[] url) {
|
||||
System.out.println("I2PFirefox");
|
||||
i2pFirefox.launch(privateWindow, url);
|
||||
}
|
||||
private void launchChromium(boolean privateWindow, String[] url) {
|
||||
System.out.println("I2PChromium");
|
||||
i2pChromium.launch(privateWindow, url);
|
||||
}
|
||||
private void launchGeneric(boolean privateWindow, String[] url) {
|
||||
System.out.println("I2PChromium");
|
||||
i2pGeneral.launch(privateWindow, url);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct an I2PBrowser class which automatically determines which browser to use.
|
||||
*
|
||||
* @since 0.0.16
|
||||
*/
|
||||
public I2PBrowser() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct an I2PBrowser class which automatically determines which browser to use.
|
||||
*
|
||||
* @since 0.0.18
|
||||
*/
|
||||
public I2PBrowser(String browserPath) {
|
||||
I2PGenericUnsafeBrowser.BROWSER = browserPath;
|
||||
}
|
||||
|
||||
public void setBrowser(String browserPath) {
|
||||
I2PGenericUnsafeBrowser.BROWSER = browserPath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if there is a Chromium available
|
||||
*
|
||||
* @return true if Chromium is available, false otherwise
|
||||
* @since 0.0.16
|
||||
*/
|
||||
public boolean hasChromium() {
|
||||
String chrome = i2pChromium.topChromium();
|
||||
if (chrome == null) {
|
||||
return false;
|
||||
}
|
||||
if (chrome.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if there is a Firefox variant available
|
||||
*
|
||||
* @return true if Firefox variant is available, false otherwise
|
||||
* @since 0.0.16
|
||||
*/
|
||||
public boolean hasFirefox() {
|
||||
String fox = i2pFirefox.topFirefox();
|
||||
if (fox == null) {
|
||||
return false;
|
||||
}
|
||||
if (fox.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Populates a profile directory with a proxy configuration.
|
||||
* Waits for an HTTP proxy on the port 4444 to be ready.
|
||||
* Launches either Firefox or Chromium with the profile directory.
|
||||
*
|
||||
* @param bool if true, the profile will be ephemeral(i.e. a --private-window profile).
|
||||
* @since 0.0.17
|
||||
*/
|
||||
public void launch(boolean privateWindow, String[] url){
|
||||
if (generic)
|
||||
this.launchGeneric(privateWindow, url);
|
||||
if ((chromium && firefox) || (!chromium && !firefox)) {
|
||||
if (this.hasFirefox()) {
|
||||
this.launchFirefox(privateWindow, url);
|
||||
} else if (this.hasChromium()) {
|
||||
this.launchChromium(privateWindow, url);
|
||||
}else{
|
||||
this.launchGeneric(privateWindow, url);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (chromiumFirst){
|
||||
if (chromium) {
|
||||
this.launchChromium(privateWindow, url);
|
||||
}else if (firefox) {
|
||||
this.launchFirefox(privateWindow, url);
|
||||
}else{
|
||||
this.launchGeneric(privateWindow, url);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (firefox) {
|
||||
this.launchFirefox(privateWindow, url);
|
||||
}else if (chromium) {
|
||||
this.launchChromium(privateWindow, url);
|
||||
}else{
|
||||
this.launchGeneric(privateWindow, url);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Populates a profile directory with a proxy configuration.
|
||||
* Waits for an HTTP proxy on the port 4444 to be ready.
|
||||
* Launches either Firefox or Chromium with the profile directory.
|
||||
*
|
||||
* @param bool if true, the profile will be ephemeral(i.e. a --private-window profile).
|
||||
* @since 0.0.16
|
||||
*/
|
||||
public void launch(boolean privateWindow){
|
||||
launch(privateWindow, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Populates a profile directory with a proxy configuration.
|
||||
* Waits for an HTTP proxy on the port 4444 to be ready.
|
||||
* Launches either Firefox or Chromium with the profile directory.
|
||||
*
|
||||
* @since 0.0.16
|
||||
*/
|
||||
public void launch(){
|
||||
launch(false);
|
||||
}
|
||||
|
||||
private static String ValidURL(String inUrl){
|
||||
String[] schemes = {"http", "https"};
|
||||
for (String scheme: schemes) {
|
||||
if (inUrl.startsWith(scheme)) {
|
||||
return inUrl;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
boolean privateBrowsing = false;
|
||||
System.out.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.startsWith("-")){
|
||||
visitURL.add(ValidURL(arg));
|
||||
}
|
||||
}
|
||||
}
|
||||
i2pBrowser.launch(privateBrowsing, visitURL.toArray(new String[visitURL.size()]));
|
||||
}
|
||||
|
||||
}
|
@ -5,12 +5,26 @@ import java.io.IOException;
|
||||
import java.net.Socket;
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
||||
/**
|
||||
* 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
|
||||
* @since 0.0.1
|
||||
*/
|
||||
public class I2PChromium {
|
||||
private final String[] CHROMIUM_SEARCH_PATHS = CHROMIUM_FINDER();
|
||||
private final int DEFAULT_TIMEOUT = 200;
|
||||
private Process p = null;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Construct an I2PChromium class which manages an instance of Chromium and
|
||||
* an accompanying Chromium profile. This version includes Chromium variants
|
||||
* and forks.
|
||||
@ -55,11 +69,10 @@ public class I2PChromium {
|
||||
return exePath;
|
||||
}
|
||||
private static String[] FIND_CHROMIUM_SEARCH_PATHS_WINDOWS() {
|
||||
String userHome = System.getProperty("user.home");
|
||||
String programFiles = System.getenv("ProgramFiles");
|
||||
String localAppData = System.getenv("LOCALAPPDATA");
|
||||
String programFiles86 = System.getenv("ProgramFiles(x86)");
|
||||
String[] path = new String[]{
|
||||
String[] path = new String[] {
|
||||
new File(localAppData, "/Google/Chrome/Application/").toString(),
|
||||
new File(programFiles, "/Google/Chrome/Application/").toString(),
|
||||
new File(programFiles86, "/Google/Chrome/Application/").toString(),
|
||||
@ -72,12 +85,12 @@ public class I2PChromium {
|
||||
new File(programFiles86, "/Microsoft/Edge/Application/").toString(),
|
||||
new File(programFiles, "/Microsoft/Edge/Application/").toString(),
|
||||
};
|
||||
String[] exes = new String[]{"ungoogled-chromium.exe", "chromium.exe", "brave.exe", "edge.exe", "ungoogled-chromium.exe", "chrome.exe"};
|
||||
String[] exes = new String[]{"ungoogled-chromium.exe", "chromium.exe", "brave.exe", "msedge.exe", "edge.exe", "chrome.exe"};
|
||||
String[] exePath = new String[path.length * exes.length];
|
||||
int i = 0;
|
||||
for (String s : path) {
|
||||
for (String exe : exes) {
|
||||
exePath[i] = s + exe;
|
||||
exePath[i] = s + "\\" + exe;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
@ -188,7 +201,7 @@ public class I2PChromium {
|
||||
return "Unknown";
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Check our list of chrome paths for a valid chrome binary.
|
||||
* Just an existence check for now, but should check versions
|
||||
* in the future.
|
||||
@ -202,13 +215,15 @@ public class I2PChromium {
|
||||
for (String chrome : chromees) {
|
||||
File chromeFile = new File(chrome);
|
||||
if (chromeFile.exists()) {
|
||||
System.out.println("Found valid chromium at " + chrome);
|
||||
validChromiums.add(chrome);
|
||||
}
|
||||
System.out.println("chrome at " + chrome + "does not exist");
|
||||
}
|
||||
return validChromiums.toArray(new String[validChromiums.size()]);
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Return the best available Chromium from the list of Chromiums we have.
|
||||
*
|
||||
* @return the path to the best available Chromium, or null if none are found.
|
||||
@ -234,7 +249,7 @@ public class I2PChromium {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Return the best available Chromium from the list of Chromiums we have.
|
||||
* if override is passed it will be validated and if it validates, it will
|
||||
* be used.
|
||||
@ -253,7 +268,7 @@ public class I2PChromium {
|
||||
return topChromium();
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Build a ProcessBuilder for the top Chromium binary and
|
||||
* the default profile.
|
||||
*
|
||||
@ -265,7 +280,54 @@ public class I2PChromium {
|
||||
return processBuilder(new String[]{});
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Build a ProcessBuilder for the top Chromium binary and
|
||||
* the default profile.
|
||||
*
|
||||
* @args the arguments to pass to the Chromium binary
|
||||
* @return a ProcessBuilder for the top Chromium binary and
|
||||
* the default profile.
|
||||
* @since 0.0.1
|
||||
*/
|
||||
public ProcessBuilder defaultProcessBuilder(String[] args) {
|
||||
return processBuilder(args);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Build a ProcessBuilder for the top Chromium binary and
|
||||
* the default profile.
|
||||
*
|
||||
* @return a ProcessBuilder for the top Chromium binary and
|
||||
* the default profile. Always passes the --incognito flag.
|
||||
* @since 0.0.1
|
||||
*/
|
||||
public ProcessBuilder privateProcessBuilder() {
|
||||
return processBuilder(new String[]{"--incognito"});
|
||||
}
|
||||
|
||||
/**
|
||||
* Build a ProcessBuilder for the top Chromium binary and
|
||||
* the default profile.
|
||||
*
|
||||
* @param args the arguments to pass to the Chromium binary.
|
||||
* @return a ProcessBuilder for the top Chromium binary and
|
||||
* the default profile. Always passes the --incognito flag.
|
||||
* @since 0.0.1
|
||||
*/
|
||||
public ProcessBuilder privateProcessBuilder(String[] args) {
|
||||
//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);
|
||||
}
|
||||
}
|
||||
return processBuilder(argList.toArray(new String[argList.size()]));
|
||||
}
|
||||
|
||||
/**
|
||||
1 --user-data-dir="$CHROMIUM_I2P" \
|
||||
2 --proxy-server="http://127.0.0.1:4444" \
|
||||
3 --proxy-bypass-list=127.0.0.1:7657 \
|
||||
@ -288,7 +350,7 @@ public class I2PChromium {
|
||||
20 --disable-file-system \
|
||||
*/
|
||||
|
||||
/*
|
||||
/**
|
||||
* Build a ProcessBuilder for the top Chromium binary and
|
||||
* the default profile, with a specific set of extended
|
||||
* arguments.
|
||||
@ -301,7 +363,7 @@ public class I2PChromium {
|
||||
public ProcessBuilder processBuilder(String[] args) {
|
||||
String chrome = topChromium();
|
||||
if (!chrome.isEmpty()) {
|
||||
String[] newArgs = new String[args.length+19];
|
||||
String[] newArgs = new String[args.length+20];
|
||||
newArgs[0] = chrome;
|
||||
newArgs[1] = "--user-data-dir="+I2PChromiumProfileBuilder.profileDirectory();
|
||||
newArgs[2] = "--proxy-server=http://127.0.0.1:4444";
|
||||
@ -321,16 +383,24 @@ public class I2PChromium {
|
||||
newArgs[16] = "--disable-background-networking";
|
||||
newArgs[17] = "--disable-d3d11";
|
||||
newArgs[18] = "--disable-file-system";
|
||||
for (int i = 0; i < args.length; i++) {
|
||||
newArgs[i+19] = args[i];
|
||||
newArgs[19] = "--load-extension="+new File(I2PChromiumProfileBuilder.profileDirectory(),"extensions/i2pchrome.js").getAbsolutePath();
|
||||
/**+","+
|
||||
new File(I2PChromiumProfileBuilder.profileDirectory(),"extensions/ublock.js").getAbsolutePath()
|
||||
+","+
|
||||
new File(I2PChromiumProfileBuilder.profileDirectory(),"extensions/scriptsafe.js").getAbsolutePath();*/
|
||||
if (args.length > 0) {
|
||||
for (int i = 0; i < args.length; i++) {
|
||||
newArgs[i+20] = args[i];
|
||||
}
|
||||
}
|
||||
return new ProcessBuilder(newArgs).directory(I2PChromiumProfileBuilder.runtimeDirectory(true));
|
||||
} else {
|
||||
System.out.println("No Chromium found.");
|
||||
return new ProcessBuilder(args);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Waits for an HTTP proxy on port 4444 to be ready.
|
||||
* Returns false on timeout of 200 seconds.
|
||||
*
|
||||
@ -341,7 +411,7 @@ public class I2PChromium {
|
||||
return waitForProxy(DEFAULT_TIMEOUT);
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Waits for an HTTP proxy on port 4444 to be ready.
|
||||
* Returns false on timeout of the specified number of seconds.
|
||||
*
|
||||
@ -352,7 +422,7 @@ public class I2PChromium {
|
||||
public boolean waitForProxy(int timeout) {
|
||||
return waitForProxy(timeout, 4444);
|
||||
}
|
||||
/*
|
||||
/**
|
||||
* Waits for an HTTP proxy on the specified port to be ready.
|
||||
* Returns false on timeout of the specified number of seconds.
|
||||
*
|
||||
@ -364,7 +434,7 @@ public class I2PChromium {
|
||||
public boolean waitForProxy(int timeout, int port) {
|
||||
return waitForProxy(timeout, port, "localhost");
|
||||
}
|
||||
/*
|
||||
/**
|
||||
* Waits for an HTTP proxy on the specified port to be ready.
|
||||
* Returns false on timeout of the specified number of seconds.
|
||||
*
|
||||
@ -398,7 +468,74 @@ public class I2PChromium {
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
public Process launchAndDetatch(boolean privateWindow, String[] url){
|
||||
if (waitForProxy()) {
|
||||
String profileDirectory = I2PChromiumProfileBuilder.profileDirectory();
|
||||
if (I2PChromiumProfileChecker.validateProfileDirectory(profileDirectory)) {
|
||||
System.out.println("Valid profile directory: "+profileDirectory);
|
||||
} else {
|
||||
System.out.println("Invalid profile directory: "+profileDirectory+" rebuilding...");
|
||||
if (!I2PChromiumProfileBuilder.copyBaseProfiletoProfile()) {
|
||||
System.out.println("Failed to rebuild profile directory: "+profileDirectory);
|
||||
return null;
|
||||
} else {
|
||||
System.out.println("Rebuilt profile directory: "+profileDirectory);
|
||||
}
|
||||
}
|
||||
ProcessBuilder pb = null;
|
||||
if (privateWindow) {
|
||||
pb = this.privateProcessBuilder(url);
|
||||
} else {
|
||||
pb = this.defaultProcessBuilder(url);
|
||||
}
|
||||
try{
|
||||
System.out.println(pb.command());
|
||||
p = pb.start();
|
||||
sleep(2000);
|
||||
return p;
|
||||
}catch(Throwable e){
|
||||
System.out.println(e);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @param bool if true, the profile will be ephemeral(i.e. a --private-window profile).
|
||||
* @param String[] a list of URL's to pass to the browser window
|
||||
* @since 0.0.17
|
||||
*/
|
||||
public void launch(boolean privateWindow, String[] url){
|
||||
if (waitForProxy()) {
|
||||
p = launchAndDetatch(privateWindow, url);
|
||||
System.out.println("I2PChromium");
|
||||
try{
|
||||
System.out.println("Waiting for I2PChromium to close...");
|
||||
int exit = p.waitFor();
|
||||
System.out.println("I2PChromium exited with value: "+exit);
|
||||
}catch(Exception e){
|
||||
System.out.println("Error: "+e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @param bool if true, the profile will be ephemeral(i.e. a --private-window profile).
|
||||
* @since 0.0.1
|
||||
*/
|
||||
public void launch(boolean privateWindow){
|
||||
launch(privateWindow, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
@ -406,41 +543,45 @@ public class I2PChromium {
|
||||
* @since 0.0.1
|
||||
*/
|
||||
public void launch(){
|
||||
String profileDirectory = I2PChromiumProfileBuilder.profileDirectory();
|
||||
if (I2PChromiumProfileChecker.validateProfileDirectory(profileDirectory)) {
|
||||
System.out.println("Valid profile directory: "+profileDirectory);
|
||||
} else {
|
||||
System.out.println("Invalid profile directory: "+profileDirectory+" rebuilding...");
|
||||
if (!I2PChromiumProfileBuilder.copyBaseProfiletoProfile()) {
|
||||
System.out.println("Failed to rebuild profile directory: "+profileDirectory);
|
||||
return;
|
||||
} else {
|
||||
System.out.println("Rebuilt profile directory: "+profileDirectory);
|
||||
}
|
||||
}
|
||||
if (waitForProxy()){
|
||||
ProcessBuilder pb = this.defaultProcessBuilder();
|
||||
Process p = null;
|
||||
try{
|
||||
System.out.println(pb.command());
|
||||
p = pb.start();
|
||||
}catch(Exception e){
|
||||
System.out.println("Error: "+e.getMessage());
|
||||
}finally{
|
||||
System.out.println("I2PChromium");
|
||||
try{
|
||||
System.out.println("Waiting for I2PChromium to close...");
|
||||
p.waitFor();
|
||||
}catch(Exception e){
|
||||
System.out.println("Error: "+e.getMessage());
|
||||
}
|
||||
launch(false);
|
||||
}
|
||||
|
||||
private static String ValidURL(String inUrl){
|
||||
String[] schemes = {"http", "https"};
|
||||
for (String scheme: schemes) {
|
||||
if (inUrl.startsWith(scheme)) {
|
||||
return inUrl;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
boolean privateBrowsing = false;
|
||||
System.out.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));
|
||||
}
|
||||
}
|
||||
}
|
||||
System.out.println("I2PChromium");
|
||||
I2PChromium i2pChromium = new I2PChromium();
|
||||
i2pChromium.launch();
|
||||
}
|
||||
i2pChromium.launch(privateBrowsing, visitURL.toArray(new String[visitURL.size()]));
|
||||
}
|
||||
private static void sleep(int millis) {
|
||||
try {
|
||||
Thread.sleep(millis);
|
||||
} catch (InterruptedException bad) {
|
||||
bad.printStackTrace();
|
||||
throw new RuntimeException(bad);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,6 +9,24 @@ import java.io.OutputStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
|
||||
/**
|
||||
* I2PChromiumProfileBuilder.java
|
||||
* Copyright (C) 2022 idk <hankhill19580@gmail.com>
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the MIT License. See LICENSE.md for details.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* I2PChromiumProfileBuilder is a class that builds a profile directory which
|
||||
* contains the I2P browser profile for the Chromium browser family. It manages
|
||||
* the base profile directory and copies it's contents to the active profile
|
||||
* directory, which is actually used by Chromium.
|
||||
*
|
||||
* @author idk
|
||||
* @since 0.0.1
|
||||
*/
|
||||
public class I2PChromiumProfileBuilder {
|
||||
private static boolean strict;
|
||||
|
||||
@ -17,7 +35,7 @@ public class I2PChromiumProfileBuilder {
|
||||
return profileDir.getAbsolutePath();
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* get the profile directory, creating it if necessary
|
||||
*
|
||||
* @return the profile directory, or null if it could not be created
|
||||
@ -49,7 +67,7 @@ public class I2PChromiumProfileBuilder {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* get the base profile directory, creating it if necessary
|
||||
*
|
||||
* @return the base profile directory, or null if it could not be created
|
||||
@ -71,7 +89,7 @@ public class I2PChromiumProfileBuilder {
|
||||
return baseProfileDir(rtd);
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* get the runtime directory, creating it if create=true
|
||||
*
|
||||
* @param create if true, create the runtime directory if it does not exist
|
||||
@ -89,7 +107,7 @@ public class I2PChromiumProfileBuilder {
|
||||
return new File(rtd);
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* get the correct runtime directory
|
||||
*
|
||||
* @return the runtime directory, or null if it could not be created or found
|
||||
@ -136,7 +154,7 @@ public class I2PChromiumProfileBuilder {
|
||||
return "";
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Copy the inert base profile directory to the runtime profile directory
|
||||
*
|
||||
* @since 0.0.1
|
||||
@ -200,7 +218,7 @@ public class I2PChromiumProfileBuilder {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Copy the strict options from the base profile to the profile
|
||||
*
|
||||
* @return true if successful, false otherwise
|
||||
@ -238,7 +256,7 @@ public class I2PChromiumProfileBuilder {
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Construct a new Profile Builder
|
||||
*
|
||||
* @since 0.0.1
|
||||
@ -247,7 +265,7 @@ public class I2PChromiumProfileBuilder {
|
||||
I2PChromiumProfileBuilder.strict = false;
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Construct a new Profile Builder
|
||||
* @param strict if true, the strict overrides will be copied to the profile
|
||||
*
|
||||
|
@ -2,7 +2,30 @@ package net.i2p.i2pfirefox;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* I2PChromiumProfileChecker.java
|
||||
* Copyright (C) 2022 idk <hankhill19580@gmail.com>
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the MIT License. See LICENSE.md for details.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* I2PChromiumProfileChecker is a class that checks if the Chromium profile directory
|
||||
* exists and is valid.
|
||||
*
|
||||
* @author idk
|
||||
* @since 0.0.1
|
||||
*/
|
||||
public class I2PChromiumProfileChecker {
|
||||
/**
|
||||
* Output feedback if the profile directory is valid or invalid
|
||||
*
|
||||
* @description Output feedback if the profile directory is valid or invalid
|
||||
* @args unused
|
||||
* @since 0.0.1
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
String profileDirectory = I2PChromiumProfileBuilder.profileDirectory();
|
||||
if (profileDirectory == null) {
|
||||
@ -17,6 +40,13 @@ public class I2PChromiumProfileChecker {
|
||||
System.out.println("Profile directory is invalid");
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Return true if the profile directory is valid.
|
||||
*
|
||||
* @param profileDirectory the profile directory to check
|
||||
* @return true if the profile directory is valid, false otherwise
|
||||
* @since 0.0.1
|
||||
*/
|
||||
public static boolean validateProfileDirectory(String profileDirectory) {
|
||||
File profileDir = new File(profileDirectory);
|
||||
if (!profileDir.exists()) {
|
||||
@ -41,6 +71,13 @@ public class I2PChromiumProfileChecker {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
/**
|
||||
* Return true if the file is valid.
|
||||
*
|
||||
* @param file the file to check
|
||||
* @return true if the file is valid, false otherwise
|
||||
* @since 0.0.1
|
||||
*/
|
||||
public static boolean validateFile(String file) {
|
||||
File f = new File(file);
|
||||
if (!f.exists()) {
|
||||
@ -61,6 +98,13 @@ public class I2PChromiumProfileChecker {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
/**
|
||||
* Return true if the extension directory is valid.
|
||||
*
|
||||
* @param extensionDirectory the extension directory to check
|
||||
* @return true if the extension directory is valid, false otherwise
|
||||
* @since 0.0.1
|
||||
*/
|
||||
public static boolean validateExtensionDirectory(String extensionDirectory) {
|
||||
File extensionDir = new File(extensionDirectory);
|
||||
if (!extensionDir.exists()) {
|
||||
|
@ -7,6 +7,23 @@ import java.nio.file.StandardCopyOption;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipInputStream;
|
||||
|
||||
/**
|
||||
* I2PChromiumProfileUnpacker.java
|
||||
* Copyright (C) 2022 idk <hankhill19580@gmail.com>
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the MIT License. See LICENSE.md for details.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* I2PChromiumProfileUnpacker is a class that unpacks the Chromium profile zip file
|
||||
* into the Chromium base profile directory. This is not used by the Chromium browser
|
||||
* instance, it's unpacked to the disk to be copied to the active profile directory.
|
||||
*
|
||||
* @author idk
|
||||
* @since 0.0.1
|
||||
*/
|
||||
public class I2PChromiumProfileUnpacker {
|
||||
|
||||
public static void main(String[] args) {
|
||||
@ -18,7 +35,7 @@ public class I2PChromiumProfileUnpacker {
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* unpack the profile directory
|
||||
*
|
||||
* @return true if the profile directory was successfully unpacked
|
||||
|
@ -5,11 +5,26 @@ import java.io.IOException;
|
||||
import java.net.Socket;
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* 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
|
||||
* @since 0.0.1
|
||||
*/
|
||||
public class I2PFirefox {
|
||||
private final String[] FIREFOX_SEARCH_PATHS = FIREFOX_FINDER();
|
||||
private final int DEFAULT_TIMEOUT = 200;
|
||||
private Process p = null;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Construct an I2PFirefox class which manages an instance of Firefox and
|
||||
* an accompanying Firefox profile. This version includes Firefox variants
|
||||
* and forks.
|
||||
@ -63,18 +78,26 @@ public class I2PFirefox {
|
||||
String[] tbPath = new String[]{new File(userHome, "/OneDrive/Desktop/Tor Browser/Browser/").toString(), new File(userHome, "/Desktop/Tor Browser/Browser/").toString()};
|
||||
|
||||
String[] path = new String[]{
|
||||
tbPath[0], tbPath[1],
|
||||
new File(programFiles, "Mozilla Firefox/").toString(),
|
||||
new File(programFiles86, "Mozilla Firefox/").toString(),
|
||||
new File(programFiles, "Waterfox/").toString(),
|
||||
new File(programFiles86, "Waterfox/").toString(),
|
||||
new File(programFiles, "Librewolf/").toString(),
|
||||
tbPath[0], tbPath[1]};
|
||||
String[] exes = new String[]{"firefox.exe", "firefox-bin.exe", "firefox-esr.exe", "waterfox.exe", "waterfox-bin.exe", "librewolf.exe"};
|
||||
};
|
||||
String[] exes = new String[]{
|
||||
"firefox.exe",
|
||||
"firefox-bin.exe",
|
||||
"firefox-esr.exe",
|
||||
"waterfox.exe",
|
||||
"waterfox-bin.exe",
|
||||
"librewolf.exe",
|
||||
};
|
||||
String[] exePath = new String[path.length * exes.length];
|
||||
int i = 0;
|
||||
for (String s : path) {
|
||||
for (String exe : exes) {
|
||||
exePath[i] = s + exe;
|
||||
exePath[i] = s + "\\" + exe;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
@ -185,7 +208,7 @@ public class I2PFirefox {
|
||||
return "Unknown";
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Check our list of firefox paths for a valid firefox binary.
|
||||
* Just an existence check for now, but should check versions
|
||||
* in the future.
|
||||
@ -199,13 +222,15 @@ public class I2PFirefox {
|
||||
for (String firefox : firefoxes) {
|
||||
File firefoxFile = new File(firefox);
|
||||
if (firefoxFile.exists()) {
|
||||
System.out.println("Found valid firefox at " + firefox);
|
||||
validFirefoxes.add(firefox);
|
||||
}
|
||||
System.out.println("firefox at " + firefox + "does not exist");
|
||||
}
|
||||
return validFirefoxes.toArray(new String[validFirefoxes.size()]);
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Return the best available Firefox from the list of Firefoxes we have.
|
||||
*
|
||||
* @return the path to the best available Firefox, or null if none are found.
|
||||
@ -231,7 +256,7 @@ public class I2PFirefox {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* 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.
|
||||
@ -250,7 +275,7 @@ public class I2PFirefox {
|
||||
return topFirefox();
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Build a ProcessBuilder for the top Firefox binary and
|
||||
* the default profile.
|
||||
*
|
||||
@ -262,7 +287,54 @@ public class I2PFirefox {
|
||||
return processBuilder(new String[]{});
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* * Build a ProcessBuilder for the top Firefox binary and
|
||||
* the default profile.
|
||||
*
|
||||
* @param args the args to pass to the Firefox binary
|
||||
* @return a ProcessBuilder for the top Firefox binary and
|
||||
* the default profile.
|
||||
*/
|
||||
public ProcessBuilder defaultProcessBuilder(String[] args) {
|
||||
return processBuilder(args);
|
||||
}
|
||||
|
||||
/**
|
||||
* Build a ProcessBuilder for the top Firefox binary and
|
||||
* the default profile. Pass the --private-window flag to
|
||||
* open a private window.
|
||||
*
|
||||
* @param args the arguments to pass to the Firefox binary.
|
||||
* @return a ProcessBuilder for the top Firefox binary and
|
||||
* the default profile.
|
||||
* @since 0.0.1
|
||||
*/
|
||||
public ProcessBuilder privateProcessBuilder() {
|
||||
return processBuilder(new String[]{"--private-window"});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* * Build a ProcessBuilder for the top Firefox binary and
|
||||
* the default profile. Pass the --private-window flag to
|
||||
* open a private window.
|
||||
*
|
||||
* @param args the arguments to pass to the Firefox binary
|
||||
* @return a ProcessBuilder for the top Firefox binary and
|
||||
* the default profile.
|
||||
*/
|
||||
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);
|
||||
}
|
||||
}
|
||||
return processBuilder(argList.toArray(new String[argList.size()]));
|
||||
}
|
||||
|
||||
/**
|
||||
* Build a ProcessBuilder for the top Firefox binary and
|
||||
* the default profile, with a specific set of extended
|
||||
* arguments.
|
||||
@ -279,16 +351,19 @@ public class I2PFirefox {
|
||||
newArgs[0] = firefox;
|
||||
newArgs[1] = "--profile";
|
||||
newArgs[2] = I2PFirefoxProfileBuilder.profileDirectory();
|
||||
for (int i = 0; i < args.length; i++) {
|
||||
newArgs[i+3] = args[i];
|
||||
if (args != null && args.length > 0) {
|
||||
for (int i = 0; i < args.length; i++) {
|
||||
newArgs[i+3] = args[i];
|
||||
}
|
||||
}
|
||||
return new ProcessBuilder(newArgs).directory(I2PFirefoxProfileBuilder.runtimeDirectory(true));
|
||||
} else {
|
||||
System.out.println("No Firefox found.");
|
||||
return new ProcessBuilder(args);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Waits for an HTTP proxy on port 4444 to be ready.
|
||||
* Returns false on timeout of 200 seconds.
|
||||
*
|
||||
@ -299,7 +374,7 @@ public class I2PFirefox {
|
||||
return waitForProxy(DEFAULT_TIMEOUT);
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Waits for an HTTP proxy on port 4444 to be ready.
|
||||
* Returns false on timeout of the specified number of seconds.
|
||||
*
|
||||
@ -310,7 +385,7 @@ public class I2PFirefox {
|
||||
public boolean waitForProxy(int timeout) {
|
||||
return waitForProxy(timeout, 4444);
|
||||
}
|
||||
/*
|
||||
/**
|
||||
* Waits for an HTTP proxy on the specified port to be ready.
|
||||
* Returns false on timeout of the specified number of seconds.
|
||||
*
|
||||
@ -322,7 +397,7 @@ public class I2PFirefox {
|
||||
public boolean waitForProxy(int timeout, int port) {
|
||||
return waitForProxy(timeout, port, "localhost");
|
||||
}
|
||||
/*
|
||||
/**
|
||||
* Waits for an HTTP proxy on the specified port to be ready.
|
||||
* Returns false on timeout of the specified number of seconds.
|
||||
*
|
||||
@ -356,49 +431,123 @@ public class I2PFirefox {
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
public Process launchAndDetatch(boolean privateWindow, String[] url){
|
||||
if (waitForProxy()){
|
||||
String profileDirectory = I2PFirefoxProfileBuilder.profileDirectory();
|
||||
if (I2PFirefoxProfileChecker.validateProfileDirectory(profileDirectory)) {
|
||||
System.out.println("Valid profile directory: "+profileDirectory);
|
||||
} else {
|
||||
System.out.println("Invalid profile directory: "+profileDirectory+" rebuilding...");
|
||||
if (!I2PFirefoxProfileBuilder.copyBaseProfiletoProfile()) {
|
||||
System.out.println("Failed to rebuild profile directory: "+profileDirectory);
|
||||
return null;
|
||||
} else {
|
||||
System.out.println("Rebuilt profile directory: "+profileDirectory);
|
||||
}
|
||||
}
|
||||
ProcessBuilder pb;
|
||||
if (privateWindow) {
|
||||
pb = privateProcessBuilder(url);
|
||||
} else {
|
||||
pb = defaultProcessBuilder(url);
|
||||
}
|
||||
try{
|
||||
System.out.println(pb.command());
|
||||
p = pb.start();
|
||||
System.out.println("I2PFirefox");
|
||||
sleep(2000);
|
||||
return p;
|
||||
}catch(Throwable e){
|
||||
System.out.println(e);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @since 0.0.1
|
||||
* @param bool if true, the profile will be ephemeral(i.e. a --private-window profile).
|
||||
* @param String[] a list of URL's to pass to the browser window
|
||||
* @since 0.0.17
|
||||
*/
|
||||
public void launch(){
|
||||
String profileDirectory = I2PFirefoxProfileBuilder.profileDirectory();
|
||||
if (I2PFirefoxProfileChecker.validateProfileDirectory(profileDirectory)) {
|
||||
System.out.println("Valid profile directory: "+profileDirectory);
|
||||
} else {
|
||||
System.out.println("Invalid profile directory: "+profileDirectory+" rebuilding...");
|
||||
if (!I2PFirefoxProfileBuilder.copyBaseProfiletoProfile()) {
|
||||
System.out.println("Failed to rebuild profile directory: "+profileDirectory);
|
||||
return;
|
||||
} else {
|
||||
System.out.println("Rebuilt profile directory: "+profileDirectory);
|
||||
}
|
||||
}
|
||||
public void launch(boolean privateWindow, String[] url){
|
||||
if (waitForProxy()){
|
||||
ProcessBuilder pb = this.defaultProcessBuilder();
|
||||
Process p = null;
|
||||
p = launchAndDetatch(privateWindow, url);
|
||||
try{
|
||||
System.out.println(pb.command());
|
||||
p = pb.start();
|
||||
System.out.println("Waiting for I2PFirefox to close...");
|
||||
int exit = p.waitFor();
|
||||
System.out.println("I2PFirefox exited with value: "+exit);
|
||||
}catch(Exception e){
|
||||
System.out.println("Error: "+e.getMessage());
|
||||
}finally{
|
||||
System.out.println("I2PFirefox");
|
||||
try{
|
||||
System.out.println("Waiting for I2PFirefox to close...");
|
||||
p.waitFor();
|
||||
}catch(Exception e){
|
||||
System.out.println("Error: "+e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @param bool if true, the profile will be ephemeral(i.e. a --private-window profile).
|
||||
* @since 0.0.1
|
||||
*/
|
||||
public void launch(boolean privateWindow){
|
||||
launch(privateWindow, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @since 0.0.1
|
||||
*/
|
||||
public void launch(){
|
||||
launch(false);
|
||||
}
|
||||
|
||||
private static String ValidURL(String inUrl){
|
||||
String[] schemes = {"http", "https"};
|
||||
for (String scheme: schemes) {
|
||||
if (inUrl.startsWith(scheme)) {
|
||||
System.out.println("Valid URL: " + inUrl);
|
||||
return inUrl;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
boolean privateBrowsing = false;
|
||||
System.out.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));
|
||||
}
|
||||
}
|
||||
}
|
||||
System.out.println("I2PFirefox");
|
||||
I2PFirefox i2pFirefox = new I2PFirefox();
|
||||
i2pFirefox.launch();
|
||||
}
|
||||
i2pFirefox.launch(privateBrowsing, visitURL.toArray(new String[visitURL.size()]));
|
||||
}
|
||||
|
||||
private static void sleep(int millis) {
|
||||
try {
|
||||
Thread.sleep(millis);
|
||||
} catch (InterruptedException bad) {
|
||||
bad.printStackTrace();
|
||||
throw new RuntimeException(bad);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,6 +9,24 @@ import java.io.OutputStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
|
||||
/**
|
||||
* I2PFirefoxProfileBuilder.java
|
||||
* Copyright (C) 2022 idk <hankhill19580@gmail.com>
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the MIT License. See LICENSE.md for details.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* I2PFirefoxProfileBuilder is a class that builds a profile directory which
|
||||
* contains the I2P browser profile for the Firefox browser family. It manages
|
||||
* the base profile directory and copies it's contents to the active profile
|
||||
* directory, which is actually used by Firefox.
|
||||
*
|
||||
* @author idk
|
||||
* @since 0.0.1
|
||||
*/
|
||||
public class I2PFirefoxProfileBuilder {
|
||||
private static boolean strict;
|
||||
|
||||
@ -17,7 +35,7 @@ public class I2PFirefoxProfileBuilder {
|
||||
return profileDir.getAbsolutePath();
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* get the profile directory, creating it if necessary
|
||||
*
|
||||
* @return the profile directory, or null if it could not be created
|
||||
@ -49,7 +67,7 @@ public class I2PFirefoxProfileBuilder {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* get the base profile directory, creating it if necessary
|
||||
*
|
||||
* @return the base profile directory, or null if it could not be created
|
||||
@ -71,7 +89,7 @@ public class I2PFirefoxProfileBuilder {
|
||||
return baseProfileDir(rtd);
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* get the runtime directory, creating it if create=true
|
||||
*
|
||||
* @param create if true, create the runtime directory if it does not exist
|
||||
@ -89,7 +107,7 @@ public class I2PFirefoxProfileBuilder {
|
||||
return new File(rtd);
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* get the correct runtime directory
|
||||
*
|
||||
* @return the runtime directory, or null if it could not be created or found
|
||||
@ -136,7 +154,7 @@ public class I2PFirefoxProfileBuilder {
|
||||
return "";
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Copy the inert base profile directory to the runtime profile directory
|
||||
*
|
||||
* @since 0.0.1
|
||||
@ -200,7 +218,7 @@ public class I2PFirefoxProfileBuilder {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Copy the strict options from the base profile to the profile
|
||||
*
|
||||
* @return true if successful, false otherwise
|
||||
@ -238,7 +256,7 @@ public class I2PFirefoxProfileBuilder {
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Construct a new Profile Builder
|
||||
*
|
||||
* @since 0.0.1
|
||||
@ -247,7 +265,7 @@ public class I2PFirefoxProfileBuilder {
|
||||
I2PFirefoxProfileBuilder.strict = false;
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Construct a new Profile Builder
|
||||
* @param strict if true, the strict overrides will be copied to the profile
|
||||
*
|
||||
|
@ -2,7 +2,27 @@ package net.i2p.i2pfirefox;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* I2PFirefoxProfileChecker.java
|
||||
* Copyright (C) 2022 idk <hankhill19580@gmail.com>
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the MIT License. See LICENSE.md for details.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* I2PFirefoxProfileChecker is a class that checks if the Firefox profile directory
|
||||
* exists and is valid.
|
||||
*
|
||||
* @author idk
|
||||
* @since 0.0.1
|
||||
*/
|
||||
public class I2PFirefoxProfileChecker {
|
||||
|
||||
/**
|
||||
* @param args unused
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
String profileDirectory = I2PFirefoxProfileBuilder.profileDirectory();
|
||||
if (profileDirectory == null) {
|
||||
@ -16,7 +36,14 @@ public class I2PFirefoxProfileChecker {
|
||||
} else {
|
||||
System.out.println("Profile directory is invalid");
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Return true if the profile directory is valid.
|
||||
*
|
||||
* @param profileDirectory the profile directory to check
|
||||
* @return true if the profile directory is valid, false otherwise
|
||||
* @since 0.0.1
|
||||
*/
|
||||
public static boolean validateProfileDirectory(String profileDirectory) {
|
||||
File profileDir = new File(profileDirectory);
|
||||
if (!profileDir.exists()) {
|
||||
@ -49,6 +76,13 @@ public class I2PFirefoxProfileChecker {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
/**
|
||||
* Return true if the file is valid.
|
||||
*
|
||||
* @param file the file to check
|
||||
* @return true if the file is valid, false otherwise
|
||||
* @since 0.0.1
|
||||
*/
|
||||
public static boolean validateFile(String file) {
|
||||
File f = new File(file);
|
||||
if (!f.exists()) {
|
||||
@ -69,6 +103,13 @@ public class I2PFirefoxProfileChecker {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
/**
|
||||
* Return true if the extension directory is valid.
|
||||
*
|
||||
* @param extensionDirectory the extension directory to check
|
||||
* @return true if the extension directory is valid, false otherwise
|
||||
* @since 0.0.1
|
||||
*/
|
||||
public static boolean validateExtensionDirectory(String extensionDirectory) {
|
||||
File extensionDir = new File(extensionDirectory);
|
||||
if (!extensionDir.exists()) {
|
||||
|
@ -7,6 +7,24 @@ import java.nio.file.StandardCopyOption;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipInputStream;
|
||||
|
||||
/**
|
||||
* I2PFirefoxProfileUnpacker.java
|
||||
* Copyright (C) 2022 idk <hankhill19580@gmail.com>
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the MIT License. See LICENSE.md for details.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* I2PFirefoxProfileUnpacker is a class that unpacks the I2P Firefox profile
|
||||
* from a zip file embedded in the `jar` file. The zip is unpacked to a base
|
||||
* directory where it is left untouched, and the base profile is copied to the
|
||||
* active profile directory.
|
||||
*
|
||||
* @author idk
|
||||
* @since 0.0.1
|
||||
*/
|
||||
public class I2PFirefoxProfileUnpacker {
|
||||
|
||||
public static void main(String[] args) {
|
||||
@ -18,7 +36,7 @@ public class I2PFirefoxProfileUnpacker {
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* unpack the profile directory
|
||||
*
|
||||
* @return true if the profile directory was successfully unpacked
|
||||
|
441
src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java
Normal file
@ -0,0 +1,441 @@
|
||||
package net.i2p.i2pfirefox;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.Socket;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Scanner;
|
||||
|
||||
/**
|
||||
* I2PChromiumProfileChecker.java
|
||||
* Copyright (C) 2022 idk <hankhill19580@gmail.com>
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the MIT License. See LICENSE.md for details.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* I2PGenericUnsafeBrowser is a wrapper which sets common environment
|
||||
* variables for the process controlled by a processbuilder.
|
||||
*
|
||||
* ALWAYS ALWAYS ALWAYS try the Firefox and Chromium specific launchers
|
||||
* first.
|
||||
*
|
||||
* @author idk
|
||||
* @since 0.0.18
|
||||
*/
|
||||
|
||||
public class I2PGenericUnsafeBrowser {
|
||||
private final int DEFAULT_TIMEOUT = 200;
|
||||
public static String BROWSER = "";
|
||||
private Process p = null;
|
||||
// Ideally, EVERY browser in this list should honor http_proxy, https_proxy, ftp_proxy and no_proxy.
|
||||
// in practice, this is going to be hard to guarantee. For now, we're just assuming. So don't use this until
|
||||
// I understand the situation better, unless you think you know better.
|
||||
private static final String[] browsers = {
|
||||
// This debian script tries everything in $BROWSER, then gnome-www-browser and x-www-browser
|
||||
// if X is running and www-browser otherwise. Those point to the user's preferred
|
||||
// browser using the update-alternatives system.
|
||||
"sensible-browser",
|
||||
// another one that opens a preferred browser
|
||||
"xdg-open",
|
||||
// Try x-www-browser directly
|
||||
"x-www-browser",
|
||||
"gnome-www-browser",
|
||||
// general graphical browsers that aren't Firefox or Chromium based
|
||||
"defaultbrowser", // puppy linux
|
||||
"dillo",
|
||||
"seamonkey",
|
||||
"konqueror",
|
||||
"galeon",
|
||||
"surf",
|
||||
// Text Mode Browsers only below here
|
||||
"www-browser",
|
||||
"links",
|
||||
"lynx"
|
||||
};
|
||||
|
||||
private static String getOperatingSystem() {
|
||||
String os = System.getProperty("os.name");
|
||||
if (os.startsWith("Windows")) {
|
||||
return "Windows";
|
||||
} else if (os.contains("Linux")) {
|
||||
return "Linux";
|
||||
} else if (os.contains("BSD")) {
|
||||
return "BSD";
|
||||
} else if (os.contains("Mac")) {
|
||||
return "Mac";
|
||||
}
|
||||
return "Unknown";
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtains the default browser for the Windows platform, which by now should be Edgium in
|
||||
* the worst-case scenario but in case it isn't, we can use this function to figure it out.
|
||||
* It can find:
|
||||
*
|
||||
* 1. The current user's HTTPS default browser if they configured it to be non-default
|
||||
* 2. The current user's HTTP default browser if they configured it to be non-default
|
||||
* 3. Edgium if it's available
|
||||
* 4. iexplore if it's not
|
||||
*
|
||||
* and it will return the first one we find in exactly that order.
|
||||
*
|
||||
* Adapted from:
|
||||
* https://stackoverflow.com/questions/15852885/method-returning-default-browser-as-a-string
|
||||
* and from:
|
||||
* https://github.com/i2p/i2p.i2p/blob/master/apps/systray/java/src/net/i2p/apps/systray/UrlLauncher.java
|
||||
*
|
||||
* @return path to the default browser ready for execution. Empty string on Linux and OSX.
|
||||
*/
|
||||
public static String getDefaultWindowsBrowser() {
|
||||
if (getOperatingSystem() == "Windows"){
|
||||
String defaultBrowser = getDefaultOutOfRegistry("HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\Shell\\Associations\\URLAssociations\\https\\UserChoice");
|
||||
if (defaultBrowser != "")
|
||||
return defaultBrowser;
|
||||
defaultBrowser = getDefaultOutOfRegistry("HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\Shell\\Associations\\URLAssociations\\http\\UserChoice");
|
||||
if (defaultBrowser != "")
|
||||
return defaultBrowser;
|
||||
defaultBrowser = getDefaultOutOfRegistry("HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\microsoft-edge\\shell\\open\\command");
|
||||
if (defaultBrowser != "")
|
||||
return defaultBrowser;
|
||||
defaultBrowser = getDefaultOutOfRegistry("HKEY_CLASSES_ROOT\\http\\shell\\open\\command");
|
||||
if (defaultBrowser != "")
|
||||
return defaultBrowser;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* obtains information out of the Windows registry.
|
||||
*
|
||||
* @param hkeyquery registry entry to ask for.
|
||||
* @return
|
||||
*/
|
||||
public static String getDefaultOutOfRegistry(String hkeyquery){
|
||||
if (getOperatingSystem() == "Windows"){
|
||||
try {
|
||||
// Get registry where we find the default browser
|
||||
Process process = Runtime.getRuntime().exec("REG QUERY " + hkeyquery);
|
||||
Scanner kb = new Scanner(process.getInputStream());
|
||||
while (kb.hasNextLine()) {
|
||||
String line = kb.nextLine();
|
||||
if (line.contains("(Default")){
|
||||
String[] splitLine = line.split(" ");
|
||||
kb.close();
|
||||
return splitLine[splitLine.length-1].replace("%1", "").replaceAll("\\s+$", "").replaceAll("\"", "");
|
||||
}
|
||||
}
|
||||
// Match wasn't found, still need to close Scanner
|
||||
kb.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
private static String scanAPath(String dir) {
|
||||
for (String browser : browsers) {
|
||||
File test = new File(dir, browser);
|
||||
if (test.exists()){
|
||||
return test.getAbsolutePath();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Find any browser in our list within a UNIX path
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String getAnyUnixBrowser() {
|
||||
// read the PATH environment variable and split it by ":"
|
||||
String[] path = System.getenv("PATH").split(":");
|
||||
if (path != null && path.length > 0){
|
||||
for (String p : path){
|
||||
String f = scanAPath(p);
|
||||
if (f != "") {
|
||||
return f;
|
||||
}
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Find any usable browser and output the whole path
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String findUnsafeBrowserAnywhere() {
|
||||
if (BROWSER != ""){
|
||||
File f = new File(BROWSER);
|
||||
if (f.exists())
|
||||
return f.getAbsolutePath();
|
||||
}
|
||||
|
||||
if (getOperatingSystem() == "Windows"){
|
||||
return getDefaultWindowsBrowser();
|
||||
}
|
||||
return getAnyUnixBrowser();
|
||||
}
|
||||
|
||||
//
|
||||
public ProcessBuilder baseProcessBuilder(String[] args) {
|
||||
String browser = findUnsafeBrowserAnywhere();
|
||||
if (!browser.isEmpty()) {
|
||||
String[] newArgs = new String[args.length+1];
|
||||
newArgs[0] = browser;
|
||||
if (args != null && args.length > 0) {
|
||||
for (int i = 0; i < args.length; i++) {
|
||||
newArgs[i+1] = args[i];
|
||||
}
|
||||
}
|
||||
ProcessBuilder pb = new ProcessBuilder(newArgs).directory(runtimeDirectory(true));
|
||||
pb.environment().put("http_proxy","http://127.0.0.1:4444");
|
||||
pb.environment().put("https_proxy","http://127.0.0.1:4444");
|
||||
pb.environment().put("ftp_proxy","http://127.0.0.1:0");
|
||||
pb.environment().put("all_proxy","http://127.0.0.1:4444");
|
||||
pb.environment().put("no_proxy","http://127.0.0.1:7657");
|
||||
pb.environment().put("HTTP_PROXY","http://127.0.0.1:4444");
|
||||
pb.environment().put("HTTPS_PROXY","http://127.0.0.1:4444");
|
||||
pb.environment().put("FTP_PROXY","http://127.0.0.1:0");
|
||||
pb.environment().put("ALL_PROXY","http://127.0.0.1:4444");
|
||||
pb.environment().put("NO_PROXY","http://127.0.0.1:7657");
|
||||
return pb;
|
||||
} else {
|
||||
System.out.println("No Browser found.");
|
||||
return new ProcessBuilder(args);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* delete the runtime directory
|
||||
*
|
||||
* @return true if successful, false if not
|
||||
*/
|
||||
public static boolean deleteRuntimeDirectory(){
|
||||
File rtd = runtimeDirectory(true);
|
||||
if (rtd.exists()) {
|
||||
rtd.delete();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* get the runtime directory, creating it if create=true
|
||||
*
|
||||
* @param create if true, create the runtime directory if it does not exist
|
||||
* @return the runtime directory, or null if it could not be created
|
||||
* @since 0.0.18
|
||||
*/
|
||||
public static File runtimeDirectory(boolean create) {
|
||||
String rtd = runtimeDirectory();
|
||||
File rtdFile = new File(rtd);
|
||||
if (create) {
|
||||
if (!rtdFile.exists()) {
|
||||
rtdFile.mkdir();
|
||||
}
|
||||
}
|
||||
return new File(rtd);
|
||||
}
|
||||
|
||||
/**
|
||||
* get the correct runtime directory
|
||||
*
|
||||
* @return the runtime directory, or null if it could not be created or found
|
||||
* @since 0.0.18
|
||||
*/
|
||||
public static String runtimeDirectory() {
|
||||
// get the I2P_BROWSER_DIR environment variable
|
||||
String rtd = System.getenv("I2P_BROWSER_DIR");
|
||||
// if it is not null and not empty
|
||||
if (rtd != null && !rtd.isEmpty()) {
|
||||
// check if the file exists
|
||||
File rtdFile = new File(rtd);
|
||||
if (rtdFile.exists()) {
|
||||
// if it does, return it
|
||||
return rtd;
|
||||
}
|
||||
}
|
||||
// obtain the PLUGIN environment variable
|
||||
String plugin = System.getenv("PLUGIN");
|
||||
if (plugin != null && !plugin.isEmpty()) {
|
||||
File pluginDir = new File(plugin);
|
||||
if (pluginDir.exists()) {
|
||||
return pluginDir.toString()+"/i2pbrowser";
|
||||
}
|
||||
}
|
||||
String userDir = System.getProperty("user.dir");
|
||||
if (userDir != null && !userDir.isEmpty()) {
|
||||
File userDir1 = new File(userDir);
|
||||
if (userDir1.exists()) {
|
||||
return userDir1.toString()+"/i2pbrowser";
|
||||
}
|
||||
}
|
||||
String homeDir = System.getProperty("user.home");
|
||||
if (homeDir != null && !homeDir.isEmpty()) {
|
||||
File homeDir1 = new File(homeDir+"/.i2p");
|
||||
if (homeDir1.exists()) {
|
||||
return homeDir.toString()+"/i2pbrowser";
|
||||
}
|
||||
File homeDir2 = new File(homeDir+"/i2p");
|
||||
if (homeDir2.exists()) {
|
||||
return homeDir2.toString()+"/i2pbrowser";
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Waits for an HTTP proxy on port 4444 to be ready.
|
||||
* Returns false on timeout of 200 seconds.
|
||||
*
|
||||
* @return true if the proxy is ready, false if it is not.
|
||||
* @since 0.0.18
|
||||
*/
|
||||
public boolean waitForProxy() {
|
||||
return waitForProxy(DEFAULT_TIMEOUT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Waits for an HTTP proxy on port 4444 to be ready.
|
||||
* Returns false on timeout of the specified number of seconds.
|
||||
*
|
||||
* @param timeout the number of seconds to wait for the proxy to be ready.
|
||||
* @return true if the proxy is ready, false if it is not.
|
||||
* @since 0.0.18
|
||||
*/
|
||||
public boolean waitForProxy(int timeout) {
|
||||
return waitForProxy(timeout, 4444);
|
||||
}
|
||||
/**
|
||||
* Waits for an HTTP proxy on the specified port to be ready.
|
||||
* Returns false on timeout of the specified number of seconds.
|
||||
*
|
||||
* @param timeout the number of seconds to wait for the proxy to be ready.
|
||||
* @param port the port to wait for the proxy to be ready on.
|
||||
* @return true if the proxy is ready, false if it is not.
|
||||
* @since 0.0.18
|
||||
*/
|
||||
public boolean waitForProxy(int timeout, int port) {
|
||||
return waitForProxy(timeout, port, "localhost");
|
||||
}
|
||||
|
||||
/**
|
||||
* Waits for an HTTP proxy on the specified port to be ready.
|
||||
* Returns false on timeout of the specified number of seconds.
|
||||
*
|
||||
* @param timeout the number of seconds to wait for the proxy to be ready.
|
||||
* @param port the port to wait for the proxy to be ready on.
|
||||
* @param host the host to wait for the proxy to be ready on.
|
||||
* @return true if the proxy is ready, false if it is not.
|
||||
* @since 0.0.18
|
||||
*/
|
||||
public boolean waitForProxy(int timeout, int port, String host) {
|
||||
for (int i = 0; i < timeout; i++) {
|
||||
if (checkifPortIsOccupied(port, host)) {
|
||||
return true;
|
||||
}
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public Process launchAndDetatch(boolean privateWindow, String[] url){
|
||||
if (waitForProxy()){
|
||||
ProcessBuilder pb;
|
||||
if (privateWindow) {
|
||||
pb = baseProcessBuilder(url);
|
||||
} else {
|
||||
pb = baseProcessBuilder(url);
|
||||
}
|
||||
try{
|
||||
System.out.println(pb.command());
|
||||
p = pb.start();
|
||||
System.out.println("I2PBrowser");
|
||||
sleep(2000);
|
||||
return p;
|
||||
}catch(Throwable e) {
|
||||
System.out.println(e);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void launch(boolean privateWindow, String[] url){
|
||||
if (waitForProxy()){
|
||||
p = launchAndDetatch(privateWindow, url);
|
||||
try{
|
||||
System.out.println("Waiting for I2PBrowser to close...");
|
||||
int exit = p.waitFor();
|
||||
if (privateWindow){
|
||||
if (deleteRuntimeDirectory())
|
||||
System.out.println("Private browsing enforced, deleting runtime directory");
|
||||
}
|
||||
System.out.println("I2PBrowser exited with value: "+exit);
|
||||
}catch(Exception e){
|
||||
System.out.println("Error: "+e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void sleep(int millis) {
|
||||
try {
|
||||
Thread.sleep(millis);
|
||||
} catch (InterruptedException bad) {
|
||||
bad.printStackTrace();
|
||||
throw new RuntimeException(bad);
|
||||
}
|
||||
}
|
||||
private static String ValidURL(String inUrl){
|
||||
String[] schemes = {"http", "https"};
|
||||
for (String scheme: schemes) {
|
||||
if (inUrl.startsWith(scheme)) {
|
||||
System.out.println("Valid URL: " + inUrl);
|
||||
return inUrl;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
private boolean checkifPortIsOccupied(int port, String host) {
|
||||
try {
|
||||
Socket socket = new Socket(host, port);
|
||||
socket.close();
|
||||
return true;
|
||||
} catch (IOException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
public static void main(String[] args) {
|
||||
boolean privateBrowsing = false;
|
||||
System.out.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));
|
||||
}
|
||||
}
|
||||
}
|
||||
System.out.println("I2PGenericUnsafeBrowser");
|
||||
I2PGenericUnsafeBrowser i2pBrowser = new I2PGenericUnsafeBrowser();
|
||||
i2pBrowser.launch(privateBrowsing, visitURL.toArray(new String[visitURL.size()]));
|
||||
}
|
||||
}
|
@ -22,29 +22,4 @@
|
||||
<url-pattern>/index.html</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>net.i2p.i2pfirefox.announce_jsp</servlet-name>
|
||||
<url-pattern>/announce.php</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>net.i2p.i2pfirefox.announce_jsp</servlet-name>
|
||||
<url-pattern>/announce</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>net.i2p.i2pfirefox.announce_jsp</servlet-name>
|
||||
<url-pattern>/a</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>net.i2p.i2pfirefox.scrape_jsp</servlet-name>
|
||||
<url-pattern>/scrape</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>net.i2p.i2pfirefox.scrape_jsp</servlet-name>
|
||||
<url-pattern>/scrape.php</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
</web-app>
|
||||
|
@ -1,8 +0,0 @@
|
||||
#! /usr/bin/env sh
|
||||
|
||||
GITHUB_USER=eyedeekay
|
||||
GITHUB_REPO=i2p.plugins.firefox
|
||||
ant distclean
|
||||
cd src && \
|
||||
ant && cd ../
|
||||
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PChromium
|
15
test-unsafe.sh
Executable file
@ -0,0 +1,15 @@
|
||||
#! /usr/bin/env sh
|
||||
|
||||
ant distclean
|
||||
ant jar
|
||||
|
||||
echo "Testing UNSAFE auto-selector with no private and no URL parameters."
|
||||
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PGenericUnsafeBrowser 2> gen.0.err 1> gen.0.log
|
||||
echo "Testing UNSAFE auto-selector with local URL parameter."
|
||||
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PGenericUnsafeBrowser "http://127.0.0.1:7657" 2> gen.1.err 1> gen.1.log
|
||||
echo "Testing UNSAFE auto-selector with remote URL parameter."
|
||||
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PGenericUnsafeBrowser "http://idk.i2p" 2> gen.2.err 1> gen.2.log
|
||||
echo "Testing UNSAFE auto-selector with private browsing parameter"
|
||||
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PGenericUnsafeBrowser -private "http://127.0.0.1:7657" 2> gen.3.err 1> gen.3.log
|
||||
|
||||
echo "UNSAFE browser tests complete"
|
66
test.sh
@ -1,8 +1,64 @@
|
||||
#! /usr/bin/env sh
|
||||
|
||||
GITHUB_USER=eyedeekay
|
||||
GITHUB_REPO=i2p.plugins.firefox
|
||||
ant distclean
|
||||
cd src && \
|
||||
ant && cd ../
|
||||
./i2pbrowser.cmd
|
||||
ant jar
|
||||
|
||||
rm -rf i2p.chromium.base.profile i2p.chromium.profile i2p.firefox.base.profile i2p.firefox.profile
|
||||
|
||||
echo "Testing auto-selector with no private and no URL parameters."
|
||||
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser 2> auto.0.err 1> auto.0.log
|
||||
echo "Testing auto-selector with local URL parameter."
|
||||
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser "http://127.0.0.1:7657" 2> auto.1.err 1> auto.1.log
|
||||
echo "Testing auto-selector with remote URL parameter."
|
||||
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser "http://idk.i2p" 2> auto.2.err 1> auto.2.log
|
||||
echo "Testing auto-selector with remote AND local URL parameter."
|
||||
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser "http://127.0.0.1:7657" "http://idk.i2p" 2> auto.3.err 1> auto.3.log
|
||||
echo "Testing auto-selector with private browsing parameter"
|
||||
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -private "http://127.0.0.1:7657" 2> auto.4.err 1> auto.4.log
|
||||
|
||||
echo "Auto-Selector tests completed"
|
||||
sleep 2s
|
||||
rm -rf i2p.chromium.base.profile i2p.chromium.profile
|
||||
|
||||
echo "Testing Chromium with no private and no URL parameters."
|
||||
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -chromium 2> chrome.1.err 1> chrome.1.log
|
||||
echo "Testing Chromium with local URL parameter."
|
||||
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -chromium "http://127.0.0.1:7657" 2> chrome.1.err 1> chrome.1.log
|
||||
echo "Testing Chromium with remote URL parameter."
|
||||
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -chromium "http://idk.i2p" 2> chrome.2.err 1> chrome.2.log
|
||||
echo "Testing Chromium with remote AND local URL parameter."
|
||||
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -chromium "http://127.0.0.1:7657" "http://idk.i2p" 2> fox.3.err 1> fox.3.log
|
||||
echo "Testing Chromium with private browsing parameter"
|
||||
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -chromium -private "http://127.0.0.1:7657" 2> chrome.4.err 1> chrome.4.log
|
||||
|
||||
echo "Chromium tests completed"
|
||||
sleep 2s
|
||||
rm -rf i2p.firefox.base.profile i2p.firefox.profile
|
||||
|
||||
echo "Testing Firefox with no private and no URL parameters."
|
||||
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -firefox 2> fox.0.err 1> fox.0.log
|
||||
echo "Testing Firefox with local URL parameter."
|
||||
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -firefox "http://127.0.0.1:7657" 2> fox.1.err 1> fox.1.log
|
||||
echo "Testing Firefox with remote URL parameter."
|
||||
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -firefox "http://idk.i2p" 2> fox.2.err 1> fox.2.log
|
||||
echo "Testing Firefox with remote AND local URL parameter."
|
||||
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -firefox "http://127.0.0.1:7657" "http://idk.i2p" 2> fox.3.err 1> fox.3.log
|
||||
echo "Testing Firefox with private browsing parameter"
|
||||
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PBrowser -firefox -private "http://127.0.0.1:7657" 2> fox.4.err 1> fox.4.log
|
||||
|
||||
echo "Firefox tests completed"
|
||||
sleep 2s
|
||||
rm -rf i2p.chromium.base.profile i2p.chromium.profile i2p.firefox.base.profile i2p.firefox.profile
|
||||
|
||||
echo "Testing UNSAFE auto-selector with no private and no URL parameters."
|
||||
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PGenericUnsafeBrowser 2> gen.0.err 1> gen.0.log
|
||||
echo "Testing UNSAFE auto-selector with local URL parameter."
|
||||
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PGenericUnsafeBrowser "http://127.0.0.1:7657" 2> gen.1.err 1> gen.1.log
|
||||
echo "Testing UNSAFE auto-selector with remote URL parameter."
|
||||
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PGenericUnsafeBrowser "http://idk.i2p" 2> gen.2.err 1> gen.2.log
|
||||
echo "Testing UNSAFE auto-selector with remote AND local URL parameter."
|
||||
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PGenericUnsafeBrowser "http://127.0.0.1:7657" "http://idk.i2p" 2> gen.3.err 1> gen.3.log
|
||||
echo "Testing UNSAFE auto-selector with private browsing parameter"
|
||||
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PGenericUnsafeBrowser -private "http://127.0.0.1:7657" 2> gen.4.err 1> gen.4.log
|
||||
|
||||
echo "UNSAFE browser tests complete"
|
||||
|