To build this, you will need the following software packages (all available in Debian) :
In addition, you will need the NSIS plugin “ShellExecAsUser” which you can get from the
NSIS Wiki Page
. In order to install
the plugin on Debian, Ubuntu, or using
WSL
, you can download the:
7zip release
and copy the content of
Plugins
to
/usr/share/nsis/Plugins
.
cp -rv Plugins/* /usr/share/nsis/Plugins/
To build a Debian package, you’ll also need
Before you build, run the targets
make clean-extensions
make extensions
to update the extensions to point to their latest versions.
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.
When generating a Windows build it’s important to make sure that the
licenses for all the bundled softare are included. This should happen
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.
It is possible to use these profiles on Linux and possibly other
Unixes, if Firefox is already installed on the system. It can be
installed system-wide using the
make install
target. Running
make install
requires root, and requires
make
to have been run
first. To install on Unix, system-wide, run:
make
sudo make install
To run without installing them system wide, unpack the
profile*.tgz
to a location of your choice and run the
i2pbrowser.sh
script. This
will start a Firefox profile configured to use I2P.
tar xvf profile-0.3.tgz
cd profile
./i2pbrowser.sh
If you want to run the app-like i2pconfig browser, then follow the same steps with app-profile*.tgz.
tar xvf app-profile-0.3.tgz
cd app-profile
./i2pconfig.sh
To generate a
deb
package, install the package
checkinstall
and run
the
make checkinstall
target after building with
make
.
make
make checkinstall
sudo apt install ./i2p-firefox*.deb
If you want to set up i2pconfig to run when you start the service
with
sudo service i2p start
then you can run the script:
/usr/local/bin/i2p-config-service-setup
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.
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.
Set up Windows Subsystem for Linux per Microsoft’s instructions
Open Git Bash.
Install prerequisites
wsl sudo apt-get update && sudo apt-get install make nsis dos2unix curl jq
Clone
i2p.i2p
and
i2p.firefox
git clone https://github.com/i2p/i2p.i2p
git clone https://github.com/i2p/i2p.firefox
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 ..
Move into the i2p.firefox directory. Run the
./build.sh
script.
cd i2p.firefox
./build.sh
Compile the NSIS installer using WSL.
wsl make
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.
Run the Cygwin
setup-$arch.exe
for your platform to set up new packages. Select the
make
jq
dos2unix
and
curl
packages.
Open a cygwin terminal.
Clone
i2p.i2p
and
i2p.firefox
git clone https://github.com/i2p/i2p.i2p
git clone https://github.com/i2p/i2p.firefox
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 ..
Move into the i2p.firefox directory. Run the
./build.sh
script.
cd i2p.firefox
./build.sh
Run
make
to build the installer.
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.
# Release Copypasta
./clean.sh
wsl make distclean
wsl make clean-extensions
wsl make extensions
./build.sh
wsl make
./sign.sh
Building a signed update file for automatically updating a Windows I2P router 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:
make su3
to run the signing tool if necessary and then package the installer in a signed update file.
You can use a Docker container to install this browser profile as well. In order to do this, you can run the commands:
xhost + local:docker
docker run -it --rm \
--net=host \
-e DISPLAY=unix$(DISPLAY) \
-v /tmp/.X11-unix:/tmp/.X11-unix \
geti2p/i2p.firefox firefox --profile /src/build/profile
To build and run the container locally, clone this repository and run the
make run
target.
To report issues against this browser profile, please file issues at the official Gitlab or the Github Mirror . 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
Copyright 2018
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.
Hide license