Files
i2p.firefox/README.md

252 lines
9.1 KiB
Markdown
Raw Normal View History

2022-08-27 11:31:04 -04:00
I2P Easy-Install Bundle for Windows(Also/formerly)I2P Browsing Profile for Firefox
==================================================================================
Features:
---------
2022-03-21 11:43:34 -04:00
- Automatically select an up-to-date, secure Firefox or Tor Browser(On Windows) variant
- Automatically configure a profile for I2P
- Automatically block-list all non-I2P local destinations
- Enable first-party isolation, anti-fingerprinting, letterboxing
- Automatically sandbox I2P, Non-I2P, and I2P-Application cookiestores
Build Dependencies:
-------------------
To build this, you will need the following software packages (all available in Debian) :
2022-03-21 11:43:34 -04:00
- make
- nsis
- dos2unix
- curl
- jq
In addition, you will need the NSIS plugin "ShellExecAsUser" which you can get from the
[NSIS Wiki Page](https://nsis.sourceforge.io/ShellExecAsUser_plug-in). In order to install
2022-02-23 13:42:24 -05:00
the plugin on Debian, Ubuntu, or using `WSL`, you can download the: [7zip release](https://nsis.sourceforge.io/mediawiki/images/6/68/ShellExecAsUser_amd64-Unicode.7z)
and copy the content of `Plugins` to `/usr/share/nsis/Plugins`.
```sh
cp -rv Plugins/* /usr/share/nsis/Plugins/
```
To build a Debian package, you'll also need
2022-03-21 11:43:34 -04:00
- checkinstall
Preparation
-----------
Before you build, run the targets
make clean-extensions
make extensions
to update the extensions to point to their latest versions.
Windows Build
-------------
After installing the dependencies and completing the preparations,
just run `make`. This will produce three files:
profile.tgz - the firefox profile, plus a shell script which will
launch it if Firefox is found in the $PATH on Unix-Like operating
systems.
app-profile.tgz - the Firefox profile plus a launcher shell script,
which will launch a *modified* Firefox without a URL bar as a router
console wrapper.
install.exe - the windows installer, which sets up shortcuts to
launch Firefox on Windows.
2022-05-20 12:56:59 -04:00
When generating a Windows build it's important to make sure that the
2022-05-20 13:02:30 -04:00
licenses for all the bundled softare are included. This should happen
2022-05-20 12:56:59 -04:00
automatically. When bundling software, describe the terms and where
they are applied in the `LICENSE.index`, then add the full license
to the `licenses` directory. Then, add the full license to the `cat`
command in the `build/licenses` make target. The build/licenses
target is run automatically during the build process.
2022-03-21 11:41:29 -04:00
Including a jpackaged I2P Router
--------------------------------
In order to include a jpackaged(dependency-free) I2P router in the Profile
Bundle you will need to build the jpackaged I2P router as an "App Image" on
a Windows system and place it into a directory called `I2P` in your `i2p.firefox`
checkout.
Assuming a working java and jpackage environment on your Windows system, the
following command should generate a suitable "App Image" in a directory
called "I2P."
export I2P_VERSION=0.9.49
cp -R ../i2p.i2p/pkg-temp/lib build/lib
jpackage --type app-image --name I2P --app-version "$I2P_VERSION" \
--verbose \
--resource-dir build/lib \
--input build/lib --main-jar router.jar --main-class net.i2p.router.RouterLaunch
Transfer the I2P directory to the machine where you build i2p.firefox if
necessary, then complete the regular build instructions. If a jpackaged I2P router
isn't present to use at build time, the inclusion will be skipped automatically
with a non-fatal warning.
In the near future, I'll start providing a pre-built app image to ease the
build process for non-Windows users.
End-to-End Windows build process using WSL
------------------------------------------
**If you've already done this once, you can just use:** `./build.sh && wsl make`
**in `git bash`** to automatically build an installer.
**Prerequisites:** You need to have OpenJDK 14 or greater installed and configured
with your `%JAVA_HOME%` environment variable configured and `%JAVA_HOME%/bin` on
your `%PATH%`. You need to have Apache Ant installed and configured with `%ANT_HOME%`
environment variable configured and `%ANT_HOME%/bin` on your `%PATH%`. You must have
Cygwin installed. You must have `NSIS.exe` installed and `makensis` available on your
`%PATH%`. You must have Git for Windows installed. When installing git for Windows,
you should select "Checkout as is, commit as is" and leave line-endings alone.
1. [Set up Windows Subsystem for Linux per Microsoft's instructions](https://docs.microsoft.com/en-us/windows/wsl/install-win10#manual-installation-steps)
2. [Install Ubuntu Focal per Microsoft's instructions](https://www.microsoft.com/store/apps/9n6svws3rx71)
3. Open Git Bash.
4. Install prerequisites `wsl sudo apt-get update && sudo apt-get install make nsis dos2unix curl jq`
5. Clone `i2p.i2p` and `i2p.firefox`
git clone https://github.com/i2p/i2p.i2p
git clone https://github.com/i2p/i2p.firefox
6. Move to the i2p.i2p directory. Build the .jar files required to build the App Image
inside i2p.i2p. Return to home.
cd i2p.i2p
ant clean pkg
cd ..
7. Move into the i2p.firefox directory. Run the `./build.sh` script.
cd i2p.firefox
./build.sh
8. Compile the NSIS installer using WSL.
wsl make
End-to-End Windows build process using Cygwin
---------------------------------------------
2022-03-21 11:41:29 -04:00
I highly recommend you look into the Chocolatey package manager, which makes it much
easier to configure these tools and keep them up to date.
**Prerequisites:** You need to have OpenJDK 14 or greater installed and configured
with your `%JAVA_HOME%` environment variable configured and `%JAVA_HOME%/bin` on
your `%PATH%`. You need to have Apache Ant installed and configured with `%ANT_HOME%`
environment variable configured and `%ANT_HOME%/bin` on your `%PATH%`. You must have
WSL and git bash installed. You must have `NSIS.exe` installed and `makensis` available on your
`%PATH%`. You must have Git for Windows installed. When installing git for Windows, you should
select "Checkout as is, commit as is" and leave line-endings alone.
TODO: Add links to the respective instructions for each of these.
2022-03-21 11:43:34 -04:00
1. Run the Cygwin `setup-$arch.exe` for your platform to set up new packages. Select the `make` `jq` `dos2unix` and `curl` packages.
2. Open a cygwin terminal.
3. Clone `i2p.i2p` and `i2p.firefox`
git clone https://github.com/i2p/i2p.i2p
git clone https://github.com/i2p/i2p.firefox
2022-03-21 11:43:34 -04:00
4. Move to the i2p.i2p directory. Build the .jar files required to build the App Image
inside i2p.i2p. Return to home.
cd i2p.i2p
ant clean pkg
cd ..
2022-03-21 11:43:34 -04:00
5. Move into the i2p.firefox directory. Run the `./build.sh` script.
cd i2p.firefox
./build.sh
2022-03-21 11:43:34 -04:00
6. Run `make` to build the installer.
Doing a Release
---------------
Once you have the installer `.exe` file produced by NSIS, you're almost ready to
do a release. As a final step, someone must sign the `.exe` file using a
Certificate which Windows will recognize. The current signer of the Windows
bundle is Zlatinb. Standard Windows signing tools are used.
```sh
2022-05-17 17:18:12 -04:00
# Release Copypasta
./clean.sh
wsl make distclean
wsl make clean-extensions
wsl make extensions
./build.sh
2022-05-17 17:27:06 -04:00
wsl make
2022-05-17 16:38:18 -04:00
./sign.sh
```
2021-08-19 21:01:23 -04:00
Building a signed update file
-----------------------------
Building a signed update file for automatically updating a Windows I2P router
2022-05-17 17:18:12 -04:00
requires you to either be using linux, or have Go installed in your Cygwin or WSL environment.
On Linux(Where I sign the su3 files), this works:
2021-08-19 21:01:23 -04:00
2022-05-17 17:18:12 -04:00
make su3
2021-08-19 21:01:23 -04:00
2022-05-17 17:18:12 -04:00
to run the signing tool if necessary and then package the installer in a
2021-08-19 21:01:23 -04:00
signed update file.
2021-08-20 00:12:36 -04:00
Docker Support
--------------
2022-09-16 17:33:01 -04:00
**MOVED, DEPRECATION WARNING:** Most of this functionality has been moved
to http://git.idk.i2p/idk/i2p.plugins.native which is more stable,
easier to build and use, and easier to incorporate into other
projects.
- https://i2pgit.org/idk/i2p.plugins.firefox/-/blob/master/docker.sh
Unix Support
------------
**MOVED. DEPRECATION WARNING:** Most of this functionality has been moved
to http://git.idk.i2p/idk/i2p.plugins.native which is more stable,
easier to build and use, and easier to incorporate into other
projects. It is the better option for nearly every non-Windows case
right now. You can get binary packages from:
2021-08-20 00:12:36 -04:00
2022-09-16 17:33:01 -04:00
- https://github.com/eyedeekay/i2p.plugins.firefox/releases
2021-08-20 00:12:36 -04:00
2022-09-16 17:33:01 -04:00
or look at
2021-08-20 00:12:36 -04:00
2022-09-16 17:33:01 -04:00
- https://i2pgit.org/idk/i2p.plugins.firefox/-/blob/master/PACKAGES.md
2021-08-20 00:12:36 -04:00
2022-09-16 17:33:01 -04:00
for instructions on how to build your own packages. These packages are
unofficial! Although I do dogfood most of them and the `.jar` gets thorough
testing.
2021-08-20 00:12:36 -04:00
Issues
------
To report issues against this browser profile, please file issues
at [the official Gitlab](https://i2pgit.org/i2p-hackers/i2p.firefox)
or the [Github Mirror](https://github.com/i2p/i2p.firefox). Issues
pertaining to the plugins may be reported to their upstream
maintainers if it's determined that our configuration is not at
fault.
NoScript is developed on Github by `hackademix` and the community:
- https://github.com/hackademix/noscript
HTTPS Everywhere is developed on Github by the EFF:
- https://github.com/EFForg/https-everywhere
I2P in Private Browsing is developed on Gitlab and Github by idk and the community:
- https://i2pgit.org/idk/I2P-in-Private-Browsing-Mode-Firefox
- https://github.com/eyedeekay/I2P-in-Private-Browsing-Mode-Firefox