Compare commits

...

58 Commits
0.0.1 ... 0.0.6

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

10
.gitignore vendored
View File

@ -1,2 +1,10 @@
log
src/i2p.firefox.base.profile.zip
src/i2p.firefox.base.profile.zip
*.su3
*.xpi2p
*.zip
generated/
i2p.chromium.base.profile
i2p.firefox.base.profile
i2p.chromium/profile
i2p.firefox.profile

0
.nojekyll Normal file
View File

996
CHANGES.html Executable file
View File

@ -0,0 +1,996 @@
<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
</a>
</div>
</div>
</div>
<h2>
Mon, August 8
</h2>
<ul>
<li>
Add Chromium support. You heard me. Chromium support.
</li>
<li>
Update launcher script so it self-discovers the location of the script and uses that to find the bundled jar.
</li>
</ul>
<h2>
Sun, August 7
</h2>
<ul>
<li>
Wrote the Javadoc
</li>
<li>
Embedded the Firefox profile in the Jar so it always unpacks correctly
</li>
<li>
re-added Tor Browser support on Windows
</li>
<li>
Fix false positives in validation routine
</li>
<li>
Make constructors public
</li>
<li>
Wait on processbuilder to close
</li>
</ul>
<h2>
Saturday, August 6
</h2>
<ul>
<li>
Implemented firefox detection
</li>
<li>
Implemented directory setup
</li>
<li>
Implemented processBuilder generator
</li>
</ul>
<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>

22
CHANGES.md Normal file → Executable file
View File

@ -0,0 +1,22 @@
Mon, August 8
-------------
- Add Chromium support. You heard me. Chromium support.
- Update launcher script so it self-discovers the location of the script and uses that to find the bundled jar.
Sun, August 7
-------------
- Wrote the Javadoc
- Embedded the Firefox profile in the Jar so it always unpacks correctly
- re-added Tor Browser support on Windows
- Fix false positives in validation routine
- Make constructors public
- Wait on processbuilder to close
Saturday, August 6
------------------
- Implemented firefox detection
- Implemented directory setup
- Implemented processBuilder generator

1551
I2PChromium.html Normal file

File diff suppressed because it is too large Load Diff

246
I2PChromium.md Normal file
View File

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

File diff suppressed because it is too large Load Diff

View File

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

File diff suppressed because it is too large Load Diff

View File

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

File diff suppressed because it is too large Load Diff

View File

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

1551
I2PFirefox.html Normal file

File diff suppressed because it is too large Load Diff

246
I2PFirefox.md Normal file
View File

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

File diff suppressed because it is too large Load Diff

161
I2PFirefoxProfileBuilder.md Normal file
View File

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

File diff suppressed because it is too large Load Diff

View File

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

File diff suppressed because it is too large Load Diff

View File

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

1829
LICENSE.html Executable file

File diff suppressed because it is too large Load Diff

0
LICENSE.md Normal file → Executable file
View File

24
README.md Normal file → Executable file
View File

@ -11,18 +11,32 @@ To generate that, you can either generate the full plugin, which will not work b
produces the jar as a by-product, or you can:
```sh
cd src
ant
cd ...
cd ..
```
To build just the jar. You'll know it worked if you can:
```sh
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PFirefox
```
and a new Firefox instance comes up with a fresh profile. This is just a default Firefox
profile, configuring it for I2P requires you to put a pre-configured Firefox profile into
the `i2p.firefox.base.profile` directory or otherwise supply a static, pre-configured
profile.
and a new Firefox instance comes up with a fresh profile, ready-to-use for I2P browsing.
The cooler thing you can do with it is add it to an I2P distribution and somewhere in it,
add a UI element that triggers something along the lines of this:
```java
if (i2pIsRunning()) {
logger.warning("I2P is already running");
System.out.println("I2PFirefox");
I2PFirefox i2pFirefox = new I2PFirefox();
i2pFirefox.launch();
}
```
to add a browser management tool to it.

37
build.xml Normal file → Executable file
View File

@ -2,12 +2,16 @@
<project basedir="." default="all" name="i2pfirefox">
<property file="override.properties"/>
<target name="all" depends="clean,i2pFirefoxBaseProfileZip,plugin" />
<target name="all" depends="clean,i2pFirefoxBaseProfileZip,i2pChromiumBaseProfileZip,plugin" />
<target name="war" >
<ant dir="src" target="build" />
</target>
<target name="jar" >
<ant dir="src" target="jar" />
</target>
<target name="i2pFirefoxBaseProfileZip">
<exec executable="rm" failonerror="false" dir="src">
<arg value="-rf" />
@ -20,6 +24,32 @@
</exec>
</target>
<target name="i2pChromiumBaseProfileZip">
<exec executable="rm" failonerror="false" dir="src">
<arg value="-rf" />
<arg value="i2p.chromium.base.profile.zip" />
</exec>
<exec executable="zip" failonerror="true" dir="src">
<arg value="-r"/>
<arg value="i2p.chromium.base.profile.zip"/>
<arg value="i2p.chromium.base.profile"/>
</exec>
</target>
<target name="freeZip" depends="jar">
<exec executable="rm" failonerror="false" dir="src">
<arg value="-rf" />
<arg value="i2pbrowser.zip" />
</exec>
<exec executable="zip" failonerror="true">
<arg value="-r"/>
<arg value="src/build/i2pfirefox.jar"/>
<arg value="i2pbrowser.cmd"/>
<arg value="LICENSE.md"/>
<arg value="README.md"/>
</exec>
</target>
<target name="plugin" depends="war">
<delete>
<!-- in installer but not update -->
@ -28,7 +58,7 @@
<delete dir="plugin/eepsite/docroot/torrents/" />
<!-- get version number -->
<buildnumber file="scripts/build.number" />
<property name="release.number" value="0.0.1" />
<property name="release.number" value="0.0.6" />
<!-- make the update xpi2p -->
<!-- this contains everything except i2ptunnel.config -->
@ -94,6 +124,9 @@
<delete dir="i2p.firefox.base.profile" />
<delete dir="i2p.firefox.profile" />
<delete dir="src/i2p.firefox.profile.zip" />
<delete dir="i2p.chromium.base.profile" />
<delete dir="i2p.chromium.profile" />
<delete dir="src/i2p.chromium.profile.zip" />
<delete file="plugin/i2ptunnel.config" />
<delete file="plugin/plugin.config" />
<delete file="plugin/i2pfirefox.config" />

3
i2pbrowser.cmd Executable file
View File

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

BIN
i2plogo.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

994
index.html Executable file
View File

@ -0,0 +1,994 @@
<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
</a>
</div>
</div>
</div>
<h1>
i2p.plugins.firefox
</h1>
<p>
A port of the batch scripts from i2p.firefox to Java.
</p>
<h2>
Getting started
</h2>
<h3>
Building
</h3>
<p>
This is not actually a plugin yet, but it will be soon. The important bit is the jar.
To generate that, you can either generate the full plugin, which will not work but
produces the jar as a by-product, or you can:
</p>
<pre><code>
cd src
ant
cd ..
</code></pre>
<p>
To build just the jar. Youll know it worked if you can:
</p>
<pre><code>
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PFirefox
</code></pre>
<p>
and a new Firefox instance comes up with a fresh profile, ready-to-use for I2P browsing.
</p>
<p>
The cooler thing you can do with it is add it to an I2P distribution and somewhere in it,
add a UI element that triggers something along the lines of this:
</p>
<pre><code>
if (i2pIsRunning()) {
logger.warning(&#34;I2P is already running&#34;);
System.out.println(&#34;I2PFirefox&#34;);
I2PFirefox i2pFirefox = new I2PFirefox();
i2pFirefox.launch();
}
</code></pre>
<p>
to add a browser management tool to it.
</p>
<div>
<a href="#show">
Show license
</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>

10
javadoc.sh Executable file
View File

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

29
release.sh Executable file
View File

@ -0,0 +1,29 @@
#! /usr/bin/env sh
GITHUB_USER=eyedeekay
GITHUB_REPO=i2p.plugins.firefox
GITHUB_NAME="With a launcher script so you can run it without typing the full java command"
GITHUB_DESCRIPTION=$(cat CHANGES.md)
GITHUB_TAG=0.0.6
ant distclean
ant jar freeZip
github-release release --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \
--name "${GITHUB_NAME}" \
--description "${GITHUB_DESCRIPTION}" \
--tag "${GITHUB_TAG}"
sleep 2s
github-release upload --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \
--tag "${GITHUB_TAG}" \
--name "i2pfirefox.jar" \
--file "src/build/i2pfirefox.jar" \
--replace
github-release upload --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \
--tag "${GITHUB_TAG}" \
--name "i2pfirefox.zip" \
--file "i2pfirefox.zip" \
--replace
git pull github --tags
git push --all

172
report.log Normal file
View File

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

View File

@ -1,3 +1,3 @@
#Build Number for ANT. Do not edit!
#Sun Aug 07 19:34:07 EDT 2022
build.number=84
#Sun Aug 07 20:17:38 EDT 2022
build.number=85

10
showhider.css Normal file
View File

@ -0,0 +1,10 @@
/* edgar showhider CSS file */
#show {display:none; }
#hide {display:block; }
#show:target {display: block; }
#hide:target {display: none; }
#shownav {display:none; }
#hidenav {display:block; }
#shownav:target {display: block; }
#hidenav:target {display: none; }

View File

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

View File

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

View File

@ -0,0 +1,446 @@
package net.i2p.i2pfirefox;
import java.io.File;
import java.io.IOException;
import java.net.Socket;
import java.util.ArrayList;
public class I2PChromium {
private final String[] CHROMIUM_SEARCH_PATHS = CHROMIUM_FINDER();
private final int DEFAULT_TIMEOUT = 200;
/*
* Construct an I2PChromium class which manages an instance of Chromium and
* an accompanying Chromium profile. This version includes Chromium variants
* and forks.
*
* @since 0.0.1
*/
public I2PChromium() {
for (String path : CHROMIUM_SEARCH_PATHS) {
File f = new File(path);
if (f.exists()) {
System.out.println("Found Chromium at " + path);
return;
}
}
}
private static String[] FIND_CHROMIUM_SEARCH_PATHS_UNIX(){
String[] path = new String[]{"/usr/bin", "/usr/local/bin", "/opt/chrome/bin","/snap/bin"};
String[] exes = new String[]{"ungoogled-chromium", "chromium", "brave", "edge", "ungoogled-chromium", "chrome"};
String[] exePath = new String[path.length * exes.length];
int i = 0;
for (String s : path) {
for (String exe : exes) {
exePath[i] = s + "/" + exe;
i++;
}
}
return exePath;
}
private static String[] FIND_CHROMIUM_SEARCH_PATHS_OSX() {
String[] path = new String[]{"/Applications/Chromium.app/Contents/MacOS/", "/Applications/Waterfox.app/Contents/MacOS/", "/Applications/Librewolf.app/Contents/MacOS/"};
String[] exes = new String[]{"ungoogled-chromium", "chromium", "brave", "edge", "ungoogled-chromium", "chrome"};
String[] exePath = new String[path.length * exes.length];
int i = 0;
for (String s : path) {
for (String exe : exes) {
exePath[i] = s + "/" + exe;
i++;
}
}
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[]{
new File(localAppData, "/Google/Chrome/Application/").toString(),
new File(programFiles, "/Google/Chrome/Application/").toString(),
new File(programFiles86, "/Google/Chrome/Application/").toString(),
new File(localAppData, "/Chromium/Application/").toString(),
new File(programFiles, "/Chromium/Application/").toString(),
new File(programFiles86, "/Chromium/Application/").toString(),
new File(localAppData, "/BraveSoftware/Brave Browser/Application/").toString(),
new File(programFiles, "/BraveSoftware/Brave Browser/Application/").toString(),
new File(programFiles86, "/BraveSoftware/Brave Browser/Application/").toString(),
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[] exePath = new String[path.length * exes.length];
int i = 0;
for (String s : path) {
for (String exe : exes) {
exePath[i] = s + exe;
i++;
}
}
return exePath;
}
private static String[] FIND_ALL_CHROMIUM_SEARCH_PATHS() {
String[] Unix = FIND_CHROMIUM_SEARCH_PATHS_UNIX();
String[] Windows = FIND_CHROMIUM_SEARCH_PATHS_WINDOWS();
String[] Mac = FIND_CHROMIUM_SEARCH_PATHS_OSX();
String[] exePath = new String[Unix.length + Windows.length + Mac.length];
int i = 0;
for (String s : Unix) {
exePath[i] = s;
i++;
}
for (String s : Windows) {
exePath[i] = s;
i++;
}
for (String s : Mac) {
exePath[i] = s;
i++;
}
return exePath;
}
private static String[] FIND_CHROMIUM_SEARCH_PATHS() {
switch (getOperatingSystem()) {
case "Windows":
return FIND_CHROMIUM_SEARCH_PATHS_WINDOWS();
case "Linux":
return FIND_CHROMIUM_SEARCH_PATHS_UNIX();
case "Mac":
return FIND_CHROMIUM_SEARCH_PATHS_OSX();
case "BSD":
return FIND_CHROMIUM_SEARCH_PATHS_UNIX();
default:
return FIND_ALL_CHROMIUM_SEARCH_PATHS();
}
}
private static String[] NEARBY_CHROMIUM_SEARCH_PATHS() {
// obtain the PLUGIN environment variable
String plugin = System.getenv("PLUGIN");
// search the plugin directory for anything named "ungoogled-chromium", "chromium", "brave", "edge", "ungoogled-chromium", "chrome"
// up to a depth of 2 directories deep.
// list the directories in the plugin directory
if (plugin != null && !plugin.isEmpty()){
File pluginDir = new File(plugin);
if (pluginDir.exists()) {
File[] pluginDirs = pluginDir.listFiles();
// list the files in the plugin directory
for (File pluginDir1 : pluginDirs) {
File[] pluginFiles = pluginDir1.listFiles();
// list the files in the plugin directory
if (pluginFiles != null){
for (File pluginFile : pluginFiles) {
if (pluginFile.getName().equals("ungoogled-chromium") || pluginFile.getName().equals("chromium") || pluginFile.getName().equals("brave") || pluginFile.getName().equals("edge") || pluginFile.getName().equals("ungoogled-chromium") || pluginFile.getName().equals("chrome")) {
return new String[]{pluginFile.getAbsolutePath()};
}
}
}
}
}
}
// now, do the same thing, but with user.dir instead of plugin
// list the directories in the user.dir directory
File userDir = new File(System.getProperty("user.dir"));
if (userDir.exists()) {
File[] userDirs = userDir.listFiles();
// list the files in the user.dir directory
for (File userDir1 : userDirs) {
File[] userFiles = userDir1.listFiles();
// list the files in the user.dir directory
if (userFiles != null){
for (File userFile : userFiles) {
if (userFile.getName().equals("ungoogled-chromium") || userFile.getName().equals("chromium") || userFile.getName().equals("brave") || userFile.getName().equals("edge") || userFile.getName().equals("ungoogled-chromium") || userFile.getName().equals("chrome")) {
return new String[]{userFile.getAbsolutePath()};
}
}
}
}
}
return new String[]{};
}
private static String[] CHROMIUM_FINDER() {
String[] nearby = NEARBY_CHROMIUM_SEARCH_PATHS();
String[] all = FIND_CHROMIUM_SEARCH_PATHS();
if (nearby != null && nearby.length > 0) {
return nearby;
} else if (all != null && all.length > 0) {
return all;
} else {
return new String[]{};
}
}
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";
}
/*
* Check our list of chrome paths for a valid chrome binary.
* Just an existence check for now, but should check versions
* in the future.
*
* @return a list of usable Chromiums, or an empty list if none are found.
* @since 0.0.1
*/
public String[] onlyValidChromiums() {
String[] chromees = CHROMIUM_FINDER();
ArrayList<String> validChromiums = new ArrayList<String>();
for (String chrome : chromees) {
File chromeFile = new File(chrome);
if (chromeFile.exists()) {
validChromiums.add(chrome);
}
}
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.
* @since 0.0.1
*/
public String topChromium() {
// get the CHROMIUM environment variable
String chrome = System.getenv("CHROMIUM");
// if it is not null and not empty
if (chrome != null && !chrome.isEmpty()) {
// check if the file exists
File chromeFile = new File(chrome);
if (chromeFile.exists()) {
// if it does, return it
return chrome;
}
}
String[] chromees = onlyValidChromiums();
if (chromees.length > 0) {
return chromees[0];
} else {
return "";
}
}
/*
* 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.
*
* @param override the path to a valid Chromium binary to use.
* @return the path to the best available Chromium, or null if none are found.
* @since 0.0.1
*/
public String topChromium(String overrideChromium) {
if (overrideChromium != null && !overrideChromium.isEmpty()) {
File chromeFile = new File(overrideChromium);
if (chromeFile.exists()) {
return overrideChromium;
}
}
return topChromium();
}
/*
* Build a ProcessBuilder for the top Chromium binary and
* the default profile.
*
* @return a ProcessBuilder for the top Chromium binary and
* the default profile.
* @since 0.0.1
*/
public ProcessBuilder defaultProcessBuilder() {
return processBuilder(new String[]{});
}
/*
1 --user-data-dir="$CHROMIUM_I2P" \
2 --proxy-server="http://127.0.0.1:4444" \
3 --proxy-bypass-list=127.0.0.1:7657 \
4 --user-data-dir=$HOME/WebApps/i2padmin \
5 --safebrowsing-disable-download-protection \
6 --disable-client-side-phishing-detection \
7 --disable-3d-apis \
8 --disable-accelerated-2d-canvas \
9 --disable-remote-fonts \
10 --disable-sync-preferences \
11 --disable-sync \
12 --disable-speech \
13 --disable-webgl \
14 --disable-reading-from-canvas \
15 --disable-gpu \
16 --disable-32-apis \
17 --disable-auto-reload \
18 --disable-background-networking \
19 --disable-d3d11 \
20 --disable-file-system \
*/
/*
* Build a ProcessBuilder for the top Chromium binary and
* the default profile, with a specific set of extended
* arguments.
*
* @param args the extended arguments to pass to the Chromium binary.
* @return a ProcessBuilder for the top Chromium binary and
* default profile, with a specific set of extended arguments.
* @since 0.0.1
*/
public ProcessBuilder processBuilder(String[] args) {
String chrome = topChromium();
if (!chrome.isEmpty()) {
String[] newArgs = new String[args.length+19];
newArgs[0] = chrome;
newArgs[1] = "--user-data-dir="+I2PChromiumProfileBuilder.profileDirectory();
newArgs[2] = "--proxy-server=http://127.0.0.1:4444";
newArgs[3] = "--proxy-bypass-list=http://localhost:7657";
newArgs[4] = "--safebrowsing-disable-download-protection";
newArgs[5] = "--disable-client-side-phishing-detection";
newArgs[6] = "--disable-3d-apis";
newArgs[7] = "--disable-accelerated-2d-canvas";
newArgs[8] = "--disable-remote-fonts";
newArgs[9] = "--disable-sync-preferences";
newArgs[10] = "--disable-sync";
newArgs[11] = "--disable-speech";
newArgs[12] = "--disable-webgl";
newArgs[13] = "--disable-reading-from-canvas";
newArgs[14] = "--disable-gpu";
newArgs[15] = "--disable-auto-reload";
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];
}
return new ProcessBuilder(newArgs).directory(I2PChromiumProfileBuilder.runtimeDirectory(true));
} else {
return new ProcessBuilder(args);
}
}
/*
* Waits for an HTTP proxy on port 4444 to be ready.
* Returns false on timeout of 200 seconds.
*
* @return true if the proxy is ready, false if it is not.
* @since 0.0.1
*/
public boolean waitForProxy() {
return waitForProxy(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.1
*/
public boolean waitForProxy(int timeout) {
return waitForProxy(timeout, 4444);
}
/*
* Waits for an HTTP proxy on the specified port to be ready.
* Returns false on timeout of the specified number of seconds.
*
* @param timeout the number of seconds to wait for the proxy to be ready.
* @param port the port to wait for the proxy to be ready on.
* @return true if the proxy is ready, false if it is not.
* @since 0.0.1
*/
public boolean waitForProxy(int timeout, int port) {
return waitForProxy(timeout, port, "localhost");
}
/*
* Waits for an HTTP proxy on the specified port to be ready.
* Returns false on timeout of the specified number of seconds.
*
* @param timeout the number of seconds to wait for the proxy to be ready.
* @param port the port to wait for the proxy to be ready on.
* @param host the host to wait for the proxy to be ready on.
* @return true if the proxy is ready, false if it is not.
* @since 0.0.1
*/
public boolean waitForProxy(int timeout, int port, String host) {
for (int i = 0; i < timeout; i++) {
if (checkifPortIsOccupied(port, host)) {
return true;
}
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
return false;
}
private boolean checkifPortIsOccupied(int port, String host) {
try {
Socket socket = new Socket(host, port);
socket.close();
return true;
} catch (IOException e) {
return false;
}
}
/*
* 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.
*
* @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());
}
}
}
}
public static void main(String[] args) {
System.out.println("I2PChromium");
I2PChromium i2pChromium = new I2PChromium();
i2pChromium.launch();
}
}

View File

@ -0,0 +1,259 @@
package net.i2p.i2pfirefox;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
public class I2PChromiumProfileBuilder {
private static boolean strict;
private static String profileDir(String file) {
File profileDir = new File(file, "i2p.chromium.profile");
return profileDir.getAbsolutePath();
}
/*
* get the profile directory, creating it if necessary
*
* @return the profile directory, or null if it could not be created
*/
public static String profileDirectory() {
String pd = System.getenv("I2P_FIREFOX_PROFILE");
if (pd != null && !pd.isEmpty()) {
File pdf = new File(pd);
if (pdf.exists() && pdf.isDirectory()) {
return pd;
}
}
String rtd = runtimeDirectory();
return profileDir(rtd);
}
private static String baseProfileDir(String file) {
File profileDir = new File(file, "i2p.chromium.base.profile");
// make sure the directory exists
if (profileDir.exists()) {
return profileDir.getAbsolutePath();
} else {
// create the directory
I2PChromiumProfileUnpacker unpacker = new I2PChromiumProfileUnpacker();
if (!unpacker.unpackProfile(profileDir.getAbsolutePath())) {
return null;
}
return profileDir.getAbsolutePath();
}
}
/*
* get the base profile directory, creating it if necessary
*
* @return the base profile directory, or null if it could not be created
*/
public static String baseProfileDirectory() {
String pd = System.getenv("I2P_FIREFOX_BASE_PROFILE");
if (pd != null && !pd.isEmpty()) {
File pdf = new File(pd);
if (pdf.exists() && pdf.isDirectory()) {
return pd;
}else{
I2PChromiumProfileUnpacker unpacker = new I2PChromiumProfileUnpacker();
if (!unpacker.unpackProfile(pdf.getAbsolutePath())) {
return null;
}
}
}
String rtd = runtimeDirectory();
return baseProfileDir(rtd);
}
/*
* get the runtime directory, creating it if create=true
*
* @param create if true, create the runtime directory if it does not exist
* @return the runtime directory, or null if it could not be created
* @since 0.0.1
*/
public static File runtimeDirectory(boolean create) {
String rtd = runtimeDirectory();
File rtdFile = new File(rtd);
if (create) {
if (!rtdFile.exists()) {
rtdFile.mkdir();
}
}
return new File(rtd);
}
/*
* get the correct runtime directory
*
* @return the runtime directory, or null if it could not be created or found
* @since 0.0.1
*/
public static String runtimeDirectory() {
// get the I2P_FIREFOX_DIR environment variable
String rtd = System.getenv("I2P_FIREFOX_DIR");
// if it is not null and not empty
if (rtd != null && !rtd.isEmpty()) {
// check if the file exists
File rtdFile = new File(rtd);
if (rtdFile.exists()) {
// if it does, return it
return rtd;
}
}
// obtain the PLUGIN environment variable
String plugin = System.getenv("PLUGIN");
if (plugin != null && !plugin.isEmpty()) {
File pluginDir = new File(plugin);
if (pluginDir.exists()) {
return pluginDir.toString();
}
}
String userDir = System.getProperty("user.dir");
if (userDir != null && !userDir.isEmpty()) {
File userDir1 = new File(userDir);
if (userDir1.exists()) {
return userDir1.toString();
}
}
String homeDir = System.getProperty("user.home");
if (homeDir != null && !homeDir.isEmpty()) {
File homeDir1 = new File(homeDir+"/.i2p");
if (homeDir1.exists()) {
return homeDir.toString();
}
File homeDir2 = new File(homeDir+"/i2p");
if (homeDir2.exists()) {
return homeDir2.toString();
}
}
return "";
}
/*
* Copy the inert base profile directory to the runtime profile directory
*
* @since 0.0.1
*/
public static boolean copyBaseProfiletoProfile() {
String baseProfile = baseProfileDirectory();
String profile = profileDirectory();
System.out.println("Copying base profile to profile directory: " + baseProfile + " -> " + profile);
if (baseProfile.isEmpty() || profile.isEmpty()) {
return false;
}
File baseProfileDir = new File(baseProfile);
File profileDir = new File(profile);
try {
System.out.println("Copying base profile to profile directory");
copyDirectory(baseProfileDir, profileDir);
} catch (Exception e) {
System.out.println("Error copying base profile to profile"+e);
return false;
}
System.out.println("Copied base profile to profile directory");
// if user.js does not exist yet, make an empty one.
//if (!touch(profileDir.toString(), "user.js")) {
//return false;
//}
// if extensions does not exist yet, make an empty one.
//if (!mkExtensionsDir(profileDir.toString())){
//return false;
//}
return copyStrictOptions();
}
private static void copyDirectory(File sourceDirectory, File destinationDirectory) throws IOException {
destinationDirectory = new File(destinationDirectory.toString().replace("i2p.chromium.base.profile", ""));
if (!destinationDirectory.exists()) {
destinationDirectory.mkdir();
}
for (String f : sourceDirectory.list()) {
copyDirectoryCompatibityMode(new File(sourceDirectory, f), new File(destinationDirectory, f));
}
}
public static void copyDirectoryCompatibityMode(File source, File destination) throws IOException {
if (source.isDirectory()) {
copyDirectory(source, destination);
} else {
copyFile(source, destination);
}
}
private static void copyFile(File sourceFile, File destinationFile) throws IOException {
try (InputStream in = new FileInputStream(sourceFile);
OutputStream out = new FileOutputStream(destinationFile)) {
byte[] buf = new byte[1024];
int length;
while ((length = in.read(buf)) > 0) {
out.write(buf, 0, length);
}
}
}
/*
* Copy the strict options from the base profile to the profile
*
* @return true if successful, false otherwise
* @since 0.0.1
*/
public static boolean copyStrictOptions() {
if (!strict){
return true;
}
String baseProfile = baseProfileDirectory();
String profile = profileDirectory();
if (baseProfile.isEmpty() || profile.isEmpty()) {
return false;
}
File baseProfileDir = new File(baseProfile);
File profileDir = new File(profile);
if (!baseProfileDir.exists() || !profileDir.exists()) {
return false;
}
File baseOverrides = new File(baseProfile, "strict-overrides.js");
File userOverrides = new File(baseProfile, "user-overrides.js");
if (!baseOverrides.exists()) {
return false;
}
try {
Files.copy(baseOverrides.toPath(), userOverrides.toPath(), StandardCopyOption.REPLACE_EXISTING);
} catch (Exception e) {
System.out.println("Error copying base profile to profile"+e);
return false;
}
// if user-overrides.js does not exist yet, make an empty one.
//if (!touch(profileDir.toString(), "user-overrides.js")) {
//return false;
//}
return true;
}
/*
* Construct a new Profile Builder
*
* @since 0.0.1
*/
public I2PChromiumProfileBuilder() {
I2PChromiumProfileBuilder.strict = false;
}
/*
* Construct a new Profile Builder
* @param strict if true, the strict overrides will be copied to the profile
*
* @since 0.0.1
*/
public I2PChromiumProfileBuilder(boolean strict) {
I2PChromiumProfileBuilder.strict = strict;
}
}

View File

@ -0,0 +1,84 @@
package net.i2p.i2pfirefox;
import java.io.File;
public class I2PChromiumProfileChecker {
public static void main(String[] args) {
String profileDirectory = I2PChromiumProfileBuilder.profileDirectory();
if (profileDirectory == null) {
System.out.println("No profile directory found");
return;
}
System.out.println("Profile directory: " + profileDirectory);
boolean ok = validateProfileDirectory(profileDirectory);
if (ok) {
System.out.println("Profile directory is valid");
} else {
System.out.println("Profile directory is invalid");
}
}
public static boolean validateProfileDirectory(String profileDirectory) {
File profileDir = new File(profileDirectory);
if (!profileDir.exists()) {
System.out.println("Profile directory does not exist");
return false;
}
if (!profileDir.isDirectory()) {
System.out.println("Profile directory is not a directory");
return false;
}
if (!profileDir.canRead()) {
System.out.println("Profile directory is not readable");
return false;
}
if (!profileDir.canWrite()) {
System.out.println("Profile directory is not writable");
return false;
}
if (!validateExtensionDirectory(profileDir+"/extensions")){
System.out.println("extensions directory is invalid");
return false;
}
return true;
}
public static boolean validateFile(String file) {
File f = new File(file);
if (!f.exists()) {
System.out.println("User JavaScript file does not exist");
return false;
}
if (!f.isFile()) {
System.out.println("User JavaScript file is not a file");
return false;
}
if (!f.canRead()) {
System.out.println("User JavaScript file is not readable");
return false;
}
if (!f.canWrite()) {
System.out.println("User JavaScript file is not writable");
return false;
}
return true;
}
public static boolean validateExtensionDirectory(String extensionDirectory) {
File extensionDir = new File(extensionDirectory);
if (!extensionDir.exists()) {
System.out.println("Extension directory does not exist");
return false;
}
if (!extensionDir.isDirectory()) {
System.out.println("Extension directory is not a directory");
return false;
}
if (!extensionDir.canRead()) {
System.out.println("Extension directory is not readable");
return false;
}
if (!extensionDir.canWrite()) {
System.out.println("Extension directory is not writable");
return false;
}
return true;
}
}

View File

@ -0,0 +1,70 @@
package net.i2p.i2pfirefox;
import java.io.File;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
public class I2PChromiumProfileUnpacker {
public static void main(String[] args) {
String profileDirectory = I2PChromiumProfileBuilder.profileDirectory();
if (profileDirectory == null) {
System.out.println("No profile directory found");
return;
}
}
/*
* unpack the profile directory
*
* @return true if the profile directory was successfully unpacked
* @since 0.0.1
*/
public boolean unpackProfile(String profileDirectory) {
System.out.println("Unpacking base profile to " + profileDirectory);
try {
final InputStream resources = this.getClass().getClassLoader().getResourceAsStream("i2p.chromium.base.profile.zip");
if (resources == null) {
System.out.println("Could not find resources");
return false;
}
System.out.println(resources.toString());
// InputStream corresponds to a zip file. Unzip it.
//Files.copy(r, new File(profileDirectory).toPath(), StandardCopyOption.REPLACE_EXISTING);
ZipInputStream zis = new ZipInputStream(resources);
ZipEntry entry;
// while there are entries I process them
while ((entry = zis.getNextEntry()) != null)
{
System.out.println("entry: " + entry.getName() + ", " + entry.getSize());
// consume all the data from this entry
if (entry.isDirectory()) {
System.out.println("Creating directory: " + entry.getName());
File dir = new File(profileDirectory + "/" + entry.getName());
dir.mkdirs();
} else {
System.out.println("Creating file: " + entry.getName());
File file = new File(profileDirectory + "/" + entry.getName());
file.createNewFile();
Files.copy(zis, file.toPath(), StandardCopyOption.REPLACE_EXISTING);
}
while (zis.available() > 0)
zis.read();
// I could close the entry, but getNextEntry does it automatically
// zis.closeEntry()
}
// loop through the Enumeration
} catch (Exception e) {
System.out.println("Error copying profile files: " + e.getMessage());
return false;
}
return true;
}
}

View File

@ -16,7 +16,7 @@ public class I2PFirefox {
*
* @since 0.0.1
*/
I2PFirefox() {
public I2PFirefox() {
for (String path : FIREFOX_SEARCH_PATHS) {
File f = new File(path);
if (f.exists()) {
@ -54,7 +54,21 @@ public class I2PFirefox {
return exePath;
}
private static String[] FIND_FIREFOX_SEARCH_PATHS_WINDOWS() {
String[] path = new String[]{"C:/Program Files/Mozilla Firefox/", "C:/Program Files (x86)/Mozilla Firefox/", "C:/Program Files/Waterfox/", "C:/Program Files (x86)/Waterfox/", "C:/Program Files/Librewolf/"};
String userHome = System.getProperty("user.home");
String programFiles = System.getenv("ProgramFiles");
//String localAppData = System.getenv("LOCALAPPDATA");
//Is there some way Mozilla does adminless installs to LocalAppData? Don't know for sure.
String programFiles86 = System.getenv("ProgramFiles(x86)");
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[]{
new File(programFiles, "Mozilla Firefox/").toString(),
new File(programFiles86, "Mozilla Firefox/").toString(),
new File(programFiles, "Waterfox/").toString(),
new File(programFiles86, "Waterfox/").toString(),
new File(programFiles, "Librewolf/").toString(),
tbPath[0], tbPath[1]};
String[] exes = new String[]{"firefox.exe", "firefox-bin.exe", "firefox-esr.exe", "waterfox.exe", "waterfox-bin.exe", "librewolf.exe"};
String[] exePath = new String[path.length * exes.length];
int i = 0;
@ -364,13 +378,20 @@ public class I2PFirefox {
}
if (waitForProxy()){
ProcessBuilder pb = this.defaultProcessBuilder();
Process p = null;
try{
System.out.println(pb.command());
pb.start();
p = pb.start();
}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());
}
}
}
}

View File

@ -243,7 +243,7 @@ public class I2PFirefoxProfileBuilder {
*
* @since 0.0.1
*/
I2PFirefoxProfileBuilder() {
public I2PFirefoxProfileBuilder() {
I2PFirefoxProfileBuilder.strict = false;
}
@ -253,7 +253,7 @@ public class I2PFirefoxProfileBuilder {
*
* @since 0.0.1
*/
I2PFirefoxProfileBuilder(boolean strict) {
public I2PFirefoxProfileBuilder(boolean strict) {
I2PFirefoxProfileBuilder.strict = strict;
}
}

View File

@ -2,10 +2,8 @@ package net.i2p.i2pfirefox;
import java.io.File;
import java.io.InputStream;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
import java.util.Enumeration;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
@ -20,6 +18,12 @@ public class I2PFirefoxProfileUnpacker {
}
/*
* unpack the profile directory
*
* @return true if the profile directory was successfully unpacked
* @since 0.0.1
*/
public boolean unpackProfile(String profileDirectory) {
System.out.println("Unpacking base profile to " + profileDirectory);
try {

157
style.css Executable file
View File

@ -0,0 +1,157 @@
/* edgar default CSS file */
body {
font-family: "Roboto";
font-family: monospace;
text-align: justify;
background-color: #373636;
color: whitesmoke;
font-size: 1.15em;
}
ul {
width: 55%;
display: block;
}
ol {
width: 55%;
display: block;
}
li {
margin-top: 1%;
}
p {
max-width: 90%;
margin-top: 1%;
margin-left: 3%;
margin-right: 3%;
}
img {
float: left;
top: 5%;
left: 5%;
max-width: 60%;
display: inline;
}
.inline {
display: inline;
}
.link-button:focus {
outline: none;
}
.link-button:active {
color: red;
}
code {
font-family: monospace;
border-radius: 5%;
padding: 1%;
border-color: darkgray;
font-size: .9em;
}
a {
color: #C6D9FE;
padding: 1%;
}
ul li {
color: #C6D9FE;
}
iframe {
background: aliceblue;
border-radius: 15%;
margin: 2%;
}
.container {
width: 36vw;
height: 64vh;
display: inline-block;
margin: 0;
padding: 0;
}
.editor-toolbar a {
display: inline-block;
text-align: center;
text-decoration: none !important;
color: whitesmoke !important;
}
#feed {
width: 60vw;
height: unset !important;
margin: 0;
padding: 0;
float: right;
background-color: #373636;
color: whitesmoke;
border: #C6D9FE solid 1px;
}
.thread-post,
.thread {
color: whitesmoke !important;
background-color: #373636;
border: 1px solid darkgray;
font-size: inherit;
padding-top: 1%;
padding-bottom: 1%;
}
.thread-post {
margin-left: 4%;
}
input {
text-align: center;
color: whitesmoke !important;
background-color: #373636;
border: 1px solid darkgray;
font: normal normal normal 14px/1 FontAwesome;
font-size: inherit;
padding-top: 1%;
padding-bottom: 1%;
}
.thread-hash {
text-align: right;
color: whitesmoke !important;
background-color: #373636;
border: 1px solid darkgray;
font-size: inherit;
padding-top: 1%;
padding-bottom: 1%;
}
.post-body {
text-align: left;
color: whitesmoke !important;
font-size: inherit;
padding-top: 1%;
padding-bottom: 1%;
}
#show {display:none; }
#hide {display:block; }
#show:target {display: block; }
#hide:target {display: none; }
#shownav {display:none; }
#hidenav {display:block; }
#shownav:target {display: block; }
#hidenav:target {display: none; }
#navbar {
float: right;
width: 10%;
}

8
test-chromium.sh Executable file
View File

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

8
test.sh Executable file
View File

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