Compare commits
48 Commits
Author | SHA1 | Date | |
---|---|---|---|
c5736f51c9 | |||
a274fe4bbc | |||
ee480843d3 | |||
b9711689a7 | |||
03a2105daa | |||
f997171dcc | |||
7ccaec1748 | |||
48869cf2b5 | |||
dcfd991aac | |||
c3136fb4b7 | |||
52086c98df | |||
1bc9894616 | |||
b7bbcf4e4b | |||
b46abac574 | |||
aca1dd618d | |||
9f283c4ef5 | |||
b1a54e0144 | |||
b4c4c20d74 | |||
d874caa490 | |||
baec921a37 | |||
fd0bfb8b3d | |||
6ac3a2eb55 | |||
50de466282 | |||
ad61d69be0 | |||
8b1e908bc1 | |||
19fb2f5378 | |||
e0d0a537e7 | |||
b4371dad07 | |||
fbbaffddb9 | |||
7f409bfc1f | |||
bdf9ca5548 | |||
397afe0cb7 | |||
0df0a380bb | |||
10887da2f7 | |||
3da4c9ee1e | |||
c24a0acea1 | |||
41a4e895cc | |||
ba6275008a | |||
f268f3b459 | |||
eb195f7dba | |||
bbd2fdeeec | |||
ecfc447125 | |||
238f3fd839 | |||
c01312a1a5 | |||
b72dd14310 | |||
64aac910a6 | |||
246c27627b | |||
d529f353e4 |
8
.github/workflows/ant.yml
vendored
8
.github/workflows/ant.yml
vendored
@ -24,7 +24,7 @@ jobs:
|
|||||||
echo "build.built-by=GitHub Actions" >> override.properties
|
echo "build.built-by=GitHub Actions" >> override.properties
|
||||||
echo "noExe=true" >> override.properties
|
echo "noExe=true" >> override.properties
|
||||||
- name: install crx3
|
- name: install crx3
|
||||||
run: go install github.com/mediabuyerbot/go-crx3/crx3@latest
|
run: mkdir -p $(go env GOPATH)/bin; wget -O $(go env GOPATH)/bin/crx3 https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/build-tools/crx3-linux; chmod +x $(go env GOPATH)/bin/crx3
|
||||||
- name: install dzip
|
- name: install dzip
|
||||||
run: go install github.com/delicb/dzip@latest
|
run: go install github.com/delicb/dzip@latest
|
||||||
- name: install amo-version
|
- name: install amo-version
|
||||||
@ -107,7 +107,7 @@ jobs:
|
|||||||
- run: echo enabled=1 >> /etc/yum.repos.d/adoptium.repo
|
- run: echo enabled=1 >> /etc/yum.repos.d/adoptium.repo
|
||||||
- run: echo gpgcheck=1 >> /etc/yum.repos.d/adoptium.repo
|
- run: echo gpgcheck=1 >> /etc/yum.repos.d/adoptium.repo
|
||||||
- run: echo gpgkey=https://packages.adoptium.net/artifactory/api/gpg/key/public >> /etc/yum.repos.d/adoptium.repo
|
- run: echo gpgkey=https://packages.adoptium.net/artifactory/api/gpg/key/public >> /etc/yum.repos.d/adoptium.repo
|
||||||
- run: dnf clean all && rm -r /var/cache/dnf && dnf upgrade -y && dnf update -y
|
- run: dnf clean all && rm -rf /var/cache/dnf && dnf upgrade -y && dnf update -y
|
||||||
- run: dnf install -y temurin-21-jdk
|
- run: dnf install -y temurin-21-jdk
|
||||||
- name: Generate override.properties
|
- name: Generate override.properties
|
||||||
run: |
|
run: |
|
||||||
@ -115,7 +115,7 @@ jobs:
|
|||||||
echo "build.built-by=GitHub Actions" >> override.properties
|
echo "build.built-by=GitHub Actions" >> override.properties
|
||||||
echo "noExe=true" >> override.properties
|
echo "noExe=true" >> override.properties
|
||||||
- name: install crx3
|
- name: install crx3
|
||||||
run: go install github.com/mediabuyerbot/go-crx3/crx3@latest
|
run: mkdir -p $(go env GOPATH)/bin; wget -O $(go env GOPATH)/bin/crx3 https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/build-tools/crx3-linux; chmod +x $(go env GOPATH)/bin/crx3
|
||||||
- name: install dzip
|
- name: install dzip
|
||||||
run: go install github.com/delicb/dzip@latest
|
run: go install github.com/delicb/dzip@latest
|
||||||
- name: install amo-version
|
- name: install amo-version
|
||||||
@ -211,7 +211,7 @@ jobs:
|
|||||||
bash -c 'echo "build.built-by=GitHub Actions" >> override.properties'
|
bash -c 'echo "build.built-by=GitHub Actions" >> override.properties'
|
||||||
bash -c 'echo "noExe=true" >> override.properties'
|
bash -c 'echo "noExe=true" >> override.properties'
|
||||||
- name: install crx3
|
- name: install crx3
|
||||||
run: go install github.com/mediabuyerbot/go-crx3/crx3@latest
|
run: mkdir -p $(go env GOPATH)/bin; wget -O $(go env GOPATH)/bin/crx3 https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/build-tools/crx3-osx; chmod +x $(go env GOPATH)/bin/crx3
|
||||||
- name: install dzip
|
- name: install dzip
|
||||||
run: go install github.com/delicb/dzip@latest
|
run: go install github.com/delicb/dzip@latest
|
||||||
- name: install amo-version
|
- name: install amo-version
|
||||||
|
82
.github/workflows/nightly.yml
vendored
Normal file
82
.github/workflows/nightly.yml
vendored
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
name: Nightly
|
||||||
|
|
||||||
|
#on: [push]
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
sparse-checkout: |
|
||||||
|
CHANGES.md
|
||||||
|
sparse-checkout-cone-mode: false
|
||||||
|
- name: sleep 15 minutes
|
||||||
|
run: |
|
||||||
|
echo "sleeping 15 minutes to wait for artifacts"
|
||||||
|
sleep 1m
|
||||||
|
echo "sleeping 14 minutes to wait for artifacts"
|
||||||
|
sleep 1m
|
||||||
|
echo "sleeping 13 minutes to wait for artifacts"
|
||||||
|
sleep 1m
|
||||||
|
echo "sleeping 12 minutes to wait for artifacts"
|
||||||
|
sleep 1m
|
||||||
|
echo "sleeping 11 minutes to wait for artifacts"
|
||||||
|
sleep 1m
|
||||||
|
echo "sleeping 10 minutes to wait for artifacts"
|
||||||
|
sleep 1m
|
||||||
|
echo "sleeping 9 minutes to wait for artifacts"
|
||||||
|
sleep 1m
|
||||||
|
echo "sleeping 8 minutes to wait for artifacts"
|
||||||
|
sleep 1m
|
||||||
|
echo "sleeping 7 minutes to wait for artifacts"
|
||||||
|
sleep 1m
|
||||||
|
echo "sleeping 6 minutes to wait for artifacts"
|
||||||
|
sleep 1m
|
||||||
|
echo "sleeping 5 minutes to wait for artifacts"
|
||||||
|
sleep 1m
|
||||||
|
echo "sleeping 4 minutes to wait for artifacts"
|
||||||
|
sleep 1m
|
||||||
|
echo "sleeping 3 minutes to wait for artifacts"
|
||||||
|
sleep 1m
|
||||||
|
echo "sleeping 2 minutes to wait for artifacts"
|
||||||
|
sleep 1m
|
||||||
|
echo "sleeping 1 minutes to wait for artifacts"
|
||||||
|
sleep 1m
|
||||||
|
- name: Download artifacts
|
||||||
|
id: download-artifact
|
||||||
|
uses: dawidd6/action-download-artifact@v3
|
||||||
|
with:
|
||||||
|
skip_unpack: true
|
||||||
|
workflow: ant.yml
|
||||||
|
if_no_artifact_found: fail
|
||||||
|
# remove .zip file extension
|
||||||
|
- run: for f in *.zip; do unzip "$f"; rm "$f"; done
|
||||||
|
- run: echo "" | tee -a CHANGES.md
|
||||||
|
- run: echo "## Checksums" | tee -a CHANGES.md
|
||||||
|
- run: echo "" | tee -a CHANGES.md
|
||||||
|
- run: echo '```' | tee -a CHANGES.md
|
||||||
|
- run: sha256sum * | tee -a CHANGES.md
|
||||||
|
- run: echo '```' | tee -a CHANGES.md
|
||||||
|
- run: echo "" | tee -a CHANGES.md
|
||||||
|
- run: echo '```' | tee -a CHANGES.md
|
||||||
|
- run: file * | tee -a CHANGES.md
|
||||||
|
- run: echo '```' | tee -a CHANGES.md
|
||||||
|
- run: echo "" | tee -a CHANGES.md
|
||||||
|
- name: Upload artifacts
|
||||||
|
uses: ncipollo/release-action@v1
|
||||||
|
with:
|
||||||
|
commit: $GITHUB_SHA
|
||||||
|
name: nightly
|
||||||
|
prerelease: true
|
||||||
|
makeLatest: true
|
||||||
|
allowUpdates: true
|
||||||
|
artifacts: "*"
|
||||||
|
bodyFile: "CHANGES.md"
|
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
@ -59,7 +59,7 @@ jobs:
|
|||||||
workflow: ant.yml
|
workflow: ant.yml
|
||||||
if_no_artifact_found: fail
|
if_no_artifact_found: fail
|
||||||
# remove .zip file extension
|
# remove .zip file extension
|
||||||
- run: for f in *.zip; do mv "$f" "${f%.zip}"; done
|
- run: for f in *.zip; do unzip "$f"; rm "$f"; done
|
||||||
- run: echo "" | tee -a CHANGES.md
|
- run: echo "" | tee -a CHANGES.md
|
||||||
- run: echo "## Checksums" | tee -a CHANGES.md
|
- run: echo "## Checksums" | tee -a CHANGES.md
|
||||||
- run: echo "" | tee -a CHANGES.md
|
- run: echo "" | tee -a CHANGES.md
|
||||||
@ -67,6 +67,10 @@ jobs:
|
|||||||
- run: sha256sum * | tee -a CHANGES.md
|
- run: sha256sum * | tee -a CHANGES.md
|
||||||
- run: echo '```' | tee -a CHANGES.md
|
- run: echo '```' | tee -a CHANGES.md
|
||||||
- run: echo "" | tee -a CHANGES.md
|
- run: echo "" | tee -a CHANGES.md
|
||||||
|
- run: echo '```' | tee -a CHANGES.md
|
||||||
|
- run: file * | tee -a CHANGES.md
|
||||||
|
- run: echo '```' | tee -a CHANGES.md
|
||||||
|
- run: echo "" | tee -a CHANGES.md
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: ncipollo/release-action@v1
|
uses: ncipollo/release-action@v1
|
||||||
with:
|
with:
|
||||||
|
@ -55,6 +55,11 @@
|
|||||||
docs/BUILD
|
docs/BUILD
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="docs/I2P-PLUGIN.html">
|
||||||
|
docs/I2P-PLUGIN
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="docs/I2PBrowser.html">
|
<a href="docs/I2PBrowser.html">
|
||||||
docs/I2PBrowser
|
docs/I2PBrowser
|
||||||
|
60
CHANGES.md
60
CHANGES.md
@ -1,3 +1,21 @@
|
|||||||
|
2025 Tue, January 7
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
- Disable downloading Chrome extensions, begin phasing out Chrome support
|
||||||
|
|
||||||
|
Sat, October 19
|
||||||
|
---------------
|
||||||
|
|
||||||
|
- Ignore most changes when running in Tor Browser, only set the proxy
|
||||||
|
- 2.7.0 release
|
||||||
|
|
||||||
|
Mon, July 8
|
||||||
|
-----------
|
||||||
|
|
||||||
|
- Fix a bug which caused the profile manager to fail to detect Firefox on some systems
|
||||||
|
- Fix a bug which caused the profile manager to use an unwritable directory on some systems
|
||||||
|
- Fix a bug where if user tried to run it from the home directory, the application would make sure that no firefoxes existed in any subdirectory before running
|
||||||
|
|
||||||
Thu, March 7
|
Thu, March 7
|
||||||
------------
|
------------
|
||||||
|
|
||||||
@ -169,4 +187,44 @@ Saturday, August 6
|
|||||||
|
|
||||||
- Implemented firefox detection
|
- Implemented firefox detection
|
||||||
- Implemented directory setup
|
- Implemented directory setup
|
||||||
- Implemented processBuilder generator
|
- Implemented processBuilder generator
|
||||||
|
## Checksums
|
||||||
|
|
||||||
|
```
|
||||||
|
dc8797cfae23640e27ed7b32a3e6ccec232d24411d64cd9e5b107f8c5384a70a CHANGES.md
|
||||||
|
9a36e15def2a95077027cd0db5f95b345a87a8edfe5e89ea7f83aaa3c94f5ebb i2p.chromium.base.profile.zip
|
||||||
|
97ae21d621f813fd2d91f5921fe1eee95ec0d01782bf93db7b3689f959a9f3b8 i2p.chromium.usability.profile.zip
|
||||||
|
5cd673bb27827e67796b52f26194b7b1504dddf1630ad9d9084ab6a318c6d20a i2p.firefox.base.profile.zip
|
||||||
|
556fc2df825e64b1463e88ec77a5de46bce61516a475e1136110363d5badabd2 i2p.firefox.usability.profile.zip
|
||||||
|
6d3882ac113116b8f40ce07985e779859a68f43f14278b40f1628ea5362acca5 i2pbrowser-1.0.0-1.x86_64.rpm
|
||||||
|
aa7185799b17fd7893818fe7728f3e3cb6b4c8022e033fc0f33f6be81e7b2c2f i2pbrowser-1.0.0.dmg
|
||||||
|
c307fb6556821258520a3d522cf7fbe2031aa421161fcac3e409f5ce20a1637a i2pbrowser-1.0.0.exe
|
||||||
|
5eae853ff7f8b9a05c4c7111147882a54aabd1cf581d21396878055a54a3efc7 i2pbrowser-1.0.0.msi
|
||||||
|
cda1bb2058048a4303bbc65543a0f340ade1c88881ee60704333e767bae10db6 i2pbrowser-1.0.0.pkg
|
||||||
|
183197aa39e891d5763ef5449957b9d9790bdfaaa06760288526f6283b865d97 i2pbrowser-portable.zip
|
||||||
|
f017951df66f2e3d2d57886085a95bd2463cc8f7d793683960da30b842b9b17b i2pbrowser.tar.gz
|
||||||
|
4538172d9753967485566e52f064dbc06a5123971044d973766de28051d53eb1 i2pbrowser_1.0.0_amd64.deb
|
||||||
|
6b5dd3e4ab1bcb3df4a5a758b5469239453c713bb6266bc5eea8b0d9ec7aa413 i2pfirefox-plugin.jar
|
||||||
|
85ce64a3c03c72421947c777a72d42be6fc568c5317070927463accb347b703f i2pfirefox.jar
|
||||||
|
9856613f8229a773ef54a9e7e2a37a6c788755d96393478afce8db7439404e42 plugin.zip
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
CHANGES.md: ASCII text
|
||||||
|
i2p.chromium.base.profile.zip: Zip archive data, at least v2.0 to extract, compression method=store
|
||||||
|
i2p.chromium.usability.profile.zip: Zip archive data, at least v2.0 to extract, compression method=store
|
||||||
|
i2p.firefox.base.profile.zip: Zip archive data, at least v2.0 to extract, compression method=store
|
||||||
|
i2p.firefox.usability.profile.zip: Zip archive data, at least v2.0 to extract, compression method=store
|
||||||
|
i2pbrowser-1.0.0-1.x86_64.rpm: RPM v3.0 bin i386/x86_64
|
||||||
|
i2pbrowser-1.0.0.dmg: zlib compressed data
|
||||||
|
i2pbrowser-1.0.0.exe: PE32+ executable (GUI) x86-64, for MS Windows
|
||||||
|
i2pbrowser-1.0.0.msi: Composite Document File V2 Document, Little Endian, Os: Windows, Version 6.2, MSI Installer, Code page: 1252, Title: Installation Database, Subject: i2pbrowser, Author: Unknown, Keywords: Installer, Comments: This installer database contains the logic and data required to install i2pbrowser., Template: x64;1033, Revision Number: {6D1D56D8-CB72-4709-BD0B-0FDBF71C6D32}, Create Time/Date: Sun Mar 10 06:04:32 2024, Last Saved Time/Date: Sun Mar 10 06:04:32 2024, Number of Pages: 200, Number of Words: 10, Name of Creating Application: Windows Installer XML Toolset (3.14.0.8606), Security: 2
|
||||||
|
i2pbrowser-1.0.0.pkg: xar archive compressed TOC: 1244, SHA-1 checksum, contains zlib compressed data
|
||||||
|
i2pbrowser-portable.zip: Zip archive data, at least v2.0 to extract, compression method=deflate
|
||||||
|
i2pbrowser.tar.gz: gzip compressed data, from Unix, original size modulo 2^32 725985280
|
||||||
|
i2pbrowser_1.0.0_amd64.deb: Debian binary package (format 2.0), with control.tar.zs, data compression zst
|
||||||
|
i2pfirefox-plugin.jar: Java archive data (JAR)
|
||||||
|
i2pfirefox.jar: Java archive data (JAR)
|
||||||
|
plugin.zip: Zip archive data, at least v1.0 to extract, compression method=store
|
||||||
|
```
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ RUN echo enabled=1 >> /etc/yum.repos.d/adoptium.repo
|
|||||||
RUN echo gpgcheck=1 >> /etc/yum.repos.d/adoptium.repo
|
RUN echo gpgcheck=1 >> /etc/yum.repos.d/adoptium.repo
|
||||||
RUN echo gpgkey=https://packages.adoptium.net/artifactory/api/gpg/key/public >> /etc/yum.repos.d/adoptium.repo
|
RUN echo gpgkey=https://packages.adoptium.net/artifactory/api/gpg/key/public >> /etc/yum.repos.d/adoptium.repo
|
||||||
RUN cat /etc/yum.repos.d/adoptium.repo
|
RUN cat /etc/yum.repos.d/adoptium.repo
|
||||||
RUN dnf clean all && rm -r /var/cache/dnf && dnf upgrade -y && dnf update -y
|
RUN dnf clean all && rm -rf /var/cache/dnf && dnf upgrade -y && dnf update -y
|
||||||
RUN dnf -y install rpm-build temurin-19-jdk
|
RUN dnf -y install rpm-build temurin-19-jdk
|
||||||
ADD . /src/i2p.plugins.firefox
|
ADD . /src/i2p.plugins.firefox
|
||||||
WORKDIR /src/i2p.plugins.firefox
|
WORKDIR /src/i2p.plugins.firefox
|
||||||
|
@ -55,6 +55,11 @@
|
|||||||
docs/BUILD
|
docs/BUILD
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="docs/I2P-PLUGIN.html">
|
||||||
|
docs/I2P-PLUGIN
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="docs/I2PBrowser.html">
|
<a href="docs/I2PBrowser.html">
|
||||||
docs/I2PBrowser
|
docs/I2PBrowser
|
||||||
|
23
README.md
23
README.md
@ -11,6 +11,28 @@ trackers, and jerks using off-the-shelf techniques and exploits. It is fundament
|
|||||||
to make changes which un-trust your browser vendor, your OS, your package manager or any
|
to make changes which un-trust your browser vendor, your OS, your package manager or any
|
||||||
other system that exists underneath it. **It is just a profile manager.**
|
other system that exists underneath it. **It is just a profile manager.**
|
||||||
|
|
||||||
|
**What is this?**
|
||||||
|
|
||||||
|
This is a browser profile manager which pre-configures a browser on the host system, usually
|
||||||
|
Firefox or Tor Browser, for browsing I2P. When acting as an I2P Plugin, it adds GUI elements to
|
||||||
|
I2P for launching the browser in a highly restricted "Safe" mode(the default) or a more permissive
|
||||||
|
"Usability" mode.
|
||||||
|
|
||||||
|
This package expresses functionality that has existed in many places at many times, sometimes
|
||||||
|
bundled with other software. As it has developed here, the border of where the Easy-Install
|
||||||
|
ends and Firefox Profile Manager begins has become clearer. This repository contains the profile
|
||||||
|
manager and it's buildsystem, the whole profile manager, and nothing but the profile manager.
|
||||||
|
It can be used independently of other software, provided an I2P proxy on the host system somewhere.
|
||||||
|
|
||||||
|
However, in practice, most people probably get it alongside an I2P router, through the **I2P Easy-Install Bundle for Windows**.
|
||||||
|
|
||||||
|
**What version numbers should I pay attention to?**
|
||||||
|
When I decided to port the `.bat` launcher scripts from the Easy-Install bundle to Java, this project
|
||||||
|
was created and started using it's own version numbers. This was the practice up until version 1.5.0,
|
||||||
|
which was the last version to use a different version number than I2P itself. Starting in April 2024,
|
||||||
|
`i2p.plugins.firefox` will follow along with the Java I2P major and minor version numbers. Incremental
|
||||||
|
changes may become differing point releases.
|
||||||
|
|
||||||
**All packages require a running I2P router.**
|
**All packages require a running I2P router.**
|
||||||
|
|
||||||
**[Windows users should see the Easy-Install Bundle](https://i2pgit.org/i2p-hackers/i2p.firefox)**
|
**[Windows users should see the Easy-Install Bundle](https://i2pgit.org/i2p-hackers/i2p.firefox)**
|
||||||
@ -47,6 +69,7 @@ directory for Firefox, and the `src/i2p.chromium.*.profile/extensions/*.js/*` di
|
|||||||
|
|
||||||
For platform specific instructions, see
|
For platform specific instructions, see
|
||||||
|
|
||||||
|
- [I2P-PLUGIN.md](docs/I2P-PLUGIN.md)/[I2P-PLUGIN.html](docs/I2P-PLUGIN.html)
|
||||||
- [LINUX.md](docs/LINUX.md)/[LINUX.html](docs/LINUX.html)
|
- [LINUX.md](docs/LINUX.md)/[LINUX.html](docs/LINUX.html)
|
||||||
- [OSX.md](docs/OSX.md)/[OSX.html](docs/OSX.html)
|
- [OSX.md](docs/OSX.md)/[OSX.html](docs/OSX.html)
|
||||||
- [WINDOWS.md](docs/WINDOWS.md)/[WINDOWS.html](docs/WINDOWS.html)
|
- [WINDOWS.md](docs/WINDOWS.md)/[WINDOWS.html](docs/WINDOWS.html)
|
||||||
|
@ -55,6 +55,11 @@
|
|||||||
docs/BUILD
|
docs/BUILD
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="docs/I2P-PLUGIN.html">
|
||||||
|
docs/I2P-PLUGIN
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="docs/I2PBrowser.html">
|
<a href="docs/I2PBrowser.html">
|
||||||
docs/I2PBrowser
|
docs/I2PBrowser
|
||||||
@ -181,7 +186,7 @@ NoScript
|
|||||||
11.4.18
|
11.4.18
|
||||||
https://clients2.google.com/service/update2/crx
|
https://clients2.google.com/service/update2/crx
|
||||||
LocalCDN
|
LocalCDN
|
||||||
2.6.64
|
2.6.65
|
||||||
https://clients2.google.com/service/update2/crx
|
https://clients2.google.com/service/update2/crx
|
||||||
uBlock Origin
|
uBlock Origin
|
||||||
1.56.0
|
1.56.0
|
||||||
|
35
VERSION.md
35
VERSION.md
@ -6,41 +6,26 @@ Extension Versions
|
|||||||
|
|
||||||
```md
|
```md
|
||||||
i2p-in-private-browsing
|
i2p-in-private-browsing
|
||||||
1.48
|
2.7.0
|
||||||
https://addons.mozilla.org/firefox/downloads/file/4123613/i2p_in_private_browsing-1.48.xpi
|
https://addons.mozilla.org/firefox/downloads/file/4364373/i2p_in_private_browsing-2.7.0.xpi
|
||||||
noscript
|
noscript
|
||||||
11.4.29
|
12.1.1
|
||||||
https://addons.mozilla.org/firefox/downloads/file/4206186/noscript-11.4.29.xpi
|
https://addons.mozilla.org/firefox/downloads/file/4411102/noscript-12.1.1.xpi
|
||||||
localcdn-fork-of-decentraleyes
|
localcdn-fork-of-decentraleyes
|
||||||
2.6.64
|
2.6.76
|
||||||
https://addons.mozilla.org/firefox/downloads/file/4243456/localcdn_fork_of_decentraleyes-2.6.64.xpi
|
https://addons.mozilla.org/firefox/downloads/file/4401439/localcdn_fork_of_decentraleyes-2.6.76.xpi
|
||||||
onion-in-container-browsing
|
onion-in-container-browsing
|
||||||
0.82
|
0.82
|
||||||
https://addons.mozilla.org/firefox/downloads/file/3904685/onion_in_container_browsing-0.82.xpi
|
https://addons.mozilla.org/firefox/downloads/file/3904685/onion_in_container_browsing-0.82.xpi
|
||||||
javascript-restrictor
|
javascript-restrictor
|
||||||
0.17
|
0.19.1
|
||||||
https://addons.mozilla.org/firefox/downloads/file/4190089/javascript_restrictor-0.17.xpi
|
https://addons.mozilla.org/firefox/downloads/file/4352350/javascript_restrictor-0.19.1.xpi
|
||||||
ublock-origin
|
ublock-origin
|
||||||
1.56.0
|
1.61.2
|
||||||
https://addons.mozilla.org/firefox/downloads/file/4237670/ublock_origin-1.56.0.xpi
|
https://addons.mozilla.org/firefox/downloads/file/4391011/ublock_origin-1.61.2.xpi
|
||||||
```
|
```
|
||||||
|
|
||||||
## Chromium
|
## Chromium
|
||||||
|
|
||||||
```md
|
```md
|
||||||
__MSG_extensionName__
|
|
||||||
1.29
|
|
||||||
https://clients2.google.com/service/update2/crx
|
|
||||||
NoScript
|
|
||||||
11.4.18
|
|
||||||
https://clients2.google.com/service/update2/crx
|
|
||||||
LocalCDN
|
|
||||||
2.6.64
|
|
||||||
https://clients2.google.com/service/update2/crx
|
|
||||||
uBlock Origin
|
|
||||||
1.56.0
|
|
||||||
https://clients2.google.com/service/update2/crx
|
|
||||||
__MSG_extensionName__
|
|
||||||
0.17
|
|
||||||
https://clients2.google.com/service/update2/crx
|
|
||||||
```
|
```
|
||||||
|
33
build.xml
33
build.xml
@ -328,7 +328,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
|
|||||||
|
|
||||||
<target name="buildNum">
|
<target name="buildNum">
|
||||||
<buildnumber file="scripts/build.number" />
|
<buildnumber file="scripts/build.number" />
|
||||||
<property name="release.number" value="1.3.0" />
|
<property name="release.number" value="1.4.991" />
|
||||||
<exec executable="echo" osfamily="unix">
|
<exec executable="echo" osfamily="unix">
|
||||||
<arg value="${release.number}-${build.number}" />
|
<arg value="${release.number}-${build.number}" />
|
||||||
</exec>
|
</exec>
|
||||||
@ -522,6 +522,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
|
|||||||
<arg value="--input"/> <arg value="src/build"/>
|
<arg value="--input"/> <arg value="src/build"/>
|
||||||
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
|
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
|
||||||
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
|
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
|
||||||
|
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
|
||||||
</exec>
|
</exec>
|
||||||
<exec executable="rm" failonerror="true" osfamily="windows">
|
<exec executable="rm" failonerror="true" osfamily="windows">
|
||||||
<arg value="-rf" />
|
<arg value="-rf" />
|
||||||
@ -557,6 +558,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
|
|||||||
<arg value="--icon"/> <arg value="src/icon.png"/>
|
<arg value="--icon"/> <arg value="src/icon.png"/>
|
||||||
<arg value="--app-version"/> <arg value="1.0.0"/>
|
<arg value="--app-version"/> <arg value="1.0.0"/>
|
||||||
<arg value="--input"/> <arg value="src/build"/>
|
<arg value="--input"/> <arg value="src/build"/>
|
||||||
|
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
|
||||||
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
|
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
|
||||||
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
|
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
|
||||||
</exec>
|
</exec>
|
||||||
@ -574,6 +576,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
|
|||||||
<arg value="--icon"/> <arg value="src/icon.png"/>
|
<arg value="--icon"/> <arg value="src/icon.png"/>
|
||||||
<arg value="--app-version"/> <arg value="${release.number}"/>
|
<arg value="--app-version"/> <arg value="${release.number}"/>
|
||||||
<arg value="--input"/> <arg value="src/build"/>
|
<arg value="--input"/> <arg value="src/build"/>
|
||||||
|
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
|
||||||
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
|
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
|
||||||
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
|
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
|
||||||
</exec>
|
</exec>
|
||||||
@ -592,6 +595,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
|
|||||||
<arg value="--input"/> <arg value="src/build"/>
|
<arg value="--input"/> <arg value="src/build"/>
|
||||||
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
|
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
|
||||||
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
|
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
|
||||||
|
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
|
||||||
</exec>
|
</exec>
|
||||||
</target>
|
</target>
|
||||||
<target name="fedora-release" depends="jar">
|
<target name="fedora-release" depends="jar">
|
||||||
@ -608,6 +612,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
|
|||||||
<arg value="--input"/> <arg value="src/build"/>
|
<arg value="--input"/> <arg value="src/build"/>
|
||||||
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
|
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
|
||||||
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
|
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
|
||||||
|
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
|
||||||
</exec>
|
</exec>
|
||||||
</target>
|
</target>
|
||||||
<target name="windows" depends="jar">
|
<target name="windows" depends="jar">
|
||||||
@ -628,6 +633,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
|
|||||||
<arg value="--input"/> <arg value="src/build"/>
|
<arg value="--input"/> <arg value="src/build"/>
|
||||||
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
|
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
|
||||||
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
|
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
|
||||||
|
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
|
||||||
</exec>
|
</exec>
|
||||||
</target>
|
</target>
|
||||||
<target name="windows-release" depends="jar">
|
<target name="windows-release" depends="jar">
|
||||||
@ -648,6 +654,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
|
|||||||
<arg value="--input"/> <arg value="src/build"/>
|
<arg value="--input"/> <arg value="src/build"/>
|
||||||
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
|
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
|
||||||
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
|
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
|
||||||
|
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
|
||||||
</exec>
|
</exec>
|
||||||
</target>
|
</target>
|
||||||
<target name="windows-msi" depends="jar">
|
<target name="windows-msi" depends="jar">
|
||||||
@ -668,6 +675,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
|
|||||||
<arg value="--input"/> <arg value="src/build"/>
|
<arg value="--input"/> <arg value="src/build"/>
|
||||||
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
|
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
|
||||||
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
|
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
|
||||||
|
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
|
||||||
</exec>
|
</exec>
|
||||||
</target>
|
</target>
|
||||||
<target name="windows-msi-release" depends="jar">
|
<target name="windows-msi-release" depends="jar">
|
||||||
@ -688,6 +696,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
|
|||||||
<arg value="--input"/> <arg value="src/build"/>
|
<arg value="--input"/> <arg value="src/build"/>
|
||||||
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
|
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
|
||||||
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
|
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
|
||||||
|
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
|
||||||
</exec>
|
</exec>
|
||||||
</target>
|
</target>
|
||||||
<target name="windows-portable" depends="jar">
|
<target name="windows-portable" depends="jar">
|
||||||
@ -700,6 +709,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
|
|||||||
<arg value="--input"/> <arg value="src/build"/>
|
<arg value="--input"/> <arg value="src/build"/>
|
||||||
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
|
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
|
||||||
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
|
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
|
||||||
|
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
|
||||||
</exec>
|
</exec>
|
||||||
<copy file="LICENSE.md" todir="i2pbrowser-portable" overwrite="true"/>
|
<copy file="LICENSE.md" todir="i2pbrowser-portable" overwrite="true"/>
|
||||||
<delete file="i2pbrowser-portable.zip"/>
|
<delete file="i2pbrowser-portable.zip"/>
|
||||||
@ -719,6 +729,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
|
|||||||
<arg value="--input"/> <arg value="src/build"/>
|
<arg value="--input"/> <arg value="src/build"/>
|
||||||
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
|
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
|
||||||
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
|
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
|
||||||
|
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
|
||||||
</exec>
|
</exec>
|
||||||
<copy file="LICENSE.md" todir="i2pbrowser-portable" overwrite="true"/>
|
<copy file="LICENSE.md" todir="i2pbrowser-portable" overwrite="true"/>
|
||||||
<delete file="i2pbrowser-portable.zip"/>
|
<delete file="i2pbrowser-portable.zip"/>
|
||||||
@ -742,6 +753,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
|
|||||||
<arg value="--input"/> <arg value="src/build"/>
|
<arg value="--input"/> <arg value="src/build"/>
|
||||||
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
|
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
|
||||||
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
|
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
|
||||||
|
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
|
||||||
</exec>
|
</exec>
|
||||||
</target>
|
</target>
|
||||||
<target name="macos-release" depends="jar">
|
<target name="macos-release" depends="jar">
|
||||||
@ -757,6 +769,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
|
|||||||
<arg value="--input"/> <arg value="src/build"/>
|
<arg value="--input"/> <arg value="src/build"/>
|
||||||
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
|
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
|
||||||
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
|
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
|
||||||
|
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
|
||||||
</exec>
|
</exec>
|
||||||
</target>
|
</target>
|
||||||
<target name="macos-pkg" depends="jar">
|
<target name="macos-pkg" depends="jar">
|
||||||
@ -772,6 +785,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
|
|||||||
<arg value="--input"/> <arg value="src/build"/>
|
<arg value="--input"/> <arg value="src/build"/>
|
||||||
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
|
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
|
||||||
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
|
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
|
||||||
|
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
|
||||||
</exec>
|
</exec>
|
||||||
</target>
|
</target>
|
||||||
<target name="macos-pkg-release" depends="jar">
|
<target name="macos-pkg-release" depends="jar">
|
||||||
@ -787,6 +801,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
|
|||||||
<arg value="--input"/> <arg value="src/build"/>
|
<arg value="--input"/> <arg value="src/build"/>
|
||||||
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
|
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
|
||||||
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
|
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
|
||||||
|
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
|
||||||
</exec>
|
</exec>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
@ -870,7 +885,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
|
|||||||
<redirector output="VERSION.md" error="VERSION.md" alwayslog="true" append="true"></redirector>
|
<redirector output="VERSION.md" error="VERSION.md" alwayslog="true" append="true"></redirector>
|
||||||
<arg value="```md"/>
|
<arg value="```md"/>
|
||||||
</exec>
|
</exec>
|
||||||
<exec executable="manifest-json-version" failonerror="true">
|
<!--<exec executable="manifest-json-version" failonerror="true">
|
||||||
<redirector output="VERSION.md" error="VERSION.md" alwayslog="true" append="true"></redirector>
|
<redirector output="VERSION.md" error="VERSION.md" alwayslog="true" append="true"></redirector>
|
||||||
<arg value="-mf"/>
|
<arg value="-mf"/>
|
||||||
<arg value="src/i2p.chromium.base.profile/extensions/i2pchrome.js/manifest.json"/>
|
<arg value="src/i2p.chromium.base.profile/extensions/i2pchrome.js/manifest.json"/>
|
||||||
@ -894,7 +909,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
|
|||||||
<redirector output="VERSION.md" error="VERSION.md" alwayslog="true" append="true"></redirector>
|
<redirector output="VERSION.md" error="VERSION.md" alwayslog="true" append="true"></redirector>
|
||||||
<arg value="-mf"/>
|
<arg value="-mf"/>
|
||||||
<arg value="src/i2p.chromium.usability.profile/extensions/jshelter.js/manifest.json"/>
|
<arg value="src/i2p.chromium.usability.profile/extensions/jshelter.js/manifest.json"/>
|
||||||
</exec>
|
</exec>-->
|
||||||
<exec executable="echo" failonerror="true">
|
<exec executable="echo" failonerror="true">
|
||||||
<redirector output="VERSION.md" error="VERSION.md" alwayslog="true" append="true"></redirector>
|
<redirector output="VERSION.md" error="VERSION.md" alwayslog="true" append="true"></redirector>
|
||||||
<arg value="```"/>
|
<arg value="```"/>
|
||||||
@ -903,20 +918,20 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
|
|||||||
|
|
||||||
<target name="i2pChromiumBaseProfile">
|
<target name="i2pChromiumBaseProfile">
|
||||||
<mkdir dir="src/i2p.chromium.base.profile/extensions/" />
|
<mkdir dir="src/i2p.chromium.base.profile/extensions/" />
|
||||||
<exec executable="crx3" failonerror="true">
|
<!--<exec executable="crx3" failonerror="true">
|
||||||
<arg value="download"/>
|
<arg value="download"/>
|
||||||
<arg value="ikdjcmomgldfciocnpekfndklkfgglpe" />
|
<arg value="ikdjcmomgldfciocnpekfndklkfgglpe" />
|
||||||
<arg value="-u=true"/>
|
<arg value="-u=true"/>
|
||||||
<arg value="-o" />
|
<arg value="-o" />
|
||||||
<arg value="src/i2p.chromium.base.profile/extensions/i2pchrome.js.crx" />
|
<arg value="src/i2p.chromium.base.profile/extensions/i2pchrome.js.crx" />
|
||||||
</exec>
|
</exec>-->
|
||||||
<exec executable="crx3" failonerror="true">
|
<!--<exec executable="crx3" failonerror="true">
|
||||||
<arg value="download"/>
|
<arg value="download"/>
|
||||||
<arg value="doojmbjmlfjjnbmnoijecmcbfeoakpjm" />
|
<arg value="doojmbjmlfjjnbmnoijecmcbfeoakpjm" />
|
||||||
<arg value="-u=true"/>
|
<arg value="-u=true"/>
|
||||||
<arg value="-o" />
|
<arg value="-o" />
|
||||||
<arg value="src/i2p.chromium.base.profile/extensions/noscript.js.crx" />
|
<arg value="src/i2p.chromium.base.profile/extensions/noscript.js.crx" />
|
||||||
</exec>
|
</exec>-->
|
||||||
<exec executable="echo" failonerror="true" append="false" output="src/i2p.chromium.base.profile/version.md">
|
<exec executable="echo" failonerror="true" append="false" output="src/i2p.chromium.base.profile/version.md">
|
||||||
<arg value="Profile Version" />
|
<arg value="Profile Version" />
|
||||||
</exec>
|
</exec>
|
||||||
@ -936,7 +951,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
|
|||||||
|
|
||||||
<target name="i2pChromiumUsabilityProfile">
|
<target name="i2pChromiumUsabilityProfile">
|
||||||
<mkdir dir="src/i2p.chromium.usability.profile/extensions/" />
|
<mkdir dir="src/i2p.chromium.usability.profile/extensions/" />
|
||||||
<exec executable="crx3" failonerror="true">
|
<!--<exec executable="crx3" failonerror="true">
|
||||||
<arg value="download"/>
|
<arg value="download"/>
|
||||||
<arg value="ikdjcmomgldfciocnpekfndklkfgglpe" />
|
<arg value="ikdjcmomgldfciocnpekfndklkfgglpe" />
|
||||||
<arg value="-u=true"/>
|
<arg value="-u=true"/>
|
||||||
@ -963,7 +978,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
|
|||||||
<arg value="-u=true"/>
|
<arg value="-u=true"/>
|
||||||
<arg value="-o" />
|
<arg value="-o" />
|
||||||
<arg value="src/i2p.chromium.usability.profile/extensions/localcdn.js.crx" />
|
<arg value="src/i2p.chromium.usability.profile/extensions/localcdn.js.crx" />
|
||||||
</exec>
|
</exec>-->
|
||||||
<exec executable="echo" failonerror="true" append="false" output="src/i2p.chromium.usability.profile/version.md">
|
<exec executable="echo" failonerror="true" append="false" output="src/i2p.chromium.usability.profile/version.md">
|
||||||
<arg value="Profile Version" />
|
<arg value="Profile Version" />
|
||||||
</exec>
|
</exec>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#! /usr/bin/env sh
|
#! /usr/bin/env sh
|
||||||
export GITHUB_USER=eyedeekay
|
export GITHUB_USER=eyedeekay
|
||||||
export GITHUB_REPO=i2p.plugins.firefox
|
export GITHUB_REPO=i2p.plugins.firefox
|
||||||
export GITHUB_NAME="Updates extensions, plugin support temporarily removed(Stay on the old version)"
|
export GITHUB_NAME="Fixes the build system"
|
||||||
export GITHUB_DESCRIPTION=$(cat CHANGES.md VERSION.md)
|
export GITHUB_DESCRIPTION=$(cat CHANGES.md VERSION.md)
|
||||||
export GITHUB_TAG=1.4.0
|
export GITHUB_TAG=$(git describe --tags --abbrev=0)
|
@ -55,6 +55,11 @@
|
|||||||
BUILD
|
BUILD
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="I2P-PLUGIN.html">
|
||||||
|
I2P-PLUGIN
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="I2PBrowser.html">
|
<a href="I2PBrowser.html">
|
||||||
I2PBrowser
|
I2PBrowser
|
||||||
@ -152,6 +157,42 @@
|
|||||||
<h2>
|
<h2>
|
||||||
Build Dependencies
|
Build Dependencies
|
||||||
</h2>
|
</h2>
|
||||||
|
<p>
|
||||||
|
<strong>
|
||||||
|
SHORTCUT:
|
||||||
|
</strong>
|
||||||
|
All the build artifacts can be produced by the description in the
|
||||||
|
<code>
|
||||||
|
.yaml
|
||||||
|
</code>
|
||||||
|
files in
|
||||||
|
<code>
|
||||||
|
.github/workflows
|
||||||
|
</code>
|
||||||
|
.
|
||||||
|
These can be run on Github’s infrastructure, or on a local PC using
|
||||||
|
<a href="https://github.com/nektos/act">
|
||||||
|
https://github.com/nektos/act
|
||||||
|
</a>
|
||||||
|
.
|
||||||
|
Windows targets will require a Windows PC!
|
||||||
|
Doing things this way deals with all the dependency issues that Windows doesn’t really give you a good way to deal with automatically.
|
||||||
|
It also guarantees that the same base container and environment gets used for every build no matter what machine it runs on.
|
||||||
|
I highly recommend you use either Github CI or
|
||||||
|
<code>
|
||||||
|
nektos/act
|
||||||
|
</code>
|
||||||
|
for dev builds of this software, as it
|
||||||
|
<strong>
|
||||||
|
automates literally every one of the steps
|
||||||
|
</strong>
|
||||||
|
.
|
||||||
|
CI-based builds follow the
|
||||||
|
<code>
|
||||||
|
WSL
|
||||||
|
</code>
|
||||||
|
version of the instructions.
|
||||||
|
</p>
|
||||||
<p>
|
<p>
|
||||||
You will need
|
You will need
|
||||||
<code>
|
<code>
|
||||||
|
@ -2,6 +2,14 @@
|
|||||||
|
|
||||||
## Build Dependencies
|
## Build Dependencies
|
||||||
|
|
||||||
|
**SHORTCUT:** All the build artifacts can be produced by the description in the `.yaml` files in `.github/workflows`.
|
||||||
|
These can be run on Github's infrastructure, or on a local PC using https://github.com/nektos/act.
|
||||||
|
Windows targets will require a Windows PC!
|
||||||
|
Doing things this way deals with all the dependency issues that Windows doesn't really give you a good way to deal with automatically.
|
||||||
|
It also guarantees that the same base container and environment gets used for every build no matter what machine it runs on.
|
||||||
|
I highly recommend you use either Github CI or `nektos/act` for dev builds of this software, as it **automates literally every one of the steps**.
|
||||||
|
CI-based builds follow the `WSL` version of the instructions.
|
||||||
|
|
||||||
You will need `ant` and java `java` and for building the jar. You will need
|
You will need `ant` and java `java` and for building the jar. You will need
|
||||||
`jpackage` for many of the potential build targets. I've been using Java 18
|
`jpackage` for many of the potential build targets. I've been using Java 18
|
||||||
on Debian mostly, on Debian and Ubuntu, install the dependencies with:
|
on Debian mostly, on Debian and Ubuntu, install the dependencies with:
|
||||||
|
1106
docs/I2P-PLUGIN.html
Normal file
1106
docs/I2P-PLUGIN.html
Normal file
File diff suppressed because it is too large
Load Diff
23
docs/I2P-PLUGIN.md
Normal file
23
docs/I2P-PLUGIN.md
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
### I2P Plugin Support
|
||||||
|
|
||||||
|
Since version `1.5.0`, this package has had basic plugin support in Java I2P.
|
||||||
|
This means it can be integrated with your I2P installation or portable package, with
|
||||||
|
the benefit of reduced size requirements, automatic updates, and integration with the I2P UI.
|
||||||
|
Installation in this way is **platform-independent**, the same package is used for Linux, Windows, and OSX.
|
||||||
|
In this type of installation, the profile manager install is entirely managed by I2P.
|
||||||
|
Uninstalling I2P will also uninstall the profile manager.
|
||||||
|
|
||||||
|
#### Downloading the Plugin
|
||||||
|
|
||||||
|
Right now, the best way to download the plugin is from the Github releases page.
|
||||||
|
First, download the `i2pfirefox.su3` file from [the latest release](https://github.com/eyedeekay/i2p.plugins.firefox/releases).
|
||||||
|
Versions ending in `0` will always have a plugin release, starting with `1.5.0`.
|
||||||
|
Dev builds will not have a reliable plugin release.
|
||||||
|
|
||||||
|
#### Install the plugin "From File"
|
||||||
|
|
||||||
|
Once you have downloaded the `i2pfirefox.su3` file, open [`http://127.0.0.1:7657/configplugins`](http://127.0.0.1:7657/configplugins) and scroll to the bottom of the page.
|
||||||
|
Under the heading **Installation from File**, click the "Browse" button.
|
||||||
|
In the window that appears, select the `i2pfirefox.su3` file you just downloaded.
|
||||||
|
Finally, click the "Install plugin from File" button.
|
||||||
|
The plugin will install and start shortly.
|
@ -55,6 +55,11 @@
|
|||||||
BUILD
|
BUILD
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="I2P-PLUGIN.html">
|
||||||
|
I2P-PLUGIN
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="I2PBrowser.html">
|
<a href="I2PBrowser.html">
|
||||||
I2PBrowser
|
I2PBrowser
|
||||||
|
@ -55,6 +55,11 @@
|
|||||||
BUILD
|
BUILD
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="I2P-PLUGIN.html">
|
||||||
|
I2P-PLUGIN
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="I2PBrowser.html">
|
<a href="I2PBrowser.html">
|
||||||
I2PBrowser
|
I2PBrowser
|
||||||
|
@ -55,6 +55,11 @@
|
|||||||
BUILD
|
BUILD
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="I2P-PLUGIN.html">
|
||||||
|
I2P-PLUGIN
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="I2PBrowser.html">
|
<a href="I2PBrowser.html">
|
||||||
I2PBrowser
|
I2PBrowser
|
||||||
|
@ -55,6 +55,11 @@
|
|||||||
BUILD
|
BUILD
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="I2P-PLUGIN.html">
|
||||||
|
I2P-PLUGIN
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="I2PBrowser.html">
|
<a href="I2PBrowser.html">
|
||||||
I2PBrowser
|
I2PBrowser
|
||||||
|
@ -55,6 +55,11 @@
|
|||||||
BUILD
|
BUILD
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="I2P-PLUGIN.html">
|
||||||
|
I2P-PLUGIN
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="I2PBrowser.html">
|
<a href="I2PBrowser.html">
|
||||||
I2PBrowser
|
I2PBrowser
|
||||||
|
@ -55,6 +55,11 @@
|
|||||||
BUILD
|
BUILD
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="I2P-PLUGIN.html">
|
||||||
|
I2P-PLUGIN
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="I2PBrowser.html">
|
<a href="I2PBrowser.html">
|
||||||
I2PBrowser
|
I2PBrowser
|
||||||
|
@ -55,6 +55,11 @@
|
|||||||
BUILD
|
BUILD
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="I2P-PLUGIN.html">
|
||||||
|
I2P-PLUGIN
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="I2PBrowser.html">
|
<a href="I2PBrowser.html">
|
||||||
I2PBrowser
|
I2PBrowser
|
||||||
|
@ -55,6 +55,11 @@
|
|||||||
BUILD
|
BUILD
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="I2P-PLUGIN.html">
|
||||||
|
I2P-PLUGIN
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="I2PBrowser.html">
|
<a href="I2PBrowser.html">
|
||||||
I2PBrowser
|
I2PBrowser
|
||||||
|
@ -55,6 +55,11 @@
|
|||||||
BUILD
|
BUILD
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="I2P-PLUGIN.html">
|
||||||
|
I2P-PLUGIN
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="I2PBrowser.html">
|
<a href="I2PBrowser.html">
|
||||||
I2PBrowser
|
I2PBrowser
|
||||||
|
@ -55,6 +55,11 @@
|
|||||||
BUILD
|
BUILD
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="I2P-PLUGIN.html">
|
||||||
|
I2P-PLUGIN
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="I2PBrowser.html">
|
<a href="I2PBrowser.html">
|
||||||
I2PBrowser
|
I2PBrowser
|
||||||
|
@ -55,6 +55,11 @@
|
|||||||
BUILD
|
BUILD
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="I2P-PLUGIN.html">
|
||||||
|
I2P-PLUGIN
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="I2PBrowser.html">
|
<a href="I2PBrowser.html">
|
||||||
I2PBrowser
|
I2PBrowser
|
||||||
|
@ -55,6 +55,11 @@
|
|||||||
BUILD
|
BUILD
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="I2P-PLUGIN.html">
|
||||||
|
I2P-PLUGIN
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="I2PBrowser.html">
|
<a href="I2PBrowser.html">
|
||||||
I2PBrowser
|
I2PBrowser
|
||||||
|
@ -55,6 +55,11 @@
|
|||||||
BUILD
|
BUILD
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="I2P-PLUGIN.html">
|
||||||
|
I2P-PLUGIN
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="I2PBrowser.html">
|
<a href="I2PBrowser.html">
|
||||||
I2PBrowser
|
I2PBrowser
|
||||||
|
@ -55,6 +55,11 @@
|
|||||||
BUILD
|
BUILD
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="I2P-PLUGIN.html">
|
||||||
|
I2P-PLUGIN
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="I2PBrowser.html">
|
<a href="I2PBrowser.html">
|
||||||
I2PBrowser
|
I2PBrowser
|
||||||
@ -163,7 +168,7 @@
|
|||||||
</h4>
|
</h4>
|
||||||
<p>
|
<p>
|
||||||
<strong>
|
<strong>
|
||||||
(Not Recommended! This functionality is already included in the Easy-Install Bundle for Windows)
|
(Recommended for advanced users ONLY. Most people should be using Easy-Install Bundle for Windows)
|
||||||
</strong>
|
</strong>
|
||||||
</p>
|
</p>
|
||||||
<ol>
|
<ol>
|
||||||
|
@ -7,7 +7,7 @@ an unbundled I2P router with an external JVM.
|
|||||||
|
|
||||||
#### Windows Jpackage: `.zip`
|
#### Windows Jpackage: `.zip`
|
||||||
|
|
||||||
**(Not Recommended! This functionality is already included in the Easy-Install Bundle for Windows)**
|
**(Recommended for advanced users ONLY. Most people should be using Easy-Install Bundle for Windows)**
|
||||||
|
|
||||||
1. Start your I2P Router
|
1. Start your I2P Router
|
||||||
2. Download the latest release `.zip` from [Github](https://github.com/eyedeekay/i2p.plugins.firefox/releases) and verify it's hash.
|
2. Download the latest release `.zip` from [Github](https://github.com/eyedeekay/i2p.plugins.firefox/releases) and verify it's hash.
|
||||||
|
Binary file not shown.
56
index.html
56
index.html
@ -55,6 +55,11 @@
|
|||||||
docs/BUILD
|
docs/BUILD
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="docs/I2P-PLUGIN.html">
|
||||||
|
docs/I2P-PLUGIN
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="docs/I2PBrowser.html">
|
<a href="docs/I2PBrowser.html">
|
||||||
docs/I2PBrowser
|
docs/I2PBrowser
|
||||||
@ -172,6 +177,48 @@
|
|||||||
It is just a profile manager.
|
It is just a profile manager.
|
||||||
</strong>
|
</strong>
|
||||||
</p>
|
</p>
|
||||||
|
<p>
|
||||||
|
<strong>
|
||||||
|
What is this?
|
||||||
|
</strong>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
This is a browser profile manager which pre-configures a browser on the host system, usually
|
||||||
|
Firefox or Tor Browser, for browsing I2P. When acting as an I2P Plugin, it adds GUI elements to
|
||||||
|
I2P for launching the browser in a highly restricted “Safe” mode(the default) or a more permissive
|
||||||
|
“Usability” mode.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
This package expresses functionality that has existed in many places at many times, sometimes
|
||||||
|
bundled with other software. As it has developed here, the border of where the Easy-Install
|
||||||
|
ends and Firefox Profile Manager begins has become clearer. This repository contains the profile
|
||||||
|
manager and it’s buildsystem, the whole profile manager, and nothing but the profile manager.
|
||||||
|
It can be used independently of other software, provided an I2P proxy on the host system somewhere.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
However, in practice, most people probably get it alongside an I2P router, through the
|
||||||
|
<strong>
|
||||||
|
I2P Easy-Install Bundle for Windows
|
||||||
|
</strong>
|
||||||
|
.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<strong>
|
||||||
|
What version numbers should I pay attention to?
|
||||||
|
</strong>
|
||||||
|
When I decided to port the
|
||||||
|
<code>
|
||||||
|
.bat
|
||||||
|
</code>
|
||||||
|
launcher scripts from the Easy-Install bundle to Java, this project
|
||||||
|
was created and started using it’s own version numbers. This was the practice up until version 1.5.0,
|
||||||
|
which was the last version to use a different version number than I2P itself. Starting in April 2024,
|
||||||
|
<code>
|
||||||
|
i2p.plugins.firefox
|
||||||
|
</code>
|
||||||
|
will follow along with the Java I2P major and minor version numbers. Incremental
|
||||||
|
changes may become differing point releases.
|
||||||
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<strong>
|
<strong>
|
||||||
All packages require a running I2P router.
|
All packages require a running I2P router.
|
||||||
@ -269,6 +316,15 @@
|
|||||||
For platform specific instructions, see
|
For platform specific instructions, see
|
||||||
</p>
|
</p>
|
||||||
<ul>
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="docs/I2P-PLUGIN.md">
|
||||||
|
I2P-PLUGIN.md
|
||||||
|
</a>
|
||||||
|
/
|
||||||
|
<a href="docs/I2P-PLUGIN.html">
|
||||||
|
I2P-PLUGIN.html
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="docs/LINUX.md">
|
<a href="docs/LINUX.md">
|
||||||
LINUX.md
|
LINUX.md
|
||||||
|
30
plugin-upload.sh
Executable file
30
plugin-upload.sh
Executable file
@ -0,0 +1,30 @@
|
|||||||
|
#! /usr/bin/env sh
|
||||||
|
|
||||||
|
. ./config.sh
|
||||||
|
NUMLINE=`grep release.number build.xml | head -n 1`
|
||||||
|
sed -i "s|${NUMLINE}| <property name=\"release.number\" value=\"$GITHUB_TAG\" />|g" build.xml
|
||||||
|
ant distclean versionMd jar plugin
|
||||||
|
|
||||||
|
github-release release --user "${GITHUB_USER}" \
|
||||||
|
--repo "${GITHUB_REPO}" \
|
||||||
|
--name "${GITHUB_NAME}" \
|
||||||
|
--description "${GITHUB_DESCRIPTION}" \
|
||||||
|
--tag "${GITHUB_TAG}"; true
|
||||||
|
sleep 2s
|
||||||
|
susum=$(sha256sum i2pfirefox.su3)
|
||||||
|
github-release upload --user "${GITHUB_USER}" \
|
||||||
|
--replace \
|
||||||
|
--repo "${GITHUB_REPO}" \
|
||||||
|
--tag "${GITHUB_TAG}" \
|
||||||
|
--label "I2P Browser launcher as an I2P Console Plugin. ${susum}" \
|
||||||
|
--name "i2pfirefox.su3" \
|
||||||
|
--file "i2pfirefox.su3"
|
||||||
|
#susum=$(sha256sum i2pfirefox-update.su3)
|
||||||
|
#github-release upload --user "${GITHUB_USER}" \
|
||||||
|
# --replace \
|
||||||
|
# --repo "${GITHUB_REPO}" \
|
||||||
|
# --tag "${GITHUB_TAG}" \
|
||||||
|
# --label "I2P Browser launcher as an I2P Console Plugin, update-only. ${susum}" \
|
||||||
|
# --name "i2pfirefox-update.su3" \
|
||||||
|
# --file "i2pfirefox-update.su3"
|
||||||
|
echo "Uploaded su3 package"
|
@ -1,3 +1,3 @@
|
|||||||
#Build Number for ANT. Do not edit!
|
#Build Number for ANT. Do not edit!
|
||||||
#Thu Mar 07 15:18:16 EST 2024
|
#Tue Jan 07 18:04:41 EST 2025
|
||||||
build.number=709
|
build.number=805
|
||||||
|
@ -1,27 +1,6 @@
|
|||||||
package net.i2p.i2pfirefox;
|
package net.i2p.i2pfirefox;
|
||||||
|
|
||||||
/*import java.awt.AWTException;
|
|
||||||
import java.awt.Component;
|
|
||||||
import java.awt.Image;
|
|
||||||
import java.awt.Menu;
|
|
||||||
import java.awt.MenuItem;
|
|
||||||
import java.awt.PopupMenu;
|
|
||||||
import java.awt.SystemTray;
|
|
||||||
import java.awt.Toolkit;
|
|
||||||
import java.awt.TrayIcon;
|
|
||||||
import java.awt.event.ActionEvent;
|
|
||||||
import java.awt.event.ActionListener;
|
|
||||||
import java.awt.event.MouseAdapter;
|
|
||||||
import java.awt.event.MouseEvent;
|
|
||||||
import java.awt.event.MouseListener;*/
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.FileOutputStream;
|
|
||||||
import java.io.FileWriter;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
|
||||||
import java.io.OutputStream;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* I2PBrowser.java
|
* I2PBrowser.java
|
||||||
@ -274,6 +253,8 @@ public class I2PBrowser extends I2PGenericUnsafeBrowser {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!this.chromium)
|
||||||
|
this.firefox = true;
|
||||||
}
|
}
|
||||||
return visitURL;
|
return visitURL;
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ import java.util.stream.Stream;
|
|||||||
* @author idk
|
* @author idk
|
||||||
* @since 0.0.1
|
* @since 0.0.1
|
||||||
*/
|
*/
|
||||||
public class I2PChromium extends I2PChromiumProfileUnpacker {
|
public class I2PChromium extends I2PChromiumProfileBuilder {
|
||||||
private final String[] CHROMIUM_SEARCH_PATHS = CHROMIUM_FINDER();
|
private final String[] CHROMIUM_SEARCH_PATHS = CHROMIUM_FINDER();
|
||||||
private Process p = null;
|
private Process p = null;
|
||||||
private String chromePath;
|
private String chromePath;
|
||||||
@ -295,7 +295,7 @@ public class I2PChromium extends I2PChromiumProfileUnpacker {
|
|||||||
}
|
}
|
||||||
// now, do the same thing, but with user.dir instead of plugin
|
// now, do the same thing, but with user.dir instead of plugin
|
||||||
// list the directories in the user.dir directory
|
// list the directories in the user.dir directory
|
||||||
File userDir = new File(System.getProperty("user.dir"));
|
File userDir = userHomeDir();
|
||||||
if (userDir.exists()) {
|
if (userDir.exists()) {
|
||||||
if (isWindows()) {
|
if (isWindows()) {
|
||||||
File searchResult = searchFile(userDir, "ungoogled-chromium.exe");
|
File searchResult = searchFile(userDir, "ungoogled-chromium.exe");
|
||||||
|
@ -30,8 +30,7 @@ public class I2PChromiumProfileBuilder extends I2PChromiumProfileChecker {
|
|||||||
return profileDir.getAbsolutePath();
|
return profileDir.getAbsolutePath();
|
||||||
} else {
|
} else {
|
||||||
// create the directory
|
// create the directory
|
||||||
I2PChromiumProfileUnpacker unpacker = new I2PChromiumProfileUnpacker();
|
if (!this.unpackProfile(profileDir.getAbsolutePath(), "chromium", mode)) {
|
||||||
if (!unpacker.unpackProfile(profileDir.getAbsolutePath(), mode)) {
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return profileDir.getAbsolutePath();
|
return profileDir.getAbsolutePath();
|
||||||
@ -54,8 +53,7 @@ public class I2PChromiumProfileBuilder extends I2PChromiumProfileChecker {
|
|||||||
if (pdf.exists() && pdf.isDirectory()) {
|
if (pdf.exists() && pdf.isDirectory()) {
|
||||||
return pd;
|
return pd;
|
||||||
} else {
|
} else {
|
||||||
I2PChromiumProfileUnpacker unpacker = new I2PChromiumProfileUnpacker();
|
if (!this.unpackProfile(pdf.getAbsolutePath(), "chromium", mode)) {
|
||||||
if (!unpacker.unpackProfile(pdf.getAbsolutePath(), mode)) {
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,42 +0,0 @@
|
|||||||
package net.i2p.i2pfirefox;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* I2PChromiumProfileUnpacker.java
|
|
||||||
* Copyright (C) 2022 idk <hankhill19580@gmail.com>
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the MIT License. See LICENSE.md for details.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
*
|
|
||||||
* I2PChromiumProfileUnpacker is a class that unpacks the Chromium profile zip
|
|
||||||
* file into the Chromium base profile directory. This is not used by the
|
|
||||||
* Chromium browser instance, it's unpacked to the disk to be copied to the
|
|
||||||
* active profile directory.
|
|
||||||
*
|
|
||||||
* @author idk
|
|
||||||
* @since 0.0.1
|
|
||||||
*/
|
|
||||||
public class I2PChromiumProfileUnpacker extends I2PChromiumProfileBuilder {
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
I2PChromiumProfileUnpacker pu = new I2PChromiumProfileUnpacker();
|
|
||||||
String profileDirectory = pu.profileDirectory("base");
|
|
||||||
if (profileDirectory == null) {
|
|
||||||
pu.logger.info("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, String mode) {
|
|
||||||
logger.info("Unpacking base profile to " + profileDirectory);
|
|
||||||
return unpackProfile(profileDirectory, "chromium", mode);
|
|
||||||
}
|
|
||||||
}
|
|
@ -9,11 +9,9 @@ import java.io.OutputStream;
|
|||||||
import java.net.Socket;
|
import java.net.Socket;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.StandardCopyOption;
|
import java.nio.file.StandardCopyOption;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
import java.util.logging.FileHandler;
|
import java.util.logging.FileHandler;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import java.util.logging.SimpleFormatter;
|
|
||||||
import java.util.zip.ZipEntry;
|
import java.util.zip.ZipEntry;
|
||||||
import java.util.zip.ZipInputStream;
|
import java.util.zip.ZipInputStream;
|
||||||
|
|
||||||
@ -36,6 +34,7 @@ public class I2PCommonBrowser {
|
|||||||
private Properties prop = new Properties();
|
private Properties prop = new Properties();
|
||||||
public Logger logger = Logger.getLogger("browserlauncher");
|
public Logger logger = Logger.getLogger("browserlauncher");
|
||||||
private FileHandler fh;
|
private FileHandler fh;
|
||||||
|
private boolean validated = false;
|
||||||
int CONFIGURED_TIMEOUT = 200;
|
int CONFIGURED_TIMEOUT = 200;
|
||||||
|
|
||||||
public I2PCommonBrowser() {
|
public I2PCommonBrowser() {
|
||||||
@ -75,6 +74,8 @@ public class I2PCommonBrowser {
|
|||||||
* @return None No return value.
|
* @return None No return value.
|
||||||
*/
|
*/
|
||||||
public void validateUserDirectory() {
|
public void validateUserDirectory() {
|
||||||
|
if (validated)
|
||||||
|
return;
|
||||||
logger.info("Validating user directory");
|
logger.info("Validating user directory");
|
||||||
String userDir = System.getProperty("user.dir");
|
String userDir = System.getProperty("user.dir");
|
||||||
String userHome = System.getProperty("user.home");
|
String userHome = System.getProperty("user.home");
|
||||||
@ -123,6 +124,7 @@ public class I2PCommonBrowser {
|
|||||||
logger.info(defaultPathFile.getAbsolutePath());
|
logger.info(defaultPathFile.getAbsolutePath());
|
||||||
}
|
}
|
||||||
System.setProperty("user.dir", defaultPathFile.getAbsolutePath());
|
System.setProperty("user.dir", defaultPathFile.getAbsolutePath());
|
||||||
|
validated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -192,15 +194,17 @@ public class I2PCommonBrowser {
|
|||||||
*
|
*
|
||||||
* @return the log file for the browser launcher
|
* @return the log file for the browser launcher
|
||||||
*/
|
*/
|
||||||
/*private File logFile() {
|
/*
|
||||||
// validateUserDirectory();
|
* private File logFile() {
|
||||||
String userDirectory = System.getProperty("user.dir");
|
* // validateUserDirectory();
|
||||||
File logDirectory = new File(userDirectory, "logs");
|
* String userDirectory = System.getProperty("user.dir");
|
||||||
if (!logDirectory.exists()) {
|
* File logDirectory = new File(userDirectory, "logs");
|
||||||
logDirectory.mkdirs();
|
* if (!logDirectory.exists()) {
|
||||||
}
|
* logDirectory.mkdirs();
|
||||||
return new File(logDirectory, "browserlauncher.log");
|
* }
|
||||||
}*/
|
* return new File(logDirectory, "browserlauncher.log");
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the runtime directory, creating it if create=true.
|
* Get the runtime directory, creating it if create=true.
|
||||||
@ -223,7 +227,7 @@ public class I2PCommonBrowser {
|
|||||||
* Returns the runtime directory path based on the given override parameter.
|
* Returns the runtime directory path based on the given override parameter.
|
||||||
*
|
*
|
||||||
* @param override the name of the environment variable to override the
|
* @param override the name of the environment variable to override the
|
||||||
* runtime
|
* runtime
|
||||||
* directory
|
* directory
|
||||||
* @return the runtime directory path as a string
|
* @return the runtime directory path as a string
|
||||||
*/
|
*/
|
||||||
@ -430,7 +434,7 @@ public class I2PCommonBrowser {
|
|||||||
* copied to
|
* copied to
|
||||||
* @throws IOException if an I/O error occurs during the file copy process
|
* @throws IOException if an I/O error occurs during the file copy process
|
||||||
*/
|
*/
|
||||||
private void copyFile(File sourceFile, File destinationFile)
|
public void copyFile(File sourceFile, File destinationFile)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
try (InputStream in = new FileInputStream(sourceFile);
|
try (InputStream in = new FileInputStream(sourceFile);
|
||||||
OutputStream out = new FileOutputStream(destinationFile)) {
|
OutputStream out = new FileOutputStream(destinationFile)) {
|
||||||
@ -586,6 +590,13 @@ public class I2PCommonBrowser {
|
|||||||
* @return the found file or null if not found
|
* @return the found file or null if not found
|
||||||
*/
|
*/
|
||||||
public File searchFile(File directory, String search) {
|
public File searchFile(File directory, String search) {
|
||||||
|
File hd = new File(System.getProperty("user.home"));
|
||||||
|
if (hd != null) {
|
||||||
|
if (directory.getAbsolutePath().equals(hd.getAbsolutePath()))
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if (directory == null || !directory.exists() || !directory.canRead())
|
||||||
|
return null;
|
||||||
if (directory.isDirectory()) {
|
if (directory.isDirectory()) {
|
||||||
File[] files = directory.listFiles();
|
File[] files = directory.listFiles();
|
||||||
for (File file : files) {
|
for (File file : files) {
|
||||||
@ -600,4 +611,18 @@ public class I2PCommonBrowser {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public File userHomeDir() {
|
||||||
|
File rd = new File(System.getProperty("user.dir"));
|
||||||
|
File hd = new File(System.getProperty("user.home"));
|
||||||
|
if (rd == null || !rd.exists()) {
|
||||||
|
if (hd == null || !hd.exists()) {
|
||||||
|
if (rd.getAbsolutePath().equals(hd.getAbsolutePath()))
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return rd;
|
||||||
|
}
|
||||||
|
logger.info("Runtime directory discovered at: " + rd);
|
||||||
|
return rd;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
package net.i2p.i2pfirefox;
|
package net.i2p.i2pfirefox;
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.FileWriter;
|
import java.io.FileWriter;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -27,7 +29,7 @@ import java.util.stream.Stream;
|
|||||||
* @author idk
|
* @author idk
|
||||||
* @since 0.0.1
|
* @since 0.0.1
|
||||||
*/
|
*/
|
||||||
public class I2PFirefox extends I2PFirefoxProfileUnpacker {
|
public class I2PFirefox extends I2PFirefoxProfileBuilder {
|
||||||
private final String[] FIREFOX_SEARCH_PATHS = FIREFOX_FINDER();
|
private final String[] FIREFOX_SEARCH_PATHS = FIREFOX_FINDER();
|
||||||
private Process process = null;
|
private Process process = null;
|
||||||
private String firefoxPath;
|
private String firefoxPath;
|
||||||
@ -124,6 +126,7 @@ public class I2PFirefox extends I2PFirefoxProfileUnpacker {
|
|||||||
}
|
}
|
||||||
return exePath;
|
return exePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String[] firefoxPathsOSX() {
|
public String[] firefoxPathsOSX() {
|
||||||
String firefoxPathsProp = getProperties().getProperty("firefox.paths.osx");
|
String firefoxPathsProp = getProperties().getProperty("firefox.paths.osx");
|
||||||
if (firefoxPathsProp != null)
|
if (firefoxPathsProp != null)
|
||||||
@ -134,6 +137,7 @@ public class I2PFirefox extends I2PFirefoxProfileUnpacker {
|
|||||||
"/Applications/Waterfox.app/Contents/MacOS",
|
"/Applications/Waterfox.app/Contents/MacOS",
|
||||||
"/Applications/Librewolf.app/Contents/MacOS"};
|
"/Applications/Librewolf.app/Contents/MacOS"};
|
||||||
}
|
}
|
||||||
|
|
||||||
private String[] FIND_FIREFOX_SEARCH_PATHS_OSX() {
|
private String[] FIND_FIREFOX_SEARCH_PATHS_OSX() {
|
||||||
String[] path = firefoxPathsOSX();
|
String[] path = firefoxPathsOSX();
|
||||||
String[] exes = firefoxBinsUnix();
|
String[] exes = firefoxBinsUnix();
|
||||||
@ -147,6 +151,7 @@ public class I2PFirefox extends I2PFirefoxProfileUnpacker {
|
|||||||
}
|
}
|
||||||
return exePath;
|
return exePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String[] firefoxPathsWindows() {
|
public String[] firefoxPathsWindows() {
|
||||||
String firefoxPathsProp =
|
String firefoxPathsProp =
|
||||||
getProperties().getProperty("firefox.paths.windows");
|
getProperties().getProperty("firefox.paths.windows");
|
||||||
@ -181,6 +186,7 @@ public class I2PFirefox extends I2PFirefoxProfileUnpacker {
|
|||||||
new File(programFiles, "Librewolf/").toString(),
|
new File(programFiles, "Librewolf/").toString(),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private String[] firefoxBinsWindows() {
|
private String[] firefoxBinsWindows() {
|
||||||
String firefoxPathsProp =
|
String firefoxPathsProp =
|
||||||
getProperties().getProperty("firefox.bins.windows");
|
getProperties().getProperty("firefox.bins.windows");
|
||||||
@ -192,6 +198,7 @@ public class I2PFirefox extends I2PFirefoxProfileUnpacker {
|
|||||||
"waterfox.exe", "waterfox-bin.exe", "librewolf.exe",
|
"waterfox.exe", "waterfox-bin.exe", "librewolf.exe",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private String[] FIND_FIREFOX_SEARCH_PATHS_WINDOWS() {
|
private String[] FIND_FIREFOX_SEARCH_PATHS_WINDOWS() {
|
||||||
String[] path = firefoxPathsWindows();
|
String[] path = firefoxPathsWindows();
|
||||||
String[] exes = firefoxBinsWindows();
|
String[] exes = firefoxBinsWindows();
|
||||||
@ -226,6 +233,7 @@ public class I2PFirefox extends I2PFirefoxProfileUnpacker {
|
|||||||
}
|
}
|
||||||
return exePath;
|
return exePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String[] FIND_FIREFOX_SEARCH_PATHS() {
|
private String[] FIND_FIREFOX_SEARCH_PATHS() {
|
||||||
switch (getOperatingSystem()) {
|
switch (getOperatingSystem()) {
|
||||||
case "Windows":
|
case "Windows":
|
||||||
@ -292,7 +300,7 @@ public class I2PFirefox extends I2PFirefoxProfileUnpacker {
|
|||||||
}
|
}
|
||||||
// now, do the same thing, but with user.dir instead of plugin
|
// now, do the same thing, but with user.dir instead of plugin
|
||||||
// list the directories in the user.dir directory
|
// list the directories in the user.dir directory
|
||||||
File userDir = new File(System.getProperty("user.dir"));
|
File userDir = userHomeDir();
|
||||||
if (userDir.exists()) {
|
if (userDir.exists()) {
|
||||||
if (isWindows()) {
|
if (isWindows()) {
|
||||||
File searchResult = searchFile(userDir, "firefox-esr.exe");
|
File searchResult = searchFile(userDir, "firefox-esr.exe");
|
||||||
@ -337,6 +345,7 @@ public class I2PFirefox extends I2PFirefoxProfileUnpacker {
|
|||||||
|
|
||||||
return new String[] {};
|
return new String[] {};
|
||||||
}
|
}
|
||||||
|
|
||||||
private String[] FIREFOX_FINDER() {
|
private String[] FIREFOX_FINDER() {
|
||||||
String[] nearby = NEARBY_FIREFOX_SEARCH_PATHS();
|
String[] nearby = NEARBY_FIREFOX_SEARCH_PATHS();
|
||||||
String[] all = FIND_FIREFOX_SEARCH_PATHS();
|
String[] all = FIND_FIREFOX_SEARCH_PATHS();
|
||||||
@ -366,8 +375,9 @@ public class I2PFirefox extends I2PFirefoxProfileUnpacker {
|
|||||||
if (firefoxFile.exists()) {
|
if (firefoxFile.exists()) {
|
||||||
logger.info("Found valid firefox at " + firefox);
|
logger.info("Found valid firefox at " + firefox);
|
||||||
validFirefoxes.add(firefox);
|
validFirefoxes.add(firefox);
|
||||||
|
} else {
|
||||||
|
logger.info("firefox at " + firefox + "does not exist");
|
||||||
}
|
}
|
||||||
logger.info("firefox at " + firefox + "does not exist");
|
|
||||||
}
|
}
|
||||||
return validFirefoxes.toArray(new String[validFirefoxes.size()]);
|
return validFirefoxes.toArray(new String[validFirefoxes.size()]);
|
||||||
}
|
}
|
||||||
@ -376,7 +386,7 @@ public class I2PFirefox extends I2PFirefoxProfileUnpacker {
|
|||||||
* Return the best available Firefox from the list of Firefoxes we have.
|
* Return the best available Firefox from the list of Firefoxes we have.
|
||||||
*
|
*
|
||||||
* @return the path to the best available Firefox, or null if none are
|
* @return the path to the best available Firefox, or null if none are
|
||||||
* found.
|
* found.
|
||||||
* @since 0.0.1
|
* @since 0.0.1
|
||||||
*/
|
*/
|
||||||
public String topFirefox() {
|
public String topFirefox() {
|
||||||
@ -411,7 +421,7 @@ public class I2PFirefox extends I2PFirefoxProfileUnpacker {
|
|||||||
*
|
*
|
||||||
* @param override the path to a valid Firefox binary to use.
|
* @param override the path to a valid Firefox binary to use.
|
||||||
* @return the path to the best available Firefox, or null if none are
|
* @return the path to the best available Firefox, or null if none are
|
||||||
* found.
|
* found.
|
||||||
* @since 0.0.1
|
* @since 0.0.1
|
||||||
*/
|
*/
|
||||||
public String topFirefox(String overrideFirefox) {
|
public String topFirefox(String overrideFirefox) {
|
||||||
@ -429,7 +439,7 @@ public class I2PFirefox extends I2PFirefoxProfileUnpacker {
|
|||||||
* the default profile.
|
* the default profile.
|
||||||
*
|
*
|
||||||
* @return a ProcessBuilder for the top Firefox binary and
|
* @return a ProcessBuilder for the top Firefox binary and
|
||||||
* the default profile.
|
* the default profile.
|
||||||
* @since 0.0.1
|
* @since 0.0.1
|
||||||
*/
|
*/
|
||||||
public ProcessBuilder defaultProcessBuilder() {
|
public ProcessBuilder defaultProcessBuilder() {
|
||||||
@ -442,7 +452,7 @@ public class I2PFirefox extends I2PFirefoxProfileUnpacker {
|
|||||||
*
|
*
|
||||||
* @param args the args to pass to the Firefox binary
|
* @param args the args to pass to the Firefox binary
|
||||||
* @return a ProcessBuilder for the top Firefox binary and
|
* @return a ProcessBuilder for the top Firefox binary and
|
||||||
* the default profile.
|
* the default profile.
|
||||||
*/
|
*/
|
||||||
public ProcessBuilder defaultProcessBuilder(String[] args) {
|
public ProcessBuilder defaultProcessBuilder(String[] args) {
|
||||||
return processBuilder(args, false);
|
return processBuilder(args, false);
|
||||||
@ -455,7 +465,7 @@ public class I2PFirefox extends I2PFirefoxProfileUnpacker {
|
|||||||
*
|
*
|
||||||
* @param args the arguments to pass to the Firefox binary.
|
* @param args the arguments to pass to the Firefox binary.
|
||||||
* @return a ProcessBuilder for the top Firefox binary and
|
* @return a ProcessBuilder for the top Firefox binary and
|
||||||
* the default profile.
|
* the default profile.
|
||||||
* @since 0.0.1
|
* @since 0.0.1
|
||||||
*/
|
*/
|
||||||
public ProcessBuilder privateProcessBuilder() {
|
public ProcessBuilder privateProcessBuilder() {
|
||||||
@ -469,7 +479,7 @@ public class I2PFirefox extends I2PFirefoxProfileUnpacker {
|
|||||||
*
|
*
|
||||||
* @param args the arguments to pass to the Firefox binary
|
* @param args the arguments to pass to the Firefox binary
|
||||||
* @return a ProcessBuilder for the top Firefox binary and
|
* @return a ProcessBuilder for the top Firefox binary and
|
||||||
* the default profile.
|
* the default profile.
|
||||||
*/
|
*/
|
||||||
public ProcessBuilder privateProcessBuilder(String[] args) {
|
public ProcessBuilder privateProcessBuilder(String[] args) {
|
||||||
ArrayList<String> argList = new ArrayList<String>();
|
ArrayList<String> argList = new ArrayList<String>();
|
||||||
@ -491,7 +501,7 @@ public class I2PFirefox extends I2PFirefoxProfileUnpacker {
|
|||||||
*
|
*
|
||||||
* @param args the arguments to pass to the Firefox binary.
|
* @param args the arguments to pass to the Firefox binary.
|
||||||
* @return a ProcessBuilder for the top Firefox binary and
|
* @return a ProcessBuilder for the top Firefox binary and
|
||||||
* the default profile.
|
* the default profile.
|
||||||
* @since 0.0.1
|
* @since 0.0.1
|
||||||
*/
|
*/
|
||||||
public ProcessBuilder appProcessBuilder() {
|
public ProcessBuilder appProcessBuilder() {
|
||||||
@ -505,7 +515,7 @@ public class I2PFirefox extends I2PFirefoxProfileUnpacker {
|
|||||||
*
|
*
|
||||||
* @param args the arguments to pass to the Firefox binary
|
* @param args the arguments to pass to the Firefox binary
|
||||||
* @return a ProcessBuilder for the top Firefox binary and
|
* @return a ProcessBuilder for the top Firefox binary and
|
||||||
* the default profile.
|
* the default profile.
|
||||||
*/
|
*/
|
||||||
public ProcessBuilder appProcessBuilder(String[] args) {
|
public ProcessBuilder appProcessBuilder(String[] args) {
|
||||||
ArrayList<String> argList = new ArrayList<String>();
|
ArrayList<String> argList = new ArrayList<String>();
|
||||||
@ -526,7 +536,7 @@ public class I2PFirefox extends I2PFirefoxProfileUnpacker {
|
|||||||
*
|
*
|
||||||
* @param args the arguments to pass to the Firefox binary
|
* @param args the arguments to pass to the Firefox binary
|
||||||
* @return a ProcessBuilder for the top Firefox binary and
|
* @return a ProcessBuilder for the top Firefox binary and
|
||||||
* the default profile.
|
* the default profile.
|
||||||
*/
|
*/
|
||||||
public ProcessBuilder headlessProcessBuilder(String[] args) {
|
public ProcessBuilder headlessProcessBuilder(String[] args) {
|
||||||
ArrayList<String> argList = new ArrayList<String>();
|
ArrayList<String> argList = new ArrayList<String>();
|
||||||
@ -548,14 +558,14 @@ public class I2PFirefox extends I2PFirefoxProfileUnpacker {
|
|||||||
*
|
*
|
||||||
* @param args the extended arguments to pass to the Firefox binary.
|
* @param args the extended arguments to pass to the Firefox binary.
|
||||||
* @return a ProcessBuilder for the top Firefox binary and
|
* @return a ProcessBuilder for the top Firefox binary and
|
||||||
* default profile, with a specific set of extended arguments.
|
* default profile, with a specific set of extended arguments.
|
||||||
* @since 0.0.1
|
* @since 0.0.1
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
public ProcessBuilder processBuilder(String[] args ) {
|
* public ProcessBuilder processBuilder(String[] args ) {
|
||||||
return processBuilder(args, false);
|
* return processBuilder(args, false);
|
||||||
}
|
* }
|
||||||
*/
|
*/
|
||||||
public ProcessBuilder processBuilder(String[] args, boolean app) {
|
public ProcessBuilder processBuilder(String[] args, boolean app) {
|
||||||
String firefox = topFirefox();
|
String firefox = topFirefox();
|
||||||
if (!firefox.isEmpty()) {
|
if (!firefox.isEmpty()) {
|
||||||
@ -683,7 +693,7 @@ public class I2PFirefox extends I2PFirefoxProfileUnpacker {
|
|||||||
pb.environment().put("TOR_SKIP_CONTROLPORTTEST", "1");
|
pb.environment().put("TOR_SKIP_CONTROLPORTTEST", "1");
|
||||||
pb.environment().put("TOR_NONTOR_PROXY", "1");
|
pb.environment().put("TOR_NONTOR_PROXY", "1");
|
||||||
return pb;
|
return pb;
|
||||||
//}
|
// }
|
||||||
// return null;
|
// return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -693,12 +703,14 @@ public class I2PFirefox extends I2PFirefoxProfileUnpacker {
|
|||||||
}
|
}
|
||||||
return "base";
|
return "base";
|
||||||
}
|
}
|
||||||
|
|
||||||
public Process launchAndDetatch(boolean privateWindow, String[] url) {
|
public Process launchAndDetatch(boolean privateWindow, String[] url) {
|
||||||
int privateWindowInt = 0;
|
int privateWindowInt = 0;
|
||||||
if (privateWindow)
|
if (privateWindow)
|
||||||
privateWindowInt = 1;
|
privateWindowInt = 1;
|
||||||
return launchAndDetatch(privateWindowInt, url);
|
return launchAndDetatch(privateWindowInt, url);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Process launchAndDetatch(int privateWindow, String[] url) {
|
public Process launchAndDetatch(int privateWindow, String[] url) {
|
||||||
validateUserDirectory();
|
validateUserDirectory();
|
||||||
boolean app = false;
|
boolean app = false;
|
||||||
@ -706,12 +718,13 @@ public class I2PFirefox extends I2PFirefoxProfileUnpacker {
|
|||||||
app = true;
|
app = true;
|
||||||
if (waitForProxy()) {
|
if (waitForProxy()) {
|
||||||
String profileDirectory = this.profileDirectory(app, baseMode());
|
String profileDirectory = this.profileDirectory(app, baseMode());
|
||||||
if (this.validateProfileDirectory(profileDirectory)) {
|
if (this.validateProfileDirectory(profileDirectory) && !isTorBrowser()) {
|
||||||
logger.info("Valid profile directory: " + profileDirectory);
|
logger.info("Valid profile directory: " + profileDirectory);
|
||||||
} else {
|
} else {
|
||||||
logger.info("Invalid profile directory: " + profileDirectory +
|
logger.info("Invalid profile directory: " + profileDirectory +
|
||||||
" rebuilding...");
|
" rebuilding...");
|
||||||
if (!this.copyBaseProfiletoProfile(usabilityMode(), app)) {
|
if (!this.copyBaseProfiletoProfile(usabilityMode(), app,
|
||||||
|
isTorBrowser())) {
|
||||||
logger.info("Failed to rebuild profile directory: " +
|
logger.info("Failed to rebuild profile directory: " +
|
||||||
profileDirectory);
|
profileDirectory);
|
||||||
return null;
|
return null;
|
||||||
@ -720,7 +733,7 @@ public class I2PFirefox extends I2PFirefoxProfileUnpacker {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (validateProfileFirstRun(profileDirectory)) {
|
if (validateProfileFirstRun(profileDirectory)) {
|
||||||
if (isWindows()) {
|
if (isWindows() && !isTorBrowser()) {
|
||||||
ProcessBuilder hpb = headlessProcessBuilder(url);
|
ProcessBuilder hpb = headlessProcessBuilder(url);
|
||||||
try {
|
try {
|
||||||
Process hp = hpb.start();
|
Process hp = hpb.start();
|
||||||
@ -786,8 +799,8 @@ public class I2PFirefox extends I2PFirefoxProfileUnpacker {
|
|||||||
* Waits for an HTTP proxy on the port 4444 to be ready.
|
* Waits for an HTTP proxy on the port 4444 to be ready.
|
||||||
* Launches Firefox with the profile directory.
|
* Launches Firefox with the profile directory.
|
||||||
*
|
*
|
||||||
* @param bool if true, the profile will be ephemeral(i.e. a
|
* @param bool if true, the profile will be ephemeral(i.e. a
|
||||||
* --private-window profile).
|
* --private-window profile).
|
||||||
* @param String[] a list of URL's to pass to the browser window
|
* @param String[] a list of URL's to pass to the browser window
|
||||||
* @since 0.0.17
|
* @since 0.0.17
|
||||||
*/
|
*/
|
||||||
@ -797,6 +810,7 @@ public class I2PFirefox extends I2PFirefoxProfileUnpacker {
|
|||||||
priv = 1;
|
priv = 1;
|
||||||
launch(priv, url);
|
launch(priv, url);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void launch(int privateWindow, String[] url) {
|
public void launch(int privateWindow, String[] url) {
|
||||||
if (waitForProxy()) {
|
if (waitForProxy()) {
|
||||||
process = launchAndDetatch(privateWindow, url);
|
process = launchAndDetatch(privateWindow, url);
|
||||||
@ -820,7 +834,7 @@ public class I2PFirefox extends I2PFirefoxProfileUnpacker {
|
|||||||
* Launches Firefox with the profile directory.
|
* Launches Firefox with the profile directory.
|
||||||
*
|
*
|
||||||
* @param bool if true, the profile will be ephemeral(i.e. a
|
* @param bool if true, the profile will be ephemeral(i.e. a
|
||||||
* --private-window profile).
|
* --private-window profile).
|
||||||
* @since 0.0.1
|
* @since 0.0.1
|
||||||
*/
|
*/
|
||||||
public void launch(boolean privateWindow) { launch(privateWindow, null); }
|
public void launch(boolean privateWindow) { launch(privateWindow, null); }
|
||||||
@ -902,12 +916,40 @@ public class I2PFirefox extends I2PFirefoxProfileUnpacker {
|
|||||||
visitURL.toArray(new String[visitURL.size()]));
|
visitURL.toArray(new String[visitURL.size()]));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*private void sleep(int millis) {
|
public boolean isTorBrowser() {
|
||||||
|
String[] args = {"--version"};
|
||||||
|
ProcessBuilder tpb = defaultProcessBuilder(args);
|
||||||
try {
|
try {
|
||||||
Thread.sleep(millis);
|
Process tp = tpb.start();
|
||||||
} catch (InterruptedException bad) {
|
BufferedReader reader =
|
||||||
bad.printStackTrace();
|
new BufferedReader(new InputStreamReader(tp.getInputStream()));
|
||||||
throw new RuntimeException(bad);
|
StringBuilder builder = new StringBuilder();
|
||||||
|
String line = null;
|
||||||
|
while ((line = reader.readLine()) != null) {
|
||||||
|
builder.append(line);
|
||||||
|
builder.append(System.getProperty("line.separator"));
|
||||||
|
}
|
||||||
|
String result = builder.toString().toLowerCase();
|
||||||
|
if (result.contains("tor ")) {
|
||||||
|
logger.info("running in Tor Browser, modifying only required config");
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
logger.info("running in regular Firefox, using extended config");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}*/
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* private void sleep(int millis) {s
|
||||||
|
* try {
|
||||||
|
* Thread.sleep(millis);
|
||||||
|
* } catch (InterruptedException bad) {
|
||||||
|
* bad.printStackTrace();
|
||||||
|
* throw new RuntimeException(bad);
|
||||||
|
* }
|
||||||
|
* }
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package net.i2p.i2pfirefox;
|
package net.i2p.i2pfirefox;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.FileWriter;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.StandardCopyOption;
|
import java.nio.file.StandardCopyOption;
|
||||||
@ -25,6 +26,44 @@ import java.nio.file.StandardCopyOption;
|
|||||||
*/
|
*/
|
||||||
public class I2PFirefoxProfileBuilder extends I2PFirefoxProfileChecker {
|
public class I2PFirefoxProfileBuilder extends I2PFirefoxProfileChecker {
|
||||||
private boolean strict;
|
private boolean strict;
|
||||||
|
|
||||||
|
private String TBB_BASE =
|
||||||
|
"user_pref(\"extensions.torbutton.use_nontor_proxy\", true);\n"
|
||||||
|
+ "user_pref(\"extensions.torlauncher.start_tor\", false);\n"
|
||||||
|
+ "user_pref(\"extensions.torlauncher.prompt_at_startup\", false);\n"
|
||||||
|
+
|
||||||
|
"user_pref(\"network.proxy.no_proxies_on\", \"127.0.0.1:7657,localhost:7657,127.0.0.1:7662,localhost:7662,127.0.0.1:7669,localhost:7669\");\n"
|
||||||
|
+ "user_pref(\"network.proxy.type\", 1);\n"
|
||||||
|
+ "user_pref(\"network.proxy.http\", \"127.0.0.1\");\n"
|
||||||
|
+ "user_pref(\"network.proxy.http_port\", 4444);\n"
|
||||||
|
+ "user_pref(\"network.proxy.ssl\", \"127.0.0.1\");\n"
|
||||||
|
+ "user_pref(\"network.proxy.ssl_port\", 4444);\n"
|
||||||
|
+ "user_pref(\"network.proxy.ftp\", \"127.0.0.1\");"
|
||||||
|
+ "user_pref(\"network.proxy.ftp_port\", 4444);\n"
|
||||||
|
+ "user_pref(\"network.proxy.socks\", \"127.0.0.1\");\n"
|
||||||
|
+ "user_pref(\"network.proxy.socks_port\", 4444);\n"
|
||||||
|
+ "user_pref(\"network.proxy.share_proxy_settings\", true);\n"
|
||||||
|
+ "user_pref(\"browser.startup.homepage\", \"about:blank\");\n"
|
||||||
|
+ "user_pref(\"keyword.enabled\", false);\n"
|
||||||
|
+ "user_pref(\"extensions.allowPrivateBrowsingByDefault\", true);\n"
|
||||||
|
+ "user_pref(\"extensions.PrivateBrowsing.notification\", false);\n"
|
||||||
|
+ "user_pref(\"extensions.pocket.enabled\", false);\n"
|
||||||
|
+
|
||||||
|
"user_pref(\"browser.newtabpage.activity-stream.showSponsoredTopSites\", false);\n"
|
||||||
|
+
|
||||||
|
"user_pref(\"browser.newtabpage.activity-stream.showSponsored\", false);\n"
|
||||||
|
+
|
||||||
|
"user_pref(\"services.sync.prefs.sync.browser.newtabpage.activity-stream.showSponsored\", false);\n"
|
||||||
|
+
|
||||||
|
"user_pref(\"browser.newtabpage.activity-stream.feeds.section.highlights\", false);\n"
|
||||||
|
+
|
||||||
|
"user_pref(\"browser.newtabpage.activity-stream.feeds.section.topstories\", false);\n"
|
||||||
|
+
|
||||||
|
"user_pref(\"browser.newtabpage.activity-stream.default.sites\", \"http://planet.i2p/,http://legwork.i2p/,http://i2pwiki.i2p/,http://i2pforums.i2p/,http://zzz.i2p/\");\n"
|
||||||
|
+
|
||||||
|
"user_pref(\"browser.newtabpage.activity-stream.feeds.topsites\", true);\n"
|
||||||
|
+ "user_pref(\"browser.fixup.domainsuffixwhitelist.i2p\", true);\n";
|
||||||
|
|
||||||
private String userChromeCSS() {
|
private String userChromeCSS() {
|
||||||
String ret =
|
String ret =
|
||||||
"@namespace url(\"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul\")\n";
|
"@namespace url(\"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul\")\n";
|
||||||
@ -99,19 +138,24 @@ public class I2PFirefoxProfileBuilder extends I2PFirefoxProfileChecker {
|
|||||||
* @return the profile directory, or null if it could not be created
|
* @return the profile directory, or null if it could not be created
|
||||||
*/
|
*/
|
||||||
// public String profileDirectory() {
|
// public String profileDirectory() {
|
||||||
// return profileDirectory("I2P_FIREFOX_PROFILE", "firefox", false);
|
// return profileDirectory("I2P_FIREFOX_PROFILE", "firefox", false);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
private String baseProfileDir(String file, String base) {
|
private String baseProfileDir(String file, String base,
|
||||||
|
boolean isTorBrowser) {
|
||||||
File profileDir = new File(file, "i2p.firefox." + base + ".profile");
|
File profileDir = new File(file, "i2p.firefox." + base + ".profile");
|
||||||
// make sure the directory exists
|
// make sure the directory exists
|
||||||
if (profileDir.exists()) {
|
if (profileDir.exists()) {
|
||||||
return profileDir.getAbsolutePath();
|
return profileDir.getAbsolutePath();
|
||||||
} else {
|
} else {
|
||||||
// create the directory
|
// create the directory
|
||||||
I2PFirefoxProfileUnpacker unpacker = new I2PFirefoxProfileUnpacker();
|
if (!isTorBrowser) {
|
||||||
if (!unpacker.unpackProfile(profileDir.getAbsolutePath(), base)) {
|
if (!this.unpackProfile(profileDir.getAbsolutePath(), "firefox",
|
||||||
return null;
|
base)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
makeTBBDirectory(profileDir, profileDir);
|
||||||
}
|
}
|
||||||
return profileDir.getAbsolutePath();
|
return profileDir.getAbsolutePath();
|
||||||
}
|
}
|
||||||
@ -122,21 +166,20 @@ public class I2PFirefoxProfileBuilder extends I2PFirefoxProfileChecker {
|
|||||||
*
|
*
|
||||||
* @return the base profile directory, or null if it could not be created
|
* @return the base profile directory, or null if it could not be created
|
||||||
*/
|
*/
|
||||||
public String baseProfileDirectory(String base) {
|
public String baseProfileDirectory(String base, boolean isTorBrowser) {
|
||||||
String pd = System.getenv("I2P_FIREFOX_BASE_PROFILE");
|
String pd = System.getenv("I2P_FIREFOX_BASE_PROFILE");
|
||||||
if (pd != null && !pd.isEmpty()) {
|
if (pd != null && !pd.isEmpty()) {
|
||||||
File pdf = new File(pd);
|
File pdf = new File(pd);
|
||||||
if (pdf.exists() && pdf.isDirectory()) {
|
if (pdf.exists() && pdf.isDirectory()) {
|
||||||
return pd;
|
return pd;
|
||||||
} else {
|
} else {
|
||||||
I2PFirefoxProfileUnpacker unpacker = new I2PFirefoxProfileUnpacker();
|
if (!this.unpackProfile(pdf.getAbsolutePath(), "firefox", base)) {
|
||||||
if (!unpacker.unpackProfile(pdf.getAbsolutePath(), base)) {
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
String rtd = runtimeDirectory();
|
String rtd = runtimeDirectory();
|
||||||
return baseProfileDir(rtd, base);
|
return baseProfileDir(rtd, base, isTorBrowser);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -177,11 +220,10 @@ public class I2PFirefoxProfileBuilder extends I2PFirefoxProfileChecker {
|
|||||||
*
|
*
|
||||||
* @since 0.0.1
|
* @since 0.0.1
|
||||||
*/
|
*/
|
||||||
public boolean copyBaseProfiletoProfile(String base, boolean app) {
|
public boolean copyBaseProfiletoProfile(String base, boolean app,
|
||||||
String baseProfile = baseProfileDirectory(base);
|
boolean isTorBrowser) {
|
||||||
|
String baseProfile = baseProfileDirectory(base, isTorBrowser);
|
||||||
String profile = profileDirectory(app, base);
|
String profile = profileDirectory(app, base);
|
||||||
logger.info("Copying base profile to profile directory: " + baseProfile +
|
|
||||||
" -> " + profile);
|
|
||||||
if (baseProfile.isEmpty() || profile.isEmpty()) {
|
if (baseProfile.isEmpty() || profile.isEmpty()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -190,24 +232,31 @@ public class I2PFirefoxProfileBuilder extends I2PFirefoxProfileChecker {
|
|||||||
|
|
||||||
if (!profileDir.exists()) {
|
if (!profileDir.exists()) {
|
||||||
try {
|
try {
|
||||||
logger.info("Copying base profile to profile directory");
|
if (!isTorBrowser) {
|
||||||
copyDirectory(baseProfileDir, profileDir, "firefox", base);
|
logger.info("Copying base profile to profile directory: " +
|
||||||
|
baseProfile + " -> " + profile);
|
||||||
|
copyDirectory(baseProfileDir, profileDir, "firefox", base);
|
||||||
|
} else {
|
||||||
|
logger.info("Creating base directory for use with Tor Browser");
|
||||||
|
makeTBBDirectory(baseProfileDir, profileDir);
|
||||||
|
}
|
||||||
|
logger.info("Copied base profile to profile directory");
|
||||||
|
return true;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.info("Error copying base profile to profile" + e);
|
logger.info("Error copying base profile to profile" + e);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
logger.info("Copied base profile to profile directory");
|
|
||||||
}
|
}
|
||||||
// if user.js does not exist yet, make an empty one.
|
// if user.js does not exist yet, make an empty one.
|
||||||
// if (!touch(profileDir.toString(), "user.js")) {
|
// if (!touch(profileDir.toString(), "user.js")) {
|
||||||
// return false;
|
// return false;
|
||||||
//}
|
// }
|
||||||
// if extensions does not exist yet, make an empty one.
|
// if extensions does not exist yet, make an empty one.
|
||||||
// if (!mkExtensionsDir(profileDir.toString())){
|
// if (!mkExtensionsDir(profileDir.toString())){
|
||||||
// return false;
|
// return false;
|
||||||
//}
|
// }
|
||||||
|
|
||||||
return copyStrictOptions(base, app);
|
return copyStrictOptions(base, app, isTorBrowser);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean writeAppChrome(String profile) {
|
protected boolean writeAppChrome(String profile) {
|
||||||
@ -223,6 +272,7 @@ public class I2PFirefoxProfileBuilder extends I2PFirefoxProfileChecker {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean deleteAppChrome(String profile) {
|
protected boolean deleteAppChrome(String profile) {
|
||||||
File dir = new File(profile, "chrome");
|
File dir = new File(profile, "chrome");
|
||||||
if (!dir.exists())
|
if (!dir.exists())
|
||||||
@ -232,15 +282,17 @@ public class I2PFirefoxProfileBuilder extends I2PFirefoxProfileChecker {
|
|||||||
f.delete();
|
f.delete();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copy the strict options from the base profile to the profile
|
* Copy the strict options from the base profile to the profile
|
||||||
*
|
*
|
||||||
* @return true if successful, false otherwise
|
* @return true if successful, false otherwise
|
||||||
* @since 0.0.1
|
* @since 0.0.1
|
||||||
*/
|
*/
|
||||||
public boolean copyStrictOptions(String base, boolean app) {
|
public boolean copyStrictOptions(String base, boolean app,
|
||||||
|
boolean isTorBrowser) {
|
||||||
logger.info("Checking strict options");
|
logger.info("Checking strict options");
|
||||||
String baseProfile = baseProfileDirectory(base);
|
String baseProfile = baseProfileDirectory(base, isTorBrowser);
|
||||||
String profile = profileDirectory(app, base);
|
String profile = profileDirectory(app, base);
|
||||||
if (baseProfile.isEmpty() || profile.isEmpty()) {
|
if (baseProfile.isEmpty() || profile.isEmpty()) {
|
||||||
logger.info("Empty paths");
|
logger.info("Empty paths");
|
||||||
@ -249,8 +301,8 @@ public class I2PFirefoxProfileBuilder extends I2PFirefoxProfileChecker {
|
|||||||
File baseProfileDir = new File(baseProfile);
|
File baseProfileDir = new File(baseProfile);
|
||||||
File profileDir = new File(profile);
|
File profileDir = new File(profile);
|
||||||
setupUserChrome(profileDir, app);
|
setupUserChrome(profileDir, app);
|
||||||
if (!baseProfileDir.exists() || !profileDir.exists()) {
|
if (!baseProfileDir.exists()) {
|
||||||
logger.info("Empty directories");
|
logger.info("Empty base directories: " + baseProfileDir);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
File baseOverrides = new File(baseProfile, "strict-overrides.js");
|
File baseOverrides = new File(baseProfile, "strict-overrides.js");
|
||||||
@ -317,6 +369,20 @@ public class I2PFirefoxProfileBuilder extends I2PFirefoxProfileChecker {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void makeTBBDirectory(File sourceDir, File destDir) {
|
||||||
|
logger.info("creating TBB directory");
|
||||||
|
if (!destDir.exists())
|
||||||
|
destDir.mkdir();
|
||||||
|
File workUserJs = new File(destDir, "user.js");
|
||||||
|
// Write the value of TBB_BASE to the file workUserJs
|
||||||
|
try (FileWriter writer = new FileWriter(workUserJs)) {
|
||||||
|
logger.info("writing TBB user.js");
|
||||||
|
writer.write(TBB_BASE);
|
||||||
|
} catch (IOException e) {
|
||||||
|
logger.info("Error writing to file: " + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct a new Profile Builder
|
* Construct a new Profile Builder
|
||||||
*
|
*
|
||||||
@ -326,6 +392,7 @@ public class I2PFirefoxProfileBuilder extends I2PFirefoxProfileChecker {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct a new Profile Builder
|
* Construct a new Profile Builder
|
||||||
|
*
|
||||||
* @param strict if true, the strict overrides will be copied to the profile
|
* @param strict if true, the strict overrides will be copied to the profile
|
||||||
*
|
*
|
||||||
* @since 0.0.1
|
* @since 0.0.1
|
||||||
|
@ -1,41 +0,0 @@
|
|||||||
package net.i2p.i2pfirefox;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* I2PFirefoxProfileUnpacker.java
|
|
||||||
* Copyright (C) 2022 idk <hankhill19580@gmail.com>
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the MIT License. See LICENSE.md for details.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
*
|
|
||||||
* I2PFirefoxProfileUnpacker is a class that unpacks the I2P Firefox profile
|
|
||||||
* from a zip file embedded in the `jar` file. The zip is unpacked to a base
|
|
||||||
* directory where it is left untouched, and the base profile is copied to the
|
|
||||||
* active profile directory.
|
|
||||||
*
|
|
||||||
* @author idk
|
|
||||||
* @since 0.0.1
|
|
||||||
*/
|
|
||||||
public class I2PFirefoxProfileUnpacker extends I2PFirefoxProfileBuilder {
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
I2PFirefoxProfileUnpacker up = new I2PFirefoxProfileUnpacker();
|
|
||||||
String profileDirectory = up.profileDirectory(false, "base");
|
|
||||||
if (profileDirectory == null) {
|
|
||||||
up.logger.info("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, String base) {
|
|
||||||
return unpackProfile(profileDirectory, "firefox", base);
|
|
||||||
}
|
|
||||||
}
|
|
@ -4,7 +4,6 @@ import java.io.File;
|
|||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.net.Socket;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
package net.i2p.i2pfirefox;
|
package net.i2p.i2pfirefox;
|
||||||
|
|
||||||
import java.io.*;
|
|
||||||
import javax.script.*;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* I2PLibreWolf.java
|
* I2PLibreWolf.java
|
||||||
* Copyright (C) 2022 idk <hankhill19580@gmail.com>
|
* Copyright (C) 2022 idk <hankhill19580@gmail.com>
|
||||||
|
@ -116,7 +116,7 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
|
|||||||
_log.info("I2P Browser tray manager not supported");
|
_log.info("I2P Browser tray manager not supported");
|
||||||
try {
|
try {
|
||||||
I2PBrowser i2pBrowser = new I2PBrowser(profileDir.getAbsolutePath());
|
I2PBrowser i2pBrowser = new I2PBrowser(profileDir.getAbsolutePath());
|
||||||
String[] args = {"http://proxy.i2p"};
|
String[] args = {"http://127.0.0.1:7657"};
|
||||||
i2pBrowser.launchFirefox(0, args);
|
i2pBrowser.launchFirefox(0, args);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
_log.error("Error starting I2P Browser", e);
|
_log.error("Error starting I2P Browser", e);
|
||||||
@ -124,10 +124,10 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
|
|||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
_log.info(
|
_log.info(
|
||||||
"Starting I2P Browser tray manager by testing http://proxy.i2p");
|
"Starting I2P Browser tray manager by testing http://127.0.0.1:7657");
|
||||||
MenuService dtg = startTrayApp();
|
MenuService dtg = startTrayApp();
|
||||||
try {
|
try {
|
||||||
Thread.sleep(1000);
|
Thread.sleep(5000);
|
||||||
} catch (InterruptedException ie) {
|
} catch (InterruptedException ie) {
|
||||||
}
|
}
|
||||||
if (dtg != null) {
|
if (dtg != null) {
|
||||||
@ -144,7 +144,7 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
|
|||||||
_log.info("I2P Browser tray manager not found");
|
_log.info("I2P Browser tray manager not found");
|
||||||
}
|
}
|
||||||
I2PBrowser i2pBrowser = new I2PBrowser(profileDir.getAbsolutePath());
|
I2PBrowser i2pBrowser = new I2PBrowser(profileDir.getAbsolutePath());
|
||||||
String[] args = {"http://proxy.i2p"};
|
String[] args = {"http://127.0.0.1:7657"};
|
||||||
i2pBrowser.launchFirefox(0, args);
|
i2pBrowser.launchFirefox(0, args);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
_log.error("Error starting I2P Browser tray manager", e);
|
_log.error("Error starting I2P Browser tray manager", e);
|
||||||
@ -190,8 +190,8 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
|
|||||||
// Ubuntu GNOME does not work, SystemTray.isSupported() returns false
|
// Ubuntu GNOME does not work, SystemTray.isSupported() returns false
|
||||||
String xdg = System.getenv("XDG_CURRENT_DESKTOP");
|
String xdg = System.getenv("XDG_CURRENT_DESKTOP");
|
||||||
boolean dflt = SystemVersion.isWindows() || SystemVersion.isMac() ||
|
boolean dflt = SystemVersion.isWindows() || SystemVersion.isMac() ||
|
||||||
//"XFCE".equals(xdg) ||
|
"XFCE".equals(xdg) || "KDE".equals(xdg) ||
|
||||||
"KDE".equals(xdg) || "LXDE".equals(xdg);
|
"LXDE".equals(xdg);
|
||||||
return _context.getProperty(PROP_DTG_ENABLED, dflt);
|
return _context.getProperty(PROP_DTG_ENABLED, dflt);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -211,7 +211,7 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
|
|||||||
_log.info("I2P Browser starting up");
|
_log.info("I2P Browser starting up");
|
||||||
try {
|
try {
|
||||||
I2PBrowser i2pBrowser = new I2PBrowser(profileDir.getAbsolutePath());
|
I2PBrowser i2pBrowser = new I2PBrowser(profileDir.getAbsolutePath());
|
||||||
String[] args = {"http://proxy.i2p"};
|
String[] args = {"http://127.0.0.1:7657"};
|
||||||
i2pBrowser.launchFirefox(0, args);
|
i2pBrowser.launchFirefox(0, args);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
_log.error("Error starting I2P Browser", e);
|
_log.error("Error starting I2P Browser", e);
|
||||||
@ -235,7 +235,7 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
|
|||||||
try {
|
try {
|
||||||
I2PBrowser i2pBrowser = new I2PBrowser(profileDir.getAbsolutePath());
|
I2PBrowser i2pBrowser = new I2PBrowser(profileDir.getAbsolutePath());
|
||||||
i2pBrowser.usability = true;
|
i2pBrowser.usability = true;
|
||||||
String[] args = {"http://proxy.i2p"};
|
String[] args = {"http://127.0.0.1:7657"};
|
||||||
i2pBrowser.launchFirefox(0, args);
|
i2pBrowser.launchFirefox(0, args);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
_log.error("Error starting I2P Browser", e);
|
_log.error("Error starting I2P Browser", e);
|
||||||
|
19
src/prefs.js
19
src/prefs.js
@ -19,11 +19,6 @@ user_pref("extensions.torlauncher.start_tor", false);
|
|||||||
//user_pref("extensions.torlauncher.default_bridge_type", "");
|
//user_pref("extensions.torlauncher.default_bridge_type", "");
|
||||||
user_pref("extensions.torlauncher.prompt_at_startup", false);
|
user_pref("extensions.torlauncher.prompt_at_startup", false);
|
||||||
|
|
||||||
// Resist-fingerprinting and first-party isolation enable
|
|
||||||
|
|
||||||
user_pref("privacy.resistFingerprinting", true);
|
|
||||||
user_pref("privacy.firstparty.isolate", true);
|
|
||||||
|
|
||||||
// Use i2p http proxy for all connections and set homepage to safe local form.
|
// Use i2p http proxy for all connections and set homepage to safe local form.
|
||||||
|
|
||||||
// DON'T allow access to the admin panel from the profile we browse i2p with.
|
// DON'T allow access to the admin panel from the profile we browse i2p with.
|
||||||
@ -39,7 +34,6 @@ user_pref("network.proxy.socks", "127.0.0.1");
|
|||||||
user_pref("network.proxy.socks_port", 4444);
|
user_pref("network.proxy.socks_port", 4444);
|
||||||
user_pref("network.proxy.share_proxy_settings", true);
|
user_pref("network.proxy.share_proxy_settings", true);
|
||||||
user_pref("browser.startup.homepage", "about:blank");
|
user_pref("browser.startup.homepage", "about:blank");
|
||||||
user_pref("dom.security.https_only_mode", false);
|
|
||||||
user_pref("keyword.enabled", false);
|
user_pref("keyword.enabled", false);
|
||||||
user_pref("extensions.allowPrivateBrowsingByDefault", true);
|
user_pref("extensions.allowPrivateBrowsingByDefault", true);
|
||||||
user_pref("extensions.PrivateBrowsing.notification", false);
|
user_pref("extensions.PrivateBrowsing.notification", false);
|
||||||
@ -51,17 +45,4 @@ user_pref("browser.newtabpage.activity-stream.feeds.section.highlights", false);
|
|||||||
user_pref("browser.newtabpage.activity-stream.feeds.section.topstories", false);
|
user_pref("browser.newtabpage.activity-stream.feeds.section.topstories", false);
|
||||||
user_pref("browser.newtabpage.activity-stream.default.sites", "http://planet.i2p/,http://legwork.i2p/,http://i2pwiki.i2p/,http://i2pforums.i2p/,http://zzz.i2p/");
|
user_pref("browser.newtabpage.activity-stream.default.sites", "http://planet.i2p/,http://legwork.i2p/,http://i2pwiki.i2p/,http://i2pforums.i2p/,http://zzz.i2p/");
|
||||||
user_pref("browser.newtabpage.activity-stream.feeds.topsites", true);
|
user_pref("browser.newtabpage.activity-stream.feeds.topsites", true);
|
||||||
user_pref("ui.use_standins_for_native_colors", true);
|
|
||||||
user_pref("webgl.disable-extensions", true);
|
|
||||||
user_pref("webgl.min_capability_mode", true);
|
|
||||||
user_pref("webgl.disable-fail-if-major-performance-caveat", true);
|
|
||||||
user_pref("webgl.enable-webgl2", false);
|
|
||||||
user_pref("media.navigator.enabled", false);
|
|
||||||
user_pref("dom.w3c_touch_events.enabled", false);
|
|
||||||
user_pref("browser.privatebrowsing.autostart", false);
|
|
||||||
user_pref("browser.display.use_system_colors", false);
|
|
||||||
user_pref("dom.image-lazy-loading.enabled", false);
|
|
||||||
user_pref("extensions.autoDisableScopes", 0);
|
|
||||||
user_pref("extensions.enabledScopes", 1);
|
|
||||||
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", false);
|
|
||||||
user_pref("browser.fixup.domainsuffixwhitelist.i2p", true);
|
user_pref("browser.fixup.domainsuffixwhitelist.i2p", true);
|
2
src/usability.properties
Normal file
2
src/usability.properties
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
main-class=net.i2p.i2pfirefox.I2PBrowser
|
||||||
|
arguments=-usability
|
@ -228,4 +228,24 @@ user_pref("dom.w3c_touch_events.enabled", false);
|
|||||||
user_pref("browser.privatebrowsing.autostart", false);
|
user_pref("browser.privatebrowsing.autostart", false);
|
||||||
user_pref("browser.display.use_system_colors", false);
|
user_pref("browser.display.use_system_colors", false);
|
||||||
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", false);
|
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", false);
|
||||||
user_pref("browser.fixup.domainsuffixwhitelist.i2p", true);
|
user_pref("browser.fixup.domainsuffixwhitelist.i2p", true);
|
||||||
|
|
||||||
|
user_pref("ui.use_standins_for_native_colors", true);
|
||||||
|
user_pref("webgl.disable-extensions", true);
|
||||||
|
user_pref("webgl.min_capability_mode", true);
|
||||||
|
user_pref("webgl.disable-fail-if-major-performance-caveat", true);
|
||||||
|
user_pref("webgl.enable-webgl2", false);
|
||||||
|
user_pref("media.navigator.enabled", false);
|
||||||
|
user_pref("dom.w3c_touch_events.enabled", false);
|
||||||
|
user_pref("browser.privatebrowsing.autostart", false);
|
||||||
|
user_pref("browser.display.use_system_colors", false);
|
||||||
|
user_pref("dom.image-lazy-loading.enabled", false);
|
||||||
|
user_pref("extensions.autoDisableScopes", 0);
|
||||||
|
user_pref("extensions.enabledScopes", 1);
|
||||||
|
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", false);
|
||||||
|
user_pref("dom.security.https_only_mode", false);
|
||||||
|
|
||||||
|
// Resist-fingerprinting and first-party isolation enable
|
||||||
|
|
||||||
|
user_pref("privacy.resistFingerprinting", true);
|
||||||
|
user_pref("privacy.firstparty.isolate", true);
|
43
tools.sh
Executable file
43
tools.sh
Executable file
@ -0,0 +1,43 @@
|
|||||||
|
#! /usr/bin/env sh
|
||||||
|
|
||||||
|
. ./config.sh
|
||||||
|
#./preprelease.sh
|
||||||
|
github-release release --user "${GITHUB_USER}" \
|
||||||
|
--repo "${GITHUB_REPO}" \
|
||||||
|
--name "Build Tools" \
|
||||||
|
--description "binaries required for generating the profiles" \
|
||||||
|
--tag "build-tools"; true
|
||||||
|
echo "Uploading generated build-tools"
|
||||||
|
sleep 2s
|
||||||
|
torsum=$(sha256sum $HOME/go/bin/crx3 | sed "s|$HOME||g")
|
||||||
|
echo "$torsum"
|
||||||
|
github-release upload --user "${GITHUB_USER}" \
|
||||||
|
--replace \
|
||||||
|
--repo "${GITHUB_REPO}" \
|
||||||
|
--tag "build-tools" \
|
||||||
|
--label "crx3 for Linux. ${torsum}" \
|
||||||
|
--name "crx3-linux" \
|
||||||
|
--file "$HOME/go/bin/crx3"
|
||||||
|
echo "Uploaded crx3 linux package"
|
||||||
|
torsum=$(sha256sum $HOME/go/bin/darwin_amd64/crx3 | sed "s|$HOME||g")
|
||||||
|
echo "$torsum"
|
||||||
|
github-release upload --user "${GITHUB_USER}" \
|
||||||
|
--replace \
|
||||||
|
--repo "${GITHUB_REPO}" \
|
||||||
|
--tag "build-tools" \
|
||||||
|
--label "crx3 for Mac. ${torsum}" \
|
||||||
|
--name "crx3-osx" \
|
||||||
|
--file "$HOME/go/bin/darwin_amd64/crx3"
|
||||||
|
echo "Uploaded crx3 mac package"
|
||||||
|
torsum=$(sha256sum $HOME/go/bin/windows_amd64/crx3.exe | sed "s|$HOME||g")
|
||||||
|
echo "$torsum"
|
||||||
|
github-release upload --user "${GITHUB_USER}" \
|
||||||
|
--replace \
|
||||||
|
--repo "${GITHUB_REPO}" \
|
||||||
|
--tag "build-tools" \
|
||||||
|
--label "crx3 for Windows. ${torsum}" \
|
||||||
|
--name "crx3.exe" \
|
||||||
|
--file "$HOME/go/bin/windows_amd64/crx3.exe"
|
||||||
|
echo "Uploaded crx3 windows package"
|
||||||
|
git pull github --tags
|
||||||
|
git push --all
|
Reference in New Issue
Block a user