Compare commits

...

134 Commits
1.0.6 ... 1.3.2

Author SHA1 Message Date
75049fa08e fix plugin build 2024-03-07 13:25:50 -05:00
113caaa922 Attempt release upload in CI 2024-03-07 13:19:19 -05:00
bf1b923750 redownload artifacts from ant.yml in release release.yml 2024-03-07 13:12:50 -05:00
286122d492 see about doing releases in CI 2024-03-07 12:52:19 -05:00
9ebc0eae81 page generation update for: 2024-03-07 11:35:28.227799872 -0500 EST m=+44.700656834 2024-03-07 11:35:28 -05:00
de6cdb7b42 Update changelog 2024-03-07 11:30:54 -05:00
fdeb86d356 use about:blank when url list is null 2024-03-07 11:22:28 -05:00
b25cb2c9b3 remove redundant menu item, don't worry about a thread for the Firefox, it doesn't even need to know if it's started, don't force logs into a file where logs don't belong 2024-03-07 11:00:13 -05:00
515e52eeb2 don't bother with update target for now 2024-03-05 18:09:48 -05:00
616a839c8b clang-format again 2024-03-05 18:06:04 -05:00
da5ae47278 cut plugin zip size by 49% 2024-03-05 17:25:02 -05:00
c37df87516 fix plugin jar package upload 2024-03-05 17:10:07 -05:00
980c59d031 separate ant call for plugin 2024-03-05 17:02:42 -05:00
b8b5c45126 no password on unsigned plugin 2024-03-05 16:56:39 -05:00
affc3e5d40 Add plugin zip to CI 2024-03-05 16:32:38 -05:00
f225bbb35e clang-format everything, whitespace-only changes 2024-03-05 16:31:28 -05:00
6ed3aae543 Add plugin zip to CI 2024-03-05 16:29:58 -05:00
aa54248eb8 inform the application about the plugin state 2024-03-04 20:12:14 -05:00
9a5c2bbe42 running state should simply reflect if Firefox is running 2024-03-04 18:32:02 -05:00
fccccfedfa running state should simply reflect if Firefox is running 2024-03-04 18:30:37 -05:00
3b8baa4db4 running state should simply reflect if Firefox is running 2024-03-04 18:26:15 -05:00
31f1483aa7 Fix build.xm; 2024-03-04 17:06:50 -05:00
1157eb666e add main to plugin jar 2024-03-04 16:27:40 -05:00
c300648c22 add main to plugin jar 2024-03-04 16:26:12 -05:00
267047f687 add main to plugin jar 2024-03-04 16:23:35 -05:00
1f6c3348a3 clients.config update 2024-03-04 16:10:07 -05:00
47962f350b clients.config update 2024-03-04 15:46:38 -05:00
625d13d4a3 fix file extensions of jar uploads 2024-03-04 15:42:09 -05:00
61aa5f4b1f build plugin deps in CI 2024-03-04 15:36:33 -05:00
d1d457a0fe add plugin jar to normal build 2024-03-01 21:45:10 -05:00
cac93e0f48 Call stop in StopperThread 2024-03-01 21:38:17 -05:00
e1401ea5d0 Re-create the I2P Plugin 2024-03-01 16:52:37 -05:00
8ce0bd3f12 fix rpm path 2024-02-23 00:52:00 -05:00
3c705909ea fix rpm path 2024-02-23 00:49:28 -05:00
5db2119370 add rpm-build 2024-02-23 00:18:34 -05:00
9f309457e6 switch back to Temurin 2024-02-22 23:25:21 -05:00
1bab795f26 use openjdk from fedora image 2024-02-22 22:52:25 -05:00
012e5d6d5b add xz to fedora image 2024-02-22 22:41:18 -05:00
74f946bbe8 rm torsocks from fedora image 2024-02-22 22:18:30 -05:00
e606cd68bb Add torsocks to fedora image 2024-02-22 21:08:01 -05:00
a833bb30bd Add temurin to fedora image 2024-02-22 21:03:04 -05:00
be5204bf76 Add utils to fedora image 2024-02-22 20:58:26 -05:00
7332ae013d Do a Fedora build too 2024-02-22 20:54:16 -05:00
7a008be8d7 Do a Fedora build too 2024-02-22 20:51:46 -05:00
4101a344a2 start recreating plugin 2024-02-21 00:48:04 -05:00
ff35bc7023 build mac dev builds 2024-02-20 23:57:37 -05:00
1249e78543 Remove redundant old scripts 2024-02-20 22:45:30 -05:00
af1c32ccc1 fix versions 2024-02-20 21:40:24 -05:00
50c2f33f55 don't zip twice 2024-02-20 21:33:30 -05:00
6178b723f5 don't count on poweshell aliases to be there 2024-02-20 21:24:15 -05:00
c71b30d5c1 try zipping in ci script instead of ant 2024-02-20 20:56:14 -05:00
7d66622db2 use powershell to zip windows in CI 2024-02-20 20:32:18 -05:00
fe8616491a attempt portable in CI 2024-02-20 19:30:45 -05:00
240b54d280 attempt portable in CI 2024-02-20 19:20:23 -05:00
903da4bb7a fix upload paths 2024-02-20 19:08:04 -05:00
ab936f08eb move other windows packaging script into ant 2024-02-20 19:04:39 -05:00
61431a027c move windows packaging script into ant 2024-02-20 19:03:26 -05:00
8cca947702 move windows packaging script into ant 2024-02-20 19:02:56 -05:00
ae888b9a06 assure gobin is in path at script level 2024-02-20 18:55:12 -05:00
e9c1d78a75 specify bash for some commands 2024-02-20 18:52:11 -05:00
e930adf49d try windows build 2024-02-20 18:49:40 -05:00
496db4a1f5 build both 2024-02-01 16:14:26 -05:00
4cf2854896 fix deb path 2024-02-01 16:12:13 -05:00
9e3a834f88 fix deb path 2024-02-01 16:11:36 -05:00
8fd2874722 upload deb in CI 2024-02-01 15:49:33 -05:00
83f49f5b12 Remove debian.sh and put it in build.xml instead 2024-02-01 15:44:17 -05:00
b7bb0b3da1 try uploading the portable jpackage in CI 2024-02-01 15:25:12 -05:00
7d10266562 try building the portable jpackage for linux in CI 2024-02-01 15:12:16 -05:00
53a1e0ff0f add chromium and jar artifacts 2024-02-01 15:10:00 -05:00
524896c03f change artifact names 2024-02-01 15:05:36 -05:00
effe91b6f6 upgrade node versions 2024-02-01 15:02:56 -05:00
f0616b82d4 add manifest-json-version 2024-02-01 14:53:38 -05:00
28153cc7a4 specify amo-version hash 2024-02-01 14:49:33 -05:00
069f6fb107 install dzip first since amo-version is most troublesome 2024-02-01 14:46:58 -05:00
6073584af8 force it to re-run with new amo-version 2024-02-01 14:44:50 -05:00
a4ec776107 force it to re-run with new amo-version 2024-02-01 14:36:19 -05:00
3b2c59f38c try and get github to build it 2024-02-01 14:05:08 -05:00
f0d9aad522 try and get github to build it 2024-02-01 13:58:36 -05:00
101d814777 try and get github to build it 2024-02-01 13:54:37 -05:00
ca5409b8b8 try and get github to build it 2024-02-01 13:50:48 -05:00
1397463841 try and get github to build it 2024-02-01 13:48:39 -05:00
fcfa56a4c9 try and get github to build it 2024-02-01 13:45:39 -05:00
8694c726c5 try and get github to build it 2024-02-01 13:43:56 -05:00
c2b4442e51 try and get github to build it 2024-02-01 12:47:23 -05:00
ac3b7163d8 try and get github to build it 2024-02-01 12:44:36 -05:00
14cd4268f4 update versions 2024-02-01 11:36:50 -05:00
db5f10764b page generation update for: 2023-12-27 17:21:02.723059604 -0500 EST m=+0.619748086 2023-12-27 17:21:02 -05:00
f2895049f5 page generation update for: 2023-12-27 16:57:46.740090032 -0500 EST m=+0.640553623 2023-12-27 16:57:46 -05:00
940808d3a2 page generation update for: 2023-12-27 16:54:23.201534121 -0500 EST m=+0.538381510 2023-12-27 16:54:23 -05:00
1eb1b4c65f update version nums 2023-12-27 16:43:52 -05:00
a9a178331e update plugin version, fix building on unix 2023-12-11 13:14:39 -05:00
6a6e688c87 fix the firefox tests 2023-07-11 14:20:14 -04:00
db3020c389 refactor I2PFirefoxProfileChecker.java 2023-07-11 14:10:34 -04:00
3f51a667ab refactor I2PFirefoxProfileChecker.java 2023-07-11 13:56:35 -04:00
1635421d0b include the javadoc 2023-07-11 13:48:16 -04:00
fdcd79aee9 include the javadoc 2023-07-11 13:46:22 -04:00
df325a0717 refactor I2PCommonBrowser.java for simplicity and readability 2023-07-11 13:19:59 -04:00
idk
aa95cab914 fix merge conflicts 2023-07-06 15:12:11 -04:00
idk
fffba3dd6d update plugins, update version number 2023-07-06 15:07:57 -04:00
idk
b5a257a57c page generation update for: 2023-07-06 15:00:19.484928122 -0400 EDT m=+0.268873888 2023-07-06 15:00:19 -04:00
idk
7cdf84bb26 page generation update for: 2023-07-01 17:56:18.467355866 -0400 EDT m=+0.320767561 2023-07-01 17:56:18 -04:00
idk
375774687b update version 2023-07-01 17:56:08 -04:00
idk
d930a201dd update all package versions 2023-07-01 17:28:24 -04:00
idk
f97f960b90 update osx-dmg.sh to do signing 2023-02-23 00:50:05 +00:00
idk
047a07a144 page generation update for: 2023-02-12 20:34:11.592702259 +0000 UTC m=+16.220661611 2023-02-12 20:34:11 +00:00
idk
bf0e479172 bump version, update changelog 2023-02-12 20:30:36 +00:00
idk
9ae73cedc1 fix reference to release.number 2023-02-12 20:17:57 +00:00
idk
46be5415bb debian build which automatically configures Tor Browser. I do not think that it has write permission to it's own directory, making Tor Browser updates probably impossible. Don't use it yet. 2023-01-18 06:38:48 +00:00
idk
2e07457135 page generation update for: 2023-01-18 06:17:44.771572675 +0000 UTC m=+90.303360112 2023-01-18 06:17:45 +00:00
idk
408b36c213 page generation update for: 2023-01-18 06:01:48.23392843 +0000 UTC m=+169.394923216 2023-01-18 06:01:49 +00:00
idk
1b77245998 fixup the scripts 2023-01-18 05:57:35 +00:00
idk
5c7bbace94 page generation update for: 2023-01-18 05:21:43.123519064 +0000 UTC m=+59.342657973 2023-01-18 05:21:43 +00:00
idk
00fa22cb0d bump for release 2023-01-18 05:07:54 +00:00
idk
8d9a4551fc remove HTTPS everywhere from all profiles. Generate a Tor Browser install to go inside the Linux jpackage portables/ 2023-01-18 04:35:53 +00:00
idk
98bf6889b8 post-release script tweaks 2023-01-01 05:27:14 +00:00
idk
34b97f706c page generation update for: 2023-01-01 02:58:42.839639106 +0000 UTC m=+16.359383969 2023-01-01 02:58:42 +00:00
idk
5c33d8b86e create zip of the torrent contents and release it 2023-01-01 02:56:07 +00:00
idk
20c481b59a create zip of the torrent contents 2023-01-01 02:50:36 +00:00
idk
60303ae33c add cmd script(valid in both batch and bash) to plugin directory, allowing it to be launched by adding it to routerconsole.browser 2023-01-01 02:43:52 +00:00
idk
cdc51127e0 bump versions 2023-01-01 02:37:26 +00:00
idk
9698715117 remove a bunch of static reference bull 2023-01-01 01:45:50 +00:00
idk
fed53350cb page generation update for: 2022-12-31 22:23:00.823477148 +0000 UTC m=+14.444190363 2022-12-31 22:23:00 +00:00
idk
09bd2fe4b2 page generation update for: 2022-12-31 22:20:56.231132457 +0000 UTC m=+15.828487886 2022-12-31 22:20:56 +00:00
idk
ccff3df856 add mozilla working directories to .gitignore 2022-12-31 22:20:12 +00:00
idk
b0da8bd494 optimizations for running in Tor Browser, optimizations to keep I2P TLD out of search engines 2022-12-31 22:12:12 +00:00
idk
82cb3da2fe build adjustments 2022-12-31 21:31:06 +00:00
idk
0b9d784810 page generation update for: 2022-12-31 20:03:28.979605024 +0000 UTC m=+15.020834097 2022-12-31 20:03:29 +00:00
idk
cacf832cb6 page generation update for: 2022-12-31 20:01:50.557119275 +0000 UTC m=+15.437837517 2022-12-31 20:01:50 +00:00
idk
a06fe41b25 add docs 2022-12-31 20:00:56 +00:00
idk
8acde05618 Only try to set env vars when using nearby shell 2022-12-23 19:41:55 +00:00
idk
13b5aeb9ee Set HOME to avoid creating .mozilla directory in the real HOME 2022-12-23 18:36:04 +00:00
idk
2035e590c2 set portable envars when running firefox 2022-12-23 06:20:42 +00:00
idk
331b8a4864 set portable envars when running firefox 2022-12-23 06:20:09 +00:00
idk
7d0a3145f0 releaser script fixups 2022-12-23 01:44:01 +00:00
84 changed files with 16184 additions and 10091 deletions

240
.github/workflows/ant.yml vendored Normal file
View File

@ -0,0 +1,240 @@
# Mostly copied from i2p.i2p, by way of: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-ant
# zlatinb did it originally, now I maintain it(idk)
name: Java CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: dependencies
run: sudo apt install gettext golang-go git ant
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name : Generate override.properties
run: |
rm -f override.properties
echo "build.built-by=GitHub Actions" >> override.properties
echo "noExe=true" >> override.properties
- name: install crx3
run: go install github.com/mediabuyerbot/go-crx3/crx3@latest
- name: install dzip
run: go install github.com/delicb/dzip@latest
- name: install amo-version
run: go install github.com/eyedeekay/amo-version@a4f4119eac453a14d6b6184b656320eb72b5da3c
- name: install manifest-json-version
run: go install github.com/eyedeekay/manifest-json-version@latest
- run: git clone https://github.com/i2p/i2p.i2p ../i2p.i2p
- run: cd ../i2p.i2p && ant builddep
- name: build with Ant
run: |
export PATH=$PATH:$(go env GOPATH)/bin
ant distclean jpackage debian
- name: Upload Firefox Profile Strict
uses: actions/upload-artifact@v4
with:
name: i2p.firefox.base.profile-${{ github.sha }}.zip
path: ./src/i2p.firefox.base.profile.zip
- name: Upload Firefox Profile Usability
uses: actions/upload-artifact@v4
with:
name: i2p.firefox.usability.profile-${{ github.sha }}.zip
path: ./src/i2p.firefox.usability.profile.zip
- name: Upload Chromium Profile Strict
uses: actions/upload-artifact@v4
with:
name: i2p.chromium.base.profile-${{ github.sha }}.zip
path: ./src/i2p.chromium.base.profile.zip
- name: Upload Chromium Profile Usability
uses: actions/upload-artifact@v4
with:
name: i2p.chromium.usability.profile-${{ github.sha }}.zip
path: ./src/i2p.chromium.usability.profile.zip
- name: Upload i2pfirefox.jar
uses: actions/upload-artifact@v4
with:
name: i2pfirefox-${{ github.sha }}.jar
path: ./src/build/i2pfirefox.jar
- name: Upload i2pfirefox-plugin.jar
uses: actions/upload-artifact@v4
with:
name: i2pfirefox-plugin-${{ github.sha }}.jar
path: ./src/build/i2pfirefox-plugin.jar
- name: Upload i2pbrowser.tar.gz
uses: actions/upload-artifact@v4
with:
name: i2pbrowser-${{ github.sha }}.tar.gz
path: ./i2pbrowser.tar.gz
- name: Upload i2pbrowser.deb
uses: actions/upload-artifact@v4
with:
name: i2pbrowser_${{ github.sha }}_amd64.deb
path: ./i2pbrowser_1.0.0_amd64.deb
- name: build plugin with Ant
run: |
export PATH=$PATH:$(go env GOPATH)/bin
ant distclean pluginzip
- name: Upload i2pfirefox.zip (unsigned plugin)
uses: actions/upload-artifact@v4
with:
name: i2pfirefox-${{ github.sha }}.zip
path: ./plugin.zip
buildrpm:
runs-on: ubuntu-latest
container: fedora
steps:
- name: dependencies
run: sudo yum install -y gettext golang-go git ant jq wget curl gpg xz ca-certificates rpm-build
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- run: echo [Adoptium] >> /etc/yum.repos.d/adoptium.repo
- run: echo name=Adoptium >> /etc/yum.repos.d/adoptium.repo
- run: . /etc/os-release; echo baseurl=https://packages.adoptium.net/artifactory/rpm/fedora/$VERSION_ID/x86_64/ >> /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 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 install -y temurin-21-jdk
- name: Generate override.properties
run: |
rm -f override.properties
echo "build.built-by=GitHub Actions" >> override.properties
echo "noExe=true" >> override.properties
- name: install crx3
run: go install github.com/mediabuyerbot/go-crx3/crx3@latest
- name: install dzip
run: go install github.com/delicb/dzip@latest
- name: install amo-version
run: go install github.com/eyedeekay/amo-version@a4f4119eac453a14d6b6184b656320eb72b5da3c
- name: install manifest-json-version
run: go install github.com/eyedeekay/manifest-json-version@latest
- run: git clone https://github.com/i2p/i2p.i2p ../i2p.i2p
- run: cd ../i2p.i2p && ant builddep
- name: build with Ant
run: |
export PATH=$PATH:$(go env GOPATH)/bin
ant distclean jpackage fedora
find . -name '*.rpm'
- name: Upload i2pbrowser.rpm
uses: actions/upload-artifact@v4
with:
name: i2pbrowser-${{ github.sha }}.x86_64.rpm
path: ./i2pbrowser-1.0.0-1.x86_64.rpm
buildwin:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- uses: actions/setup-go@v5
with:
go-version: '1.21'
- name : Generate override.properties
run: |
bash -c 'rm -f override.properties'
bash -c 'echo "build.built-by=GitHub Actions" >> override.properties'
bash -c 'echo "noExe=true" >> override.properties'
- name: install crx3
run: go install github.com/mediabuyerbot/go-crx3/crx3@latest
- name: install dzip
run: go install github.com/delicb/dzip@latest
- name: install amo-version
run: go install github.com/eyedeekay/amo-version@a4f4119eac453a14d6b6184b656320eb72b5da3c
- name: install manifest-json-version
run: go install github.com/eyedeekay/manifest-json-version@latest
- run: git clone https://github.com/i2p/i2p.i2p ../i2p.i2p
- run: cd ../i2p.i2p && ant builddep
- name: build exe with Ant
run: |
ant windows
bash -c 'ls *.exe'
- name: Upload Firefox Profile EXE Installer
uses: actions/upload-artifact@v4
with:
name: i2pbrowser-1.0.0-${{ github.sha }}.exe
path: ./i2pbrowser-1.0.0.exe
- name: build msi with Ant
run: |
ant windows-msi
bash -c 'ls *.msi'
- name: Upload Firefox Profile MSI Installer
uses: actions/upload-artifact@v4
with:
name: i2pbrowser-1.0.0-${{ github.sha }}.msi
path: ./i2pbrowser-1.0.0.msi
- name: build portable zip with Ant
run: |
ant windows-portable
bash -c 'ls *.zip'
- name: Upload Firefox Profile Portable Zip
uses: actions/upload-artifact@v4
with:
name: i2pbrowser-portable-${{ github.sha }}.zip
path: ./i2pbrowser-portable.zip
buildmac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- uses: actions/setup-go@v5
with:
go-version: '1.21'
- name : Generate override.properties
run: |
bash -c 'rm -f override.properties'
bash -c 'echo "build.built-by=GitHub Actions" >> override.properties'
bash -c 'echo "noExe=true" >> override.properties'
- name: install crx3
run: go install github.com/mediabuyerbot/go-crx3/crx3@latest
- name: install dzip
run: go install github.com/delicb/dzip@latest
- name: install amo-version
run: go install github.com/eyedeekay/amo-version@a4f4119eac453a14d6b6184b656320eb72b5da3c
- name: install manifest-json-version
run: go install github.com/eyedeekay/manifest-json-version@latest
- run: git clone https://github.com/i2p/i2p.i2p ../i2p.i2p
- run: cd ../i2p.i2p && ant builddep
- name: build dmg with Ant
run: |
ant macos
bash -c 'ls *.dmg'
- name: Upload Firefox Profile DMG Installer
uses: actions/upload-artifact@v4
with:
name: i2pbrowser-1.0.0-${{ github.sha }}.dmg
path: ./i2pbrowser-1.0.0.dmg
- name: build pkg with Ant
run: |
ant macos-pkg
bash -c 'ls *.pkg'
- name: Upload Firefox Profile PKG Installer
uses: actions/upload-artifact@v4
with:
name: i2pbrowser-1.0.0-${{ github.sha }}.pkg
path: ./i2pbrowser-1.0.0.pkg

29
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,29 @@
name: Release
#on: [push]
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- '*.*.*' # Release 1.2.3
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download artifacts
id: download-artifact
uses: dawidd6/action-download-artifact@v3
with:
workflow: ant.yml
if_no_artifact_found: fail
- name: List artifacts
run: ls -lah
- name: Upload artifacts
uses: ncipollo/release-action@v1
with:
artifacts: "*"
bodyFile: "CHANGES.md"

4
.gitignore vendored
View File

@ -33,3 +33,7 @@ arkenfoxnum
i2p.plugins.firefox/ i2p.plugins.firefox/
/icon.png /icon.png
/systray.running /systray.running
/.cache
/.mozilla
/i2p.plugins.firefox.torrent.zip
/plugin

View File

@ -8,8 +8,11 @@
<meta name="keywords" content="main" /> <meta name="keywords" content="main" />
<link rel="stylesheet" type="text/css" href="style.css" /> <link rel="stylesheet" type="text/css" href="style.css" />
<link rel="stylesheet" type="text/css" href="showhider.css" /> <link rel="stylesheet" type="text/css" href="showhider.css" />
<link rel="stylesheet" type="text/css" href="darklight.css" />
</head> </head>
<body> <body>
<input type="checkbox" id="checkboxDarkLight">
<div class="container">
<div id="navbar"> <div id="navbar">
<a href="#shownav"> <a href="#shownav">
Show navigation Show navigation
@ -47,6 +50,11 @@
index.html index.html
</a> </a>
</li> </li>
<li>
<a href="docs/BUILD.html">
docs/BUILD
</a>
</li>
<li> <li>
<a href="docs/I2PBrowser.html"> <a href="docs/I2PBrowser.html">
docs/I2PBrowser docs/I2PBrowser
@ -54,7 +62,7 @@
</li> </li>
<li> <li>
<a href="docs/I2PBrowserPlugin.html"> <a href="docs/I2PBrowserPlugin.html">
docs/I2PBrowserPlugin docs/I2PBrowserPlugin.html
</a> </a>
</li> </li>
<li> <li>
@ -109,7 +117,22 @@
</li> </li>
<li> <li>
<a href="docs/I2PLibreWolf.html"> <a href="docs/I2PLibreWolf.html">
docs/I2PLibreWolf docs/I2PLibreWolf.html
</a>
</li>
<li>
<a href="docs/LINUX.html">
docs/LINUX
</a>
</li>
<li>
<a href="docs/OSX.html">
docs/OSX
</a>
</li>
<li>
<a href="docs/WINDOWS.html">
docs/WINDOWS
</a> </a>
</li> </li>
</ul> </ul>
@ -123,6 +146,42 @@
<a id="returnhome" href="/"> <a id="returnhome" href="/">
/ /
</a> </a>
<h2>
Thu, March 7
</h2>
<ul>
<li>
re-implement Plugin functions with Destop GUI API.
</li>
<li>
Fix several NPE&rsquo;s
</li>
<li>
Delete redundant code
</li>
<li>
CI/CD improvements, packaging improvements
</li>
</ul>
<h2>
Tue, January 17
</h2>
<ul>
<li>
Remove HTTPS everywhere from all profiles
</li>
<li>
Generate a Tor Browser install to go inside Linux jpackage portables
</li>
</ul>
<h2>
Sat, December 31
</h2>
<ul>
<li>
Add environment variables which customize behavior of Tor Browser
</li>
</ul>
<h2> <h2>
Sun, December 18 Sun, December 18
</h2> </h2>
@ -1287,12 +1346,13 @@ Public License instead of this License.
</div> </div>
</div> </div>
</div> </div>
</div>
<div> <div>
<iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe> <iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe>
</div> </div>
<div> <div>
<a href="https://geti2p.net/"> <a href="https://geti2p.net/">
<img src="i2plogo.png"></img> <img class="i2plogo" src="i2plogo.png"></img>
I2P I2P
</a> </a>
</div> </div>

View File

@ -1,3 +1,22 @@
Thu, March 7
------------
- re-implement Plugin functions with Destop GUI API.
- Fix several NPE's
- Delete redundant code
- CI/CD improvements, packaging improvements
Tue, January 17
---------------
- Remove HTTPS everywhere from all profiles
- Generate a Tor Browser install to go inside Linux jpackage portables
Sat, December 31
----------------
- Add environment variables which customize behavior of Tor Browser
Sun, December 18 Sun, December 18
---------------- ----------------

View File

@ -8,8 +8,11 @@
<meta name="keywords" content="main" /> <meta name="keywords" content="main" />
<link rel="stylesheet" type="text/css" href="style.css" /> <link rel="stylesheet" type="text/css" href="style.css" />
<link rel="stylesheet" type="text/css" href="showhider.css" /> <link rel="stylesheet" type="text/css" href="showhider.css" />
<link rel="stylesheet" type="text/css" href="darklight.css" />
</head> </head>
<body> <body>
<input type="checkbox" id="checkboxDarkLight">
<div class="container">
<div id="navbar"> <div id="navbar">
<a href="#shownav"> <a href="#shownav">
Show navigation Show navigation
@ -47,6 +50,11 @@
index.html index.html
</a> </a>
</li> </li>
<li>
<a href="docs/BUILD.html">
docs/BUILD
</a>
</li>
<li> <li>
<a href="docs/I2PBrowser.html"> <a href="docs/I2PBrowser.html">
docs/I2PBrowser docs/I2PBrowser
@ -54,7 +62,7 @@
</li> </li>
<li> <li>
<a href="docs/I2PBrowserPlugin.html"> <a href="docs/I2PBrowserPlugin.html">
docs/I2PBrowserPlugin docs/I2PBrowserPlugin.html
</a> </a>
</li> </li>
<li> <li>
@ -109,7 +117,22 @@
</li> </li>
<li> <li>
<a href="docs/I2PLibreWolf.html"> <a href="docs/I2PLibreWolf.html">
docs/I2PLibreWolf docs/I2PLibreWolf.html
</a>
</li>
<li>
<a href="docs/LINUX.html">
docs/LINUX
</a>
</li>
<li>
<a href="docs/OSX.html">
docs/OSX
</a>
</li>
<li>
<a href="docs/WINDOWS.html">
docs/WINDOWS
</a> </a>
</li> </li>
</ul> </ul>
@ -1873,12 +1896,13 @@ Public License instead of this License.
</div> </div>
</div> </div>
</div> </div>
</div>
<div> <div>
<iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe> <iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe>
</div> </div>
<div> <div>
<a href="https://geti2p.net/"> <a href="https://geti2p.net/">
<img src="i2plogo.png"></img> <img class="i2plogo" src="i2plogo.png"></img>
I2P I2P
</a> </a>
</div> </div>

View File

@ -47,15 +47,15 @@ directory for Firefox, and the `src/i2p.chromium.*.profile/extensions/*.js/*` di
For platform specific instructions, see For platform specific instructions, see
- [LINUX.md](LINUX.md)/[LINUX.html](LINUX.html) - [LINUX.md](docs/LINUX.md)/[LINUX.html](docs/LINUX.html)
- [OSX.md](OSX.md)/[OSX.html](OSX.html) - [OSX.md](docs/OSX.md)/[OSX.html](docs/OSX.html)
- [WINDOWS.md](WINDOWS.md)/[WINDOWS.html](WINDOWS.html) - [WINDOWS.md](docs/WINDOWS.md)/[WINDOWS.html](docs/WINDOWS.html)
#### All platforms, using a zip: `.zip` and a non-bundled Java #### All platforms, using a zip: `.zip` and a non-bundled Java
```sh ```sh
mkdir ~/tmp-i2pfirefox && cd ~/tmp-i2pfirefox mkdir ~/tmp-i2pfirefox && cd ~/tmp-i2pfirefox
wget https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/1.0.6/i2pfirefox.zip wget https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/1.3.0/i2pfirefox.zip
unzip i2pfirefox.zip unzip i2pfirefox.zip
./i2pfirefox.cmd ./i2pfirefox.cmd

View File

@ -8,8 +8,11 @@
<meta name="keywords" content="main" /> <meta name="keywords" content="main" />
<link rel="stylesheet" type="text/css" href="style.css" /> <link rel="stylesheet" type="text/css" href="style.css" />
<link rel="stylesheet" type="text/css" href="showhider.css" /> <link rel="stylesheet" type="text/css" href="showhider.css" />
<link rel="stylesheet" type="text/css" href="darklight.css" />
</head> </head>
<body> <body>
<input type="checkbox" id="checkboxDarkLight">
<div class="container">
<div id="navbar"> <div id="navbar">
<a href="#shownav"> <a href="#shownav">
Show navigation Show navigation
@ -47,6 +50,11 @@
index.html index.html
</a> </a>
</li> </li>
<li>
<a href="docs/BUILD.html">
docs/BUILD
</a>
</li>
<li> <li>
<a href="docs/I2PBrowser.html"> <a href="docs/I2PBrowser.html">
docs/I2PBrowser docs/I2PBrowser
@ -54,7 +62,7 @@
</li> </li>
<li> <li>
<a href="docs/I2PBrowserPlugin.html"> <a href="docs/I2PBrowserPlugin.html">
docs/I2PBrowserPlugin docs/I2PBrowserPlugin.html
</a> </a>
</li> </li>
<li> <li>
@ -109,7 +117,22 @@
</li> </li>
<li> <li>
<a href="docs/I2PLibreWolf.html"> <a href="docs/I2PLibreWolf.html">
docs/I2PLibreWolf docs/I2PLibreWolf.html
</a>
</li>
<li>
<a href="docs/LINUX.html">
docs/LINUX
</a>
</li>
<li>
<a href="docs/OSX.html">
docs/OSX
</a>
</li>
<li>
<a href="docs/WINDOWS.html">
docs/WINDOWS
</a> </a>
</li> </li>
</ul> </ul>
@ -130,26 +153,23 @@
Firefox Firefox
</h2> </h2>
<pre><code class="language-md">i2p-in-private-browsing <pre><code class="language-md">i2p-in-private-browsing
1.44 1.48
https://addons.mozilla.org/firefox/downloads/file/4020669/i2p_in_private_browsing-1.44.xpi https://addons.mozilla.org/firefox/downloads/file/4123613/i2p_in_private_browsing-1.48.xpi
noscript noscript
11.4.13 11.4.29
https://addons.mozilla.org/firefox/downloads/file/4033638/noscript-11.4.13.xpi https://addons.mozilla.org/firefox/downloads/file/4206186/noscript-11.4.29.xpi
localcdn-fork-of-decentraleyes localcdn-fork-of-decentraleyes
2.6.43 2.6.64
https://addons.mozilla.org/firefox/downloads/file/4041581/localcdn_fork_of_decentraleyes-2.6.43.xpi https://addons.mozilla.org/firefox/downloads/file/4243456/localcdn_fork_of_decentraleyes-2.6.64.xpi
https-everywhere
2021.7.13
https://addons.mozilla.org/firefox/downloads/file/3809748/https_everywhere-2021.7.13.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.11.1 0.17
https://addons.mozilla.org/firefox/downloads/file/3950710/javascript_restrictor-0.11.1.xpi https://addons.mozilla.org/firefox/downloads/file/4190089/javascript_restrictor-0.17.xpi
ublock-origin ublock-origin
1.45.2 1.56.0
https://addons.mozilla.org/firefox/downloads/file/4028976/ublock_origin-1.45.2.xpi https://addons.mozilla.org/firefox/downloads/file/4237670/ublock_origin-1.56.0.xpi
</code></pre> </code></pre>
<h2> <h2>
Chromium Chromium
@ -158,19 +178,16 @@ https://addons.mozilla.org/firefox/downloads/file/4028976/ublock_origin-1.45.2.x
1.29 1.29
https://clients2.google.com/service/update2/crx https://clients2.google.com/service/update2/crx
NoScript NoScript
11.4.13 11.4.18
https://clients2.google.com/service/update2/crx
__MSG_about_ext_name__
2022.5.24
https://clients2.google.com/service/update2/crx https://clients2.google.com/service/update2/crx
LocalCDN LocalCDN
2.6.39 2.6.64
https://clients2.google.com/service/update2/crx https://clients2.google.com/service/update2/crx
uBlock Origin uBlock Origin
1.45.2 1.56.0
https://clients2.google.com/service/update2/crx https://clients2.google.com/service/update2/crx
JShelter __MSG_extensionName__
0.11.1 0.17
https://clients2.google.com/service/update2/crx https://clients2.google.com/service/update2/crx
</code></pre> </code></pre>
<div id="sourcecode"> <div id="sourcecode">
@ -1042,12 +1059,13 @@ Public License instead of this License.
</div> </div>
</div> </div>
</div> </div>
</div>
<div> <div>
<iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe> <iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe>
</div> </div>
<div> <div>
<a href="https://geti2p.net/"> <a href="https://geti2p.net/">
<img src="i2plogo.png"></img> <img class="i2plogo" src="i2plogo.png"></img>
I2P I2P
</a> </a>
</div> </div>

View File

@ -6,26 +6,23 @@ Extension Versions
```md ```md
i2p-in-private-browsing i2p-in-private-browsing
1.44 1.48
https://addons.mozilla.org/firefox/downloads/file/4020669/i2p_in_private_browsing-1.44.xpi https://addons.mozilla.org/firefox/downloads/file/4123613/i2p_in_private_browsing-1.48.xpi
noscript noscript
11.4.13 11.4.29
https://addons.mozilla.org/firefox/downloads/file/4033638/noscript-11.4.13.xpi https://addons.mozilla.org/firefox/downloads/file/4206186/noscript-11.4.29.xpi
localcdn-fork-of-decentraleyes localcdn-fork-of-decentraleyes
2.6.43 2.6.64
https://addons.mozilla.org/firefox/downloads/file/4041581/localcdn_fork_of_decentraleyes-2.6.43.xpi https://addons.mozilla.org/firefox/downloads/file/4243456/localcdn_fork_of_decentraleyes-2.6.64.xpi
https-everywhere
2021.7.13
https://addons.mozilla.org/firefox/downloads/file/3809748/https_everywhere-2021.7.13.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.11.1 0.17
https://addons.mozilla.org/firefox/downloads/file/3950710/javascript_restrictor-0.11.1.xpi https://addons.mozilla.org/firefox/downloads/file/4190089/javascript_restrictor-0.17.xpi
ublock-origin ublock-origin
1.45.2 1.56.0
https://addons.mozilla.org/firefox/downloads/file/4028976/ublock_origin-1.45.2.xpi https://addons.mozilla.org/firefox/downloads/file/4237670/ublock_origin-1.56.0.xpi
``` ```
## Chromium ## Chromium
@ -35,18 +32,15 @@ __MSG_extensionName__
1.29 1.29
https://clients2.google.com/service/update2/crx https://clients2.google.com/service/update2/crx
NoScript NoScript
11.4.13 11.4.18
https://clients2.google.com/service/update2/crx
__MSG_about_ext_name__
2022.5.24
https://clients2.google.com/service/update2/crx https://clients2.google.com/service/update2/crx
LocalCDN LocalCDN
2.6.39 2.6.64
https://clients2.google.com/service/update2/crx https://clients2.google.com/service/update2/crx
uBlock Origin uBlock Origin
1.45.2 1.56.0
https://clients2.google.com/service/update2/crx https://clients2.google.com/service/update2/crx
JShelter __MSG_extensionName__
0.11.1 0.17
https://clients2.google.com/service/update2/crx https://clients2.google.com/service/update2/crx
``` ```

371
build.xml
View File

@ -175,6 +175,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<target name="jar" depends="versionMd,i2pFirefoxBaseProfileZip,i2pFirefoxUsabilityProfileZip,i2pChromiumBaseProfileZip,i2pChromiumUsabilityProfileZip"> <target name="jar" depends="versionMd,i2pFirefoxBaseProfileZip,i2pFirefoxUsabilityProfileZip,i2pChromiumBaseProfileZip,i2pChromiumUsabilityProfileZip">
<ant dir="src" target="jar" /> <ant dir="src" target="jar" />
<ant dir="src" target="pluginjar" />
</target> </target>
<target name="i2pFirefoxBaseProfileZip"> <target name="i2pFirefoxBaseProfileZip">
@ -327,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.0.6" /> <property name="release.number" value="1.3.0" />
<exec executable="echo" osfamily="unix"> <exec executable="echo" osfamily="unix">
<arg value="${release.number}-${build.number}" /> <arg value="${release.number}-${build.number}" />
</exec> </exec>
@ -339,6 +340,44 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
</exec> </exec>
</target> </target>
<target name="pluginzip" depends="all, buildNum">
<delete>
<!-- in installer but not update -->
<fileset dir="plugin/" includes="i2ptunnel.config i2pfirefox.config eepsite/docroot/index.html eepsite/docroot/robots.txt" />
</delete>
<delete dir="plugin/eepsite/docroot/torrents/" />
<!-- get version number -->
<!-- make the update xpi2p -->
<!-- this contains everything except i2ptunnel.config -->
<copy file="LICENSE.md" todir="plugin/" overwrite="true" />
<copy file="README.md" todir="plugin/" overwrite="true" />
<copy file="CHANGES.md" todir="plugin/" overwrite="true" />
<copy file="scripts/plugin.config" todir="plugin/" overwrite="true" />
<mkdir dir="plugin/lib/" />
<copy file="src/build/i2pfirefox-plugin.jar" todir="plugin/lib/" overwrite="true" />
<exec executable="echo" osfamily="unix" failonerror="true" output="plugin/plugin.config" append="true">
<arg value="update-only=true" />
</exec>
<exec executable="echo" osfamily="unix" failonerror="true" output="plugin/plugin.config" append="true">
<arg value="version=${release.number}-${build.number}" />
</exec>
<!-- make the install xpi2p -->
<copy file="scripts/plugin.config" todir="plugin/" overwrite="true" />
<!-- Files in installer but not update. Be sure to Add to delete fileset above and clean target below -->
<copy file="scripts/i2ptunnel.config" todir="plugin/" overwrite="true" />
<exec executable="echo" osfamily="unix" failonerror="true" output="plugin/plugin.config" append="true">
<arg value="version=${release.number}-${build.number}" />
</exec>
<exec executable="zip">
<arg value="-r"/>
<arg value="plugin.zip"/>
<arg value="plugin"/>
</exec>
</target>
<target name="plugin" depends="all, buildNum"> <target name="plugin" depends="all, buildNum">
<delete> <delete>
<!-- in installer but not update --> <!-- in installer but not update -->
@ -355,7 +394,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<copy file="CHANGES.md" todir="plugin/" overwrite="true" /> <copy file="CHANGES.md" todir="plugin/" overwrite="true" />
<copy file="scripts/plugin.config" todir="plugin/" overwrite="true" /> <copy file="scripts/plugin.config" todir="plugin/" overwrite="true" />
<mkdir dir="plugin/lib/" /> <mkdir dir="plugin/lib/" />
<copy file="src/build/i2pfirefox.jar" todir="plugin/lib/" overwrite="true" /> <copy file="src/build/i2pfirefox-plugin.jar" todir="plugin/lib/" overwrite="true" />
<exec executable="echo" osfamily="unix" failonerror="true" output="plugin/plugin.config" append="true"> <exec executable="echo" osfamily="unix" failonerror="true" output="plugin/plugin.config" append="true">
<arg value="update-only=true" /> <arg value="update-only=true" />
</exec> </exec>
@ -368,12 +407,6 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<equals arg1="${release.password.su3}" arg2=""/> <equals arg1="${release.password.su3}" arg2=""/>
</condition> </condition>
</fail> </fail>
<!-- this will fail if no su3 keys exist, as it needs the password twice -->
<exec executable="scripts/makeplugin.sh" inputstring="${release.password.su3}" failonerror="true" >
<arg value="plugin" />
</exec>
<move file="i2pfirefox.xpi2p" tofile="i2pfirefox-update.xpi2p" overwrite="true" />
<move file="i2pfirefox.su3" tofile="i2pfirefox-update.su3" overwrite="true" />
<!-- make the install xpi2p --> <!-- make the install xpi2p -->
<copy file="scripts/plugin.config" todir="plugin/" overwrite="true" /> <copy file="scripts/plugin.config" todir="plugin/" overwrite="true" />
@ -382,14 +415,15 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<exec executable="echo" osfamily="unix" failonerror="true" output="plugin/plugin.config" append="true"> <exec executable="echo" osfamily="unix" failonerror="true" output="plugin/plugin.config" append="true">
<arg value="version=${release.number}-${build.number}" /> <arg value="version=${release.number}-${build.number}" />
</exec> </exec>
<exec executable="scripts/makeplugin.sh" inputstring="${release.password.su3}" failonerror="true" > <exec executable="scripts/makeplugin.sh" inputstring="${release.password.su3}" failonerror="true" >
<arg value="plugin" /> <arg value="plugin" />
</exec> </exec>
<mkdir dir="i2p.plugins.firefox" /> <mkdir dir="i2p.plugins.firefox" />
<copy file="i2pfirefox.su3" todir="i2p.plugins.firefox" overwrite="true" /> <copy file="i2pfirefox.su3" todir="i2p.plugins.firefox" overwrite="true" />
<copy file="i2pfirefox-update.su3" todir="i2p.plugins.firefox" overwrite="true" />
<copy file="i2pfirefox.xpi2p" todir="i2p.plugins.firefox" overwrite="true" /> <copy file="i2pfirefox.xpi2p" todir="i2p.plugins.firefox" overwrite="true" />
<copy file="i2pfirefox-update.xpi2p" todir="i2p.plugins.firefox" overwrite="true" /> </target>
<target name="torrent">
<delete file="i2p.plugins.firefox.torrent" failonerror="false" /> <delete file="i2p.plugins.firefox.torrent" failonerror="false" />
<exec executable="mktorrent" osfamily="unix" failonerror="true"> <exec executable="mktorrent" osfamily="unix" failonerror="true">
<arg value='--announce=http://mb5ir7klpc2tj6ha3xhmrs3mseqvanauciuoiamx2mmzujvg67uq.b32.i2p/a,http://w7tpbzncbcocrqtwwm3nezhnnsw4ozadvi2hmvzdhrqzfxfum7wa.b32.i2p/a' /> <arg value='--announce=http://mb5ir7klpc2tj6ha3xhmrs3mseqvanauciuoiamx2mmzujvg67uq.b32.i2p/a,http://w7tpbzncbcocrqtwwm3nezhnnsw4ozadvi2hmvzdhrqzfxfum7wa.b32.i2p/a' />
@ -399,6 +433,19 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value='--output=i2p.plugins.firefox.torrent' /> <arg value='--output=i2p.plugins.firefox.torrent' />
<arg value='i2p.plugins.firefox' /> <arg value='i2p.plugins.firefox' />
</exec> </exec>
<exec executable="zip">
<arg value="-r" />
<arg value="i2p.plugins.firefox.torrent.zip" />
<arg value="i2p.plugins.firefox" />
<arg value="i2p.plugins.firefox.torrent" />
</exec>
<exec executable="unzip">
<arg value="i2p.plugins.firefox.torrent.zip" />
<arg value="-d" />
<arg value="${user.home}/.i2p/i2psnark/" />
</exec>
</target>
<target name="seed" depends="torrent">
<exec executable="cp"> <exec executable="cp">
<arg value="-rv" /> <arg value="-rv" />
<arg value="i2p.plugins.firefox" /> <arg value="i2p.plugins.firefox" />
@ -406,20 +453,20 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="${user.home}/.i2p/i2psnark/" /> <arg value="${user.home}/.i2p/i2psnark/" />
</exec> </exec>
</target> </target>
<target name="distclean" depends="clean" /> <target name="distclean" depends="clean" />
<target name="clangFmt"> <target name="clangFmt">
<exec executable="clang-format"> <exec executable="clang-format">
<arg value="-i"/> <arg value="-i"/>
<arg value="src/java/net/i2p/i2pfirefox/I2PBrowser.java"/> <arg value="src/java/net/i2p/i2pfirefox/I2PBrowser.java"/>
<arg value="src/java/net/i2p/i2pfirefox/I2PBrowserPlugin.java"/> <arg value="src/plugin/net/i2p/i2pfirefox/plugin/plugin/I2PBrowserPlugin.java"/>
<arg value="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java"/> <arg value="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java"/>
<arg value="src/java/net/i2p/i2pfirefox/I2PChromium.java"/> <arg value="src/java/net/i2p/i2pfirefox/I2PChromium.java"/>
<arg value="src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java"/> <arg value="src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java"/>
<arg value="src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java"/> <arg value="src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java"/>
<arg value="src/java/net/i2p/i2pfirefox/I2PChromiumProfileUnpacker.java"/> <arg value="src/java/net/i2p/i2pfirefox/I2PChromiumProfileUnpacker.java"/>
<arg value="src/java/net/i2p/i2pfirefox/I2PFirefox.java"/> <arg value="src/java/net/i2p/i2pfirefox/I2PFirefox.java"/>
<arg value="src/java/net/i2p/i2pfirefox/I2PLibreWolf.java"/>
<arg value="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java"/> <arg value="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java"/>
<arg value="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java"/> <arg value="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java"/>
<arg value="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileUnpacker.java"/> <arg value="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileUnpacker.java"/>
@ -470,34 +517,276 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<exec executable="jpackage" failonerror="true"> <exec executable="jpackage" failonerror="true">
<arg value="--type"/> <arg value="app-image"/> <arg value="--type"/> <arg value="app-image"/>
<arg value="--name"/> <arg value="i2pbrowser"/> <arg value="--name"/> <arg value="i2pbrowser"/>
<arg value="--app-version"/> <arg value="${release_number}"/> <arg value="--app-version"/> <arg value="${release.number}"/>
<arg value="--app-content"/> <arg value="etc/scripts/torbrowser.sh"/> <arg value="--app-content"/> <arg value="etc/scripts/torbrowser.sh"/>
<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"/>
</exec> </exec>
<exec executable="rm" failonerror="true"> <exec executable="rm" failonerror="true" osfamily="windows">
<arg value="-rf" /> <arg value="-rf" />
<arg value="i2pbrowser.zip" /> <arg value="i2pbrowser.zip" />
</exec> </exec>
<exec executable="dzip" failonerror="true"> <exec executable="dzip" failonerror="true" osfamily="windows">
<arg value="-O"/> <arg value="-O"/>
<arg value="i2pbrowser.zip"/> <arg value="i2pbrowser.zip"/>
<arg value="i2pbrowser"/> <arg value="i2pbrowser"/>
</exec> </exec>
<exec executable="rm" failonerror="true" osfamily="unix">
<arg value="-rf" />
<arg value="i2pbrowser.tar.gz" />
</exec>
<exec executable="./lib/torbrowser.sh" failonerror="true" osfamily="unix" dir="i2pbrowser">
</exec>
<exec executable="tar" failonerror="true" osfamily="unix">
<arg value="cvzf"/>
<arg value="i2pbrowser.tar.gz"/>
<arg value="i2pbrowser"/>
</exec>
</target> </target>
<target name="debian" depends="jar"> <target name="debian" depends="jar">
<exec executable="bash" failonerror="true"> <exec executable="jpackage" failonerror="true">
<arg value="--verbose"/> <arg value="--type"/> <arg value="deb"/>
<arg value="-c"/> <arg value="--linux-deb-maintainer"/> <arg value="hankhill19580@gmail.com"/>
<arg value="./debian.sh"/> <arg value="--linux-menu-group"/> <arg value="Network;WebBrowser;P2P"/>
<arg value="--linux-app-category"/> <arg value="Network"/>
<arg value="--linux-package-deps"/> <arg value="firefox|chromium|brave|firefox-esr|librewolf|icecat"/>
<arg value="--linux-shortcut"/>
<arg value="--license-file"/> <arg value="LICENSE.md"/>
<arg value="--name"/> <arg value="i2pbrowser"/>
<arg value="--icon"/> <arg value="src/icon.png"/>
<arg value="--app-version"/> <arg value="1.0.0"/>
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
</exec>
</target>
<target name="debian-release" depends="jar">
<exec executable="jpackage" failonerror="true">
<arg value="--type"/> <arg value="deb"/>
<arg value="--linux-deb-maintainer"/> <arg value="hankhill19580@gmail.com"/>
<arg value="--linux-menu-group"/> <arg value="Network;WebBrowser;P2P"/>
<arg value="--linux-app-category"/> <arg value="Network"/>
<arg value="--linux-package-deps"/> <arg value="firefox|chromium|brave|firefox-esr|librewolf|icecat"/>
<arg value="--linux-shortcut"/>
<arg value="--license-file"/> <arg value="LICENSE.md"/>
<arg value="--name"/> <arg value="i2pbrowser"/>
<arg value="--icon"/> <arg value="src/icon.png"/>
<arg value="--app-version"/> <arg value="${release.number}"/>
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
</exec> </exec>
</target> </target>
<target name="fedora" depends="jar"> <target name="fedora" depends="jar">
<exec executable="bash" failonerror="true"> <exec executable="jpackage" failonerror="true">
<arg value="--type"/> <arg value="rpm"/>
<arg value="--linux-menu-group"/> <arg value="Network;WebBrowser;P2P"/>
<arg value="--linux-app-category"/> <arg value="Network"/>
<arg value="--linux-package-deps"/> <arg value="firefox|chromium|brave|firefox-esr|librewolf|icecat"/>
<arg value="--linux-shortcut"/>
<arg value="--license-file"/> <arg value="LICENSE.md"/>
<arg value="--name"/> <arg value="i2pbrowser"/>
<arg value="--icon"/> <arg value="src/icon.png"/>
<arg value="--app-version"/> <arg value="1.0.0"/>
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
</exec>
</target>
<target name="fedora-release" depends="jar">
<exec executable="jpackage" failonerror="true">
<arg value="--type"/> <arg value="rpm"/>
<arg value="--linux-menu-group"/> <arg value="Network;WebBrowser;P2P"/>
<arg value="--linux-app-category"/> <arg value="Network"/>
<arg value="--linux-package-deps"/> <arg value="firefox|chromium|brave|firefox-esr|librewolf|icecat"/>
<arg value="--linux-shortcut"/>
<arg value="--license-file"/> <arg value="LICENSE.md"/>
<arg value="--name"/> <arg value="i2pbrowser"/>
<arg value="--icon"/> <arg value="src/icon.png"/>
<arg value="--app-version"/> <arg value="${release.number}"/>
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
</exec>
</target>
<target name="windows" depends="jar">
<exec executable="jpackage" failonerror="true">
<arg value="--verbose"/> <arg value="--verbose"/>
<arg value="-c"/> <arg value="--type"/> <arg value="exe"/>
<arg value="./fedora.sh"/> <arg value="--win-dir-chooser"/>
<arg value="--win-help-url"/> <arg value="https://geti2p.net"/>
<arg value="--win-menu"/>
<arg value="--win-menu-group"/> <arg value="I2P Browser Configurer"/>
<arg value="--win-shortcut"/>
<arg value="--win-shortcut-prompt"/>
<arg value="--win-per-user-install"/>
<arg value="--license-file"/> <arg value="LICENSE.md"/>
<arg value="--name"/> <arg value="i2pbrowser"/>
<arg value="--icon"/> <arg value="src/icon.png"/>
<arg value="--app-version"/> <arg value="1.0.0"/>
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
</exec>
</target>
<target name="windows-release" depends="jar">
<exec executable="jpackage" failonerror="true">
<arg value="--verbose"/>
<arg value="--type"/> <arg value="exe"/>
<arg value="--win-dir-chooser"/>
<arg value="--win-help-url"/> <arg value="https://geti2p.net"/>
<arg value="--win-menu"/>
<arg value="--win-menu-group"/> <arg value="I2P Browser Configurer"/>
<arg value="--win-shortcut"/>
<arg value="--win-shortcut-prompt"/>
<arg value="--win-per-user-install"/>
<arg value="--license-file"/> <arg value="LICENSE.md"/>
<arg value="--name"/> <arg value="i2pbrowser"/>
<arg value="--icon"/> <arg value="src/icon.png"/>
<arg value="--app-version"/> <arg value="${release.number}"/>
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
</exec>
</target>
<target name="windows-msi" depends="jar">
<exec executable="jpackage" failonerror="true">
<arg value="--verbose"/>
<arg value="--type"/> <arg value="msi"/>
<arg value="--win-dir-chooser"/>
<arg value="--win-help-url"/> <arg value="https://geti2p.net"/>
<arg value="--win-menu"/>
<arg value="--win-menu-group"/> <arg value="I2P Browser Configurer"/>
<arg value="--win-shortcut"/>
<arg value="--win-shortcut-prompt"/>
<arg value="--win-per-user-install"/>
<arg value="--license-file"/> <arg value="LICENSE.md"/>
<arg value="--name"/> <arg value="i2pbrowser"/>
<arg value="--icon"/> <arg value="src/icon.png"/>
<arg value="--app-version"/> <arg value="1.0.0"/>
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
</exec>
</target>
<target name="windows-msi-release" depends="jar">
<exec executable="jpackage" failonerror="true">
<arg value="--verbose"/>
<arg value="--type"/> <arg value="msi"/>
<arg value="--win-dir-chooser"/>
<arg value="--win-help-url"/> <arg value="https://geti2p.net"/>
<arg value="--win-menu"/>
<arg value="--win-menu-group"/> <arg value="I2P Browser Configurer"/>
<arg value="--win-shortcut"/>
<arg value="--win-shortcut-prompt"/>
<arg value="--win-per-user-install"/>
<arg value="--license-file"/> <arg value="LICENSE.md"/>
<arg value="--name"/> <arg value="i2pbrowser"/>
<arg value="--icon"/> <arg value="src/icon.png"/>
<arg value="--app-version"/> <arg value="${release.number}"/>
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
</exec>
</target>
<target name="windows-portable" depends="jar">
<exec executable="jpackage" failonerror="true">
<arg value="--verbose"/>
<arg value="--type"/> <arg value="app-image"/>
<arg value="--name"/> <arg value="i2pbrowser-portable"/>
<arg value="--icon"/> <arg value="src/icon.png"/>
<arg value="--app-version"/> <arg value="1.0.0"/>
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
</exec>
<copy file="LICENSE.md" todir="i2pbrowser-portable" overwrite="true"/>
<delete file="i2pbrowser-portable.zip"/>
<exec executable="powershell" failonerror="false">
<arg value="Compress-Archive"/>
<arg value="-LiteralPath"/> <arg value="i2pbrowser-portable"/>
<arg value="-DestinationPath"/> <arg value="i2pbrowser-portable.zip"/>
</exec>
</target>
<target name="windows-portable-release" depends="jar">
<exec executable="jpackage" failonerror="true">
<arg value="--verbose"/>
<arg value="--type"/> <arg value="app-image"/>
<arg value="--name"/> <arg value="i2pbrowser-portable"/>
<arg value="--icon"/> <arg value="src/icon.png"/>
<arg value="--app-version"/> <arg value="${release.number}"/>
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
</exec>
<copy file="LICENSE.md" todir="i2pbrowser-portable" overwrite="true"/>
<delete file="i2pbrowser-portable.zip"/>
<exec executable="powershell" failonerror="false">
<arg value="Compress-Archive"/>
<arg value="-LiteralPath"/> <arg value="i2pbrowser-portable"/>
<arg value="-DestinationPath"/> <arg value="i2pbrowser-portable-${release.number}.zip"/>
</exec>
</target>
<target name="macos" depends="jar">
<exec executable="jpackage" failonerror="true">
<arg value="--verbose"/>
<arg value="--type"/> <arg value="dmg"/>
<arg value="--mac-package-name"/> <arg value="I2P Browser"/>
<arg value="--mac-app-category"/> <arg value="Reference"/>
<arg value="--license-file"/> <arg value="LICENSE.md"/>
<arg value="--name"/> <arg value="i2pbrowser"/>
<arg value="--icon"/> <arg value="src/icon.png"/>
<arg value="--app-version"/> <arg value="1.0.0"/>
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
</exec>
</target>
<target name="macos-release" depends="jar">
<exec executable="jpackage" failonerror="true">
<arg value="--verbose"/>
<arg value="--type"/> <arg value="dmg"/>
<arg value="--mac-package-name"/> <arg value="I2P Browser"/>
<arg value="--mac-app-category"/> <arg value="Reference"/>
<arg value="--license-file"/> <arg value="LICENSE.md"/>
<arg value="--name"/> <arg value="i2pbrowser"/>
<arg value="--icon"/> <arg value="src/icon.png"/>
<arg value="--app-version"/> <arg value="${release.number}"/>
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
</exec>
</target>
<target name="macos-pkg" depends="jar">
<exec executable="jpackage" failonerror="true">
<arg value="--verbose"/>
<arg value="--type"/> <arg value="pkg"/>
<arg value="--mac-package-name"/> <arg value="I2P Browser"/>
<arg value="--mac-app-category"/> <arg value="Reference"/>
<arg value="--license-file"/> <arg value="LICENSE.md"/>
<arg value="--name"/> <arg value="i2pbrowser"/>
<arg value="--icon"/> <arg value="src/icon.png"/>
<arg value="--app-version"/> <arg value="1.0.0"/>
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
</exec>
</target>
<target name="macos-pkg-release" depends="jar">
<exec executable="jpackage" failonerror="true">
<arg value="--verbose"/>
<arg value="--type"/> <arg value="pkg"/>
<arg value="--mac-package-name"/> <arg value="I2P Browser"/>
<arg value="--mac-app-category"/> <arg value="Reference"/>
<arg value="--license-file"/> <arg value="LICENSE.md"/>
<arg value="--name"/> <arg value="i2pbrowser"/>
<arg value="--icon"/> <arg value="src/icon.png"/>
<arg value="--app-version"/> <arg value="${release.number}"/>
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
</exec> </exec>
</target> </target>
@ -546,11 +835,6 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="-n"/> <arg value="-n"/>
<arg value="localcdn-fork-of-decentraleyes"/> <arg value="localcdn-fork-of-decentraleyes"/>
</exec> </exec>
<exec executable="amo-version" failonerror="true">
<redirector output="VERSION.md" error="VERSION.md" alwayslog="true" append="true"></redirector>
<arg value="-n"/>
<arg value="https-everywhere"/>
</exec>
<exec executable="amo-version" failonerror="true"> <exec executable="amo-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="-n"/> <arg value="-n"/>
@ -596,11 +880,6 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="-mf"/> <arg value="-mf"/>
<arg value="src/i2p.chromium.base.profile/extensions/noscript.js/manifest.json"/> <arg value="src/i2p.chromium.base.profile/extensions/noscript.js/manifest.json"/>
</exec> </exec>
<exec executable="manifest-json-version" failonerror="true">
<redirector output="VERSION.md" error="VERSION.md" alwayslog="true" append="true"></redirector>
<arg value="-mf"/>
<arg value="src/i2p.chromium.base.profile/extensions/https-everywhere.js/manifest.json"/>
</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"/>
@ -638,13 +917,6 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<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="crx3" failonerror="true">
<arg value="download"/>
<arg value="gcbommkclmclpchllfjekcdonpmejbdp" />
<arg value="-u=true"/>
<arg value="-o" />
<arg value="src/i2p.chromium.base.profile/extensions/https-everywhere.js.crx" />
</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>
@ -692,13 +964,6 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<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="crx3" failonerror="true">
<arg value="download"/>
<arg value="gcbommkclmclpchllfjekcdonpmejbdp" />
<arg value="-u=true"/>
<arg value="-o" />
<arg value="src/i2p.chromium.usability.profile/extensions/https-everywhere.js.crx" />
</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>
@ -734,13 +999,6 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="-o" /> <arg value="-o" />
<arg value="src/i2p.firefox.base.profile/extensions/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi" /> <arg value="src/i2p.firefox.base.profile/extensions/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi" />
</exec> </exec>
<exec executable="amo-version" failonerror="true">
<arg value="-n"/>
<arg value="https-everywhere"/>
<arg value="-d"/>
<arg value="-o" />
<arg value="src/i2p.firefox.base.profile/extensions/https-everywhere-eff@eff.org.xpi" />
</exec>
<exec executable="echo" failonerror="true" append="false" output="src/i2p.firefox.base.profile/version.md"> <exec executable="echo" failonerror="true" append="false" output="src/i2p.firefox.base.profile/version.md">
<arg value="Profile Version" /> <arg value="Profile Version" />
</exec> </exec>
@ -777,13 +1035,6 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="-o" /> <arg value="-o" />
<arg value="./src/i2p.firefox.usability.profile/extensions/{b86e4813-687a-43e6-ab65-0bde4ab75758}.xpi" /> <arg value="./src/i2p.firefox.usability.profile/extensions/{b86e4813-687a-43e6-ab65-0bde4ab75758}.xpi" />
</exec> </exec>
<exec executable="amo-version" failonerror="true">
<arg value="-n"/>
<arg value="https-everywhere"/>
<arg value="-d"/>
<arg value="-o" />
<arg value="src/i2p.firefox.usability.profile/extensions/https-everywhere-eff@eff.org.xpi" />
</exec>
<exec executable="amo-version" failonerror="true"> <exec executable="amo-version" failonerror="true">
<arg value="-n"/> <arg value="-n"/>
<arg value="onion-in-container-browsing"/> <arg value="onion-in-container-browsing"/>

View File

@ -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="Enables use as a console plugin" export GITHUB_NAME="Updates extensions, plugin support temporarily removed(Stay on the old version)"
export GITHUB_DESCRIPTION=$(cat CHANGES.md VERSION.md) export GITHUB_DESCRIPTION=$(cat CHANGES.md VERSION.md)
export GITHUB_TAG=1.0.6 export GITHUB_TAG=1.3.1

24
darklight.css Normal file
View File

@ -0,0 +1,24 @@
/* edgar darklight CSS file */
#checkboxDarkLight:checked + .container {
background-color: #202020;
filter: invert(100%);
}
#checkboxDarkLight{
appearance: none;
width: 80px;
height: 40px;
background: black;
border-radius: 22px;
cursor: pointer;
outline: none;
}
#checkboxDarkLight::before{
content: '';
width: 40px;
height: 35px;
background-color:white;
border-radius: 35px;
cursor: pointer;
transition: .3s linear;
}

9
debian.sh → debian-torbrowser.sh Executable file → Normal file
View File

@ -1,7 +1,11 @@
#! /usr/bin/env sh #! /usr/bin/env sh
# debian build which automatically configures Tor Browser.
# I do not think that it has write permission to it's own directory, making Tor Browser updates probably impossible.
# Don't use it yet.
. ./config.sh . ./config.sh
ant jpackage
jpackage --verbose \ jpackage --verbose \
--app-image i2pbrowser \
--type deb \ --type deb \
--linux-deb-maintainer hankhill19580@gmail.com \ --linux-deb-maintainer hankhill19580@gmail.com \
--linux-menu-group "Network;WebBrowser;P2P" \ --linux-menu-group "Network;WebBrowser;P2P" \
@ -12,6 +16,3 @@ jpackage --verbose \
--name i2pbrowser \ --name i2pbrowser \
--icon src/icon.png \ --icon src/icon.png \
--app-version "$GITHUB_TAG" \ --app-version "$GITHUB_TAG" \
--input src/build \
--main-jar i2pfirefox.jar \
--main-class net.i2p.i2pfirefox.I2PBrowser

1417
docs/BUILD.html Normal file

File diff suppressed because it is too large Load Diff

228
docs/BUILD.md Normal file
View File

@ -0,0 +1,228 @@
# Building
## Build Dependencies
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
on Debian mostly, on Debian and Ubuntu, install the dependencies with:
```sh
sudo apt-get install openjdk-18* ant
```
Some of the targets use scripts written in Go to help generate resources. If
you want to update the profiles, you will need them. To install Go on Debian
and Ubuntu:
```sh
sudo apt-get install golang-go
```
Add `$HOME/go/bin` to your `$PATH` so `ant` can find Go applications.
`export PATH=$PATH:$HOME/go/bin`
Then use Go to download the applications you need and add them to `$HOME/go/bin`.
If you want to build the Chromium profiles you will need a Go application
called `crx3` which is used to interact with the Chrome app store to download
and update extensions.
```sh
go install github.com/mediabuyerbot/go-crx3/crx3@latest
```
Another Go application, called `amo-version`, is used to fetch extensions from addons.mozilla.org.
Like the Chrome profiles, generating the Firefox profiles requires this application. If you don't
want to update the profiles, you don't need it.
```sh
go install github.com/eyedeekay/amo-version@latest
```
One last Go application, called `dzip` is used to generate zip files deterministically for
redistribution.
```sh
go install github.com/delicb/dzip@latest
```
If you don't want to use it, you can work around it by creating a file called
`dzip` in `/usr/local/bin/dzip` and adding the contents:
```sh
#! /usr/bin/env sh
zip -r $@
```
This will break deterministic builds, but for testing it will continue to work. More elaborate
scripts or other deterministic zip utilities can be easily substituted in by placing them
in the `$PATH` under the name `dzip`.
For Fedora, use Yum, for Arch use pacman or something else but make sure to tell everyone
about it. Once you have that installed, when building, make sure to add `$GOPATH/bin/`
to your `$PATH`.
```sh
export PATH=$PATH:$HOME/go/bin
```
Will almost always work.
## Building
This is not actually a plugin yet, but it will be soon. The important bit is the jar.
To generate that, you can either generate the full plugin, which will not work but
produces the jar as a by-product, or you can:
```sh
ant jar
```
To build just the jar. You'll know it worked if you can:
```sh
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PFirefox
```
and a new Firefox instance comes up with a fresh profile, ready-to-use for I2P browsing.
The cooler thing you can do with it is add it to an I2P distribution and somewhere in it,
add a UI element that triggers something along the lines of this:
```java
// Firefox Example
if (i2pIsRunning()) {
logger.warning("I2P is already running");
System.out.println("I2PFirefox");
I2PFirefox i2pFirefox = new I2PFirefox();
i2pFirefox.launch();
}
```
```java
// Chromium Example
if (i2pIsRunning()) {
logger.warning("I2P is already running");
System.out.println("I2PChromium");
I2PChromium i2pChromium = new I2PChromium();
i2pChromium.launch();
}
```
```java
// Auto-Select Example, chooses Firefox first, then Chromium
if (i2pIsRunning()) {
logger.warning("I2P is already running");
System.out.println("I2PBrowser");
I2PBrowser i2pBrowser = new I2PBrowser();
/*
* toggle chromium to the top of the order by doing:
I2PBrowser.chromiumFirst = true;
*
*/
i2pBrowser.launch(privateBrowsing);
}
```
to add a browser management tool to it.
## Browser Discovery Methods
This tool looks for browsers on the host system, creates a workspace to use for I2P
purposes, and launches the browser inside of that workspace. The details of the
workspace vary from browser to browser but roughly corresponds to a browser profile.
In order to be successful this tool uses 3 main types of browser discovery methods,
in this order:
1. "Local" discovery, where a browser is in a subdirectory of the directory where you
ran the launcher. This will only happen if the user unpacked a portable browser into
the same directory where they ran the launcher.
2. "Path-Based" discovery, where it scans common browser installation directories
until it finds one which it can use. On Unix, it simply scans the directories on the
`PATH` for a browser it knows about. On Windows, default paths to browser install
directories are hard-coded and included in the binary. This is what usually happens.
3. "System-Based" discovery, where it defers to the host system to make a choice
about the browser and counts on browser vendors to honor the system proxy environment
variables. This is a catch-all solution which works with most browsers, but does
not apply any customizations.
There is a little subtlety here though.
- The path to Edgium on Windows will **always** resolve during path-based discovery,
resulting in a positive test for Chromium when launching the browser in auto-select
mode. So Windows will never reach stage 3 unless expressly forced to. If Firefox or
a variant is installed, it will be chosen before Edgium unless directed otherwise.
- Even though it will launch you into Edgium if it has no other choice, I recommend
you do not use it. Edgium will in a constant, incessant way try to induce you to
share your behavior with Microsoft. If you try to resist this, it negatively affects
the performance of the browser. Google also does this with Chrome, ant this negatively
affects Chrome performance too, but less than with Edgium. TL:DR Edgium sucks and is
pointless and terrible. Literally any other browser would be better.
- Linux is unaware of a Tor Browser path because Tor Browser is rarely, if ever,
installed on-path. What is on path is virtually always a wrapper for Tor Browser
which is installed either as the main user or it's own user. Linux will only use
Tor Browser if it's discovered in "Local" mode. To set this up automatically, you
can `cd` to the `I2P` directory where you unpacked the `.tar.gz` file, and run the
`./lib/torbrowser.sh` script from there.
- I really only test Phase 3 with Dillo and Edgium. **YMMV.**
## Usability vs Strict
This is basically a profile-management tool geared toward minimizing the
differences between browser users which are passively discernible while
they are browsing I2P. It assumes that they are part of a highly fragmented
browsing environment where they are already unique, and therefore consolidation
on configuration is a goal. However, this goal sometimes also conflicts with
usability. To allow users a safe set of choices, we offer "Coarse" configuration
in 2 modes. We recommend that you do not deviate from these configurations if
you have browser application fingerprinting as a concern.
### Usability Mode
TODO: description
Pros: Allows a restricted subset of Javascript
Pros: Less likely to try and reach the clearnet
Cons: Looks very different from Tor Browser
Cons: Plugin updates can create temporary uniqueness
#### Usability Extension Set
- **I2P In Private Browsing**
- **uMatrix**
- **jsRestrictor**
- **LocalCDN**
- **Onion in Container Tabs**
- **HTTPS EveryWhere** in some configurations
### Usability user.js characteristics
TODO: Summarize differences
### Strict Mode
TODO: description
Pros: Does not allow Javascript by default
Pros: Looks a lot like Tor Browser especially if you're using Tor Browser
Cons: More work to use
Cons: Temporary uniqueness can be created by enabling Javascript for specific sites
Cons: More likely to try and reach the clearnet
#### Strict Extension Set
- **NoScript**
- **I2P In Private Browsing**
- **HTTPS EveryWhere** in some configurations
#### Strict user.js characteristics
TODO: Summarize differences

View File

@ -8,8 +8,11 @@
<meta name="keywords" content="main" /> <meta name="keywords" content="main" />
<link rel="stylesheet" type="text/css" href="style.css" /> <link rel="stylesheet" type="text/css" href="style.css" />
<link rel="stylesheet" type="text/css" href="showhider.css" /> <link rel="stylesheet" type="text/css" href="showhider.css" />
<link rel="stylesheet" type="text/css" href="darklight.css" />
</head> </head>
<body> <body>
<input type="checkbox" id="checkboxDarkLight">
<div class="container">
<div id="navbar"> <div id="navbar">
<a href="#shownav"> <a href="#shownav">
Show navigation Show navigation
@ -23,19 +26,34 @@
</a> </a>
</li> </li>
<li> <li>
<a href=""></a> <a href="index.html">
index
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="CHANGES.html">
CHANGES
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="LICENSE.html">
LICENSE
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="VERSION.html">
VERSION
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="index.html">
index.html
</a>
</li>
<li>
<a href="BUILD.html">
BUILD
</a>
</li> </li>
<li> <li>
<a href="I2PBrowser.html"> <a href="I2PBrowser.html">
@ -44,7 +62,7 @@
</li> </li>
<li> <li>
<a href="I2PBrowserPlugin.html"> <a href="I2PBrowserPlugin.html">
I2PBrowserPlugin I2PBrowserPlugin.html
</a> </a>
</li> </li>
<li> <li>
@ -99,7 +117,22 @@
</li> </li>
<li> <li>
<a href="I2PLibreWolf.html"> <a href="I2PLibreWolf.html">
I2PLibreWolf I2PLibreWolf.html
</a>
</li>
<li>
<a href="LINUX.html">
LINUX
</a>
</li>
<li>
<a href="OSX.html">
OSX
</a>
</li>
<li>
<a href="WINDOWS.html">
WINDOWS
</a> </a>
</li> </li>
</ul> </ul>
@ -138,7 +171,7 @@
<p> <p>
Author: idk Author: idk
<br /> <br />
Parent class: I2PCommonBrowser Parent class: I2PGenericUnsafeBrowser
<br /> <br />
package: net.i2p.i2pfirefox package: net.i2p.i2pfirefox
</p> </p>
@ -575,9 +608,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
</ul> </ul>
<h4> <h4>
boolean useSystray boolean useSystray
@ -591,9 +621,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
</ul> </ul>
<h2> <h2>
Methods Methods
@ -714,7 +741,7 @@
</p> </p>
<h3> <h3>
hasChromium hasChromium
<a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L131"> <a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L129">
[src] [src]
</a> </a>
</h3> </h3>
@ -737,7 +764,7 @@
</p> </p>
<h3> <h3>
hasFirefox hasFirefox
<a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L148"> <a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L146">
[src] [src]
</a> </a>
</h3> </h3>
@ -760,7 +787,7 @@
</p> </p>
<h3> <h3>
launch launch
<a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L168"> <a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L166">
[src] [src]
</a> </a>
</h3> </h3>
@ -789,7 +816,7 @@
</p> </p>
<h3> <h3>
launch launch
<a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L213"> <a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L211">
[src] [src]
</a> </a>
</h3> </h3>
@ -816,7 +843,7 @@
</p> </p>
<h3> <h3>
launch launch
<a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L227"> <a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L225">
[src] [src]
</a> </a>
</h3> </h3>
@ -839,7 +866,7 @@
</p> </p>
<h3> <h3>
ValidURL ValidURL
<a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L229"> <a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L227">
[src] [src]
</a> </a>
</h3> </h3>
@ -852,9 +879,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String return: String
<br /> <br />
@ -869,7 +893,7 @@
</p> </p>
<h3> <h3>
main main
<a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L239"> <a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L237">
[src] [src]
</a> </a>
</h3> </h3>
@ -899,7 +923,7 @@
</p> </p>
<h3> <h3>
parseArgs parseArgs
<a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L243"> <a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L241">
[src] [src]
</a> </a>
</h3> </h3>
@ -927,7 +951,7 @@
</p> </p>
<h3> <h3>
startup startup
<a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L290"> <a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L288">
[src] [src]
</a> </a>
</h3> </h3>
@ -954,7 +978,7 @@
</p> </p>
<h3> <h3>
createSystrayRunningFile createSystrayRunningFile
<a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L309"> <a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L307">
[src] [src]
</a> </a>
</h3> </h3>
@ -967,9 +991,6 @@
Access: protected Access: protected
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: boolean return: boolean
<br /> <br />
@ -980,7 +1001,7 @@
</p> </p>
<h3> <h3>
systrayRunningExternally systrayRunningExternally
<a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L325"> <a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L323">
[src] [src]
</a> </a>
</h3> </h3>
@ -993,9 +1014,6 @@
Access: protected Access: protected
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: boolean return: boolean
<br /> <br />
@ -1006,7 +1024,7 @@
</p> </p>
<h3> <h3>
initTray initTray
<a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L336"> <a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L334">
[src] [src]
</a> </a>
</h3> </h3>
@ -1029,7 +1047,7 @@
</p> </p>
<h3> <h3>
initMenu initMenu
<a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L347"> <a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L345">
[src] [src]
</a> </a>
</h3> </h3>
@ -1052,7 +1070,7 @@
</p> </p>
<h3> <h3>
initIconFile initIconFile
<a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L352"> <a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L350">
[src] [src]
</a> </a>
</h3> </h3>
@ -1075,7 +1093,7 @@
</p> </p>
<h3> <h3>
initIcon initIcon
<a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L366"> <a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L364">
[src] [src]
</a> </a>
</h3> </h3>
@ -1098,7 +1116,7 @@
</p> </p>
<h3> <h3>
startupSystray startupSystray
<a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L379"> <a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L377">
[src] [src]
</a> </a>
</h3> </h3>
@ -1121,7 +1139,7 @@
</p> </p>
<h3> <h3>
shutdownSystray shutdownSystray
<a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L406"> <a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L404">
[src] [src]
</a> </a>
</h3> </h3>
@ -1144,7 +1162,7 @@
</p> </p>
<h3> <h3>
systray systray
<a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L415"> <a href="src/java/net/i2p/i2pfirefox/I2PBrowser.java#L413">
[src] [src]
</a> </a>
</h3> </h3>
@ -2034,12 +2052,13 @@ Public License instead of this License.
</div> </div>
</div> </div>
</div> </div>
</div>
<div> <div>
<iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe> <iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe>
</div> </div>
<div> <div>
<a href="https://geti2p.net/"> <a href="https://geti2p.net/">
<img src="i2plogo.png"></img> <img class="i2plogo" src="i2plogo.png"></img>
I2P I2P
</a> </a>
</div> </div>

View File

@ -7,7 +7,7 @@ Description:
> I2PBrowser.java Copyright C 2022 idk <hankhill19580@gmail.com> This program is free software: you can redistribute it and/or modify it under the terms of the MIT License. See LICENSE.md for details. This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @description I2PBrowser is a that is used to open a browser window to the I2P network. It automatically detects the operating system and available browsers and selects the best one to use with Tor Browser at the top for Firefox and Brave at the top for Chrome. > I2PBrowser.java Copyright C 2022 idk <hankhill19580@gmail.com> This program is free software: you can redistribute it and/or modify it under the terms of the MIT License. See LICENSE.md for details. This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @description I2PBrowser is a that is used to open a browser window to the I2P network. It automatically detects the operating system and available browsers and selects the best one to use with Tor Browser at the top for Firefox and Brave at the top for Chrome.
Author: idk Author: idk
Parent class: I2PCommonBrowser Parent class: I2PGenericUnsafeBrowser
package: net.i2p.i2pfirefox package: net.i2p.i2pfirefox
## Dependencies ## Dependencies
@ -197,14 +197,12 @@ package: net.i2p.i2pfirefox
> >
+ Access: private + Access: private
+ Modifiers: static
#### boolean useSystray [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L) #### boolean useSystray [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L)
> >
+ Access: private + Access: private
+ Modifiers: static
## Methods ## Methods
@ -255,7 +253,7 @@ package: net.i2p.i2pfirefox
| browserPath | String | | | browserPath | String | |
### hasChromium [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L131) ### hasChromium [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L129)
+ Description: Return true if there is a Chromium available + Description: Return true if there is a Chromium available
+ Access: public + Access: public
@ -264,7 +262,7 @@ package: net.i2p.i2pfirefox
This method has no parameters. This method has no parameters.
### hasFirefox [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L148) ### hasFirefox [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L146)
+ Description: Return true if there is a Firefox variant available + Description: Return true if there is a Firefox variant available
+ Access: public + Access: public
@ -273,7 +271,7 @@ This method has no parameters.
This method has no parameters. This method has no parameters.
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L168) ### launch [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L166)
+ Description: Populates a profile directory with a proxy configuration. Waits for an HTTP proxy on the port 4444 to be ready. Launches either Firefox or Chromium with the profile directory. + Description: Populates a profile directory with a proxy configuration. Waits for an HTTP proxy on the port 4444 to be ready. Launches either Firefox or Chromium with the profile directory.
+ Access: public + Access: public
@ -285,7 +283,7 @@ This method has no parameters.
| url | String[] | | | url | String[] | |
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L213) ### launch [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L211)
+ Description: Populates a profile directory with a proxy configuration. Waits for an HTTP proxy on the port 4444 to be ready. Launches either Firefox or Chromium with the profile directory. + Description: Populates a profile directory with a proxy configuration. Waits for an HTTP proxy on the port 4444 to be ready. Launches either Firefox or Chromium with the profile directory.
+ Access: public + Access: public
@ -296,7 +294,7 @@ This method has no parameters.
| privateWindow | boolean | | | privateWindow | boolean | |
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L227) ### launch [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L225)
+ Description: Populates a profile directory with a proxy configuration. Waits for an HTTP proxy on the port 4444 to be ready. Launches either Firefox or Chromium with the profile directory. + Description: Populates a profile directory with a proxy configuration. Waits for an HTTP proxy on the port 4444 to be ready. Launches either Firefox or Chromium with the profile directory.
+ Access: public + Access: public
@ -305,11 +303,10 @@ This method has no parameters.
This method has no parameters. This method has no parameters.
### ValidURL [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L229) ### ValidURL [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L227)
+ Description: + Description:
+ Access: private + Access: private
+ Modifiers: static
+ return: String + return: String
| Name | Type | Description | | Name | Type | Description |
@ -317,7 +314,7 @@ This method has no parameters.
| inUrl | String | | | inUrl | String | |
### main [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L239) ### main [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L237)
+ Description: + Description:
+ Access: public + Access: public
@ -329,7 +326,7 @@ This method has no parameters.
| args | String[] | | | args | String[] | |
### parseArgs [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L243) ### parseArgs [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L241)
+ Description: + Description:
+ Access: public + Access: public
@ -340,7 +337,7 @@ This method has no parameters.
| args | String[] | | | args | String[] | |
### startup [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L290) ### startup [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L288)
+ Description: + Description:
+ Access: public + Access: public
@ -351,27 +348,25 @@ This method has no parameters.
| args | String[] | | | args | String[] | |
### createSystrayRunningFile [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L309) ### createSystrayRunningFile [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L307)
+ Description: + Description:
+ Access: protected + Access: protected
+ Modifiers: static
+ return: boolean + return: boolean
This method has no parameters. This method has no parameters.
### systrayRunningExternally [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L325) ### systrayRunningExternally [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L323)
+ Description: + Description:
+ Access: protected + Access: protected
+ Modifiers: static
+ return: boolean + return: boolean
This method has no parameters. This method has no parameters.
### initTray [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L336) ### initTray [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L334)
+ Description: + Description:
+ Access: private + Access: private
@ -380,7 +375,7 @@ This method has no parameters.
This method has no parameters. This method has no parameters.
### initMenu [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L347) ### initMenu [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L345)
+ Description: + Description:
+ Access: private + Access: private
@ -389,7 +384,7 @@ This method has no parameters.
This method has no parameters. This method has no parameters.
### initIconFile [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L352) ### initIconFile [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L350)
+ Description: + Description:
+ Access: private + Access: private
@ -398,7 +393,7 @@ This method has no parameters.
This method has no parameters. This method has no parameters.
### initIcon [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L366) ### initIcon [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L364)
+ Description: + Description:
+ Access: private + Access: private
@ -407,7 +402,7 @@ This method has no parameters.
This method has no parameters. This method has no parameters.
### startupSystray [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L379) ### startupSystray [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L377)
+ Description: + Description:
+ Access: protected + Access: protected
@ -416,7 +411,7 @@ This method has no parameters.
This method has no parameters. This method has no parameters.
### shutdownSystray [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L406) ### shutdownSystray [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L404)
+ Description: + Description:
+ Access: protected + Access: protected
@ -425,7 +420,7 @@ This method has no parameters.
This method has no parameters. This method has no parameters.
### systray [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L415) ### systray [[src]](src/java/net/i2p/i2pfirefox/I2PBrowser.java#L413)
+ Description: + Description:
+ Access: public + Access: public

View File

@ -37,6 +37,11 @@
<li> <li>
<a href=""></a> <a href=""></a>
</li> </li>
<li>
<a href="BUILD.html">
BUILD
</a>
</li>
<li> <li>
<a href="I2PBrowser.html"> <a href="I2PBrowser.html">
I2PBrowser I2PBrowser
@ -102,6 +107,21 @@
I2PLibreWolf I2PLibreWolf
</a> </a>
</li> </li>
<li>
<a href="LINUX.html">
LINUX
</a>
</li>
<li>
<a href="OSX.html">
OSX
</a>
</li>
<li>
<a href="WINDOWS.html">
WINDOWS
</a>
</li>
</ul> </ul>
<br> <br>
<a href="#hidenav"> <a href="#hidenav">
@ -281,9 +301,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: File return: File
<br /> <br />

View File

@ -8,8 +8,11 @@
<meta name="keywords" content="main" /> <meta name="keywords" content="main" />
<link rel="stylesheet" type="text/css" href="style.css" /> <link rel="stylesheet" type="text/css" href="style.css" />
<link rel="stylesheet" type="text/css" href="showhider.css" /> <link rel="stylesheet" type="text/css" href="showhider.css" />
<link rel="stylesheet" type="text/css" href="darklight.css" />
</head> </head>
<body> <body>
<input type="checkbox" id="checkboxDarkLight">
<div class="container">
<div id="navbar"> <div id="navbar">
<a href="#shownav"> <a href="#shownav">
Show navigation Show navigation
@ -23,19 +26,34 @@
</a> </a>
</li> </li>
<li> <li>
<a href=""></a> <a href="index.html">
index
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="CHANGES.html">
CHANGES
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="LICENSE.html">
LICENSE
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="VERSION.html">
VERSION
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="index.html">
index.html
</a>
</li>
<li>
<a href="BUILD.html">
BUILD
</a>
</li> </li>
<li> <li>
<a href="I2PBrowser.html"> <a href="I2PBrowser.html">
@ -44,7 +62,7 @@
</li> </li>
<li> <li>
<a href="I2PBrowserPlugin.html"> <a href="I2PBrowserPlugin.html">
I2PBrowserPlugin I2PBrowserPlugin.html
</a> </a>
</li> </li>
<li> <li>
@ -99,7 +117,22 @@
</li> </li>
<li> <li>
<a href="I2PLibreWolf.html"> <a href="I2PLibreWolf.html">
I2PLibreWolf I2PLibreWolf.html
</a>
</li>
<li>
<a href="LINUX.html">
LINUX
</a>
</li>
<li>
<a href="OSX.html">
OSX
</a>
</li>
<li>
<a href="WINDOWS.html">
WINDOWS
</a> </a>
</li> </li>
</ul> </ul>
@ -138,7 +171,7 @@
<p> <p>
Author: idk Author: idk
<br /> <br />
Parent class: I2PCommonBrowser Parent class: I2PChromiumProfileUnpacker
<br /> <br />
package: net.i2p.i2pfirefox package: net.i2p.i2pfirefox
</p> </p>
@ -243,9 +276,6 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: void return: void
<br /> <br />
@ -269,9 +299,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String[] return: String[]
<br /> <br />
@ -295,9 +322,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String[] return: String[]
<br /> <br />
@ -321,9 +345,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String[] return: String[]
<br /> <br />
@ -347,9 +368,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String[] return: String[]
<br /> <br />
@ -373,9 +391,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String[] return: String[]
<br /> <br />
@ -399,9 +414,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String[] return: String[]
<br /> <br />
@ -425,9 +437,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String[] return: String[]
<br /> <br />
@ -451,9 +460,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String[] return: String[]
<br /> <br />
@ -477,9 +483,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String[] return: String[]
<br /> <br />
@ -503,9 +506,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String[] return: String[]
<br /> <br />
@ -529,9 +529,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String[] return: String[]
<br /> <br />
@ -555,9 +552,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String[] return: String[]
<br /> <br />
@ -818,7 +812,7 @@
</p> </p>
<h3> <h3>
launchAndDetatch launchAndDetatch
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L666"> <a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L662">
[src] [src]
</a> </a>
</h3> </h3>
@ -847,7 +841,7 @@
</p> </p>
<h3> <h3>
launchAndDetatch launchAndDetatch
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L673"> <a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L669">
[src] [src]
</a> </a>
</h3> </h3>
@ -876,7 +870,7 @@
</p> </p>
<h3> <h3>
launch launch
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L731"> <a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L725">
[src] [src]
</a> </a>
</h3> </h3>
@ -905,7 +899,7 @@
</p> </p>
<h3> <h3>
launch launch
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L737"> <a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L731">
[src] [src]
</a> </a>
</h3> </h3>
@ -934,7 +928,7 @@
</p> </p>
<h3> <h3>
launch launch
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L762"> <a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L756">
[src] [src]
</a> </a>
</h3> </h3>
@ -961,7 +955,7 @@
</p> </p>
<h3> <h3>
launch launch
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L771"> <a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L765">
[src] [src]
</a> </a>
</h3> </h3>
@ -984,7 +978,7 @@
</p> </p>
<h3> <h3>
ValidURL ValidURL
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L773"> <a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L767">
[src] [src]
</a> </a>
</h3> </h3>
@ -997,9 +991,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String return: String
<br /> <br />
@ -1014,7 +1005,7 @@
</p> </p>
<h3> <h3>
main main
<a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L783"> <a href="src/java/net/i2p/i2pfirefox/I2PChromium.java#L777">
[src] [src]
</a> </a>
</h3> </h3>
@ -1911,12 +1902,13 @@ Public License instead of this License.
</div> </div>
</div> </div>
</div> </div>
</div>
<div> <div>
<iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe> <iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe>
</div> </div>
<div> <div>
<a href="https://geti2p.net/"> <a href="https://geti2p.net/">
<img src="i2plogo.png"></img> <img class="i2plogo" src="i2plogo.png"></img>
I2P I2P
</a> </a>
</div> </div>

View File

@ -7,7 +7,7 @@ Description:
> I2PChromium.java Copyright C 2022 idk <hankhill19580@gmail.com> This program is free software: you can redistribute it and/or modify it under the terms of the MIT License. See LICENSE.md for details. This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > I2PChromium.java Copyright C 2022 idk <hankhill19580@gmail.com> This program is free software: you can redistribute it and/or modify it under the terms of the MIT License. See LICENSE.md for details. This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Author: idk Author: idk
Parent class: I2PCommonBrowser Parent class: I2PChromiumProfileUnpacker
package: net.i2p.i2pfirefox package: net.i2p.i2pfirefox
## Dependencies ## Dependencies
@ -52,7 +52,6 @@ package: net.i2p.i2pfirefox
+ Description: + Description:
+ Access: public + Access: public
+ Modifiers: static
+ return: void + return: void
This method has no parameters. This method has no parameters.
@ -62,7 +61,6 @@ This method has no parameters.
+ Description: + Description:
+ Access: private + Access: private
+ Modifiers: static
+ return: String[] + return: String[]
This method has no parameters. This method has no parameters.
@ -72,7 +70,6 @@ This method has no parameters.
+ Description: + Description:
+ Access: private + Access: private
+ Modifiers: static
+ return: String[] + return: String[]
This method has no parameters. This method has no parameters.
@ -82,7 +79,6 @@ This method has no parameters.
+ Description: + Description:
+ Access: private + Access: private
+ Modifiers: static
+ return: String[] + return: String[]
This method has no parameters. This method has no parameters.
@ -92,7 +88,6 @@ This method has no parameters.
+ Description: + Description:
+ Access: private + Access: private
+ Modifiers: static
+ return: String[] + return: String[]
This method has no parameters. This method has no parameters.
@ -102,7 +97,6 @@ This method has no parameters.
+ Description: + Description:
+ Access: private + Access: private
+ Modifiers: static
+ return: String[] + return: String[]
This method has no parameters. This method has no parameters.
@ -112,7 +106,6 @@ This method has no parameters.
+ Description: + Description:
+ Access: private + Access: private
+ Modifiers: static
+ return: String[] + return: String[]
This method has no parameters. This method has no parameters.
@ -122,7 +115,6 @@ This method has no parameters.
+ Description: + Description:
+ Access: private + Access: private
+ Modifiers: static
+ return: String[] + return: String[]
This method has no parameters. This method has no parameters.
@ -132,7 +124,6 @@ This method has no parameters.
+ Description: + Description:
+ Access: private + Access: private
+ Modifiers: static
+ return: String[] + return: String[]
This method has no parameters. This method has no parameters.
@ -142,7 +133,6 @@ This method has no parameters.
+ Description: + Description:
+ Access: private + Access: private
+ Modifiers: static
+ return: String[] + return: String[]
This method has no parameters. This method has no parameters.
@ -152,7 +142,6 @@ This method has no parameters.
+ Description: + Description:
+ Access: private + Access: private
+ Modifiers: static
+ return: String[] + return: String[]
This method has no parameters. This method has no parameters.
@ -162,7 +151,6 @@ This method has no parameters.
+ Description: + Description:
+ Access: private + Access: private
+ Modifiers: static
+ return: String[] + return: String[]
This method has no parameters. This method has no parameters.
@ -172,7 +160,6 @@ This method has no parameters.
+ Description: + Description:
+ Access: private + Access: private
+ Modifiers: static
+ return: String[] + return: String[]
This method has no parameters. This method has no parameters.
@ -278,7 +265,7 @@ This method has no parameters.
| args | String[] | the extended arguments to pass to the Chromium binary. | | args | String[] | the extended arguments to pass to the Chromium binary. |
### launchAndDetatch [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L666) ### launchAndDetatch [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L662)
+ Description: + Description:
+ Access: public + Access: public
@ -290,7 +277,7 @@ This method has no parameters.
| url | String[] | | | url | String[] | |
### launchAndDetatch [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L673) ### launchAndDetatch [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L669)
+ Description: + Description:
+ Access: public + Access: public
@ -302,20 +289,20 @@ This method has no parameters.
| url | String[] | | | url | String[] | |
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L725)
+ Description: Populates a profile directory with a proxy configuration. Waits for an HTTP proxy on the port 4444 to be ready. Launches Chromium with the profile directory.
+ Access: public
+ return: void
| Name | Type | Description |
| ----- | ----- | ----- |
| privateWindow | boolean | |
| url | String[] | |
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L731) ### launch [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L731)
+ Description: Populates a profile directory with a proxy configuration. Waits for an HTTP proxy on the port 4444 to be ready. Launches Chromium with the profile directory.
+ Access: public
+ return: void
| Name | Type | Description |
| ----- | ----- | ----- |
| privateWindow | boolean | |
| url | String[] | |
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L737)
+ Description: + Description:
+ Access: public + Access: public
+ return: void + return: void
@ -326,7 +313,7 @@ This method has no parameters.
| url | String[] | | | url | String[] | |
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L762) ### launch [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L756)
+ Description: Populates a profile directory with a proxy configuration. Waits for an HTTP proxy on the port 4444 to be ready. Launches Chromium with the profile directory. + Description: Populates a profile directory with a proxy configuration. Waits for an HTTP proxy on the port 4444 to be ready. Launches Chromium with the profile directory.
+ Access: public + Access: public
@ -337,7 +324,7 @@ This method has no parameters.
| privateWindow | boolean | | | privateWindow | boolean | |
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L771) ### launch [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L765)
+ Description: Populates a profile directory with a proxy configuration. Waits for an HTTP proxy on the port 4444 to be ready. Launches Chromium with the profile directory. + Description: Populates a profile directory with a proxy configuration. Waits for an HTTP proxy on the port 4444 to be ready. Launches Chromium with the profile directory.
+ Access: public + Access: public
@ -346,11 +333,10 @@ This method has no parameters.
This method has no parameters. This method has no parameters.
### ValidURL [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L773) ### ValidURL [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L767)
+ Description: + Description:
+ Access: private + Access: private
+ Modifiers: static
+ return: String + return: String
| Name | Type | Description | | Name | Type | Description |
@ -358,7 +344,7 @@ This method has no parameters.
| inUrl | String | | | inUrl | String | |
### main [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L783) ### main [[src]](src/java/net/i2p/i2pfirefox/I2PChromium.java#L777)
+ Description: + Description:
+ Access: public + Access: public

View File

@ -8,8 +8,11 @@
<meta name="keywords" content="main" /> <meta name="keywords" content="main" />
<link rel="stylesheet" type="text/css" href="style.css" /> <link rel="stylesheet" type="text/css" href="style.css" />
<link rel="stylesheet" type="text/css" href="showhider.css" /> <link rel="stylesheet" type="text/css" href="showhider.css" />
<link rel="stylesheet" type="text/css" href="darklight.css" />
</head> </head>
<body> <body>
<input type="checkbox" id="checkboxDarkLight">
<div class="container">
<div id="navbar"> <div id="navbar">
<a href="#shownav"> <a href="#shownav">
Show navigation Show navigation
@ -23,19 +26,34 @@
</a> </a>
</li> </li>
<li> <li>
<a href=""></a> <a href="index.html">
index
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="CHANGES.html">
CHANGES
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="LICENSE.html">
LICENSE
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="VERSION.html">
VERSION
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="index.html">
index.html
</a>
</li>
<li>
<a href="BUILD.html">
BUILD
</a>
</li> </li>
<li> <li>
<a href="I2PBrowser.html"> <a href="I2PBrowser.html">
@ -44,7 +62,7 @@
</li> </li>
<li> <li>
<a href="I2PBrowserPlugin.html"> <a href="I2PBrowserPlugin.html">
I2PBrowserPlugin I2PBrowserPlugin.html
</a> </a>
</li> </li>
<li> <li>
@ -99,7 +117,22 @@
</li> </li>
<li> <li>
<a href="I2PLibreWolf.html"> <a href="I2PLibreWolf.html">
I2PLibreWolf I2PLibreWolf.html
</a>
</li>
<li>
<a href="LINUX.html">
LINUX
</a>
</li>
<li>
<a href="OSX.html">
OSX
</a>
</li>
<li>
<a href="WINDOWS.html">
WINDOWS
</a> </a>
</li> </li>
</ul> </ul>
@ -138,7 +171,7 @@
<p> <p>
Author: idk Author: idk
<br /> <br />
Parent class: I2PCommonBrowser Parent class: I2PChromiumProfileChecker
<br /> <br />
package: net.i2p.i2pfirefox package: net.i2p.i2pfirefox
</p> </p>
@ -178,46 +211,13 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
</ul> </ul>
<h2> <h2>
Methods Methods
</h2> </h2>
<h3>
profileDirectory
<a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L31">
[src]
</a>
</h3>
<ul>
<li>
Description: get the profile directory creating it if necessary
<br />
</li>
<li>
Access: public
<br />
</li>
<li>
Modifiers: static
</li>
<li>
return: String
<br />
</li>
</ul>
<p>
| Name | Type | Description |
<br />
| &mdash;&ndash; | &mdash;&ndash; | &mdash;&ndash; |
<br />
| base | String | |
</p>
<h3> <h3>
baseProfileDir baseProfileDir
<a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L35"> <a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L26">
[src] [src]
</a> </a>
</h3> </h3>
@ -230,9 +230,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String return: String
<br /> <br />
@ -249,7 +246,7 @@
</p> </p>
<h3> <h3>
baseProfileDirectory baseProfileDirectory
<a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L59"> <a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L50">
[src] [src]
</a> </a>
</h3> </h3>
@ -262,9 +259,6 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String return: String
<br /> <br />
@ -279,7 +273,7 @@
</p> </p>
<h3> <h3>
runtimeDirectory runtimeDirectory
<a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L83"> <a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L74">
[src] [src]
</a> </a>
</h3> </h3>
@ -292,9 +286,6 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: the runtime directory or null if it could not be created return: the runtime directory or null if it could not be created
<br /> <br />
@ -309,7 +300,7 @@
</p> </p>
<h3> <h3>
runtimeDirectory runtimeDirectory
<a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L94"> <a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L85">
[src] [src]
</a> </a>
</h3> </h3>
@ -322,9 +313,6 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: the runtime directory or null if it could not be created or found return: the runtime directory or null if it could not be created or found
<br /> <br />
@ -335,7 +323,7 @@
</p> </p>
<h3> <h3>
usabilityMode usabilityMode
<a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L109"> <a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L100">
[src] [src]
</a> </a>
</h3> </h3>
@ -348,9 +336,6 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String return: String
<br /> <br />
@ -361,7 +346,7 @@
</p> </p>
<h3> <h3>
copyBaseProfiletoProfile copyBaseProfiletoProfile
<a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L120"> <a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L111">
[src] [src]
</a> </a>
</h3> </h3>
@ -374,9 +359,6 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: boolean return: boolean
<br /> <br />
@ -1254,12 +1236,13 @@ Public License instead of this License.
</div> </div>
</div> </div>
</div> </div>
</div>
<div> <div>
<iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe> <iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe>
</div> </div>
<div> <div>
<a href="https://geti2p.net/"> <a href="https://geti2p.net/">
<img src="i2plogo.png"></img> <img class="i2plogo" src="i2plogo.png"></img>
I2P I2P
</a> </a>
</div> </div>

View File

@ -7,7 +7,7 @@ Description:
> I2PChromiumProfileBuilder.java Copyright C 2022 idk <hankhill19580@gmail.com> This program is free software: you can redistribute it and/or modify it under the terms of the MIT License. See LICENSE.md for details. This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. I2PChromiumProfileBuilder is a that builds a profile directory which contains the I2P browser profile for the Chromium browser family. It manages the base profile directory and copies it's contents to the active profile directory which is actually used by Chromium. > I2PChromiumProfileBuilder.java Copyright C 2022 idk <hankhill19580@gmail.com> This program is free software: you can redistribute it and/or modify it under the terms of the MIT License. See LICENSE.md for details. This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. I2PChromiumProfileBuilder is a that builds a profile directory which contains the I2P browser profile for the Chromium browser family. It manages the base profile directory and copies it's contents to the active profile directory which is actually used by Chromium.
Author: idk Author: idk
Parent class: I2PCommonBrowser Parent class: I2PChromiumProfileChecker
package: net.i2p.i2pfirefox package: net.i2p.i2pfirefox
## Dependencies ## Dependencies
@ -28,27 +28,13 @@ package: net.i2p.i2pfirefox
> >
+ Access: public + Access: public
+ Modifiers: static
## Methods ## Methods
### profileDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L31) ### baseProfileDir [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L26)
+ Description: get the profile directory creating it if necessary
+ Access: public
+ Modifiers: static
+ return: String
| Name | Type | Description |
| ----- | ----- | ----- |
| base | String | |
### baseProfileDir [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L35)
+ Description: + Description:
+ Access: private + Access: private
+ Modifiers: static
+ return: String + return: String
| Name | Type | Description | | Name | Type | Description |
@ -57,11 +43,10 @@ package: net.i2p.i2pfirefox
| mode | String | | | mode | String | |
### baseProfileDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L59) ### baseProfileDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L50)
+ Description: + Description:
+ Access: public + Access: public
+ Modifiers: static
+ return: String + return: String
| Name | Type | Description | | Name | Type | Description |
@ -69,11 +54,10 @@ package: net.i2p.i2pfirefox
| mode | String | | | mode | String | |
### runtimeDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L83) ### runtimeDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L74)
+ Description: get the runtime directory creating it if create=true + Description: get the runtime directory creating it if create=true
+ Access: public + Access: public
+ Modifiers: static
+ return: the runtime directory or null if it could not be created + return: the runtime directory or null if it could not be created
| Name | Type | Description | | Name | Type | Description |
@ -81,31 +65,28 @@ package: net.i2p.i2pfirefox
| create | boolean | if true create the runtime directory if it does not exist | | create | boolean | if true create the runtime directory if it does not exist |
### runtimeDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L94) ### runtimeDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L85)
+ Description: get the correct runtime directory + Description: get the correct runtime directory
+ Access: public + Access: public
+ Modifiers: static
+ return: the runtime directory or null if it could not be created or found + return: the runtime directory or null if it could not be created or found
This method has no parameters. This method has no parameters.
### usabilityMode [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L109) ### usabilityMode [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L100)
+ Description: + Description:
+ Access: public + Access: public
+ Modifiers: static
+ return: String + return: String
This method has no parameters. This method has no parameters.
### copyBaseProfiletoProfile [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L120) ### copyBaseProfiletoProfile [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java#L111)
+ Description: Copy the inert base profile directory to the runtime profile directory + Description: Copy the inert base profile directory to the runtime profile directory
+ Access: public + Access: public
+ Modifiers: static
+ return: boolean + return: boolean
This method has no parameters. This method has no parameters.

View File

@ -8,8 +8,11 @@
<meta name="keywords" content="main" /> <meta name="keywords" content="main" />
<link rel="stylesheet" type="text/css" href="style.css" /> <link rel="stylesheet" type="text/css" href="style.css" />
<link rel="stylesheet" type="text/css" href="showhider.css" /> <link rel="stylesheet" type="text/css" href="showhider.css" />
<link rel="stylesheet" type="text/css" href="darklight.css" />
</head> </head>
<body> <body>
<input type="checkbox" id="checkboxDarkLight">
<div class="container">
<div id="navbar"> <div id="navbar">
<a href="#shownav"> <a href="#shownav">
Show navigation Show navigation
@ -23,19 +26,34 @@
</a> </a>
</li> </li>
<li> <li>
<a href=""></a> <a href="index.html">
index
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="CHANGES.html">
CHANGES
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="LICENSE.html">
LICENSE
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="VERSION.html">
VERSION
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="index.html">
index.html
</a>
</li>
<li>
<a href="BUILD.html">
BUILD
</a>
</li> </li>
<li> <li>
<a href="I2PBrowser.html"> <a href="I2PBrowser.html">
@ -44,7 +62,7 @@
</li> </li>
<li> <li>
<a href="I2PBrowserPlugin.html"> <a href="I2PBrowserPlugin.html">
I2PBrowserPlugin I2PBrowserPlugin.html
</a> </a>
</li> </li>
<li> <li>
@ -99,7 +117,22 @@
</li> </li>
<li> <li>
<a href="I2PLibreWolf.html"> <a href="I2PLibreWolf.html">
I2PLibreWolf I2PLibreWolf.html
</a>
</li>
<li>
<a href="LINUX.html">
LINUX
</a>
</li>
<li>
<a href="OSX.html">
OSX
</a>
</li>
<li>
<a href="WINDOWS.html">
WINDOWS
</a> </a>
</li> </li>
</ul> </ul>
@ -199,9 +232,36 @@
<br /> <br />
| args | String[] | | | args | String[] | |
</p> </p>
<h3>
profileDirectory
<a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L50">
[src]
</a>
</h3>
<ul>
<li>
Description: get the profile directory creating it if necessary
<br />
</li>
<li>
Access: public
<br />
</li>
<li>
return: String
<br />
</li>
</ul>
<p>
| Name | Type | Description |
<br />
| &mdash;&ndash; | &mdash;&ndash; | &mdash;&ndash; |
<br />
| base | String | |
</p>
<h3> <h3>
validateProfileDirectory validateProfileDirectory
<a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L51"> <a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L61">
[src] [src]
</a> </a>
</h3> </h3>
@ -214,9 +274,6 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: true if the profile directory is valid false otherwise return: true if the profile directory is valid false otherwise
<br /> <br />
@ -231,7 +288,7 @@
</p> </p>
<h3> <h3>
validateFile validateFile
<a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L82"> <a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L92">
[src] [src]
</a> </a>
</h3> </h3>
@ -244,9 +301,6 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: true if the file is valid false otherwise return: true if the file is valid false otherwise
<br /> <br />
@ -261,7 +315,7 @@
</p> </p>
<h3> <h3>
validateExtensionDirectory validateExtensionDirectory
<a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L109"> <a href="src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L119">
[src] [src]
</a> </a>
</h3> </h3>
@ -274,9 +328,6 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: true if the extension directory is valid false otherwise return: true if the extension directory is valid false otherwise
<br /> <br />
@ -1158,12 +1209,13 @@ Public License instead of this License.
</div> </div>
</div> </div>
</div> </div>
</div>
<div> <div>
<iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe> <iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe>
</div> </div>
<div> <div>
<a href="https://geti2p.net/"> <a href="https://geti2p.net/">
<img src="i2plogo.png"></img> <img class="i2plogo" src="i2plogo.png"></img>
I2P I2P
</a> </a>
</div> </div>

View File

@ -37,11 +37,21 @@ package: net.i2p.i2pfirefox
| args | String[] | | | args | String[] | |
### validateProfileDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L51) ### profileDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L50)
+ Description: get the profile directory creating it if necessary
+ Access: public
+ return: String
| Name | Type | Description |
| ----- | ----- | ----- |
| base | String | |
### validateProfileDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L61)
+ Description: Return true if the profile directory is valid. + Description: Return true if the profile directory is valid.
+ Access: public + Access: public
+ Modifiers: static
+ return: true if the profile directory is valid false otherwise + return: true if the profile directory is valid false otherwise
| Name | Type | Description | | Name | Type | Description |
@ -49,11 +59,10 @@ package: net.i2p.i2pfirefox
| profileDirectory | String | the profile directory to check | | profileDirectory | String | the profile directory to check |
### validateFile [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L82) ### validateFile [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L92)
+ Description: Return true if the file is valid. + Description: Return true if the file is valid.
+ Access: public + Access: public
+ Modifiers: static
+ return: true if the file is valid false otherwise + return: true if the file is valid false otherwise
| Name | Type | Description | | Name | Type | Description |
@ -61,11 +70,10 @@ package: net.i2p.i2pfirefox
| file | String | the file to check | | file | String | the file to check |
### validateExtensionDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L109) ### validateExtensionDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java#L119)
+ Description: Return true if the extension directory is valid. + Description: Return true if the extension directory is valid.
+ Access: public + Access: public
+ Modifiers: static
+ return: true if the extension directory is valid false otherwise + return: true if the extension directory is valid false otherwise
| Name | Type | Description | | Name | Type | Description |

View File

@ -8,8 +8,11 @@
<meta name="keywords" content="main" /> <meta name="keywords" content="main" />
<link rel="stylesheet" type="text/css" href="style.css" /> <link rel="stylesheet" type="text/css" href="style.css" />
<link rel="stylesheet" type="text/css" href="showhider.css" /> <link rel="stylesheet" type="text/css" href="showhider.css" />
<link rel="stylesheet" type="text/css" href="darklight.css" />
</head> </head>
<body> <body>
<input type="checkbox" id="checkboxDarkLight">
<div class="container">
<div id="navbar"> <div id="navbar">
<a href="#shownav"> <a href="#shownav">
Show navigation Show navigation
@ -23,19 +26,34 @@
</a> </a>
</li> </li>
<li> <li>
<a href=""></a> <a href="index.html">
index
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="CHANGES.html">
CHANGES
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="LICENSE.html">
LICENSE
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="VERSION.html">
VERSION
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="index.html">
index.html
</a>
</li>
<li>
<a href="BUILD.html">
BUILD
</a>
</li> </li>
<li> <li>
<a href="I2PBrowser.html"> <a href="I2PBrowser.html">
@ -44,7 +62,7 @@
</li> </li>
<li> <li>
<a href="I2PBrowserPlugin.html"> <a href="I2PBrowserPlugin.html">
I2PBrowserPlugin I2PBrowserPlugin.html
</a> </a>
</li> </li>
<li> <li>
@ -99,7 +117,22 @@
</li> </li>
<li> <li>
<a href="I2PLibreWolf.html"> <a href="I2PLibreWolf.html">
I2PLibreWolf I2PLibreWolf.html
</a>
</li>
<li>
<a href="LINUX.html">
LINUX
</a>
</li>
<li>
<a href="OSX.html">
OSX
</a>
</li>
<li>
<a href="WINDOWS.html">
WINDOWS
</a> </a>
</li> </li>
</ul> </ul>
@ -138,7 +171,7 @@
<p> <p>
Author: idk Author: idk
<br /> <br />
Parent class: I2PCommonBrowser Parent class: I2PChromiumProfileBuilder
<br /> <br />
package: net.i2p.i2pfirefox package: net.i2p.i2pfirefox
</p> </p>
@ -1094,12 +1127,13 @@ Public License instead of this License.
</div> </div>
</div> </div>
</div> </div>
</div>
<div> <div>
<iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe> <iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe>
</div> </div>
<div> <div>
<a href="https://geti2p.net/"> <a href="https://geti2p.net/">
<img src="i2plogo.png"></img> <img class="i2plogo" src="i2plogo.png"></img>
I2P I2P
</a> </a>
</div> </div>

View File

@ -7,7 +7,7 @@ Description:
> I2PChromiumProfileUnpacker.java Copyright C 2022 idk <hankhill19580@gmail.com> This program is free software: you can redistribute it and/or modify it under the terms of the MIT License. See LICENSE.md for details. This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. I2PChromiumProfileUnpacker is a that unpacks the Chromium profile zip file into the Chromium base profile directory. This is not used by the Chromium browser instance it's unpacked to the disk to be copied to the active profile directory. > I2PChromiumProfileUnpacker.java Copyright C 2022 idk <hankhill19580@gmail.com> This program is free software: you can redistribute it and/or modify it under the terms of the MIT License. See LICENSE.md for details. This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. I2PChromiumProfileUnpacker is a that unpacks the Chromium profile zip file into the Chromium base profile directory. This is not used by the Chromium browser instance it's unpacked to the disk to be copied to the active profile directory.
Author: idk Author: idk
Parent class: I2PCommonBrowser Parent class: I2PChromiumProfileBuilder
package: net.i2p.i2pfirefox package: net.i2p.i2pfirefox
## Dependencies ## Dependencies

View File

@ -8,8 +8,11 @@
<meta name="keywords" content="main" /> <meta name="keywords" content="main" />
<link rel="stylesheet" type="text/css" href="style.css" /> <link rel="stylesheet" type="text/css" href="style.css" />
<link rel="stylesheet" type="text/css" href="showhider.css" /> <link rel="stylesheet" type="text/css" href="showhider.css" />
<link rel="stylesheet" type="text/css" href="darklight.css" />
</head> </head>
<body> <body>
<input type="checkbox" id="checkboxDarkLight">
<div class="container">
<div id="navbar"> <div id="navbar">
<a href="#shownav"> <a href="#shownav">
Show navigation Show navigation
@ -23,19 +26,34 @@
</a> </a>
</li> </li>
<li> <li>
<a href=""></a> <a href="index.html">
index
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="CHANGES.html">
CHANGES
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="LICENSE.html">
LICENSE
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="VERSION.html">
VERSION
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="index.html">
index.html
</a>
</li>
<li>
<a href="BUILD.html">
BUILD
</a>
</li> </li>
<li> <li>
<a href="I2PBrowser.html"> <a href="I2PBrowser.html">
@ -44,7 +62,7 @@
</li> </li>
<li> <li>
<a href="I2PBrowserPlugin.html"> <a href="I2PBrowserPlugin.html">
I2PBrowserPlugin I2PBrowserPlugin.html
</a> </a>
</li> </li>
<li> <li>
@ -99,7 +117,22 @@
</li> </li>
<li> <li>
<a href="I2PLibreWolf.html"> <a href="I2PLibreWolf.html">
I2PLibreWolf I2PLibreWolf.html
</a>
</li>
<li>
<a href="LINUX.html">
LINUX
</a>
</li>
<li>
<a href="OSX.html">
OSX
</a>
</li>
<li>
<a href="WINDOWS.html">
WINDOWS
</a> </a>
</li> </li>
</ul> </ul>
@ -217,9 +250,6 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
</ul> </ul>
<h4> <h4>
Logger logger Logger logger
@ -233,54 +263,145 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
</ul> </ul>
<h4> <h4>
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L39"> FileHandler fh
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L">
[src] [src]
</a> </a>
</h4> </h4>
<blockquote> <blockquote></blockquote>
<p>
static FileHandler fh;
</p>
</blockquote>
<ul> <ul>
<li> <li>
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: final
</li>
</ul>
<h4>
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L40">
[src]
</a>
</h4>
<blockquote>
<p>
// private final int DEFAULT_TIMEOUT = 200;
</p>
</blockquote>
<ul>
<li>
Access: private
<br />
</li>
<li>
Modifiers: static
</li>
</ul> </ul>
<h2> <h2>
Methods Methods
</h2> </h2>
<h3>
loadPropertiesFile
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L58">
[src]
</a>
</h3>
<ul>
<li>
Description:
<br />
</li>
<li>
Access: public
<br />
</li>
<li>
return: void
<br />
</li>
</ul>
<p>
| Name | Type | Description |
<br />
| &mdash;&ndash; | &mdash;&ndash; | &mdash;&ndash; |
<br />
| props | File | |
</p>
<h3>
validateUserDir
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L68">
[src]
</a>
</h3>
<ul>
<li>
Description:
<br />
</li>
<li>
Access: public
<br />
</li>
<li>
return: void
<br />
</li>
</ul>
<p>
This method has no parameters.
</p>
<h3>
getOperatingSystem
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L113">
[src]
</a>
</h3>
<ul>
<li>
Description:
<br />
</li>
<li>
Access: public
<br />
</li>
<li>
return: String
<br />
</li>
</ul>
<p>
This method has no parameters.
</p>
<h3>
isWindows
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L127">
[src]
</a>
</h3>
<ul>
<li>
Description:
<br />
</li>
<li>
Access: protected
<br />
</li>
<li>
return: boolean
<br />
</li>
</ul>
<p>
This method has no parameters.
</p>
<h3>
isOSX
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L139">
[src]
</a>
</h3>
<ul>
<li>
Description:
<br />
</li>
<li>
Access: protected
<br />
</li>
<li>
return: boolean
<br />
</li>
</ul>
<p>
This method has no parameters.
</p>
<h3> <h3>
runtimeDirectory runtimeDirectory
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L180"> <a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L179">
[src] [src]
</a> </a>
</h3> </h3>
@ -293,9 +414,6 @@
Access: protected Access: protected
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: the runtime directory or null if it could not be created return: the runtime directory or null if it could not be created
<br /> <br />
@ -312,7 +430,7 @@
</p> </p>
<h3> <h3>
runtimeDirectory runtimeDirectory
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L197"> <a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L196">
[src] [src]
</a> </a>
</h3> </h3>
@ -325,9 +443,6 @@
Access: protected Access: protected
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: the runtime directory or null if it could not be created or found return: the runtime directory or null if it could not be created or found
<br /> <br />
@ -342,7 +457,7 @@
</p> </p>
<h3> <h3>
profileDirectory profileDirectory
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L245"> <a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L244">
[src] [src]
</a> </a>
</h3> </h3>
@ -355,9 +470,6 @@
Access: protected Access: protected
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: the profile directory or null if it could not be created return: the profile directory or null if it could not be created
<br /> <br />
@ -378,7 +490,7 @@
</p> </p>
<h3> <h3>
profileDir profileDir
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L258"> <a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L257">
[src] [src]
</a> </a>
</h3> </h3>
@ -391,9 +503,6 @@
Access: protected Access: protected
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String return: String
<br /> <br />
@ -414,7 +523,7 @@
</p> </p>
<h3> <h3>
unpackProfile unpackProfile
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L269"> <a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L268">
[src] [src]
</a> </a>
</h3> </h3>
@ -445,7 +554,7 @@
</p> </p>
<h3> <h3>
copyDirectory copyDirectory
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L315"> <a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L313">
[src] [src]
</a> </a>
</h3> </h3>
@ -458,9 +567,6 @@
Access: protected Access: protected
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: void return: void
<br /> <br />
@ -481,7 +587,7 @@
</p> </p>
<h3> <h3>
copyDirectoryCompatibilityMode copyDirectoryCompatibilityMode
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L330"> <a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L328">
[src] [src]
</a> </a>
</h3> </h3>
@ -494,9 +600,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: void return: void
<br /> <br />
@ -517,7 +620,7 @@
</p> </p>
<h3> <h3>
copy copy
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L339"> <a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L336">
[src] [src]
</a> </a>
</h3> </h3>
@ -530,9 +633,6 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: void return: void
<br /> <br />
@ -549,7 +649,7 @@
</p> </p>
<h3> <h3>
copyFile copyFile
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L348"> <a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L345">
[src] [src]
</a> </a>
</h3> </h3>
@ -562,9 +662,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: void return: void
<br /> <br />
@ -581,7 +678,7 @@
</p> </p>
<h3> <h3>
validateProfileFirstRun validateProfileFirstRun
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L359"> <a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L356">
[src] [src]
</a> </a>
</h3> </h3>
@ -594,9 +691,6 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: boolean return: boolean
<br /> <br />
@ -611,7 +705,7 @@
</p> </p>
<h3> <h3>
waitForProxy waitForProxy
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L385"> <a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L382">
[src] [src]
</a> </a>
</h3> </h3>
@ -634,7 +728,7 @@
</p> </p>
<h3> <h3>
waitForProxy waitForProxy
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L395"> <a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L392">
[src] [src]
</a> </a>
</h3> </h3>
@ -661,7 +755,7 @@
</p> </p>
<h3> <h3>
waitForProxy waitForProxy
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L407"> <a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L404">
[src] [src]
</a> </a>
</h3> </h3>
@ -690,7 +784,7 @@
</p> </p>
<h3> <h3>
waitForProxy waitForProxy
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L422"> <a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L419">
[src] [src]
</a> </a>
</h3> </h3>
@ -721,7 +815,7 @@
</p> </p>
<h3> <h3>
checkifPortIsOccupied checkifPortIsOccupied
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L440"> <a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L437">
[src] [src]
</a> </a>
</h3> </h3>
@ -750,7 +844,7 @@
</p> </p>
<h3> <h3>
setProxyTimeoutTime setProxyTimeoutTime
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L455"> <a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L452">
[src] [src]
</a> </a>
</h3> </h3>
@ -777,7 +871,7 @@
</p> </p>
<h3> <h3>
join join
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L460"> <a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L457">
[src] [src]
</a> </a>
</h3> </h3>
@ -790,9 +884,6 @@
Access: protected Access: protected
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String return: String
<br /> <br />
@ -807,7 +898,7 @@
</p> </p>
<h3> <h3>
sleep sleep
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L469"> <a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L466">
[src] [src]
</a> </a>
</h3> </h3>
@ -820,9 +911,6 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: void return: void
<br /> <br />
@ -837,7 +925,7 @@
</p> </p>
<h3> <h3>
searchFile searchFile
<a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L477"> <a href="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L474">
[src] [src]
</a> </a>
</h3> </h3>
@ -850,9 +938,6 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: File return: File
<br /> <br />
@ -1736,12 +1821,13 @@ Public License instead of this License.
</div> </div>
</div> </div>
</div> </div>
</div>
<div> <div>
<iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe> <iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe>
</div> </div>
<div> <div>
<a href="https://geti2p.net/"> <a href="https://geti2p.net/">
<img src="i2plogo.png"></img> <img class="i2plogo" src="i2plogo.png"></img>
I2P I2P
</a> </a>
</div> </div>

View File

@ -42,36 +42,72 @@ package: net.i2p.i2pfirefox
> >
+ Access: public + Access: public
+ Modifiers: static
#### Logger logger [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L) #### Logger logger [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L)
> >
+ Access: public + Access: public
+ Modifiers: static
#### [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L39) #### FileHandler fh [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L)
> static FileHandler fh; >
+ Access: private + Access: private
+ Modifiers: final
#### [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L40)
> // private final int DEFAULT_TIMEOUT = 200;
+ Access: private
+ Modifiers: static
## Methods ## Methods
### runtimeDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L180) ### loadPropertiesFile [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L58)
+ Description:
+ Access: public
+ return: void
| Name | Type | Description |
| ----- | ----- | ----- |
| props | File | |
### validateUserDir [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L68)
+ Description:
+ Access: public
+ return: void
This method has no parameters.
### getOperatingSystem [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L113)
+ Description:
+ Access: public
+ return: String
This method has no parameters.
### isWindows [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L127)
+ Description:
+ Access: protected
+ return: boolean
This method has no parameters.
### isOSX [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L139)
+ Description:
+ Access: protected
+ return: boolean
This method has no parameters.
### runtimeDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L179)
+ Description: get the runtime directory creating it if create=true + Description: get the runtime directory creating it if create=true
+ Access: protected + Access: protected
+ Modifiers: static
+ return: the runtime directory or null if it could not be created + return: the runtime directory or null if it could not be created
| Name | Type | Description | | Name | Type | Description |
@ -80,11 +116,10 @@ package: net.i2p.i2pfirefox
| override | String | | | override | String | |
### runtimeDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L197) ### runtimeDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L196)
+ Description: get the correct runtime directory + Description: get the correct runtime directory
+ Access: protected + Access: protected
+ Modifiers: static
+ return: the runtime directory or null if it could not be created or found + return: the runtime directory or null if it could not be created or found
| Name | Type | Description | | Name | Type | Description |
@ -92,11 +127,10 @@ package: net.i2p.i2pfirefox
| override | String | | | override | String | |
### profileDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L245) ### profileDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L244)
+ Description: get the profile directory creating it if necessary + Description: get the profile directory creating it if necessary
+ Access: protected + Access: protected
+ Modifiers: static
+ return: the profile directory or null if it could not be created + return: the profile directory or null if it could not be created
| Name | Type | Description | | Name | Type | Description |
@ -107,11 +141,10 @@ package: net.i2p.i2pfirefox
| app | boolean | | | app | boolean | |
### profileDir [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L258) ### profileDir [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L257)
+ Description: + Description:
+ Access: protected + Access: protected
+ Modifiers: static
+ return: String + return: String
| Name | Type | Description | | Name | Type | Description |
@ -122,7 +155,7 @@ package: net.i2p.i2pfirefox
| app | boolean | | | app | boolean | |
### unpackProfile [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L269) ### unpackProfile [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L268)
+ Description: + Description:
+ Access: protected + Access: protected
@ -135,11 +168,10 @@ package: net.i2p.i2pfirefox
| base | String | | | base | String | |
### copyDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L315) ### copyDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L313)
+ Description: + Description:
+ Access: protected + Access: protected
+ Modifiers: static
+ return: void + return: void
| Name | Type | Description | | Name | Type | Description |
@ -150,11 +182,10 @@ package: net.i2p.i2pfirefox
| base | String | | | base | String | |
### copyDirectoryCompatibilityMode [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L330) ### copyDirectoryCompatibilityMode [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L328)
+ Description: + Description:
+ Access: private + Access: private
+ Modifiers: static
+ return: void + return: void
| Name | Type | Description | | Name | Type | Description |
@ -165,11 +196,10 @@ package: net.i2p.i2pfirefox
| base | String | | | base | String | |
### copy [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L339) ### copy [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L336)
+ Description: + Description:
+ Access: public + Access: public
+ Modifiers: static
+ return: void + return: void
| Name | Type | Description | | Name | Type | Description |
@ -178,11 +208,10 @@ package: net.i2p.i2pfirefox
| target | OutputStream | | | target | OutputStream | |
### copyFile [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L348) ### copyFile [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L345)
+ Description: + Description:
+ Access: private + Access: private
+ Modifiers: static
+ return: void + return: void
| Name | Type | Description | | Name | Type | Description |
@ -191,11 +220,10 @@ package: net.i2p.i2pfirefox
| destinationFile | File | | | destinationFile | File | |
### validateProfileFirstRun [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L359) ### validateProfileFirstRun [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L356)
+ Description: + Description:
+ Access: public + Access: public
+ Modifiers: static
+ return: boolean + return: boolean
| Name | Type | Description | | Name | Type | Description |
@ -203,7 +231,7 @@ package: net.i2p.i2pfirefox
| profileDirectory | String | | | profileDirectory | String | |
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L385) ### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L382)
+ Description: Waits for an HTTP proxy on port 4444 to be ready. Returns false on timeout of 200 seconds. + Description: Waits for an HTTP proxy on port 4444 to be ready. Returns false on timeout of 200 seconds.
+ Access: public + Access: public
@ -212,7 +240,7 @@ package: net.i2p.i2pfirefox
This method has no parameters. This method has no parameters.
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L395) ### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L392)
+ Description: Waits for an HTTP proxy on port 4444 to be ready. Returns false on timeout of the specified number of seconds. + Description: Waits for an HTTP proxy on port 4444 to be ready. Returns false on timeout of the specified number of seconds.
+ Access: public + Access: public
@ -223,7 +251,7 @@ This method has no parameters.
| timeout | int | the number of seconds to wait for the proxy to be ready. | | timeout | int | the number of seconds to wait for the proxy to be ready. |
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L407) ### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L404)
+ Description: Waits for an HTTP proxy on the specified port to be ready. Returns false on timeout of the specified number of seconds. + Description: Waits for an HTTP proxy on the specified port to be ready. Returns false on timeout of the specified number of seconds.
+ Access: public + Access: public
@ -235,7 +263,7 @@ This method has no parameters.
| port | int | the port to wait for the proxy to be ready on. | | port | int | the port to wait for the proxy to be ready on. |
### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L422) ### waitForProxy [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L419)
+ Description: Waits for an HTTP proxy on the specified port to be ready. Returns false on timeout of the specified number of seconds. If the timeout is zero or less the check is disabled and always returns true. + Description: Waits for an HTTP proxy on the specified port to be ready. Returns false on timeout of the specified number of seconds. If the timeout is zero or less the check is disabled and always returns true.
+ Access: public + Access: public
@ -248,7 +276,7 @@ This method has no parameters.
| host | String | the host to wait for the proxy to be ready on. | | host | String | the host to wait for the proxy to be ready on. |
### checkifPortIsOccupied [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L440) ### checkifPortIsOccupied [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L437)
+ Description: + Description:
+ Access: public + Access: public
@ -260,7 +288,7 @@ This method has no parameters.
| host | String | | | host | String | |
### setProxyTimeoutTime [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L455) ### setProxyTimeoutTime [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L452)
+ Description: Alters the proxy timeout to customized value time in seconds. May be zero. + Description: Alters the proxy timeout to customized value time in seconds. May be zero.
+ Access: public + Access: public
@ -271,11 +299,10 @@ This method has no parameters.
| time | int | | | time | int | |
### join [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L460) ### join [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L457)
+ Description: + Description:
+ Access: protected + Access: protected
+ Modifiers: static
+ return: String + return: String
| Name | Type | Description | | Name | Type | Description |
@ -283,11 +310,10 @@ This method has no parameters.
| arr | String[] | | | arr | String[] | |
### sleep [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L469) ### sleep [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L466)
+ Description: + Description:
+ Access: public + Access: public
+ Modifiers: static
+ return: void + return: void
| Name | Type | Description | | Name | Type | Description |
@ -295,11 +321,10 @@ This method has no parameters.
| millis | int | | | millis | int | |
### searchFile [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L477) ### searchFile [[src]](src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java#L474)
+ Description: + Description:
+ Access: public + Access: public
+ Modifiers: static
+ return: File + return: File
| Name | Type | Description | | Name | Type | Description |

View File

@ -8,8 +8,11 @@
<meta name="keywords" content="main" /> <meta name="keywords" content="main" />
<link rel="stylesheet" type="text/css" href="style.css" /> <link rel="stylesheet" type="text/css" href="style.css" />
<link rel="stylesheet" type="text/css" href="showhider.css" /> <link rel="stylesheet" type="text/css" href="showhider.css" />
<link rel="stylesheet" type="text/css" href="darklight.css" />
</head> </head>
<body> <body>
<input type="checkbox" id="checkboxDarkLight">
<div class="container">
<div id="navbar"> <div id="navbar">
<a href="#shownav"> <a href="#shownav">
Show navigation Show navigation
@ -23,19 +26,34 @@
</a> </a>
</li> </li>
<li> <li>
<a href=""></a> <a href="index.html">
index
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="CHANGES.html">
CHANGES
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="LICENSE.html">
LICENSE
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="VERSION.html">
VERSION
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="index.html">
index.html
</a>
</li>
<li>
<a href="BUILD.html">
BUILD
</a>
</li> </li>
<li> <li>
<a href="I2PBrowser.html"> <a href="I2PBrowser.html">
@ -44,7 +62,7 @@
</li> </li>
<li> <li>
<a href="I2PBrowserPlugin.html"> <a href="I2PBrowserPlugin.html">
I2PBrowserPlugin I2PBrowserPlugin.html
</a> </a>
</li> </li>
<li> <li>
@ -99,7 +117,22 @@
</li> </li>
<li> <li>
<a href="I2PLibreWolf.html"> <a href="I2PLibreWolf.html">
I2PLibreWolf I2PLibreWolf.html
</a>
</li>
<li>
<a href="LINUX.html">
LINUX
</a>
</li>
<li>
<a href="OSX.html">
OSX
</a>
</li>
<li>
<a href="WINDOWS.html">
WINDOWS
</a> </a>
</li> </li>
</ul> </ul>
@ -138,7 +171,7 @@
<p> <p>
Author: idk Author: idk
<br /> <br />
Parent class: I2PCommonBrowser Parent class: I2PFirefoxProfileUnpacker
<br /> <br />
package: net.i2p.i2pfirefox package: net.i2p.i2pfirefox
</p> </p>
@ -240,9 +273,6 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
</ul> </ul>
<h2> <h2>
Methods Methods
@ -262,9 +292,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String return: String
<br /> <br />
@ -288,9 +315,6 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: void return: void
<br /> <br />
@ -314,9 +338,6 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String[] return: String[]
<br /> <br />
@ -340,9 +361,6 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String[] return: String[]
<br /> <br />
@ -366,9 +384,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String[] return: String[]
<br /> <br />
@ -392,9 +407,6 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String[] return: String[]
<br /> <br />
@ -418,9 +430,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String[] return: String[]
<br /> <br />
@ -444,9 +453,6 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String[] return: String[]
<br /> <br />
@ -470,9 +476,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String[] return: String[]
<br /> <br />
@ -496,9 +499,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String[] return: String[]
<br /> <br />
@ -522,9 +522,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String[] return: String[]
<br /> <br />
@ -548,9 +545,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String[] return: String[]
<br /> <br />
@ -574,9 +568,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String[] return: String[]
<br /> <br />
@ -587,7 +578,7 @@
</p> </p>
<h3> <h3>
FIREFOX_FINDER FIREFOX_FINDER
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L335"> <a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L337">
[src] [src]
</a> </a>
</h3> </h3>
@ -600,9 +591,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String[] return: String[]
<br /> <br />
@ -613,7 +601,7 @@
</p> </p>
<h3> <h3>
onlyValidFirefoxes onlyValidFirefoxes
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L356"> <a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L358">
[src] [src]
</a> </a>
</h3> </h3>
@ -636,7 +624,7 @@
</p> </p>
<h3> <h3>
topFirefox topFirefox
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L377"> <a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L379">
[src] [src]
</a> </a>
</h3> </h3>
@ -659,7 +647,7 @@
</p> </p>
<h3> <h3>
topFirefox topFirefox
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L407"> <a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L409">
[src] [src]
</a> </a>
</h3> </h3>
@ -686,7 +674,7 @@
</p> </p>
<h3> <h3>
defaultProcessBuilder defaultProcessBuilder
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L425"> <a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L427">
[src] [src]
</a> </a>
</h3> </h3>
@ -709,7 +697,7 @@
</p> </p>
<h3> <h3>
defaultProcessBuilder defaultProcessBuilder
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L437"> <a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L439">
[src] [src]
</a> </a>
</h3> </h3>
@ -736,7 +724,7 @@
</p> </p>
<h3> <h3>
privateProcessBuilder privateProcessBuilder
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L451"> <a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L453">
[src] [src]
</a> </a>
</h3> </h3>
@ -759,7 +747,7 @@
</p> </p>
<h3> <h3>
privateProcessBuilder privateProcessBuilder
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L464"> <a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L466">
[src] [src]
</a> </a>
</h3> </h3>
@ -786,7 +774,7 @@
</p> </p>
<h3> <h3>
appProcessBuilder appProcessBuilder
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L487"> <a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L489">
[src] [src]
</a> </a>
</h3> </h3>
@ -809,7 +797,7 @@
</p> </p>
<h3> <h3>
appProcessBuilder appProcessBuilder
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L500"> <a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L502">
[src] [src]
</a> </a>
</h3> </h3>
@ -836,7 +824,7 @@
</p> </p>
<h3> <h3>
headlessProcessBuilder headlessProcessBuilder
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L521"> <a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L523">
[src] [src]
</a> </a>
</h3> </h3>
@ -863,7 +851,7 @@
</p> </p>
<h3> <h3>
processBuilder processBuilder
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L549"> <a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L551">
[src] [src]
</a> </a>
</h3> </h3>
@ -892,7 +880,7 @@
</p> </p>
<h3> <h3>
usabilityMode usabilityMode
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L614"> <a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L682">
[src] [src]
</a> </a>
</h3> </h3>
@ -915,7 +903,7 @@
</p> </p>
<h3> <h3>
launchAndDetatch launchAndDetatch
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L620"> <a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L688">
[src] [src]
</a> </a>
</h3> </h3>
@ -944,7 +932,7 @@
</p> </p>
<h3> <h3>
launchAndDetatch launchAndDetatch
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L626"> <a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L694">
[src] [src]
</a> </a>
</h3> </h3>
@ -973,7 +961,7 @@
</p> </p>
<h3> <h3>
launch launch
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L720"> <a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L786">
[src] [src]
</a> </a>
</h3> </h3>
@ -1002,7 +990,7 @@
</p> </p>
<h3> <h3>
launch launch
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L726"> <a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L792">
[src] [src]
</a> </a>
</h3> </h3>
@ -1031,7 +1019,7 @@
</p> </p>
<h3> <h3>
launch launch
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L752"> <a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L818">
[src] [src]
</a> </a>
</h3> </h3>
@ -1058,7 +1046,7 @@
</p> </p>
<h3> <h3>
launch launch
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L762"> <a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L828">
[src] [src]
</a> </a>
</h3> </h3>
@ -1081,7 +1069,7 @@
</p> </p>
<h3> <h3>
ValidURL ValidURL
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L764"> <a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L830">
[src] [src]
</a> </a>
</h3> </h3>
@ -1094,9 +1082,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String return: String
<br /> <br />
@ -1111,7 +1096,7 @@
</p> </p>
<h3> <h3>
main main
<a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L775"> <a href="src/java/net/i2p/i2pfirefox/I2PFirefox.java#L841">
[src] [src]
</a> </a>
</h3> </h3>
@ -2008,12 +1993,13 @@ Public License instead of this License.
</div> </div>
</div> </div>
</div> </div>
</div>
<div> <div>
<iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe> <iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe>
</div> </div>
<div> <div>
<a href="https://geti2p.net/"> <a href="https://geti2p.net/">
<img src="i2plogo.png"></img> <img class="i2plogo" src="i2plogo.png"></img>
I2P I2P
</a> </a>
</div> </div>

View File

@ -7,7 +7,7 @@ Description:
> I2PFirefox.java Copyright C 2022 idk <hankhill19580@gmail.com> This program is free software: you can redistribute it and/or modify it under the terms of the MIT License. See LICENSE.md for details. This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > I2PFirefox.java Copyright C 2022 idk <hankhill19580@gmail.com> This program is free software: you can redistribute it and/or modify it under the terms of the MIT License. See LICENSE.md for details. This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Author: idk Author: idk
Parent class: I2PCommonBrowser Parent class: I2PFirefoxProfileUnpacker
package: net.i2p.i2pfirefox package: net.i2p.i2pfirefox
## Dependencies ## Dependencies
@ -52,7 +52,6 @@ package: net.i2p.i2pfirefox
> >
+ Access: public + Access: public
+ Modifiers: static
## Methods ## Methods
@ -60,7 +59,6 @@ package: net.i2p.i2pfirefox
+ Description: + Description:
+ Access: private + Access: private
+ Modifiers: static
+ return: String + return: String
This method has no parameters. This method has no parameters.
@ -70,7 +68,6 @@ This method has no parameters.
+ Description: + Description:
+ Access: public + Access: public
+ Modifiers: static
+ return: void + return: void
This method has no parameters. This method has no parameters.
@ -80,7 +77,6 @@ This method has no parameters.
+ Description: + Description:
+ Access: public + Access: public
+ Modifiers: static
+ return: String[] + return: String[]
This method has no parameters. This method has no parameters.
@ -90,7 +86,6 @@ This method has no parameters.
+ Description: + Description:
+ Access: public + Access: public
+ Modifiers: static
+ return: String[] + return: String[]
This method has no parameters. This method has no parameters.
@ -100,7 +95,6 @@ This method has no parameters.
+ Description: + Description:
+ Access: private + Access: private
+ Modifiers: static
+ return: String[] + return: String[]
This method has no parameters. This method has no parameters.
@ -110,7 +104,6 @@ This method has no parameters.
+ Description: + Description:
+ Access: public + Access: public
+ Modifiers: static
+ return: String[] + return: String[]
This method has no parameters. This method has no parameters.
@ -120,7 +113,6 @@ This method has no parameters.
+ Description: + Description:
+ Access: private + Access: private
+ Modifiers: static
+ return: String[] + return: String[]
This method has no parameters. This method has no parameters.
@ -130,7 +122,6 @@ This method has no parameters.
+ Description: + Description:
+ Access: public + Access: public
+ Modifiers: static
+ return: String[] + return: String[]
This method has no parameters. This method has no parameters.
@ -140,7 +131,6 @@ This method has no parameters.
+ Description: + Description:
+ Access: private + Access: private
+ Modifiers: static
+ return: String[] + return: String[]
This method has no parameters. This method has no parameters.
@ -150,7 +140,6 @@ This method has no parameters.
+ Description: + Description:
+ Access: private + Access: private
+ Modifiers: static
+ return: String[] + return: String[]
This method has no parameters. This method has no parameters.
@ -160,7 +149,6 @@ This method has no parameters.
+ Description: + Description:
+ Access: private + Access: private
+ Modifiers: static
+ return: String[] + return: String[]
This method has no parameters. This method has no parameters.
@ -170,7 +158,6 @@ This method has no parameters.
+ Description: + Description:
+ Access: private + Access: private
+ Modifiers: static
+ return: String[] + return: String[]
This method has no parameters. This method has no parameters.
@ -180,23 +167,21 @@ This method has no parameters.
+ Description: + Description:
+ Access: private + Access: private
+ Modifiers: static
+ return: String[] + return: String[]
This method has no parameters. This method has no parameters.
### FIREFOX_FINDER [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L335) ### FIREFOX_FINDER [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L337)
+ Description: + Description:
+ Access: private + Access: private
+ Modifiers: static
+ return: String[] + return: String[]
This method has no parameters. This method has no parameters.
### onlyValidFirefoxes [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L356) ### onlyValidFirefoxes [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L358)
+ Description: Check our list of firefox paths for a valid firefox binary. Just an existence check for now but should check versions in the future. + Description: Check our list of firefox paths for a valid firefox binary. Just an existence check for now but should check versions in the future.
+ Access: public + Access: public
@ -205,7 +190,7 @@ This method has no parameters.
This method has no parameters. This method has no parameters.
### topFirefox [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L377) ### topFirefox [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L379)
+ Description: Return the best available Firefox from the list of Firefoxes we have. + Description: Return the best available Firefox from the list of Firefoxes we have.
+ Access: public + Access: public
@ -214,7 +199,7 @@ This method has no parameters.
This method has no parameters. This method has no parameters.
### topFirefox [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L407) ### topFirefox [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L409)
+ Description: Return the best available Firefox from the list of Firefoxes we have. if override is passed it will be validated and if it validates it will be used. + Description: Return the best available Firefox from the list of Firefoxes we have. if override is passed it will be validated and if it validates it will be used.
+ Access: public + Access: public
@ -225,7 +210,7 @@ This method has no parameters.
| overrideFirefox | String | | | overrideFirefox | String | |
### defaultProcessBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L425) ### defaultProcessBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L427)
+ Description: Build a ProcessBuilder for the top Firefox binary and the default profile. + Description: Build a ProcessBuilder for the top Firefox binary and the default profile.
+ Access: public + Access: public
@ -234,7 +219,7 @@ This method has no parameters.
This method has no parameters. This method has no parameters.
### defaultProcessBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L437) ### defaultProcessBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L439)
+ Description: Build a ProcessBuilder for the top Firefox binary and the default profile. + Description: Build a ProcessBuilder for the top Firefox binary and the default profile.
+ Access: public + Access: public
@ -245,7 +230,7 @@ This method has no parameters.
| args | String[] | the args to pass to the Firefox binary | | args | String[] | the args to pass to the Firefox binary |
### privateProcessBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L451) ### privateProcessBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L453)
+ Description: Build a ProcessBuilder for the top Firefox binary and the default profile. Pass the --private-window flag to open a window. + Description: Build a ProcessBuilder for the top Firefox binary and the default profile. Pass the --private-window flag to open a window.
+ Access: public + Access: public
@ -254,7 +239,7 @@ This method has no parameters.
This method has no parameters. This method has no parameters.
### privateProcessBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L464) ### privateProcessBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L466)
+ Description: Build a ProcessBuilder for the top Firefox binary and the default profile. Pass the --private-window flag to open a window. + Description: Build a ProcessBuilder for the top Firefox binary and the default profile. Pass the --private-window flag to open a window.
+ Access: public + Access: public
@ -265,7 +250,7 @@ This method has no parameters.
| args | String[] | the arguments to pass to the Firefox binary | | args | String[] | the arguments to pass to the Firefox binary |
### appProcessBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L487) ### appProcessBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L489)
+ Description: Build a ProcessBuilder for the top Firefox binary and the default profile. Pass the --private-window flag to open a window. + Description: Build a ProcessBuilder for the top Firefox binary and the default profile. Pass the --private-window flag to open a window.
+ Access: public + Access: public
@ -274,7 +259,7 @@ This method has no parameters.
This method has no parameters. This method has no parameters.
### appProcessBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L500) ### appProcessBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L502)
+ Description: Build a ProcessBuilder for the top Firefox binary and the default profile. Pass the --private-window flag to open a window. + Description: Build a ProcessBuilder for the top Firefox binary and the default profile. Pass the --private-window flag to open a window.
+ Access: public + Access: public
@ -285,7 +270,7 @@ This method has no parameters.
| args | String[] | the arguments to pass to the Firefox binary | | args | String[] | the arguments to pass to the Firefox binary |
### headlessProcessBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L521) ### headlessProcessBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L523)
+ Description: Build a ProcessBuilder for the top Firefox binary and the default profile. Pass the --headless flag to open without a window. + Description: Build a ProcessBuilder for the top Firefox binary and the default profile. Pass the --headless flag to open without a window.
+ Access: public + Access: public
@ -296,7 +281,7 @@ This method has no parameters.
| args | String[] | the arguments to pass to the Firefox binary | | args | String[] | the arguments to pass to the Firefox binary |
### processBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L549) ### processBuilder [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L551)
+ Description: + Description:
+ Access: public + Access: public
@ -308,7 +293,7 @@ This method has no parameters.
| app | boolean | | | app | boolean | |
### usabilityMode [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L614) ### usabilityMode [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L682)
+ Description: + Description:
+ Access: private + Access: private
@ -317,7 +302,7 @@ This method has no parameters.
This method has no parameters. This method has no parameters.
### launchAndDetatch [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L620) ### launchAndDetatch [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L688)
+ Description: + Description:
+ Access: public + Access: public
@ -329,7 +314,7 @@ This method has no parameters.
| url | String[] | | | url | String[] | |
### launchAndDetatch [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L626) ### launchAndDetatch [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L694)
+ Description: + Description:
+ Access: public + Access: public
@ -341,7 +326,7 @@ This method has no parameters.
| url | String[] | | | url | String[] | |
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L720) ### launch [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L786)
+ Description: Populates a profile directory with a proxy configuration. Waits for an HTTP proxy on the port 4444 to be ready. Launches Firefox with the profile directory. + Description: Populates a profile directory with a proxy configuration. Waits for an HTTP proxy on the port 4444 to be ready. Launches Firefox with the profile directory.
+ Access: public + Access: public
@ -353,7 +338,7 @@ This method has no parameters.
| url | String[] | | | url | String[] | |
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L726) ### launch [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L792)
+ Description: + Description:
+ Access: public + Access: public
@ -365,7 +350,7 @@ This method has no parameters.
| url | String[] | | | url | String[] | |
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L752) ### launch [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L818)
+ Description: Populates a profile directory with a proxy configuration. Waits for an HTTP proxy on the port 4444 to be ready. Launches Firefox with the profile directory. + Description: Populates a profile directory with a proxy configuration. Waits for an HTTP proxy on the port 4444 to be ready. Launches Firefox with the profile directory.
+ Access: public + Access: public
@ -376,7 +361,7 @@ This method has no parameters.
| privateWindow | boolean | | | privateWindow | boolean | |
### launch [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L762) ### launch [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L828)
+ Description: Populates a profile directory with a proxy configuration. Waits for an HTTP proxy on the port 4444 to be ready. Launches Firefox with the profile directory. Uses a semi-permanent profile. + Description: Populates a profile directory with a proxy configuration. Waits for an HTTP proxy on the port 4444 to be ready. Launches Firefox with the profile directory. Uses a semi-permanent profile.
+ Access: public + Access: public
@ -385,11 +370,10 @@ This method has no parameters.
This method has no parameters. This method has no parameters.
### ValidURL [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L764) ### ValidURL [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L830)
+ Description: + Description:
+ Access: private + Access: private
+ Modifiers: static
+ return: String + return: String
| Name | Type | Description | | Name | Type | Description |
@ -397,7 +381,7 @@ This method has no parameters.
| inUrl | String | | | inUrl | String | |
### main [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L775) ### main [[src]](src/java/net/i2p/i2pfirefox/I2PFirefox.java#L841)
+ Description: + Description:
+ Access: public + Access: public

View File

@ -8,8 +8,11 @@
<meta name="keywords" content="main" /> <meta name="keywords" content="main" />
<link rel="stylesheet" type="text/css" href="style.css" /> <link rel="stylesheet" type="text/css" href="style.css" />
<link rel="stylesheet" type="text/css" href="showhider.css" /> <link rel="stylesheet" type="text/css" href="showhider.css" />
<link rel="stylesheet" type="text/css" href="darklight.css" />
</head> </head>
<body> <body>
<input type="checkbox" id="checkboxDarkLight">
<div class="container">
<div id="navbar"> <div id="navbar">
<a href="#shownav"> <a href="#shownav">
Show navigation Show navigation
@ -23,19 +26,34 @@
</a> </a>
</li> </li>
<li> <li>
<a href=""></a> <a href="index.html">
index
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="CHANGES.html">
CHANGES
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="LICENSE.html">
LICENSE
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="VERSION.html">
VERSION
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="index.html">
index.html
</a>
</li>
<li>
<a href="BUILD.html">
BUILD
</a>
</li> </li>
<li> <li>
<a href="I2PBrowser.html"> <a href="I2PBrowser.html">
@ -44,7 +62,7 @@
</li> </li>
<li> <li>
<a href="I2PBrowserPlugin.html"> <a href="I2PBrowserPlugin.html">
I2PBrowserPlugin I2PBrowserPlugin.html
</a> </a>
</li> </li>
<li> <li>
@ -99,7 +117,22 @@
</li> </li>
<li> <li>
<a href="I2PLibreWolf.html"> <a href="I2PLibreWolf.html">
I2PLibreWolf I2PLibreWolf.html
</a>
</li>
<li>
<a href="LINUX.html">
LINUX
</a>
</li>
<li>
<a href="OSX.html">
OSX
</a>
</li>
<li>
<a href="WINDOWS.html">
WINDOWS
</a> </a>
</li> </li>
</ul> </ul>
@ -138,7 +171,7 @@
<p> <p>
Author: idk Author: idk
<br /> <br />
Parent class: I2PCommonBrowser Parent class: I2PFirefoxProfileChecker
<br /> <br />
package: net.i2p.i2pfirefox package: net.i2p.i2pfirefox
</p> </p>
@ -187,9 +220,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
</ul> </ul>
<h2> <h2>
Methods Methods
@ -209,9 +239,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String return: String
<br /> <br />
@ -220,73 +247,9 @@
<p> <p>
This method has no parameters. This method has no parameters.
</p> </p>
<h3>
profileDirectory
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L110">
[src]
</a>
</h3>
<ul>
<li>
Description: get the profile directory creating it if necessary
<br />
</li>
<li>
Access: public
<br />
</li>
<li>
Modifiers: static
</li>
<li>
return: String
<br />
</li>
</ul>
<p>
| Name | Type | Description |
<br />
| &mdash;&ndash; | &mdash;&ndash; | &mdash;&ndash; |
<br />
| app | boolean | |
<br />
| base | String | |
</p>
<h3>
baseProfileDir
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L114">
[src]
</a>
</h3>
<ul>
<li>
Description:
<br />
</li>
<li>
Access: private
<br />
</li>
<li>
Modifiers: static
</li>
<li>
return: String
<br />
</li>
</ul>
<p>
| Name | Type | Description |
<br />
| &mdash;&ndash; | &mdash;&ndash; | &mdash;&ndash; |
<br />
| file | String | |
<br />
| base | String | |
</p>
<h3> <h3>
baseProfileDirectory baseProfileDirectory
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L134"> <a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L125">
[src] [src]
</a> </a>
</h3> </h3>
@ -299,9 +262,6 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String return: String
<br /> <br />
@ -316,7 +276,7 @@
</p> </p>
<h3> <h3>
runtimeDirectory runtimeDirectory
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L158"> <a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L149">
[src] [src]
</a> </a>
</h3> </h3>
@ -329,9 +289,6 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: the runtime directory or null if it could not be created return: the runtime directory or null if it could not be created
<br /> <br />
@ -346,7 +303,7 @@
</p> </p>
<h3> <h3>
runtimeDirectory runtimeDirectory
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L169"> <a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L160">
[src] [src]
</a> </a>
</h3> </h3>
@ -359,9 +316,6 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: the runtime directory or null if it could not be created or found return: the runtime directory or null if it could not be created or found
<br /> <br />
@ -372,7 +326,7 @@
</p> </p>
<h3> <h3>
copyBaseProfiletoProfile copyBaseProfiletoProfile
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L189"> <a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L180">
[src] [src]
</a> </a>
</h3> </h3>
@ -385,9 +339,6 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: boolean return: boolean
<br /> <br />
@ -404,7 +355,7 @@
</p> </p>
<h3> <h3>
writeAppChrome writeAppChrome
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L222"> <a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L213">
[src] [src]
</a> </a>
</h3> </h3>
@ -417,9 +368,6 @@
Access: protected Access: protected
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: boolean return: boolean
<br /> <br />
@ -434,7 +382,7 @@
</p> </p>
<h3> <h3>
deleteAppChrome deleteAppChrome
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L235"> <a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L226">
[src] [src]
</a> </a>
</h3> </h3>
@ -447,9 +395,6 @@
Access: protected Access: protected
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: boolean return: boolean
<br /> <br />
@ -464,7 +409,7 @@
</p> </p>
<h3> <h3>
copyStrictOptions copyStrictOptions
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L250"> <a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L241">
[src] [src]
</a> </a>
</h3> </h3>
@ -477,9 +422,6 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: true if successful false otherwise return: true if successful false otherwise
<br /> <br />
@ -496,7 +438,7 @@
</p> </p>
<h3> <h3>
setupUserChrome setupUserChrome
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L285"> <a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L276">
[src] [src]
</a> </a>
</h3> </h3>
@ -509,9 +451,6 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: void return: void
<br /> <br />
@ -1395,12 +1334,13 @@ Public License instead of this License.
</div> </div>
</div> </div>
</div> </div>
</div>
<div> <div>
<iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe> <iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe>
</div> </div>
<div> <div>
<a href="https://geti2p.net/"> <a href="https://geti2p.net/">
<img src="i2plogo.png"></img> <img class="i2plogo" src="i2plogo.png"></img>
I2P I2P
</a> </a>
</div> </div>

View File

@ -7,7 +7,7 @@ Description:
> I2PFirefoxProfileBuilder.java Copyright C 2022 idk <hankhill19580@gmail.com> This program is free software: you can redistribute it and/or modify it under the terms of the MIT License. See LICENSE.md for details. This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. I2PFirefoxProfileBuilder is a that builds a profile directory which contains the I2P browser profile for the Firefox browser family. It manages the base profile directory and copies it's contents to the active profile directory which is actually used by Firefox. > I2PFirefoxProfileBuilder.java Copyright C 2022 idk <hankhill19580@gmail.com> This program is free software: you can redistribute it and/or modify it under the terms of the MIT License. See LICENSE.md for details. This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. I2PFirefoxProfileBuilder is a that builds a profile directory which contains the I2P browser profile for the Firefox browser family. It manages the base profile directory and copies it's contents to the active profile directory which is actually used by Firefox.
Author: idk Author: idk
Parent class: I2PCommonBrowser Parent class: I2PFirefoxProfileChecker
package: net.i2p.i2pfirefox package: net.i2p.i2pfirefox
## Dependencies ## Dependencies
@ -31,7 +31,6 @@ package: net.i2p.i2pfirefox
> >
+ Access: private + Access: private
+ Modifiers: static
## Methods ## Methods
@ -39,43 +38,15 @@ package: net.i2p.i2pfirefox
+ Description: + Description:
+ Access: private + Access: private
+ Modifiers: static
+ return: String + return: String
This method has no parameters. This method has no parameters.
### profileDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L110) ### baseProfileDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L125)
+ Description: get the profile directory creating it if necessary
+ Access: public
+ Modifiers: static
+ return: String
| Name | Type | Description |
| ----- | ----- | ----- |
| app | boolean | |
| base | String | |
### baseProfileDir [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L114)
+ Description:
+ Access: private
+ Modifiers: static
+ return: String
| Name | Type | Description |
| ----- | ----- | ----- |
| file | String | |
| base | String | |
### baseProfileDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L134)
+ Description: get the base profile directory creating it if necessary + Description: get the base profile directory creating it if necessary
+ Access: public + Access: public
+ Modifiers: static
+ return: String + return: String
| Name | Type | Description | | Name | Type | Description |
@ -83,11 +54,10 @@ This method has no parameters.
| base | String | | | base | String | |
### runtimeDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L158) ### runtimeDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L149)
+ Description: get the runtime directory creating it if create=true + Description: get the runtime directory creating it if create=true
+ Access: public + Access: public
+ Modifiers: static
+ return: the runtime directory or null if it could not be created + return: the runtime directory or null if it could not be created
| Name | Type | Description | | Name | Type | Description |
@ -95,21 +65,19 @@ This method has no parameters.
| create | boolean | if true create the runtime directory if it does not exist | | create | boolean | if true create the runtime directory if it does not exist |
### runtimeDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L169) ### runtimeDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L160)
+ Description: get the correct runtime directory + Description: get the correct runtime directory
+ Access: public + Access: public
+ Modifiers: static
+ return: the runtime directory or null if it could not be created or found + return: the runtime directory or null if it could not be created or found
This method has no parameters. This method has no parameters.
### copyBaseProfiletoProfile [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L189) ### copyBaseProfiletoProfile [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L180)
+ Description: Copy the inert base profile directory to the runtime profile directory + Description: Copy the inert base profile directory to the runtime profile directory
+ Access: public + Access: public
+ Modifiers: static
+ return: boolean + return: boolean
| Name | Type | Description | | Name | Type | Description |
@ -118,11 +86,10 @@ This method has no parameters.
| app | boolean | | | app | boolean | |
### writeAppChrome [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L222) ### writeAppChrome [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L213)
+ Description: + Description:
+ Access: protected + Access: protected
+ Modifiers: static
+ return: boolean + return: boolean
| Name | Type | Description | | Name | Type | Description |
@ -130,11 +97,10 @@ This method has no parameters.
| profile | String | | | profile | String | |
### deleteAppChrome [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L235) ### deleteAppChrome [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L226)
+ Description: + Description:
+ Access: protected + Access: protected
+ Modifiers: static
+ return: boolean + return: boolean
| Name | Type | Description | | Name | Type | Description |
@ -142,11 +108,10 @@ This method has no parameters.
| profile | String | | | profile | String | |
### copyStrictOptions [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L250) ### copyStrictOptions [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L241)
+ Description: Copy the strict options from the base profile to the profile + Description: Copy the strict options from the base profile to the profile
+ Access: public + Access: public
+ Modifiers: static
+ return: true if successful false otherwise + return: true if successful false otherwise
| Name | Type | Description | | Name | Type | Description |
@ -155,11 +120,10 @@ This method has no parameters.
| app | boolean | | | app | boolean | |
### setupUserChrome [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L285) ### setupUserChrome [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java#L276)
+ Description: + Description:
+ Access: public + Access: public
+ Modifiers: static
+ return: void + return: void
| Name | Type | Description | | Name | Type | Description |

View File

@ -8,8 +8,11 @@
<meta name="keywords" content="main" /> <meta name="keywords" content="main" />
<link rel="stylesheet" type="text/css" href="style.css" /> <link rel="stylesheet" type="text/css" href="style.css" />
<link rel="stylesheet" type="text/css" href="showhider.css" /> <link rel="stylesheet" type="text/css" href="showhider.css" />
<link rel="stylesheet" type="text/css" href="darklight.css" />
</head> </head>
<body> <body>
<input type="checkbox" id="checkboxDarkLight">
<div class="container">
<div id="navbar"> <div id="navbar">
<a href="#shownav"> <a href="#shownav">
Show navigation Show navigation
@ -23,19 +26,34 @@
</a> </a>
</li> </li>
<li> <li>
<a href=""></a> <a href="index.html">
index
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="CHANGES.html">
CHANGES
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="LICENSE.html">
LICENSE
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="VERSION.html">
VERSION
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="index.html">
index.html
</a>
</li>
<li>
<a href="BUILD.html">
BUILD
</a>
</li> </li>
<li> <li>
<a href="I2PBrowser.html"> <a href="I2PBrowser.html">
@ -44,7 +62,7 @@
</li> </li>
<li> <li>
<a href="I2PBrowserPlugin.html"> <a href="I2PBrowserPlugin.html">
I2PBrowserPlugin I2PBrowserPlugin.html
</a> </a>
</li> </li>
<li> <li>
@ -99,7 +117,22 @@
</li> </li>
<li> <li>
<a href="I2PLibreWolf.html"> <a href="I2PLibreWolf.html">
I2PLibreWolf I2PLibreWolf.html
</a>
</li>
<li>
<a href="LINUX.html">
LINUX
</a>
</li>
<li>
<a href="OSX.html">
OSX
</a>
</li>
<li>
<a href="WINDOWS.html">
WINDOWS
</a> </a>
</li> </li>
</ul> </ul>
@ -217,9 +250,38 @@
<br /> <br />
| args | String[] | | | args | String[] | |
</p> </p>
<h3>
profileDirectory
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L53">
[src]
</a>
</h3>
<ul>
<li>
Description: get the profile directory creating it if necessary
<br />
</li>
<li>
Access: public
<br />
</li>
<li>
return: String
<br />
</li>
</ul>
<p>
| Name | Type | Description |
<br />
| &mdash;&ndash; | &mdash;&ndash; | &mdash;&ndash; |
<br />
| app | boolean | |
<br />
| base | String | |
</p>
<h3> <h3>
validateProfileDirectory validateProfileDirectory
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L54"> <a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L64">
[src] [src]
</a> </a>
</h3> </h3>
@ -232,9 +294,6 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: true if the profile directory is valid false otherwise return: true if the profile directory is valid false otherwise
<br /> <br />
@ -249,7 +308,7 @@
</p> </p>
<h3> <h3>
deRestrictHTTPSAndSetupHomepage deRestrictHTTPSAndSetupHomepage
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L87"> <a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L97">
[src] [src]
</a> </a>
</h3> </h3>
@ -262,9 +321,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: boolean return: boolean
<br /> <br />
@ -279,7 +335,7 @@
</p> </p>
<h3> <h3>
undoHttpsOnlyMode undoHttpsOnlyMode
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L110"> <a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L120">
[src] [src]
</a> </a>
</h3> </h3>
@ -292,9 +348,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: boolean return: boolean
<br /> <br />
@ -309,7 +362,7 @@
</p> </p>
<h3> <h3>
undoHomepage undoHomepage
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L116"> <a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L126">
[src] [src]
</a> </a>
</h3> </h3>
@ -322,9 +375,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: boolean return: boolean
<br /> <br />
@ -339,7 +389,7 @@
</p> </p>
<h3> <h3>
undoValue undoValue
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L139"> <a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L149">
[src] [src]
</a> </a>
</h3> </h3>
@ -352,9 +402,6 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: boolean return: boolean
<br /> <br />
@ -373,7 +420,7 @@
</p> </p>
<h3> <h3>
validateFile validateFile
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L173"> <a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L183">
[src] [src]
</a> </a>
</h3> </h3>
@ -386,9 +433,6 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: true if the file is valid false otherwise return: true if the file is valid false otherwise
<br /> <br />
@ -403,7 +447,7 @@
</p> </p>
<h3> <h3>
validateExtensionDirectory validateExtensionDirectory
<a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L200"> <a href="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L210">
[src] [src]
</a> </a>
</h3> </h3>
@ -416,9 +460,6 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: true if the extension directory is valid false otherwise return: true if the extension directory is valid false otherwise
<br /> <br />
@ -1300,12 +1341,13 @@ Public License instead of this License.
</div> </div>
</div> </div>
</div> </div>
</div>
<div> <div>
<iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe> <iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe>
</div> </div>
<div> <div>
<a href="https://geti2p.net/"> <a href="https://geti2p.net/">
<img src="i2plogo.png"></img> <img class="i2plogo" src="i2plogo.png"></img>
I2P I2P
</a> </a>
</div> </div>

View File

@ -43,11 +43,22 @@ package: net.i2p.i2pfirefox
| args | String[] | | | args | String[] | |
### validateProfileDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L54) ### profileDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L53)
+ Description: get the profile directory creating it if necessary
+ Access: public
+ return: String
| Name | Type | Description |
| ----- | ----- | ----- |
| app | boolean | |
| base | String | |
### validateProfileDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L64)
+ Description: Return true if the profile directory is valid. + Description: Return true if the profile directory is valid.
+ Access: public + Access: public
+ Modifiers: static
+ return: true if the profile directory is valid false otherwise + return: true if the profile directory is valid false otherwise
| Name | Type | Description | | Name | Type | Description |
@ -55,11 +66,10 @@ package: net.i2p.i2pfirefox
| profileDirectory | String | the profile directory to check | | profileDirectory | String | the profile directory to check |
### deRestrictHTTPSAndSetupHomepage [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L87) ### deRestrictHTTPSAndSetupHomepage [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L97)
+ Description: + Description:
+ Access: private + Access: private
+ Modifiers: static
+ return: boolean + return: boolean
| Name | Type | Description | | Name | Type | Description |
@ -67,11 +77,10 @@ package: net.i2p.i2pfirefox
| profile | String | | | profile | String | |
### undoHttpsOnlyMode [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L110) ### undoHttpsOnlyMode [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L120)
+ Description: + Description:
+ Access: private + Access: private
+ Modifiers: static
+ return: boolean + return: boolean
| Name | Type | Description | | Name | Type | Description |
@ -79,11 +88,10 @@ package: net.i2p.i2pfirefox
| fileToBeModified | File | | | fileToBeModified | File | |
### undoHomepage [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L116) ### undoHomepage [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L126)
+ Description: + Description:
+ Access: private + Access: private
+ Modifiers: static
+ return: boolean + return: boolean
| Name | Type | Description | | Name | Type | Description |
@ -91,11 +99,10 @@ package: net.i2p.i2pfirefox
| fileToBeModified | File | | | fileToBeModified | File | |
### undoValue [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L139) ### undoValue [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L149)
+ Description: + Description:
+ Access: public + Access: public
+ Modifiers: static
+ return: boolean + return: boolean
| Name | Type | Description | | Name | Type | Description |
@ -105,11 +112,10 @@ package: net.i2p.i2pfirefox
| fileToBeModified | File | | | fileToBeModified | File | |
### validateFile [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L173) ### validateFile [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L183)
+ Description: Return true if the file is valid. + Description: Return true if the file is valid.
+ Access: public + Access: public
+ Modifiers: static
+ return: true if the file is valid false otherwise + return: true if the file is valid false otherwise
| Name | Type | Description | | Name | Type | Description |
@ -117,11 +123,10 @@ package: net.i2p.i2pfirefox
| file | String | the file to check | | file | String | the file to check |
### validateExtensionDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L200) ### validateExtensionDirectory [[src]](src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java#L210)
+ Description: Return true if the extension directory is valid. + Description: Return true if the extension directory is valid.
+ Access: public + Access: public
+ Modifiers: static
+ return: true if the extension directory is valid false otherwise + return: true if the extension directory is valid false otherwise
| Name | Type | Description | | Name | Type | Description |

View File

@ -8,8 +8,11 @@
<meta name="keywords" content="main" /> <meta name="keywords" content="main" />
<link rel="stylesheet" type="text/css" href="style.css" /> <link rel="stylesheet" type="text/css" href="style.css" />
<link rel="stylesheet" type="text/css" href="showhider.css" /> <link rel="stylesheet" type="text/css" href="showhider.css" />
<link rel="stylesheet" type="text/css" href="darklight.css" />
</head> </head>
<body> <body>
<input type="checkbox" id="checkboxDarkLight">
<div class="container">
<div id="navbar"> <div id="navbar">
<a href="#shownav"> <a href="#shownav">
Show navigation Show navigation
@ -23,19 +26,34 @@
</a> </a>
</li> </li>
<li> <li>
<a href=""></a> <a href="index.html">
index
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="CHANGES.html">
CHANGES
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="LICENSE.html">
LICENSE
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="VERSION.html">
VERSION
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="index.html">
index.html
</a>
</li>
<li>
<a href="BUILD.html">
BUILD
</a>
</li> </li>
<li> <li>
<a href="I2PBrowser.html"> <a href="I2PBrowser.html">
@ -44,7 +62,7 @@
</li> </li>
<li> <li>
<a href="I2PBrowserPlugin.html"> <a href="I2PBrowserPlugin.html">
I2PBrowserPlugin I2PBrowserPlugin.html
</a> </a>
</li> </li>
<li> <li>
@ -99,7 +117,22 @@
</li> </li>
<li> <li>
<a href="I2PLibreWolf.html"> <a href="I2PLibreWolf.html">
I2PLibreWolf I2PLibreWolf.html
</a>
</li>
<li>
<a href="LINUX.html">
LINUX
</a>
</li>
<li>
<a href="OSX.html">
OSX
</a>
</li>
<li>
<a href="WINDOWS.html">
WINDOWS
</a> </a>
</li> </li>
</ul> </ul>
@ -142,7 +175,7 @@
<p> <p>
Author: idk Author: idk
<br /> <br />
Parent class: I2PCommonBrowser Parent class: I2PFirefoxProfileBuilder
<br /> <br />
package: net.i2p.i2pfirefox package: net.i2p.i2pfirefox
</p> </p>
@ -1098,12 +1131,13 @@ Public License instead of this License.
</div> </div>
</div> </div>
</div> </div>
</div>
<div> <div>
<iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe> <iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe>
</div> </div>
<div> <div>
<a href="https://geti2p.net/"> <a href="https://geti2p.net/">
<img src="i2plogo.png"></img> <img class="i2plogo" src="i2plogo.png"></img>
I2P I2P
</a> </a>
</div> </div>

View File

@ -7,7 +7,7 @@ Description:
> I2PFirefoxProfileUnpacker.java Copyright C 2022 idk <hankhill19580@gmail.com> This program is free software: you can redistribute it and/or modify it under the terms of the MIT License. See LICENSE.md for details. This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. I2PFirefoxProfileUnpacker is a that unpacks the I2P Firefox profile from a zip file embedded in the `jar` file. The zip is unpacked to a base directory where it is left untouched and the base profile is copied to the active profile directory. > I2PFirefoxProfileUnpacker.java Copyright C 2022 idk <hankhill19580@gmail.com> This program is free software: you can redistribute it and/or modify it under the terms of the MIT License. See LICENSE.md for details. This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. I2PFirefoxProfileUnpacker is a that unpacks the I2P Firefox profile from a zip file embedded in the `jar` file. The zip is unpacked to a base directory where it is left untouched and the base profile is copied to the active profile directory.
Author: idk Author: idk
Parent class: I2PCommonBrowser Parent class: I2PFirefoxProfileBuilder
package: net.i2p.i2pfirefox package: net.i2p.i2pfirefox
## Dependencies ## Dependencies

View File

@ -8,8 +8,11 @@
<meta name="keywords" content="main" /> <meta name="keywords" content="main" />
<link rel="stylesheet" type="text/css" href="style.css" /> <link rel="stylesheet" type="text/css" href="style.css" />
<link rel="stylesheet" type="text/css" href="showhider.css" /> <link rel="stylesheet" type="text/css" href="showhider.css" />
<link rel="stylesheet" type="text/css" href="darklight.css" />
</head> </head>
<body> <body>
<input type="checkbox" id="checkboxDarkLight">
<div class="container">
<div id="navbar"> <div id="navbar">
<a href="#shownav"> <a href="#shownav">
Show navigation Show navigation
@ -23,19 +26,34 @@
</a> </a>
</li> </li>
<li> <li>
<a href=""></a> <a href="index.html">
index
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="CHANGES.html">
CHANGES
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="LICENSE.html">
LICENSE
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="VERSION.html">
VERSION
</a>
</li> </li>
<li> <li>
<a href=""></a> <a href="index.html">
index.html
</a>
</li>
<li>
<a href="BUILD.html">
BUILD
</a>
</li> </li>
<li> <li>
<a href="I2PBrowser.html"> <a href="I2PBrowser.html">
@ -44,7 +62,7 @@
</li> </li>
<li> <li>
<a href="I2PBrowserPlugin.html"> <a href="I2PBrowserPlugin.html">
I2PBrowserPlugin I2PBrowserPlugin.html
</a> </a>
</li> </li>
<li> <li>
@ -99,7 +117,22 @@
</li> </li>
<li> <li>
<a href="I2PLibreWolf.html"> <a href="I2PLibreWolf.html">
I2PLibreWolf I2PLibreWolf.html
</a>
</li>
<li>
<a href="LINUX.html">
LINUX
</a>
</li>
<li>
<a href="OSX.html">
OSX
</a>
</li>
<li>
<a href="WINDOWS.html">
WINDOWS
</a> </a>
</li> </li>
</ul> </ul>
@ -217,9 +250,6 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
</ul> </ul>
<h4> <h4>
Process p Process p
@ -252,9 +282,6 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: path to command[0] and target URL[1] to the default browser ready for execution or null if not found return: path to command[0] and target URL[1] to the default browser ready for execution or null if not found
<br /> <br />
@ -278,9 +305,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: either a registry &ldquo;Default&rdquo; value or null if one does not exist/is empty return: either a registry &ldquo;Default&rdquo; value or null if one does not exist/is empty
<br /> <br />
@ -310,9 +334,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: the command required to run the application referenced in hkeyquery or null return: the command required to run the application referenced in hkeyquery or null
<br /> <br />
@ -340,9 +361,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: the command required to run the application referenced in hkeyquery or null return: the command required to run the application referenced in hkeyquery or null
<br /> <br />
@ -370,9 +388,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: either a registry &ldquo;Default&rdquo; value or null if one does not exist/is empty return: either a registry &ldquo;Default&rdquo; value or null if one does not exist/is empty
<br /> <br />
@ -400,9 +415,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String return: String
<br /> <br />
@ -430,9 +442,6 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String return: String
<br /> <br />
@ -456,9 +465,6 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String return: String
<br /> <br />
@ -482,9 +488,6 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: boolean return: boolean
<br /> <br />
@ -508,9 +511,6 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: the runtime directory or null if it could not be created return: the runtime directory or null if it could not be created
<br /> <br />
@ -538,9 +538,6 @@
Access: public Access: public
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: the runtime directory or null if it could not be created or found return: the runtime directory or null if it could not be created or found
<br /> <br />
@ -622,9 +619,6 @@
Access: private Access: private
<br /> <br />
</li> </li>
<li>
Modifiers: static
</li>
<li> <li>
return: String return: String
<br /> <br />
@ -637,6 +631,36 @@
<br /> <br />
| inUrl | String | | | inUrl | String | |
</p> </p>
<h3>
main
<a href="src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L419">
[src]
</a>
</h3>
<ul>
<li>
Description:
<br />
</li>
<li>
Access: public
<br />
</li>
<li>
Modifiers: static
</li>
<li>
return: void
<br />
</li>
</ul>
<p>
| Name | Type | Description |
<br />
| &mdash;&ndash; | &mdash;&ndash; | &mdash;&ndash; |
<br />
| args | String[] | |
</p>
<div id="sourcecode"> <div id="sourcecode">
<span id="sourcehead"> <span id="sourcehead">
<strong> <strong>
@ -1506,12 +1530,13 @@ Public License instead of this License.
</div> </div>
</div> </div>
</div> </div>
</div>
<div> <div>
<iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe> <iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe>
</div> </div>
<div> <div>
<a href="https://geti2p.net/"> <a href="https://geti2p.net/">
<img src="i2plogo.png"></img> <img class="i2plogo" src="i2plogo.png"></img>
I2P I2P
</a> </a>
</div> </div>

View File

@ -44,7 +44,6 @@ package: net.i2p.i2pfirefox
> >
+ Access: public + Access: public
+ Modifiers: static
#### Process p [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L) #### Process p [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L)
@ -58,7 +57,6 @@ package: net.i2p.i2pfirefox
+ Description: Obtains the default browser for the Windows platform which by now should be Edgium in the worst-case scenario but in case it isn't we can use this function to figure it out. It can find: 1. The current user's HTTPS default browser if they configured it to be non-default 2. The current user's HTTP default browser if they configured it to be non-default 3. Edgium if it's available 4. iexplore if it's not and it will return the first one we find in exactly that order. Adapted from: + Description: Obtains the default browser for the Windows platform which by now should be Edgium in the worst-case scenario but in case it isn't we can use this function to figure it out. It can find: 1. The current user's HTTPS default browser if they configured it to be non-default 2. The current user's HTTP default browser if they configured it to be non-default 3. Edgium if it's available 4. iexplore if it's not and it will return the first one we find in exactly that order. Adapted from:
+ Access: public + Access: public
+ Modifiers: static
+ return: path to command[0] and target URL[1] to the default browser ready for execution or null if not found + return: path to command[0] and target URL[1] to the default browser ready for execution or null if not found
This method has no parameters. This method has no parameters.
@ -68,7 +66,6 @@ This method has no parameters.
+ Description: obtains a value matching a key contained in the windows registry at a path represented by hkeyquery + Description: obtains a value matching a key contained in the windows registry at a path represented by hkeyquery
+ Access: private + Access: private
+ Modifiers: static
+ return: either a registry "Default" value or null if one does not exist/is empty + return: either a registry "Default" value or null if one does not exist/is empty
| Name | Type | Description | | Name | Type | Description |
@ -81,7 +78,6 @@ This method has no parameters.
+ Description: If following a query back to the Default value doesn't work then what we have is a "ProgID" which will be registered in \HKEY_CLASSES_ROOT\%ProgId% and will have an entry \shell\open\command where \shell\open\command yields the value that contains the command it needs. This function takes a registry query in the same format as getDefaultOutOfRegistry but instead of looking for the default entry + Description: If following a query back to the Default value doesn't work then what we have is a "ProgID" which will be registered in \HKEY_CLASSES_ROOT\%ProgId% and will have an entry \shell\open\command where \shell\open\command yields the value that contains the command it needs. This function takes a registry query in the same format as getDefaultOutOfRegistry but instead of looking for the default entry
+ Access: private + Access: private
+ Modifiers: static
+ return: the command required to run the application referenced in hkeyquery or null + return: the command required to run the application referenced in hkeyquery or null
| Name | Type | Description | | Name | Type | Description |
@ -93,7 +89,6 @@ This method has no parameters.
+ Description: Cross-references a progId obtained by followUserConfiguredBrowserToCommand against HKEY_CLASSES_ROOT\%ProgId%\shell\open\command which holds the value of the command which we need to run to launch the default browser. + Description: Cross-references a progId obtained by followUserConfiguredBrowserToCommand against HKEY_CLASSES_ROOT\%ProgId%\shell\open\command which holds the value of the command which we need to run to launch the default browser.
+ Access: private + Access: private
+ Modifiers: static
+ return: the command required to run the application referenced in hkeyquery or null + return: the command required to run the application referenced in hkeyquery or null
| Name | Type | Description | | Name | Type | Description |
@ -105,7 +100,6 @@ This method has no parameters.
+ Description: obtains a default browsing command out of the Windows registry. + Description: obtains a default browsing command out of the Windows registry.
+ Access: private + Access: private
+ Modifiers: static
+ return: either a registry "Default" value or null if one does not exist/is empty + return: either a registry "Default" value or null if one does not exist/is empty
| Name | Type | Description | | Name | Type | Description |
@ -117,7 +111,6 @@ This method has no parameters.
+ Description: + Description:
+ Access: private + Access: private
+ Modifiers: static
+ return: String + return: String
| Name | Type | Description | | Name | Type | Description |
@ -129,7 +122,6 @@ This method has no parameters.
+ Description: Find any browser in our list within a UNIX path + Description: Find any browser in our list within a UNIX path
+ Access: public + Access: public
+ Modifiers: static
+ return: String + return: String
This method has no parameters. This method has no parameters.
@ -139,7 +131,6 @@ This method has no parameters.
+ Description: Find any usable browser and output the whole path + Description: Find any usable browser and output the whole path
+ Access: public + Access: public
+ Modifiers: static
+ return: String + return: String
This method has no parameters. This method has no parameters.
@ -149,7 +140,6 @@ This method has no parameters.
+ Description: delete the runtime directory + Description: delete the runtime directory
+ Access: public + Access: public
+ Modifiers: static
+ return: boolean + return: boolean
This method has no parameters. This method has no parameters.
@ -159,7 +149,6 @@ This method has no parameters.
+ Description: get the runtime directory creating it if create=true + Description: get the runtime directory creating it if create=true
+ Access: public + Access: public
+ Modifiers: static
+ return: the runtime directory or null if it could not be created + return: the runtime directory or null if it could not be created
| Name | Type | Description | | Name | Type | Description |
@ -171,7 +160,6 @@ This method has no parameters.
+ Description: get the correct runtime directory + Description: get the correct runtime directory
+ Access: public + Access: public
+ Modifiers: static
+ return: the runtime directory or null if it could not be created or found + return: the runtime directory or null if it could not be created or found
This method has no parameters. This method has no parameters.
@ -205,7 +193,6 @@ This method has no parameters.
+ Description: + Description:
+ Access: private + Access: private
+ Modifiers: static
+ return: String + return: String
| Name | Type | Description | | Name | Type | Description |
@ -213,3 +200,15 @@ This method has no parameters.
| inUrl | String | | | inUrl | String | |
### main [[src]](src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java#L419)
+ Description:
+ Access: public
+ Modifiers: static
+ return: void
| Name | Type | Description |
| ----- | ----- | ----- |
| args | String[] | |

View File

@ -1,5 +1,5 @@
<html> <html>
<head> <head>
<title> <title>
i2p.plugins.fire... i2p.plugins.fire...
</title> </title>
@ -8,9 +8,9 @@
<meta name="keywords" content="main" /> <meta name="keywords" content="main" />
<link rel="stylesheet" type="text/css" href="style.css" /> <link rel="stylesheet" type="text/css" href="style.css" />
<link rel="stylesheet" type="text/css" href="showhider.css" /> <link rel="stylesheet" type="text/css" href="showhider.css" />
</head> </head>
<body> <body>
<div id="navbar"> <div id="navbar">
<a href="#shownav"> <a href="#shownav">
Show navigation Show navigation
</a> </a>
@ -37,6 +37,11 @@
<li> <li>
<a href=""></a> <a href=""></a>
</li> </li>
<li>
<a href="BUILD.html">
BUILD
</a>
</li>
<li> <li>
<a href="I2PBrowser.html"> <a href="I2PBrowser.html">
I2PBrowser I2PBrowser
@ -102,6 +107,21 @@
I2PLibreWolf I2PLibreWolf
</a> </a>
</li> </li>
<li>
<a href="LINUX.html">
LINUX
</a>
</li>
<li>
<a href="OSX.html">
OSX
</a>
</li>
<li>
<a href="WINDOWS.html">
WINDOWS
</a>
</li>
</ul> </ul>
<br> <br>
<a href="#hidenav"> <a href="#hidenav">
@ -109,22 +129,22 @@
</a> </a>
</div> </div>
</div> </div>
</div> </div>
<a id="returnhome" href="/"> <a id="returnhome" href="/">
/ /
</a> </a>
<h1> <h1>
Class I2PLibreWolf Class I2PLibreWolf
<a href="src/java/net/i2p/i2pfirefox/I2PLibreWolf.java"> <a href="src/java/net/i2p/i2pfirefox/I2PLibreWolf.java">
[src] [src]
</a> </a>
</h1> </h1>
<blockquote> <blockquote>
<p> <p>
*/ */
</p> </p>
</blockquote> </blockquote>
<p> <p>
Access: public Access: public
<br /> <br />
Description: Description:
@ -134,37 +154,72 @@
hankhill19580@gmail.com hankhill19580@gmail.com
</a> </a>
This program is free software: you can redistribute it and/or modify it under the terms of the MIT License. See LICENSE.md for details. This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. I2PLibreWolf adds the LibreWolf Updater browser extension if the browser detected by the Firefox variant launcher is LibreWolf specifically. 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. I2PLibreWolf adds the LibreWolf Updater browser extension if the browser detected by the Firefox variant launcher is LibreWolf specifically.
</p> </p>
<p> <p>
Author: idk Author: idk
<br /> <br />
package: net.i2p.i2pfirefox package: net.i2p.i2pfirefox
</p> </p>
<h2> <h2>
Dependencies Dependencies
</h2> </h2>
<p> <p>
<details> <details>
<br /> <br />
<summary> <summary>
<br /> <br />
Show dependencies Show dependencies
<br /> <br />
</summary> </summary>
<br />
<ul>
<br />
<li>
java.io.
<em>
</li>
<li>
javax.script.
<br />
<h2>
Member Variables
</h2>
<h4>
ScriptEngineManager sem
<a href="src/java/net/i2p/i2pfirefox/I2PLibreWolf.java#L">
[src]
</a>
</h4>
<blockquote></blockquote>
<ul>
<li>
Access: private
<br /> <br />
<ul> </li>
<li>
Modifiers: static final
</li>
</ul>
<h4>
ScriptEngine ee
<a href="src/java/net/i2p/i2pfirefox/I2PLibreWolf.java#L">
[src]
</a>
</h4>
<blockquote></blockquote>
<ul>
<li>
Access: private
<br /> <br />
</ul> </li>
<br /> <li>
</details> Modifiers: final
</p> </li>
<h2> </ul>
No member variables in this class <h2>
</h2>
<h2>
No methods in this class No methods in this class
</h2> </h2>
<div id="sourcecode"> <div id="sourcecode">
<span id="sourcehead"> <span id="sourcehead">
<strong> <strong>
Get the source code: Get the source code:
@ -177,8 +232,8 @@
</a> </a>
</li> </li>
</ul> </ul>
</div> </div>
<div> <div>
<a href="#show"> <a href="#show">
Show license Show license
</a> </a>
@ -1032,15 +1087,13 @@ Public License instead of this License.
</a> </a>
</div> </div>
</div> </div>
</div> </div>
<div> <div>
<iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe> <iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe>
</div> </div>
<div> <div>
<a href="https://geti2p.net/"> <a href="https://geti2p.net/">
<img src="i2plogo.png"></img> <img src="i2plogo.png"></img>
I2P I2P
</a> </a>
</div> </div>
</body>
</html>

1131
docs/LINUX.html Normal file

File diff suppressed because it is too large Load Diff

35
docs/LINUX.md Normal file
View File

@ -0,0 +1,35 @@
### Linux Support
It's possible to use this package in the following binary formats on
Linux. These packages are for the **`amd64`** architecture.
#### Linux jpackage: `.tar.gz`
```sh
mkdir ~/tmp-i2pbrowser && cd ~/tmp-i2pbrowser
wget https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/1.3.0/i2pbrowser.tar.gz
tar xvzf i2pbrowser.tar.gz && cd i2pbrowser
## THIS STEP IS OPTIONAL but it will force the system to use Tor Browser from within the i2pbrowser directory.
# This probably offers better security than vanilla Firefox.
# This will also make the directory the launcher is in relocatable to a flash drive, for instance.
# This is commonly referred to as being portable.
# If tor and torsocks are on the host system, Tor Browser will be downloaded over Tor.
./lib/torbrowser.sh
# end of optional step.
./bin/i2pbrowser
```
#### Debian/Ubuntu and variants Jpackage: `.deb`
1. Start your I2P Router
2. Download the latest release `.deb` from [Github](https://github.com/eyedeekay/i2p.plugins.firefox/releases) and verify it's hash.
3. Run `sudo apt-get install ./i2pbrowser*.deb`(Only needs to be done once per update)
4. Use the applications menu shortcut to launch the pre-configured I2P browser
#### Fedora and variants Jpackage: `.rpm`
1. Start your I2P Router
2. Download the latest release `.r[m` from [Github](https://github.com/eyedeekay/i2p.plugins.firefox/releases) and verify it's hash.
3. Run `sudo rpm -i ./i2pbrowser*.rpm`(Only needs to be done the first time)
4. Run `sudo rpm -U ./i2pbrowser*.rpm`(Only needs to be done once per update)
5. Use the applications menu shortcut to launch the pre-configured I2P browser

1080
docs/OSX.html Normal file

File diff suppressed because it is too large Load Diff

33
docs/OSX.md Normal file
View File

@ -0,0 +1,33 @@
Using this on OSX
=================
This code will launch an I2P-Configured Browser on OSX, but at this time
there are no packages for it because it's not possible for me to sign OSX
packages. You can use the `.jar` file with any Java greater than Java 8.
```sh
mkdir ~/tmp-i2pfirefox && cd ~/tmp-i2pfirefox
wget https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/1.3.0/i2pfirefox.zip
unzip i2pfirefox.zip
./cmd/i2pfirefox.cmd
#or if you want to use a Chromium
./cmd/i2pchromium.cmd
```
Building a `jpackage`
---------------------
In order to build a `jpackage`, install at least Java 17. To set up Java
17 and configure it to be the Java used by the system for the rest of the
session, use these commands:
```sh
brew install openjdk@17
sudo ln -sfn /usr/local/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk
export JAVA_HOME=`/usr/libexec/java_home -v 17`
```
Once you're finished, run `./osx-dmg.sh` in the repository root to produce a
`.dmg` package.

1153
docs/WINDOWS.html Normal file

File diff suppressed because it is too large Load Diff

33
docs/WINDOWS.md Normal file
View File

@ -0,0 +1,33 @@
### Windows Support
It's possible to use this package on Windows, but it's recommended that
you get it through the Easy-Install bundle which includes this functionality
already. Use this only if you want to test new features or if you prefer
an unbundled I2P router with an external JVM.
#### Windows Jpackage: `.zip`
**(Not Recommended! This functionality is already included in the Easy-Install Bundle for Windows)**
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.
3. Unzip the `.zip` directory
4. run the `i2pbrowser.exe` file inside the unzipped directory.
#### Windows Jpackage: `.msi`
**(Not Recommended! This functionality is already included in the Easy-Install Bundle for Windows)**
1. Start your I2P Router
2. Download the latest release `.msi` from [Github](https://github.com/eyedeekay/i2p.plugins.firefox/releases) and verify it's hash.
3. Run the `.msi` installer(Only needs to be done once per update)
4. Use the start menu shortcut to launch the pre-configured I2P browser
#### Windows Jpackage: `.exe`
**(Not Recommended! This functionality is already included in the Easy-Install Bundle for Windows)**
1. Start your I2P Router
2. Download the latest release `.exe` from [Github](https://github.com/eyedeekay/i2p.plugins.firefox/releases) and verify it's hash.
3. Run the `.msi` installer(Only needs to be done once per update)
4. Use the start menu shortcut to launch the pre-configured I2P browser

24
docs/darklight.css Normal file
View File

@ -0,0 +1,24 @@
/* edgar darklight CSS file */
#checkboxDarkLight:checked + .container {
background-color: #202020;
filter: invert(100%);
}
#checkboxDarkLight{
appearance: none;
width: 80px;
height: 40px;
background: black;
border-radius: 22px;
cursor: pointer;
outline: none;
}
#checkboxDarkLight::before{
content: '';
width: 40px;
height: 35px;
background-color:white;
border-radius: 35px;
cursor: pointer;
transition: .3s linear;
}

BIN
docs/i2plogo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

View File

@ -75,8 +75,6 @@ iframe {
} }
.container { .container {
width: 36vw;
height: 64vh;
display: inline-block; display: inline-block;
margin: 0; margin: 0;
padding: 0; padding: 0;

View File

@ -5,11 +5,11 @@ TORSOCKS=$(which torsocks)
# . "${TORSOCKS}" on # . "${TORSOCKS}" on
#fi #fi
version="$(curl -s https://aus1.torproject.org/torbrowser/update_3/release/downloads.json | jq -r ".version")" if [ -z $version ]; then
locale="en-US" # mention your locale. default = en-US version="$(curl -s https://aus1.torproject.org/torbrowser/update_3/release/downloads.json | jq -r ".version")"
if [ -d /etc/default/locale ]; then fi
. /etc/default/locale if [ -z $locale ]; then
locale=$(echo "${LANG}" | cut -d . -f1) locale="ALL" # mention your locale. default = ALL
fi fi
if [ ! -f ./tor.keyring ]; then if [ ! -f ./tor.keyring ]; then

View File

@ -6,11 +6,11 @@ if [ -f "${TORSOCKS}" ]; then
echo "" echo ""
fi fi
version="$(curl -s https://aus1.torproject.org/torbrowser/update_3/release/downloads.json | jq -r ".version")" if [ -z $version ]; then
locale="en-US" # mention your locale. default = en-US version="$(curl -s https://aus1.torproject.org/torbrowser/update_3/release/downloads.json | jq -r ".version")"
if [ -d /etc/default/locale ]; then fi
. /etc/default/locale if [ -z $locale ]; then
locale=$(echo "${LANG}" | cut -d . -f1) locale="ALL" # mention your locale. default = ALL
fi fi
if [ ! -f ./tor.keyring ]; then if [ ! -f ./tor.keyring ]; then

Binary file not shown.

View File

@ -8,8 +8,11 @@
<meta name="keywords" content="main" /> <meta name="keywords" content="main" />
<link rel="stylesheet" type="text/css" href="style.css" /> <link rel="stylesheet" type="text/css" href="style.css" />
<link rel="stylesheet" type="text/css" href="showhider.css" /> <link rel="stylesheet" type="text/css" href="showhider.css" />
<link rel="stylesheet" type="text/css" href="darklight.css" />
</head> </head>
<body> <body>
<input type="checkbox" id="checkboxDarkLight">
<div class="container">
<div id="navbar"> <div id="navbar">
<a href="#shownav"> <a href="#shownav">
Show navigation Show navigation
@ -47,6 +50,11 @@
index.html index.html
</a> </a>
</li> </li>
<li>
<a href="docs/BUILD.html">
docs/BUILD
</a>
</li>
<li> <li>
<a href="docs/I2PBrowser.html"> <a href="docs/I2PBrowser.html">
docs/I2PBrowser docs/I2PBrowser
@ -54,7 +62,7 @@
</li> </li>
<li> <li>
<a href="docs/I2PBrowserPlugin.html"> <a href="docs/I2PBrowserPlugin.html">
docs/I2PBrowserPlugin docs/I2PBrowserPlugin.html
</a> </a>
</li> </li>
<li> <li>
@ -109,7 +117,22 @@
</li> </li>
<li> <li>
<a href="docs/I2PLibreWolf.html"> <a href="docs/I2PLibreWolf.html">
docs/I2PLibreWolf docs/I2PLibreWolf.html
</a>
</li>
<li>
<a href="docs/LINUX.html">
docs/LINUX
</a>
</li>
<li>
<a href="docs/OSX.html">
docs/OSX
</a>
</li>
<li>
<a href="docs/WINDOWS.html">
docs/WINDOWS
</a> </a>
</li> </li>
</ul> </ul>
@ -247,29 +270,29 @@
</p> </p>
<ul> <ul>
<li> <li>
<a href="LINUX.md"> <a href="docs/LINUX.md">
LINUX.md LINUX.md
</a> </a>
/ /
<a href="LINUX.html"> <a href="docs/LINUX.html">
LINUX.html LINUX.html
</a> </a>
</li> </li>
<li> <li>
<a href="OSX.md"> <a href="docs/OSX.md">
OSX.md OSX.md
</a> </a>
/ /
<a href="OSX.html"> <a href="docs/OSX.html">
OSX.html OSX.html
</a> </a>
</li> </li>
<li> <li>
<a href="WINDOWS.md"> <a href="docs/WINDOWS.md">
WINDOWS.md WINDOWS.md
</a> </a>
/ /
<a href="WINDOWS.html"> <a href="docs/WINDOWS.html">
WINDOWS.html WINDOWS.html
</a> </a>
</li> </li>
@ -282,7 +305,7 @@
and a non-bundled Java and a non-bundled Java
</h4> </h4>
<pre><code class="language-sh">mkdir ~/tmp-i2pfirefox &amp;&amp; cd ~/tmp-i2pfirefox <pre><code class="language-sh">mkdir ~/tmp-i2pfirefox &amp;&amp; cd ~/tmp-i2pfirefox
wget https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/1.0.6/i2pfirefox.zip wget https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/1.3.0/i2pfirefox.zip
unzip i2pfirefox.zip unzip i2pfirefox.zip
./i2pfirefox.cmd ./i2pfirefox.cmd
@ -1159,12 +1182,13 @@ Public License instead of this License.
</div> </div>
</div> </div>
</div> </div>
</div>
<div> <div>
<iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe> <iframe src="https://snowflake.torproject.org/embed.html" width="320" height="240" frameborder="0" scrolling="no"></iframe>
</div> </div>
<div> <div>
<a href="https://geti2p.net/"> <a href="https://geti2p.net/">
<img src="i2plogo.png"></img> <img class="i2plogo" src="i2plogo.png"></img>
I2P I2P
</a> </a>
</div> </div>

View File

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

View File

@ -1,5 +1,13 @@
#! /usr/bin/env sh #! /usr/bin/env sh
. ./config.sh . ./config.sh
if [ -z "$I2P_SIGNER_USERPHRASE" ]; then
I2P_SIGNER_USERPHRASE=$(security find-identity -v -p codesigning | cut -d ' ' -f 4)
echo "Warning: using automatically configured signer ID, make sure this is the one you want: $I2P_SIGNER_USERPHRASE"
echo "continuing in 10 seconds"
sleep 10
fi
jpackage \ jpackage \
--verbose \ --verbose \
--type dmg \ --type dmg \
@ -8,4 +16,7 @@ jpackage \
--icon src/icon.icns \ --icon src/icon.icns \
--input src/build \ --input src/build \
--main-jar i2pfirefox.jar \ --main-jar i2pfirefox.jar \
--mac-sign \
--mac-signing-key-user-name "$I2P_SIGNER_USERPHRASE" \
--mac-entitlements resources/entitlements.xml \
--main-class net.i2p.i2pfirefox.I2PBrowser --main-class net.i2p.i2pfirefox.I2PBrowser

View File

@ -1,6 +1,5 @@
clientApp.0.main=net.i2p.i2pfirefox.I2PBrowserPlugin clientApp.0.main=net.i2p.i2pfirefox.plugin.I2PBrowserPlugin
clientApp.0.name=I2PBrowserPlugin clientApp.0.name=i2pfirefox
clientApp.0.delay=0 clientApp.0.delay=0
clientApp.0.startOnLoad=true clientApp.0.startOnLoad=true
# we also use i2p.jar and i2ptunnel.jar, they are in the standard router classpath clientApp.0.classpath=$PLUGIN/lib/i2pfirefox-plugin.jar
clientApp.0.classpath=$PLUGIN/lib/i2pfirefox.jar,$I2P/lib/i2psnark.jar

3
plugin/i2pbrowser.cmd Normal file
View File

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

View File

@ -6,10 +6,10 @@ ant distclean clangFmt versionMd
NUMLINE=`grep release.number build.xml | head -n 1` NUMLINE=`grep release.number build.xml | head -n 1`
READMELINE=`grep 'i2p.plugins.firefox/releases/download' README.md | grep i2pfirefox` READMELINE=`grep 'i2p.plugins.firefox/releases/download' README.md | grep i2pfirefox`
sed -i "s|${READMELINE}|wget https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/${GITHUB_TAG}/i2pfirefox.zip|g" README.md sed -i "s|${READMELINE}|wget https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/${GITHUB_TAG}/i2pfirefox.zip|g" README.md
READMELINE=`grep 'i2p.plugins.firefox/releases/download' LINUX.md | grep i2pbrowser` READMELINE=`grep 'i2p.plugins.firefox/releases/download' docs/LINUX.md | grep i2pbrowser`
sed -i "s|${READMELINE}|wget https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/${GITHUB_TAG}/i2pbrowser.zip|g" LINUX.md sed -i "s|${READMELINE}|wget https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/${GITHUB_TAG}/i2pbrowser.tar.gz|g" docs/LINUX.md
READMELINE=`grep 'i2p.plugins.firefox/releases/download' OSX.md | grep i2pfirefox` READMELINE=`grep 'i2p.plugins.firefox/releases/download' docs/OSX.md | grep i2pfirefox`
sed -i "s|${READMELINE}|wget https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/${GITHUB_TAG}/i2pfirefox.zip|g" OSX.md sed -i "s|${READMELINE}|wget https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/${GITHUB_TAG}/i2pfirefox.zip|g" docs/OSX.md
sed -i "s|${NUMLINE}| <property name=\"release.number\" value=\"$GITHUB_TAG\" />|g" build.xml sed -i "s|${NUMLINE}| <property name=\"release.number\" value=\"$GITHUB_TAG\" />|g" build.xml
edgar && git push --all edgar && git push --all
ant distclean tarball versionMd jar plugin freeZip jpackage debian fedora ant distclean versionMd jar plugin torrent freeZip jpackage debian tarball

View File

@ -1,12 +1,13 @@
#! /usr/bin/env sh #! /usr/bin/env sh
. ./config.sh . ./config.sh
./preprelease.sh #./preprelease.sh
github-release release --user "${GITHUB_USER}" \ github-release release --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \ --repo "${GITHUB_REPO}" \
--name "${GITHUB_NAME}" \ --name "${GITHUB_NAME}" \
--description "${GITHUB_DESCRIPTION}" \ --description "${GITHUB_DESCRIPTION}" \
--tag "${GITHUB_TAG}"; true --tag "${GITHUB_TAG}"; true
sleep 2s
./profiles-upload.sh ./profiles-upload.sh
sleep 2s sleep 2s
github-release edit --user "${GITHUB_USER}" \ github-release edit --user "${GITHUB_USER}" \
@ -41,14 +42,14 @@ github-release upload --user "${GITHUB_USER}" \
--name "i2pfirefox.zip" \ --name "i2pfirefox.zip" \
--file "i2pfirefox.zip" --file "i2pfirefox.zip"
echo "Uploaded freestanding zip" echo "Uploaded freestanding zip"
jvmsum=$(sha256sum "i2pbrowser.zip") jvmsum=$(sha256sum "i2pbrowser.tar.gz")
github-release upload --user "${GITHUB_USER}" \ github-release upload --user "${GITHUB_USER}" \
--replace \ --replace \
--repo "${GITHUB_REPO}" \ --repo "${GITHUB_REPO}" \
--tag "${GITHUB_TAG}" \ --tag "${GITHUB_TAG}" \
--label "I2P Browser launcher as a Jpackage, does not require a JVM. ${jvmsum}" \ --label "I2P Browser launcher as a Jpackage, does not require a JVM. ${jvmsum}" \
--name "i2pbrowser.zip" \ --name "i2pbrowser.tar.gz" \
--file "i2pbrowser.zip" --file "i2pbrowser.tar.gz"
echo "Uploaded jpackage zip" echo "Uploaded jpackage zip"
debsum=$(sha256sum "i2pbrowser_${GITHUB_TAG}_amd64.deb") debsum=$(sha256sum "i2pbrowser_${GITHUB_TAG}_amd64.deb")
github-release upload --user "${GITHUB_USER}" \ github-release upload --user "${GITHUB_USER}" \
@ -85,6 +86,15 @@ github-release upload --user "${GITHUB_USER}" \
--name "i2pfirefox-update.su3" \ --name "i2pfirefox-update.su3" \
--file "i2pfirefox-update.su3" --file "i2pfirefox-update.su3"
echo "Uploaded su3 package" echo "Uploaded su3 package"
torsum=$(sha256sum i2p.plugins.firefox.torrent.zip)
github-release upload --user "${GITHUB_USER}" \
--replace \
--repo "${GITHUB_REPO}" \
--tag "${GITHUB_TAG}" \
--label "I2P Browser launcher as an I2P Console Plugin, release torrent. ${torsum}" \
--name "i2p.plugins.firefox.torrent.zip" \
--file "i2p.plugins.firefox.torrent.zip"
echo "Uploaded torrent package"
git pull github --tags git pull github --tags
git push --all git push --all

View File

@ -1,3 +1,3 @@
#Build Number for ANT. Do not edit! #Build Number for ANT. Do not edit!
#Fri Dec 23 01:25:14 UTC 2022 #Thu Mar 07 13:23:49 EST 2024
build.number=411 build.number=708

View File

@ -9,6 +9,7 @@
<pathelement location="${i2plib}/i2ptunnel.jar" /> <pathelement location="${i2plib}/i2ptunnel.jar" />
<pathelement location="${i2plib}/i2psnark.jar" /> <pathelement location="${i2plib}/i2psnark.jar" />
<pathelement location="${i2plib}/mstreaming.jar" /> <pathelement location="${i2plib}/mstreaming.jar" />
<pathelement location="${i2plib}/desktopgui.jar" />
<pathelement location="${ant.home}/lib/ant.jar"/> <pathelement location="${ant.home}/lib/ant.jar"/>
<pathelement location="${jettylib}/org.mortbay.jetty.jar"/> <pathelement location="${jettylib}/org.mortbay.jetty.jar"/>
<pathelement location="${jettylib}/jasper-runtime.jar" /> <pathelement location="${jettylib}/jasper-runtime.jar" />
@ -23,6 +24,11 @@
<target name="build" depends="jar" /> <target name="build" depends="jar" />
<target name="builddep"> <target name="builddep">
</target> </target>
<target name="cp">
<exec executable="echo">
<arg value="${java.class.path}"></arg>
</exec>
</target>
<property name="javac.compilerargs" value="" /> <property name="javac.compilerargs" value="" />
<property name="javac.version" value="1.8" /> <property name="javac.version" value="1.8" />
@ -35,11 +41,31 @@
debug="true" deprecation="on" source="${javac.version}" target="${javac.version}" debug="true" deprecation="on" source="${javac.version}" target="${javac.version}"
destdir="./build/obj" destdir="./build/obj"
includeAntRuntime="false" includeAntRuntime="false"
classpath="${i2plib}/i2p.jar:${i2plib}/i2ptunnel.jar:${i2plib}/i2psnark.jar:${i2plib}/mstreaming.jar:${i2plib}/systray.jar:${jettylib}/org.mortbay.jetty.jar:${jettylib}/jetty-util.jar:${jettylib}/jetty-xml.jar" > classpath="${i2plib}/i2p.jar:${i2plib}/i2ptunnel.jar:${i2plib}/i2psnark.jar:${i2plib}/mstreaming.jar:${i2plib}/systray.jar:${i2plib}/desktopgui.jar:${jettylib}/org.mortbay.jetty.jar:${jettylib}/jetty-util.jar:${jettylib}/jetty-xml.jar" >
<compilerarg line="${javac.compilerargs}" /> <compilerarg line="${javac.compilerargs}" />
</javac> </javac>
</target> </target>
<target name="pluginjar" depends="jar">
<mkdir dir="./build" />
<mkdir dir="./build/obj" />
<javac
srcdir="./plugin"
debug="true" deprecation="on" source="${javac.version}" target="${javac.version}"
destdir="./build/obj"
includeAntRuntime="false"
classpath="${i2plib}/i2p.jar:${i2plib}/i2ptunnel.jar:${i2plib}/i2psnark.jar:${i2plib}/mstreaming.jar:${i2plib}/systray.jar:${i2plib}/desktopgui.jar:${jettylib}/org.mortbay.jetty.jar:${jettylib}/jetty-util.jar:${jettylib}/jetty-xml.jar:./build/i2pfirefox.jar" >
<compilerarg line="${javac.compilerargs}" />
</javac>
<jar destfile="build/i2pfirefox-plugin.jar" basedir="./build/obj" includes="**/*.class" >
<fileset file="i2p.firefox.base.profile.zip" />
<fileset file="i2p.firefox.usability.profile.zip" />
<fileset file="i2p.chromium.base.profile.zip" />
<fileset file="i2p.chromium.usability.profile.zip" />
<fileset file="icon.png" />
</jar>
</target>
<target name="jar" depends="builddep, compile"> <target name="jar" depends="builddep, compile">
<jar destfile="build/i2pfirefox.jar" basedir="./build/obj" includes="**/*.class" > <jar destfile="build/i2pfirefox.jar" basedir="./build/obj" includes="**/*.class" >
<fileset file="i2p.firefox.base.profile.zip" /> <fileset file="i2p.firefox.base.profile.zip" />

View File

@ -1,6 +1,6 @@
package net.i2p.i2pfirefox; package net.i2p.i2pfirefox;
import java.awt.AWTException; /*import java.awt.AWTException;
import java.awt.Component; import java.awt.Component;
import java.awt.Image; import java.awt.Image;
import java.awt.Menu; import java.awt.Menu;
@ -13,7 +13,7 @@ import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.awt.event.MouseListener; import java.awt.event.MouseListener;*/
import java.io.File; import java.io.File;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.FileWriter; import java.io.FileWriter;
@ -41,61 +41,49 @@ import java.util.Arrays;
* @author idk * @author idk
* @since 0.0.16 * @since 0.0.16
*/ */
public class I2PBrowser extends I2PCommonBrowser { public class I2PBrowser extends I2PGenericUnsafeBrowser {
private final I2PFirefox i2pFirefox = new I2PFirefox(); private final I2PFirefox i2pFirefox = new I2PFirefox();
private final I2PChromium i2pChromium = new I2PChromium(); private final I2PChromium i2pChromium = new I2PChromium();
private final I2PGenericUnsafeBrowser i2pGeneral = private final I2PGenericUnsafeBrowser i2pGeneral =
new I2PGenericUnsafeBrowser(); new I2PGenericUnsafeBrowser();
private final Toolkit toolkit = Toolkit.getDefaultToolkit();
private final SystemTray tray = initTray();
private final Image image = toolkit.getImage("icon.png");
private final TrayIcon icon = initIcon();
private final PopupMenu menu = initMenu();
private final Menu submenuStrict = new Menu("Strict Mode");
private final MenuItem launchRegularBrowserStrict =
new MenuItem("Launch I2P Browser");
private final MenuItem launchPrivateBrowserStrict =
new MenuItem("Launch I2P Browser - Throwaway Session");
private final Menu submenuUsability = new Menu("Usability Mode");
private final MenuItem launchRegularBrowserUsability =
new MenuItem("Launch I2P Browser");
private final MenuItem launchPrivateBrowserUsability =
new MenuItem("Launch I2P Browser - Throwaway Session");
private final MenuItem launchConfigBrowserUsability =
new MenuItem("Launch I2P Console");
private final MenuItem closeItem = new MenuItem("Close");
public boolean firefox = false; public boolean firefox = false;
public boolean chromium = false; public boolean chromium = false;
public boolean generic = false; public boolean generic = false;
public boolean chromiumFirst = false; public boolean chromiumFirst = false;
public boolean usability = false; public boolean usability = false;
public int privateBrowsing = 0; public int privateBrowsing = 0;
static private boolean outputConfig = false; private boolean outputConfig = false;
static private boolean useSystray = true;
private void launchFirefox(int privateWindow, String[] url) { public void launchFirefox(int privateWindow, String[] url) {
logger.info("I2PFirefox" + privateWindow); String priv = privateWindow == 1 ? "private-window" : "long-profile";
I2PFirefox.usability = usability; logger.info("I2PFirefox" + priv);
i2pFirefox.usability = usability;
if (url == null)
url = new String[] {"about:blank"};
if (outputConfig) if (outputConfig)
i2pFirefox.storeFirefoxDefaults(); i2pFirefox.storeFirefoxDefaults();
i2pFirefox.launch(privateWindow, url); i2pFirefox.launch(privateWindow, url);
} }
private void launchChromium(int privateWindow, String[] url) { public void launchChromium(int privateWindow, String[] url) {
logger.info("I2PChromium" + privateWindow); String priv = privateWindow == 1 ? "private-window" : "long-profile";
I2PChromiumProfileBuilder.usability = usability; logger.info("I2PChromium" + priv);
i2pChromium.usability = usability;
if (url == null)
url = new String[] {"about:blank"};
if (outputConfig) if (outputConfig)
i2pChromium.storeChromiumDefaults(); i2pChromium.storeChromiumDefaults();
i2pChromium.launch(privateWindow, url); i2pChromium.launch(privateWindow, url);
} }
private void launchGeneric(int privateWindowInt, String[] url) { private void launchGeneric(int privateWindowInt, String[] url) {
String priv = privateWindowInt == 1 ? "private-window" : "long-profile";
boolean privateWindow = false; boolean privateWindow = false;
if (url == null)
url = new String[] {"about:blank"};
if (privateWindowInt == 1) if (privateWindowInt == 1)
privateWindow = true; privateWindow = true;
if (outputConfig) if (outputConfig)
i2pGeneral.storeGenericDefaults(); i2pGeneral.storeGenericDefaults();
logger.info("I2PGeneric" + privateWindowInt); logger.info("I2PGeneric" + priv);
i2pGeneral.launch(privateWindow, url); i2pGeneral.launch(privateWindow, url);
} }
@ -105,7 +93,7 @@ public class I2PBrowser extends I2PCommonBrowser {
* *
* @since 0.0.16 * @since 0.0.16
*/ */
public I2PBrowser() { initIconFile(); } public I2PBrowser() {}
/** /**
* Construct an I2PBrowser class which automatically determines which browser * Construct an I2PBrowser class which automatically determines which browser
@ -113,14 +101,9 @@ public class I2PBrowser extends I2PCommonBrowser {
* *
* @since 0.0.18 * @since 0.0.18
*/ */
public I2PBrowser(String browserPath) { public I2PBrowser(String browserPath) { this.BROWSER = browserPath; }
I2PGenericUnsafeBrowser.BROWSER = browserPath;
initIconFile();
}
public void setBrowser(String browserPath) { public void setBrowser(String browserPath) { this.BROWSER = browserPath; }
I2PGenericUnsafeBrowser.BROWSER = browserPath;
}
/** /**
* Return true if there is a Chromium available * Return true if there is a Chromium available
@ -166,21 +149,6 @@ public class I2PBrowser extends I2PCommonBrowser {
* @since 0.0.17 * @since 0.0.17
*/ */
public void launch(int privateWindow, String[] url) { public void launch(int privateWindow, String[] url) {
validateUserDir();
if (generic) {
this.launchGeneric(privateWindow, url);
return;
}
if ((chromium && firefox) || (!chromium && !firefox)) {
if (this.hasFirefox()) {
this.launchFirefox(privateWindow, url);
} else if (this.hasChromium()) {
this.launchChromium(privateWindow, url);
} else {
this.launchGeneric(privateWindow, url);
}
return;
}
if (chromiumFirst) { if (chromiumFirst) {
if (chromium) { if (chromium) {
this.launchChromium(privateWindow, url); this.launchChromium(privateWindow, url);
@ -226,7 +194,33 @@ public class I2PBrowser extends I2PCommonBrowser {
*/ */
public void launch() { launch(false); } public void launch() { launch(false); }
private static String ValidURL(String inUrl) { /**
* Stop all running processes managed by the browser manager.
*
* @return true if successful, false if not
*/
public boolean stop() {
boolean r = true;
if (i2pFirefox != null)
r = i2pFirefox.stop();
if (i2pChromium != null)
r = i2pChromium.stop();
if (i2pGeneral != null)
r = i2pGeneral.stop();
return r;
}
public boolean running() {
if (i2pFirefox != null)
return i2pFirefox.running();
if (i2pChromium != null)
return i2pChromium.running();
if (i2pGeneral != null)
return i2pGeneral.running();
return false;
}
private String ValidURL(String inUrl) {
String[] schemes = {"http", "https"}; String[] schemes = {"http", "https"};
for (String scheme : schemes) { for (String scheme : schemes) {
if (inUrl.startsWith(scheme)) { if (inUrl.startsWith(scheme)) {
@ -241,7 +235,6 @@ public class I2PBrowser extends I2PCommonBrowser {
i2pBrowser.startup(args); i2pBrowser.startup(args);
} }
public ArrayList<String> parseArgs(String[] args) { public ArrayList<String> parseArgs(String[] args) {
validateUserDir();
logger.info("I2PBrowser"); logger.info("I2PBrowser");
ArrayList<String> visitURL = new ArrayList<String>(); ArrayList<String> visitURL = new ArrayList<String>();
if (args != null) { if (args != null) {
@ -272,9 +265,6 @@ public class I2PBrowser extends I2PCommonBrowser {
if (arg.equals("-outputconfig")) { if (arg.equals("-outputconfig")) {
outputConfig = true; outputConfig = true;
} }
if (arg.equals("-nosystray")) {
useSystray = false;
}
if (arg.equals("-noproxycheck")) { if (arg.equals("-noproxycheck")) {
logger.info("zeroing out proxy check"); logger.info("zeroing out proxy check");
this.setProxyTimeoutTime(0); this.setProxyTimeoutTime(0);
@ -290,181 +280,14 @@ public class I2PBrowser extends I2PCommonBrowser {
public void startup(String[] args) { public void startup(String[] args) {
ArrayList<String> visitURL = parseArgs(args); ArrayList<String> visitURL = parseArgs(args);
try { try {
if (useSystray) {
startupSystray();
Runtime.getRuntime().addShutdownHook(new Thread() { Runtime.getRuntime().addShutdownHook(new Thread() {
@Override @Override
public void run() { public void run() {}
shutdownSystray();
}
}); });
}
} catch (Exception e) { } catch (Exception e) {
logger.warning(e.toString()); logger.warning(e.toString());
} }
this.launch(this.privateBrowsing, this.launch(this.privateBrowsing,
visitURL.toArray(new String[visitURL.size()])); visitURL.toArray(new String[visitURL.size()]));
} }
protected static boolean createSystrayRunningFile() {
if (!systrayRunningExternally()) {
try {
File systrayIsRunningFile =
new File(runtimeDirectory(""), "systray.running");
FileWriter myWriter = new FileWriter(systrayIsRunningFile);
myWriter.write("systray.running file created");
myWriter.close();
return true;
} catch (IOException ioe) {
logger.warning(ioe.toString());
}
return false;
}
return false;
}
protected static boolean systrayRunningExternally() {
File systrayIsRunningFile =
new File(runtimeDirectory(""), "systray.running");
if (systrayIsRunningFile.exists()) {
logger.info("Systray is already running in another process: " +
systrayIsRunningFile.toString());
return true;
}
logger.info("Systray does not appear to be running");
return false;
}
private SystemTray initTray() {
if (systrayRunningExternally()) {
return null;
}
if (!SystemTray.isSupported()) {
logger.warning("SystemTray is not supported");
return null;
}
return SystemTray.getSystemTray();
}
private PopupMenu initMenu() {
PopupMenu menu = new PopupMenu();
return menu;
}
private File initIconFile() {
File iconFile = new File(runtimeDirectory(""), "icon.png");
if (!iconFile.exists()) {
InputStream resources =
I2PBrowser.class.getClassLoader().getResourceAsStream("icon.png");
try {
OutputStream fos = new FileOutputStream(iconFile);
copy(resources, fos);
} catch (IOException e) {
logger.warning(e.toString());
}
}
return iconFile;
}
private TrayIcon initIcon() {
TrayIcon icon = new TrayIcon(image, "I2P Browser Profile Controller", menu);
icon.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
if (e.getClickCount() == 2) {
String[] args = {"-usability", "-app", "http://127.0.0.1:7657"};
main(args);
}
}
});
icon.setImageAutoSize(true);
return icon;
}
protected void startupSystray() {
if (!systrayRunningExternally()) {
logger.info("Setting up systray");
try {
if (useSystray) {
logger.info("Starting systray");
try {
if (systray()) {
logger.info("Systray started");
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if (!createSystrayRunningFile()) {
logger.warning("Failed to create systray running file");
}
}
logger.info("Adding icon to systray");
tray.add(icon);
} catch (AWTException e) {
logger.warning(e.toString());
}
} else {
logger.warning("Systray is already running externally");
}
}
protected void shutdownSystray() {
if (tray != null)
tray.remove(icon);
if (systrayRunningExternally()) {
File systrayIsRunningFile =
new File(runtimeDirectory(""), "systray.running");
systrayIsRunningFile.delete();
}
}
public boolean systray() throws Exception {
if (tray == null)
throw new Exception("System Tray is Null Exception");
launchRegularBrowserStrict.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
String[] args = {"-strict"};
main(args);
}
});
submenuStrict.add(launchRegularBrowserStrict);
logger.info("Added strict mode browser");
launchPrivateBrowserStrict.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
String[] args = {"-private", "-strict"};
main(args);
}
});
submenuStrict.add(launchPrivateBrowserStrict);
logger.info("Added strict+private mode browser");
menu.add(submenuStrict);
logger.info("Added strict mode submenu");
launchRegularBrowserUsability.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
String[] args = {"-usability"};
main(args);
}
});
submenuUsability.add(launchRegularBrowserUsability);
logger.info("Added usability mode browser");
launchPrivateBrowserUsability.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
String[] args = {"-private", "-strict"};
main(args);
}
});
submenuUsability.add(launchPrivateBrowserUsability);
logger.info("Added usability+private mode browser");
launchConfigBrowserUsability.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
String[] args = {"-usability", "-app", "http://127.0.0.1:7657"};
main(args);
}
});
menu.add(submenuUsability);
menu.add(launchConfigBrowserUsability);
logger.info("Added config-only browser");
logger.info("Added usability mode submenu");
closeItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { shutdownSystray(); }
});
menu.add(closeItem);
icon.setPopupMenu(menu);
logger.info("Added close menu item");
return true;
}
} }

View File

@ -1,188 +0,0 @@
package net.i2p.i2pfirefox;
import java.io.File;
import java.io.IOException;
import java.util.logging.FileHandler;
import java.util.logging.Logger;
import java.util.logging.SimpleFormatter;
import net.i2p.I2PAppContext;
import net.i2p.app.ClientApp;
import net.i2p.app.ClientAppManager;
import net.i2p.app.ClientAppState;
import net.i2p.util.EepGet;
public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
private final I2PAppContext context;
private final ClientAppManager cam;
private final String[] args;
private volatile boolean got = false;
private volatile boolean shutdown = false;
public I2PBrowserPlugin(I2PAppContext context, ClientAppManager listener,
String[] args) {
this.cam = listener;
cam.notify(this, ClientAppState.UNINITIALIZED,
"Initializing Profile Manager Systray Plugin", null);
this.context = context;
this.args = args;
cam.notify(this, ClientAppState.INITIALIZED,
"Profile Manager Systray Plugin Initialized", null);
}
private static File threadLogFile() {
validateUserDir();
String userDir = System.getProperty("user.dir");
File log = new File(userDir, "logs");
if (!log.exists())
log.mkdirs();
return new File(log, "browserlauncherthreadlogger.log");
}
public String getDisplayName() { return "Browser Profile Manager"; }
public String getName() { return "browserProfileManager"; }
public void shutdown(String[] args) {
this.shutdownSystray();
cam.notify(this, ClientAppState.STOPPING,
"Shutting down up profile manager systray", null);
got = true;
shutdown = true;
cam.unregister(this);
cam.notify(this, ClientAppState.STOPPED,
"Shutting down up profile manager systray", null);
}
private void downloadInBackground() throws IOException {
try {
Logger threadLogger = Logger.getLogger("browserlauncherupdatethread");
FileHandler fh = new FileHandler(threadLogFile().toString());
threadLogger.addHandler(fh);
SimpleFormatter formatter = new SimpleFormatter();
fh.setFormatter(formatter);
got = downloadTorrent();
while (!got) {
threadLogger.info("Working to download updates in the background");
if (shutdown) {
break;
}
got = downloadTorrent();
try {
Thread.sleep(5000);
} catch (InterruptedException err) {
logger.warning(err.toString());
}
}
if (got) {
try {
File content = torrentFileContents();
if (content.exists()) {
content.delete();
}
} catch (IOException err) {
threadLogger.warning(err.toString());
}
}
} catch (IOException err) {
// just re-throw here
throw err;
}
}
public void startup() {
shutdown = false;
cam.notify(this, ClientAppState.STARTING,
"Starting up profile manager systray", null);
Runnable r = new Runnable() {
public void run() {
logger.info("Downloading in background thread");
try {
downloadInBackground();
} catch (IOException err) {
err.printStackTrace();
}
}
};
new Thread(r).start();
try {
this.startup(args);
cam.register(this);
cam.notify(this, ClientAppState.RUNNING,
"Starting up profile manager systray", null);
} catch (Exception e) {
logger.info(e.toString());
cam.notify(this, ClientAppState.START_FAILED,
"Error starting profile manager systray", e);
}
}
private File torrentDir() throws IOException {
File configDir = context.getConfigDir();
if (configDir == null) {
throw new IOException("The I2P Config directory is null");
}
if (!configDir.exists()) {
throw new IOException("The I2P Config directory does not exist");
}
File snarkDir = new File(configDir, "i2psnark");
if (snarkDir == null) {
throw new IOException("The Snark directory is null");
}
if (!snarkDir.exists()) {
throw new IOException("The Snark directory does not exist");
}
return snarkDir;
}
private File torrentFile() throws IOException {
try {
File torrents = torrentDir();
File torrent = new File(torrents, "i2p.plugins.firefox.torrent");
if (torrent == null) {
throw new IOException("Cannot download torrent, torrent file is null");
}
return torrent;
} catch (IOException err) {
logger.warning(err.toString());
}
return null;
}
private File torrentFileContents() throws IOException {
try {
File torrents = torrentDir();
File torrent = new File(torrents, "i2p.plugins.firefox");
if (torrent == null) {
throw new IOException("Torrent directory contents are null");
}
return torrent;
} catch (IOException err) {
logger.warning(err.toString());
}
return null;
}
private boolean downloadTorrent() {
try {
String url =
"http://idk.i2p/i2p.plugins.firefox/i2p.plugins.firefox.torrent";
String name = torrentFile().getAbsolutePath();
logger.info("Downloading " + url + " to " + name);
EepGet eepGet =
new EepGet(context, true, "127.0.0.1", 4444, 5, name, url);
if (eepGet.getNotModified()) {
return false;
}
return eepGet.fetch(60, 180, 60);
} catch (IOException err) {
logger.warning(err.toString());
}
return false;
}
public ClientAppState getState() {
if (shutdown && !systrayRunningExternally()) {
String msg = "Firefox profile manager systray is stopped";
logger.info(msg);
cam.notify(this, ClientAppState.STOPPED, msg, null);
return ClientAppState.STOPPED;
}
if (systrayRunningExternally()) {
String msg = "Firefox profile manager systray is running";
logger.info(msg);
cam.notify(this, ClientAppState.RUNNING, msg, null);
return ClientAppState.RUNNING;
}
return ClientAppState.FORKED; // Used as a euphemism for unknown here.
}
}

View File

@ -26,9 +26,10 @@ import java.util.stream.Stream;
* @author idk * @author idk
* @since 0.0.1 * @since 0.0.1
*/ */
public class I2PChromium extends I2PCommonBrowser { public class I2PChromium extends I2PChromiumProfileUnpacker {
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;
/** /**
* Construct an I2PChromium class which manages an instance of Chromium and * Construct an I2PChromium class which manages an instance of Chromium and
@ -54,40 +55,41 @@ public class I2PChromium extends I2PCommonBrowser {
return; return;
} }
} }
I2PChromiumProfileBuilder.usability = true; this.usability = true;
} }
public static void storeChromiumDefaults() { public void storeChromiumDefaults() {
List<String> list = new ArrayList<String>(); List<String> list = new ArrayList<String>();
list = Arrays.asList(chromiumPathsWindows()); list = Arrays.asList(chromiumPathsWindows());
prop.setProperty("chromium.paths.windows", getProperties().setProperty("chromium.paths.windows",
list.stream().collect(Collectors.joining(","))); list.stream().collect(Collectors.joining(",")));
list = Arrays.asList(chromiumPathsUnix()); list = Arrays.asList(chromiumPathsUnix());
prop.setProperty("chromium.paths.linux", getProperties().setProperty("chromium.paths.linux",
list.stream().collect(Collectors.joining(","))); list.stream().collect(Collectors.joining(",")));
list = Arrays.asList(chromiumPathsOSX()); list = Arrays.asList(chromiumPathsOSX());
prop.setProperty("chromium.paths.osx", getProperties().setProperty("chromium.paths.osx",
list.stream().collect(Collectors.joining(","))); list.stream().collect(Collectors.joining(",")));
list = Arrays.asList(chromiumBinsWindows()); list = Arrays.asList(chromiumBinsWindows());
prop.setProperty("chromium.bins.windows", getProperties().setProperty("chromium.bins.windows",
list.stream().collect(Collectors.joining(","))); list.stream().collect(Collectors.joining(",")));
list = Arrays.asList(chromiumBinsUnix()); list = Arrays.asList(chromiumBinsUnix());
prop.setProperty("chromium.bins.linux", getProperties().setProperty("chromium.bins.linux",
list.stream().collect(Collectors.joining(","))); list.stream().collect(Collectors.joining(",")));
list = Arrays.asList(chromiumBinsUnix()); list = Arrays.asList(chromiumBinsUnix());
prop.setProperty("chromium.bins.osx", getProperties().setProperty("chromium.bins.osx",
list.stream().collect(Collectors.joining(","))); list.stream().collect(Collectors.joining(",")));
try (OutputStream fos = new FileOutputStream( try (OutputStream fos = new FileOutputStream(
new File(runtimeDirectory(""), "browser.config"))) { new File(runtimeDirectory(""), "browser.config"))) {
prop.store(fos, "Chromium Configuration Section"); getProperties().store(fos, "Chromium Configuration Section");
} catch (IOException ioe) { } catch (IOException ioe) {
logger.warning(ioe.toString()); logger.warning(ioe.toString());
} }
} }
private static String[] chromiumPathsUnix() { private String[] chromiumPathsUnix() {
String chromiumPathsProp = prop.getProperty("chromium.paths.unix"); String chromiumPathsProp =
getProperties().getProperty("chromium.paths.unix");
if (chromiumPathsProp != null) if (chromiumPathsProp != null)
if (!chromiumPathsProp.equals("")) if (!chromiumPathsProp.equals(""))
return chromiumPathsProp.split(","); return chromiumPathsProp.split(",");
@ -95,15 +97,15 @@ public class I2PChromium extends I2PCommonBrowser {
"/snap/bin"}; "/snap/bin"};
} }
private static String[] chromiumBinsUnix() { private String[] chromiumBinsUnix() {
String chromiumPathsProp; String chromiumPathsProp;
if (isOSX()) { if (isOSX()) {
chromiumPathsProp = prop.getProperty("chromium.bins.osx"); chromiumPathsProp = getProperties().getProperty("chromium.bins.osx");
if (chromiumPathsProp != null) if (chromiumPathsProp != null)
if (!chromiumPathsProp.equals("")) if (!chromiumPathsProp.equals(""))
return chromiumPathsProp.split(","); return chromiumPathsProp.split(",");
} }
chromiumPathsProp = prop.getProperty("chromium.bins.unix"); chromiumPathsProp = getProperties().getProperty("chromium.bins.unix");
if (chromiumPathsProp != null) if (chromiumPathsProp != null)
if (!chromiumPathsProp.equals("")) if (!chromiumPathsProp.equals(""))
return chromiumPathsProp.split(","); return chromiumPathsProp.split(",");
@ -111,7 +113,7 @@ public class I2PChromium extends I2PCommonBrowser {
"ungoogled-chromium", "chromium", "brave", "edge", "msedge", "chrome"}; "ungoogled-chromium", "chromium", "brave", "edge", "msedge", "chrome"};
} }
private static String[] FIND_CHROMIUM_SEARCH_PATHS_UNIX() { private String[] FIND_CHROMIUM_SEARCH_PATHS_UNIX() {
String[] path = chromiumPathsUnix(); String[] path = chromiumPathsUnix();
String[] exes = chromiumBinsUnix(); String[] exes = chromiumBinsUnix();
@ -125,8 +127,9 @@ public class I2PChromium extends I2PCommonBrowser {
} }
return exePath; return exePath;
} }
private static String[] chromiumPathsOSX() { private String[] chromiumPathsOSX() {
String chromiumPathsProp = prop.getProperty("chromium.paths.osx"); String chromiumPathsProp =
getProperties().getProperty("chromium.paths.osx");
if (chromiumPathsProp != null) if (chromiumPathsProp != null)
if (!chromiumPathsProp.equals("")) if (!chromiumPathsProp.equals(""))
return chromiumPathsProp.split(","); return chromiumPathsProp.split(",");
@ -134,7 +137,7 @@ public class I2PChromium extends I2PCommonBrowser {
"/Applications/Chrome.app/Contents/MacOS", "/Applications/Chrome.app/Contents/MacOS",
"/Applications/Brave.app/Contents/MacOS"}; "/Applications/Brave.app/Contents/MacOS"};
} }
private static String[] FIND_CHROMIUM_SEARCH_PATHS_OSX() { private String[] FIND_CHROMIUM_SEARCH_PATHS_OSX() {
String[] path = chromiumPathsOSX(); String[] path = chromiumPathsOSX();
String[] exes = chromiumBinsUnix(); String[] exes = chromiumBinsUnix();
String[] exePath = new String[path.length * exes.length]; String[] exePath = new String[path.length * exes.length];
@ -148,8 +151,9 @@ public class I2PChromium extends I2PCommonBrowser {
return exePath; return exePath;
} }
private static String[] chromiumPathsWindows() { private String[] chromiumPathsWindows() {
String chromiumPathsProp = prop.getProperty("chromium.paths.windows"); String chromiumPathsProp =
getProperties().getProperty("chromium.paths.windows");
if (chromiumPathsProp != null) if (chromiumPathsProp != null)
if (!chromiumPathsProp.equals("")) if (!chromiumPathsProp.equals(""))
return chromiumPathsProp.split(","); return chromiumPathsProp.split(",");
@ -181,8 +185,9 @@ public class I2PChromium extends I2PCommonBrowser {
new File(programFiles, "/Microsoft/Edge/Application/").toString(), new File(programFiles, "/Microsoft/Edge/Application/").toString(),
}; };
} }
private static String[] chromiumBinsWindows() { private String[] chromiumBinsWindows() {
String chromiumPathsProp = prop.getProperty("chromium.bins.windows"); String chromiumPathsProp =
getProperties().getProperty("chromium.bins.windows");
if (chromiumPathsProp != null) if (chromiumPathsProp != null)
if (!chromiumPathsProp.equals("")) if (!chromiumPathsProp.equals(""))
return chromiumPathsProp.split(","); return chromiumPathsProp.split(",");
@ -193,7 +198,7 @@ public class I2PChromium extends I2PCommonBrowser {
"msedge.exe", "msedge.exe",
"chrome.exe"}; "chrome.exe"};
} }
private static String[] FIND_CHROMIUM_SEARCH_PATHS_WINDOWS() { private String[] FIND_CHROMIUM_SEARCH_PATHS_WINDOWS() {
String[] path = chromiumPathsWindows(); String[] path = chromiumPathsWindows();
String[] exes = chromiumBinsWindows(); String[] exes = chromiumBinsWindows();
String[] exePath = new String[path.length * exes.length]; String[] exePath = new String[path.length * exes.length];
@ -207,7 +212,7 @@ public class I2PChromium extends I2PCommonBrowser {
return exePath; return exePath;
} }
private static String[] FIND_ALL_CHROMIUM_SEARCH_PATHS() { private String[] FIND_ALL_CHROMIUM_SEARCH_PATHS() {
String[] Unix = FIND_CHROMIUM_SEARCH_PATHS_UNIX(); String[] Unix = FIND_CHROMIUM_SEARCH_PATHS_UNIX();
String[] Windows = FIND_CHROMIUM_SEARCH_PATHS_WINDOWS(); String[] Windows = FIND_CHROMIUM_SEARCH_PATHS_WINDOWS();
String[] Mac = FIND_CHROMIUM_SEARCH_PATHS_OSX(); String[] Mac = FIND_CHROMIUM_SEARCH_PATHS_OSX();
@ -227,7 +232,7 @@ public class I2PChromium extends I2PCommonBrowser {
} }
return exePath; return exePath;
} }
private static String[] FIND_CHROMIUM_SEARCH_PATHS() { private String[] FIND_CHROMIUM_SEARCH_PATHS() {
switch (getOperatingSystem()) { switch (getOperatingSystem()) {
case "Windows": case "Windows":
return FIND_CHROMIUM_SEARCH_PATHS_WINDOWS(); return FIND_CHROMIUM_SEARCH_PATHS_WINDOWS();
@ -241,7 +246,7 @@ public class I2PChromium extends I2PCommonBrowser {
return FIND_ALL_CHROMIUM_SEARCH_PATHS(); return FIND_ALL_CHROMIUM_SEARCH_PATHS();
} }
} }
private static String[] NEARBY_CHROMIUM_SEARCH_PATHS() { private String[] NEARBY_CHROMIUM_SEARCH_PATHS() {
// obtain the PLUGIN environment variable // obtain the PLUGIN environment variable
String plugin = System.getenv("PLUGIN"); String plugin = System.getenv("PLUGIN");
if (plugin != null && !plugin.isEmpty()) { if (plugin != null && !plugin.isEmpty()) {
@ -334,7 +339,7 @@ public class I2PChromium extends I2PCommonBrowser {
} }
return new String[] {}; return new String[] {};
} }
private static String[] CHROMIUM_FINDER() { private String[] CHROMIUM_FINDER() {
String[] nearby = NEARBY_CHROMIUM_SEARCH_PATHS(); String[] nearby = NEARBY_CHROMIUM_SEARCH_PATHS();
String[] all = FIND_CHROMIUM_SEARCH_PATHS(); String[] all = FIND_CHROMIUM_SEARCH_PATHS();
@ -384,11 +389,13 @@ public class I2PChromium extends I2PCommonBrowser {
File chromeFile = new File(chrome); File chromeFile = new File(chrome);
if (chromeFile.exists()) { if (chromeFile.exists()) {
// if it does, return it // if it does, return it
chromePath = chrome;
return chrome; return chrome;
} }
} }
String[] chromees = onlyValidChromiums(); String[] chromees = onlyValidChromiums();
if (chromees.length > 0) { if (chromees.length > 0) {
chromePath = chromees[0];
return chromees[0]; return chromees[0];
} else { } else {
return ""; return "";
@ -551,8 +558,7 @@ public class I2PChromium extends I2PCommonBrowser {
String[] newArgs = new String[arglength + 32]; String[] newArgs = new String[arglength + 32];
newArgs[0] = chrome; newArgs[0] = chrome;
newArgs[1] = newArgs[1] =
"--user-data-dir=" + I2PChromiumProfileBuilder.profileDirectory( "--user-data-dir=" + this.profileDirectory(this.usabilityMode());
I2PChromiumProfileBuilder.usabilityMode());
newArgs[2] = "--proxy-server=http://127.0.0.1:4444"; newArgs[2] = "--proxy-server=http://127.0.0.1:4444";
newArgs[3] = newArgs[3] =
"--proxy-bypass-list=http://localhost:7657,http://127.0.0.1:7657"; "--proxy-bypass-list=http://localhost:7657,http://127.0.0.1:7657";
@ -583,42 +589,39 @@ public class I2PChromium extends I2PCommonBrowser {
newArgs[28] = "--referrer-directive=noreferrers"; newArgs[28] = "--referrer-directive=noreferrers";
newArgs[29] = "--force-punycode-hostnames"; newArgs[29] = "--force-punycode-hostnames";
newArgs[30] = "--disable-sharing-hub"; newArgs[30] = "--disable-sharing-hub";
if (!I2PChromiumProfileBuilder.usability) { if (!this.usability) {
newArgs[31] = newArgs[31] =
"--load-extension=" + "--load-extension=" +
new File(I2PChromiumProfileBuilder.profileDirectory("base"), new File(this.profileDirectory("base"), "extensions/i2pchrome.js")
"extensions/i2pchrome.js")
.getAbsolutePath() + .getAbsolutePath() +
"," + "," +
new File(I2PChromiumProfileBuilder.profileDirectory("base"), new File(this.profileDirectory("base"),
"extensions/https-everywhere.js") "extensions/https-everywhere.js")
.getAbsolutePath() + .getAbsolutePath() +
"," + "," +
new File(I2PChromiumProfileBuilder.profileDirectory("base"), new File(this.profileDirectory("base"), "extensions/noscript.js")
"extensions/noscript.js")
.getAbsolutePath(); .getAbsolutePath();
} else { } else {
newArgs[31] = newArgs[31] =
"--load-extension=" + "--load-extension=" +
new File(I2PChromiumProfileBuilder.profileDirectory("usability"), new File(this.profileDirectory("usability"),
"extensions/i2pchrome.js") "extensions/i2pchrome.js")
.getAbsolutePath() + .getAbsolutePath() +
"," + "," +
new File(I2PChromiumProfileBuilder.profileDirectory("usability"), new File(this.profileDirectory("usability"),
"extensions/https-everywhere.js") "extensions/https-everywhere.js")
.getAbsolutePath() + .getAbsolutePath() +
"," + "," +
new File(I2PChromiumProfileBuilder.profileDirectory("usability"), new File(this.profileDirectory("usability"),
"extensions/jshelter.js") "extensions/jshelter.js")
.getAbsolutePath() + .getAbsolutePath() +
"," + "," +
new File(I2PChromiumProfileBuilder.profileDirectory("usability"), new File(this.profileDirectory("usability"),
"extensions/localcdn.js") "extensions/localcdn.js")
.getAbsolutePath() + .getAbsolutePath() +
"," + "," +
new File(I2PChromiumProfileBuilder.profileDirectory("usability"), new File(this.profileDirectory("usability"), "extensions/ublock.js")
"extensions/ublock.js")
.getAbsolutePath(); .getAbsolutePath();
} }
if (args != null) { if (args != null) {
@ -650,13 +653,13 @@ public class I2PChromium extends I2PCommonBrowser {
bashScript.setExecutable(true); bashScript.setExecutable(true);
} }
return new ProcessBuilder(bashScript.getAbsolutePath()) return new ProcessBuilder(bashScript.getAbsolutePath())
.directory(I2PChromiumProfileBuilder.runtimeDirectory(true)); .directory(this.runtimeDirectory(true));
} catch (IOException e) { } catch (IOException e) {
logger.warning(e.toString()); logger.warning(e.toString());
} }
} else { } else {
return new ProcessBuilder(newArgs).directory( return new ProcessBuilder(newArgs).directory(
I2PChromiumProfileBuilder.runtimeDirectory(true)); this.runtimeDirectory(true));
} }
} }
logger.info("No Chromium found."); logger.info("No Chromium found.");
@ -671,17 +674,15 @@ public class I2PChromium extends I2PCommonBrowser {
} }
public Process launchAndDetatch(int privateWindow, String[] url) { public Process launchAndDetatch(int privateWindow, String[] url) {
validateUserDir(); validateUserDirectory();
if (waitForProxy()) { if (waitForProxy()) {
String profileDirectory = I2PChromiumProfileBuilder.profileDirectory( String profileDirectory = this.profileDirectory(this.usabilityMode());
I2PChromiumProfileBuilder.usabilityMode()); if (this.validateProfileDirectory(profileDirectory)) {
if (I2PChromiumProfileChecker.validateProfileDirectory(
profileDirectory)) {
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 (!I2PChromiumProfileBuilder.copyBaseProfiletoProfile()) { if (!this.copyBaseProfiletoProfile()) {
logger.info("Failed to rebuild profile directory: " + logger.info("Failed to rebuild profile directory: " +
profileDirectory); profileDirectory);
return null; return null;
@ -770,7 +771,26 @@ public class I2PChromium extends I2PCommonBrowser {
*/ */
public void launch() { launch(false); } public void launch() { launch(false); }
private static String ValidURL(String inUrl) { /**
* Stop all running processes managed by the browser manager.
*
* @return true if successful, false if not
*/
public boolean stop() {
if (p != null) {
p.destroy();
return true;
}
return false;
}
public boolean running() {
if (p != null)
return p.isAlive();
return false;
}
private String ValidURL(String inUrl) {
String[] schemes = {"http", "https"}; String[] schemes = {"http", "https"};
for (String scheme : schemes) { for (String scheme : schemes) {
if (inUrl.startsWith(scheme)) { if (inUrl.startsWith(scheme)) {
@ -781,37 +801,37 @@ public class I2PChromium extends I2PCommonBrowser {
} }
public static void main(String[] args) { public static void main(String[] args) {
validateUserDir();
int privateBrowsing = 0; int privateBrowsing = 0;
logger.info("I2PChromium");
I2PChromium i2pChromium = new I2PChromium(); I2PChromium i2pChromium = new I2PChromium();
logger.info("checking for private browsing"); i2pChromium.validateUserDirectory();
i2pChromium.logger.info("I2PChromium");
i2pChromium.logger.info("checking for private browsing");
ArrayList<String> visitURL = new ArrayList<String>(); ArrayList<String> visitURL = new ArrayList<String>();
if (args != null) { if (args != null) {
if (args.length > 0) { if (args.length > 0) {
for (String arg : args) { for (String arg : args) {
if (arg.equals("-private")) { if (arg.equals("-private")) {
privateBrowsing = 1; privateBrowsing = 1;
logger.info( i2pChromium.logger.info(
"private browsing is true, profile will be discarded at end of session"); "private browsing is true, profile will be discarded at end of session");
} }
if (arg.equals("-usability")) { if (arg.equals("-usability")) {
I2PChromiumProfileBuilder.usability = true; i2pChromium.usability = true;
} }
if (arg.equals("-app")) { if (arg.equals("-app")) {
privateBrowsing = 2; privateBrowsing = 2;
I2PChromiumProfileBuilder.usability = true; i2pChromium.usability = true;
} }
if (arg.equals("-noproxycheck")) { if (arg.equals("-noproxycheck")) {
logger.info("zeroing out proxy check"); i2pChromium.logger.info("zeroing out proxy check");
i2pChromium.setProxyTimeoutTime(0); i2pChromium.setProxyTimeoutTime(0);
} }
if (!arg.startsWith("-")) { if (!arg.startsWith("-")) {
// check if it's a URL // check if it's a URL
if (privateBrowsing == 2) if (privateBrowsing == 2)
visitURL.add("--app=" + ValidURL(arg)); visitURL.add("--app=" + i2pChromium.ValidURL(arg));
else else
visitURL.add(ValidURL(arg)); visitURL.add(i2pChromium.ValidURL(arg));
} }
} }
} }

View File

@ -20,19 +20,10 @@ import java.io.File;
* @author idk * @author idk
* @since 0.0.1 * @since 0.0.1
*/ */
public class I2PChromiumProfileBuilder extends I2PCommonBrowser { public class I2PChromiumProfileBuilder extends I2PChromiumProfileChecker {
public static boolean usability; public boolean usability;
/** private String baseProfileDir(String file, String mode) {
* get the profile directory, creating it if necessary
*
* @return the profile directory, or null if it could not be created
*/
public static String profileDirectory(String base) {
return profileDirectory("I2P_CHROMIUM_PROFILE", "chromium", base, false);
}
private static String baseProfileDir(String file, String mode) {
File profileDir = new File(file, "i2p.chromium." + mode + ".profile"); File profileDir = new File(file, "i2p.chromium." + mode + ".profile");
// make sure the directory exists // make sure the directory exists
if (profileDir.exists()) { if (profileDir.exists()) {
@ -52,11 +43,11 @@ public class I2PChromiumProfileBuilder extends I2PCommonBrowser {
* *
* @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 static String baseProfileDirectory() { /*public String baseProfileDirectory() {
return baseProfileDirectory("base"); return baseProfileDirectory("base");
}*/ }*/
public static String baseProfileDirectory(String mode) { public String baseProfileDirectory(String mode) {
String pd = System.getenv("I2P_CHROMIUM_BASE_PROFILE"); String pd = System.getenv("I2P_CHROMIUM_BASE_PROFILE");
if (pd != null && !pd.isEmpty()) { if (pd != null && !pd.isEmpty()) {
File pdf = new File(pd); File pdf = new File(pd);
@ -80,7 +71,7 @@ public class I2PChromiumProfileBuilder extends I2PCommonBrowser {
* @return the runtime directory, or null if it could not be created * @return the runtime directory, or null if it could not be created
* @since 0.0.1 * @since 0.0.1
*/ */
public static File runtimeDirectory(boolean create) { public File runtimeDirectory(boolean create) {
String rtd = runtimeDirectory(); String rtd = runtimeDirectory();
return runtimeDirectory(create, rtd); return runtimeDirectory(create, rtd);
} }
@ -91,7 +82,7 @@ public class I2PChromiumProfileBuilder extends I2PCommonBrowser {
* @return the runtime directory, or null if it could not be created or found * @return the runtime directory, or null if it could not be created or found
* @since 0.0.1 * @since 0.0.1
*/ */
public static String runtimeDirectory() { public String runtimeDirectory() {
// get the I2P_CHROMIUM_DIR environment variable // get the I2P_CHROMIUM_DIR environment variable
String rtd = System.getenv("I2P_CHROMIUM_DIR"); String rtd = System.getenv("I2P_CHROMIUM_DIR");
// if it is not null and not empty // if it is not null and not empty
@ -106,7 +97,7 @@ public class I2PChromiumProfileBuilder extends I2PCommonBrowser {
return runtimeDirectory(""); return runtimeDirectory("");
} }
public static String usabilityMode() { public String usabilityMode() {
if (usability) if (usability)
return "usability"; return "usability";
return "base"; return "base";
@ -117,7 +108,7 @@ public class I2PChromiumProfileBuilder extends I2PCommonBrowser {
* *
* @since 0.0.1 * @since 0.0.1
*/ */
public static boolean copyBaseProfiletoProfile() { public boolean copyBaseProfiletoProfile() {
String baseProfile = baseProfileDirectory(usabilityMode()); String baseProfile = baseProfileDirectory(usabilityMode());
String profile = profileDirectory(usabilityMode()); String profile = profileDirectory(usabilityMode());
logger.info("Copying base profile to profile directory: " + baseProfile + logger.info("Copying base profile to profile directory: " + baseProfile +

View File

@ -27,20 +27,30 @@ public class I2PChromiumProfileChecker extends I2PCommonBrowser {
* @since 0.0.1 * @since 0.0.1
*/ */
public static void main(String[] args) { public static void main(String[] args) {
String profileDirectory = I2PChromiumProfileChecker pc = new I2PChromiumProfileChecker();
I2PChromiumProfileBuilder.profileDirectory("base"); String profileDirectory = pc.profileDirectory("base");
if (profileDirectory == null) { if (profileDirectory == null) {
logger.info("No profile directory found"); pc.logger.info("No profile directory found");
return; return;
} }
logger.info("Profile directory: " + profileDirectory); pc.logger.info("Profile directory: " + profileDirectory);
boolean ok = validateProfileDirectory(profileDirectory); boolean ok = pc.validateProfileDirectory(profileDirectory);
if (ok) { if (ok) {
logger.info("Profile directory is valid"); pc.logger.info("Profile directory is valid");
} else { } else {
logger.info("Profile directory is invalid"); pc.logger.info("Profile directory is invalid");
} }
} }
/**
* get the profile directory, creating it if necessary
*
* @return the profile directory, or null if it could not be created
*/
public String profileDirectory(String base) {
return profileDirectory("I2P_CHROMIUM_PROFILE", "chromium", base, false);
}
/** /**
* Return true if the profile directory is valid. * Return true if the profile directory is valid.
* *
@ -48,7 +58,7 @@ public class I2PChromiumProfileChecker extends I2PCommonBrowser {
* @return true if the profile directory is valid, false otherwise * @return true if the profile directory is valid, false otherwise
* @since 0.0.1 * @since 0.0.1
*/ */
public static boolean validateProfileDirectory(String profileDirectory) { public boolean validateProfileDirectory(String profileDirectory) {
File profileDir = new File(profileDirectory); File profileDir = new File(profileDirectory);
if (!profileDir.exists()) { if (!profileDir.exists()) {
logger.info("Profile directory does not exist"); logger.info("Profile directory does not exist");
@ -79,7 +89,7 @@ public class I2PChromiumProfileChecker extends I2PCommonBrowser {
* @return true if the file is valid, false otherwise * @return true if the file is valid, false otherwise
* @since 0.0.1 * @since 0.0.1
*/ */
public static boolean validateFile(String file) { public boolean validateFile(String file) {
File f = new File(file); File f = new File(file);
if (!f.exists()) { if (!f.exists()) {
logger.info("User JavaScript file does not exist"); logger.info("User JavaScript file does not exist");
@ -106,7 +116,7 @@ public class I2PChromiumProfileChecker extends I2PCommonBrowser {
* @return true if the extension directory is valid, false otherwise * @return true if the extension directory is valid, false otherwise
* @since 0.0.1 * @since 0.0.1
*/ */
public static boolean validateExtensionDirectory(String extensionDirectory) { public boolean validateExtensionDirectory(String extensionDirectory) {
File extensionDir = new File(extensionDirectory); File extensionDir = new File(extensionDirectory);
if (!extensionDir.exists()) { if (!extensionDir.exists()) {
logger.info("Extension directory does not exist"); logger.info("Extension directory does not exist");

View File

@ -18,13 +18,13 @@ package net.i2p.i2pfirefox;
* @author idk * @author idk
* @since 0.0.1 * @since 0.0.1
*/ */
public class I2PChromiumProfileUnpacker extends I2PCommonBrowser { public class I2PChromiumProfileUnpacker extends I2PChromiumProfileBuilder {
public static void main(String[] args) { public static void main(String[] args) {
String profileDirectory = I2PChromiumProfileUnpacker pu = new I2PChromiumProfileUnpacker();
I2PChromiumProfileBuilder.profileDirectory("base"); String profileDirectory = pu.profileDirectory("base");
if (profileDirectory == null) { if (profileDirectory == null) {
logger.info("No profile directory found"); pu.logger.info("No profile directory found");
return; return;
} }
} }

View File

@ -33,47 +33,57 @@ import java.util.zip.ZipInputStream;
*/ */
public class I2PCommonBrowser { public class I2PCommonBrowser {
static public Properties prop = new Properties(); private Properties prop = new Properties();
static public Logger logger = Logger.getLogger("browserlauncher"); public Logger logger = Logger.getLogger("browserlauncher");
static FileHandler fh; private FileHandler fh;
// private final int DEFAULT_TIMEOUT = 200; int CONFIGURED_TIMEOUT = 200;
private static int CONFIGURED_TIMEOUT = 200;
public I2PCommonBrowser() { public I2PCommonBrowser() {
try { try {
// This block configure the logger with handler and formatter
fh = new FileHandler(logFile().toString());
logger.addHandler(fh);
SimpleFormatter formatter = new SimpleFormatter();
fh.setFormatter(formatter);
// the following statement is used to log any messages
logger.info("Browser log"); logger.info("Browser log");
} catch (SecurityException e) { } catch (SecurityException e) {
e.printStackTrace(); e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} }
loadPropertiesFile(new File(runtimeDirectory(""), "browser.config")); loadPropertiesFile(new File(runtimeDirectory(""), "browser.config"));
} }
public static void loadPropertiesFile(File props) { /**
try (InputStream propsInput = new FileInputStream(props)) { * Loads a properties file.
*
* @param propertiesFile the file to load
*/
public void loadPropertiesFile(File propertiesFile) {
try (InputStream inputStream = new FileInputStream(propertiesFile)) {
prop = new Properties(); prop = new Properties();
prop.load(propsInput); prop.load(inputStream);
System.out.println(prop); } catch (IOException exception) {
} catch (IOException io) { logger.warning(exception.toString());
logger.warning(io.toString());
} }
} }
public static void validateUserDir() { /**
* Retrieves the properties of the object.
*
* @return the properties of the object
*/
public Properties getProperties() { return prop; }
/**
* Validates the user directory.
*
* @param None No parameters.
* @return None No return value.
*/
public void validateUserDirectory() {
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");
File userDirFile = new File(userDir); File userDirFile = new File(userDir);
File userHomeFile = new File(userHome); File userHomeFile = new File(userHome);
logger.info("user.dir testing !" + userHomeFile.getAbsolutePath() +
".equals(" + userDirFile.getAbsolutePath() + ")"); logger.info("user.dir: " + userDirFile.getAbsolutePath());
logger.info("user.home: " + userHomeFile.getAbsolutePath());
if (!userDirFile.getAbsolutePath().contains("Program Files")) { if (!userDirFile.getAbsolutePath().contains("Program Files")) {
if (!userDirFile.getAbsolutePath().equals( if (!userDirFile.getAbsolutePath().equals(
userHomeFile.getAbsolutePath())) { userHomeFile.getAbsolutePath())) {
@ -88,8 +98,9 @@ public class I2PCommonBrowser {
} else { } else {
logger.info("user.dir is not writable"); logger.info("user.dir is not writable");
} }
} else {
logger.info("user.dir is not actually a directory");
} }
{ logger.info("user.dir is not actually a directory"); }
} else { } else {
logger.info("user.dir does not exist"); logger.info("user.dir does not exist");
} }
@ -99,11 +110,13 @@ public class I2PCommonBrowser {
} else { } else {
logger.info("user.dir cannot run from inside Program Files"); logger.info("user.dir cannot run from inside Program Files");
} }
if (isWindows()) if (isWindows()) {
userHome = new File(userHome, "AppData/Local/I2P").getAbsolutePath(); userHome = new File(userHome, "AppData/Local/I2P").getAbsolutePath();
}
File defaultPathFile = new File(userHome, "i2p/i2pbrowser"); File defaultPathFile = new File(userHome, "i2p/i2pbrowser");
if (!defaultPathFile.exists()) if (!defaultPathFile.exists()) {
defaultPathFile.mkdirs(); defaultPathFile.mkdirs();
}
if (!defaultPathFile.isDirectory()) { if (!defaultPathFile.isDirectory()) {
logger.info( logger.info(
"default path exists and is not a directory, get it out of the way"); "default path exists and is not a directory, get it out of the way");
@ -111,160 +124,201 @@ public class I2PCommonBrowser {
} }
System.setProperty("user.dir", defaultPathFile.getAbsolutePath()); System.setProperty("user.dir", defaultPathFile.getAbsolutePath());
} }
public static String getOperatingSystem() {
String os = System.getProperty("os.name"); /**
if (os.startsWith("Windows")) { * Get the operating system.
*
* @return the name of the operating system (Windows, Linux, BSD, Mac, or
* Unknown)
*/
public String getOperatingSystem() {
if (isWindows()) {
return "Windows"; return "Windows";
} else if (os.contains("Linux")) { } else if (isLinux()) {
return "Linux"; return "Linux";
} else if (os.contains("BSD")) { } else if (isBSD()) {
return "BSD"; return "BSD";
} else if (os.contains("Mac")) { } else if (isOSX()) {
return "Mac"; return "Mac";
} }
return "Unknown"; return "Unknown";
} }
protected static boolean isWindows() { /**
String osName = System.getProperty("os.name"); * Determines if the current operating system is Windows.
logger.info("os.name" + osName); *
if (osName.contains("windows")) * @return true if the current operating system is Windows, false otherwise
return true; */
if (osName.contains("Windows")) protected boolean isWindows() {
return true; String osName = System.getProperty("os.name").toLowerCase();
if (osName.contains("WINDOWS")) return osName.contains("windows");
return true;
return false;
}
protected static boolean isOSX() {
String osName = System.getProperty("os.name");
logger.info("os.name" + osName);
if (osName.contains("OSX"))
return true;
if (osName.contains("osx"))
return true;
if (osName.contains("mac"))
return true;
if (osName.contains("Mac"))
return true;
if (osName.contains("apple"))
return true;
if (osName.contains("Apple"))
return true;
if (osName.contains("Darwin"))
return true;
if (osName.contains("darwin"))
return true;
return false;
}
// public static void logger.info(String line) { logger.info(line); }
private static File logFile() {
validateUserDir();
String userDir = System.getProperty("user.dir");
File log = new File(userDir, "logs");
if (!log.exists())
log.mkdirs();
return new File(log, "browserlauncher.log");
} }
/** /**
* get the runtime directory, creating it if create=true * Determines if the current operating system is macOS.
* *
* @param create if true, create the runtime directory if it does not exist * @return true if the operating system is macOS, false otherwise
* @return the runtime directory, or null if it could not be created
* @since 0.0.19
*/ */
protected static File runtimeDirectory(boolean create, String override) { protected boolean isOSX() {
String rtd = runtimeDirectory(override); String osName = System.getProperty("os.name").toLowerCase();
File rtdFile = new File(rtd); return osName.contains("osx") || osName.contains("mac") ||
if (create) { osName.contains("apple") || osName.contains("darwin");
if (!rtdFile.exists()) {
rtdFile.mkdir();
}
}
return new File(rtd);
} }
/** /**
* get the correct runtime directory * Determines whether the current operating system is Linux.
* *
* @return the runtime directory, or null if it could not be created or found * @return true if the operating system is Linux, false otherwise
*/
protected boolean isLinux() {
String osName = System.getProperty("os.name").toLowerCase();
return osName.contains("linux");
}
/**
* Checks if the current operating system is a BSD variant.
*
* @return true if the operating system is a BSD variant, false otherwise
*/
protected boolean isBSD() {
String osName = System.getProperty("os.name").toLowerCase();
return osName.contains("bsd");
}
// public void logger.info(String line) { logger.info(line); }
/**
* Returns the log file for the browser launcher.
*
* @return the log file for the browser launcher
*/
/*private File logFile() {
// validateUserDirectory();
String userDirectory = System.getProperty("user.dir");
File logDirectory = new File(userDirectory, "logs");
if (!logDirectory.exists()) {
logDirectory.mkdirs();
}
return new File(logDirectory, "browserlauncher.log");
}*/
/**
* Get the runtime directory, creating it if create=true.
*
* @param create If true, create the runtime directory if it does not exist.
* @param override The runtime directory override.
* @return The runtime directory, or null if it could not be created.
* @since 0.0.19 * @since 0.0.19
*/ */
protected static String runtimeDirectory(String override) { protected File runtimeDirectory(boolean create, String override) {
// get the I2P_BROWSER_DIR environment variable String runtimeDir = runtimeDirectory(override);
String rtd = System.getenv(override); File runtimeDirFile = new File(runtimeDir);
// if it is not null and not empty if (create && !runtimeDirFile.exists()) {
if (rtd != null && !rtd.isEmpty()) { runtimeDirFile.mkdir();
// check if the file exists
File rtdFile = new File(rtd);
if (rtdFile.exists()) {
// if it does, return it
return rtd;
} }
return runtimeDirFile;
} }
// obtain the PLUGIN environment variable
String plugin = System.getenv("PLUGIN"); /**
if (plugin != null && !plugin.isEmpty()) { * Returns the runtime directory path based on the given override parameter.
File pluginDir = new File(plugin); *
if (pluginDir.exists()) { * @param override the name of the environment variable to override the
return pluginDir.toString(); * runtime
* directory
* @return the runtime directory path as a string
*/
protected String runtimeDirectory(String override) {
String runtimeDir = System.getenv(override);
if (isDirectoryValid(runtimeDir)) {
return runtimeDir;
} }
String pluginDir = System.getenv("PLUGIN");
if (isDirectoryValid(pluginDir)) {
return pluginDir;
} }
String userDir = System.getProperty("user.dir"); String userDir = System.getProperty("user.dir");
if (userDir != null && !userDir.isEmpty()) { if (isDirectoryValid(userDir)) {
File userDir1 = new File(userDir); return userDir;
if (userDir1.exists()) {
return userDir1.toString();
}
} }
String homeDir = System.getProperty("user.home"); String homeDir = System.getProperty("user.home");
if (homeDir != null && !homeDir.isEmpty()) { if (isDirectoryValid(homeDir)) {
File homeDir1 = new File(homeDir + "/.i2p"); String i2pDir = homeDir + "/.i2p";
if (homeDir1.exists()) { if (isDirectoryValid(i2pDir)) {
return homeDir.toString(); return homeDir;
} }
File homeDir2 = new File(homeDir + "/i2p");
if (homeDir2.exists()) { String altI2pDir = homeDir + "/i2p";
return homeDir2.toString(); if (isDirectoryValid(altI2pDir)) {
return altI2pDir;
} }
} }
return ""; return "";
} }
/** /**
* get the profile directory, creating it if necessary * Checks if the given directory is valid.
* *
* @param directory the directory to check
* @return true if the directory is valid, false otherwise
*/
private boolean isDirectoryValid(String directory) {
return directory != null && !directory.isEmpty() &&
new File(directory).exists();
}
/**
* Retrieves the profile directory, creating it if necessary.
*
* @param envVar the environment variable name
* @param browser the browser name
* @param base the base directory
* @param app indicates if it is an app directory
* @return the profile directory, or null if it could not be created * @return the profile directory, or null if it could not be created
* @since 0.0.19 * @since 0.0.19
*/ */
protected static String profileDirectory(String envVar, String browser, protected String profileDirectory(String envVar, String browser, String base,
String base, boolean app) { boolean app) {
String pd = System.getenv(envVar); String profileDir = System.getenv(envVar);
if (pd != null && !pd.isEmpty()) { if (profileDir != null && !profileDir.isEmpty()) {
File pdf = new File(pd); File profileDirFile = new File(profileDir);
if (pdf.exists() && pdf.isDirectory()) { if (profileDirFile.exists() && profileDirFile.isDirectory()) {
return pd; return profileDir;
} }
} }
String rtd = runtimeDirectory(""); String runtimeDir = runtimeDirectory("");
return profileDir(rtd, browser, base, app); return profileDir(runtimeDir, browser, base, app);
} }
protected static String profileDir(String file, String browser, String base, /**
* A description of the entire Java function.
*
* @param file description of parameter
* @param browser description of parameter
* @param base description of parameter
* @param app description of parameter
* @return description of return value
*/
protected String profileDir(String file, String browser, String base,
boolean app) { boolean app) {
String appString = ""; String appString = app ? ".app" : "";
if (app) { String profileDirName =
appString = ".app"; String.format("i2p.%s.profile.%s%s", browser, base, appString);
} File profileDir = new File(file, profileDirName);
File profileDir =
new File(file, "i2p." + browser + ".profile." + base + appString);
return profileDir.getAbsolutePath(); return profileDir.getAbsolutePath();
} }
/**
* Unpacks the base profile to a specified directory.
*
* @param profileDirectory the directory where the profile will be unpacked
* @param browser the browser type
* @param base the base profile
* @return true if the profile was successfully unpacked, false otherwise
*/
protected boolean unpackProfile(String profileDirectory, String browser, protected boolean unpackProfile(String profileDirectory, String browser,
String base) { String base) {
logger.info("Unpacking base profile to " + profileDirectory); logger.info("Unpacking base profile to " + profileDirectory);
@ -310,66 +364,101 @@ public class I2PCommonBrowser {
return true; return true;
} }
protected static void copyDirectory(File sourceDirectory, /**
File destinationDirectory, String browser, * Copy a directory from sourceDir to destDir, excluding certain files based
* on browser and base.
*
* @param sourceDir directory to be copied from
* @param destDir directory to be copied to
* @param browser the browser name
* @param base the base name
* @throws IOException if an I/O error occurs during copying
*/
protected void copyDirectory(File sourceDir, File destDir, String browser,
String base) throws IOException { String base) throws IOException {
destinationDirectory = new File(destinationDirectory.toString().replace( destDir = new File(destDir.toString().replace(
"i2p." + browser + "." + base + ".profile", "")); "i2p." + browser + "." + base + ".profile", ""));
if (!destinationDirectory.exists()) { if (!destDir.exists()) {
destinationDirectory.mkdir(); destDir.mkdir();
} }
for (String f : sourceDirectory.list()) { for (String file : sourceDir.list()) {
copyDirectoryCompatibilityMode(new File(sourceDirectory, f), copyDirectoryCompatibilityMode(new File(sourceDir, file),
new File(destinationDirectory, f), browser, new File(destDir, file), browser, base);
base);
} }
} }
private static void /**
copyDirectoryCompatibilityMode(File source, File destination, String browser, * Copy a directory in compatibility mode.
String base) throws IOException { *
if (source.isDirectory()) { * @param sourceDirectory the source directory to copy
copyDirectory(source, destination, browser, base); * @param destinationDirectory the destination directory to copy to
} else { * @param browser the browser
copyFile(source, destination); * @param base the base
} * @throws IOException if an I/O error occurs
} */
private void copyDirectoryCompatibilityMode(File sourceDirectory,
public static void copy(InputStream source, OutputStream target) File destinationDirectory,
String browser, String base)
throws IOException { throws IOException {
byte[] buf = new byte[8192]; if (sourceDirectory.isDirectory()) {
int length; copyDirectory(sourceDirectory, destinationDirectory, browser, base);
while ((length = source.read(buf)) != -1) { } else {
target.write(buf, 0, length); copyFile(sourceDirectory, destinationDirectory);
} }
} }
private static void copyFile(File sourceFile, File destinationFile) /**
* Copies the content from the source InputStream to the target OutputStream.
*
* @param source the InputStream to copy from
* @param target the OutputStream to copy to
* @throws IOException if an I/O error occurs during the copying process
*/
public void copy(InputStream source, OutputStream target) throws IOException {
byte[] buffer = new byte[8192];
int bytesRead;
while ((bytesRead = source.read(buffer)) != -1) {
target.write(buffer, 0, bytesRead);
}
}
/**
* Copies a file from the source file to the destination file.
*
* @param sourceFile the source file to be copied
* @param destinationFile the destination file where the source file will be
* copied to
* @throws IOException if an I/O error occurs during the file copy process
*/
private 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)) {
byte[] buf = new byte[1024]; byte[] buffer = new byte[1024];
int length; int length;
while ((length = in.read(buf)) > 0) { while ((length = in.read(buffer)) > 0) {
out.write(buf, 0, length); out.write(buffer, 0, length);
} }
} }
} }
public static boolean validateProfileFirstRun(String profileDirectory) { /**
* Validates the profile for the first run.
*
* @param profileDirectory the directory of the profile
* @return true if the profile is valid for the first run, false otherwise
*/
public boolean validateProfileFirstRun(String profileDirectory) {
File profileDir = new File(profileDirectory); File profileDir = new File(profileDirectory);
if (!profileDir.exists()) { if (!profileDir.exists()) {
logger.info("Profile directory does not exist");
return false; return false;
} }
if (!profileDir.isDirectory()) { if (!profileDir.isDirectory()) {
logger.info("Profile directory is not a directory");
return false; return false;
} }
File frf = new File(profileDir, "first-run"); File firstRunFile = new File(profileDir, "first-run");
if (frf.exists()) { if (firstRunFile.exists()) {
frf.delete(); firstRunFile.delete();
// is a first run
return true; return true;
} }
return false; return false;
@ -395,6 +484,7 @@ public class I2PCommonBrowser {
public boolean waitForProxy(int timeout) { public boolean waitForProxy(int timeout) {
return waitForProxy(timeout, 4444); return waitForProxy(timeout, 4444);
} }
/** /**
* Waits for an HTTP proxy on the specified port to be ready. * Waits for an HTTP proxy on the specified port to be ready.
* Returns false on timeout of the specified number of seconds. * Returns false on timeout of the specified number of seconds.
@ -407,6 +497,7 @@ public class I2PCommonBrowser {
public boolean waitForProxy(int timeout, int port) { public boolean waitForProxy(int timeout, int port) {
return waitForProxy(timeout, port, "localhost"); return waitForProxy(timeout, port, "localhost");
} }
/** /**
* Waits for an HTTP proxy on the specified port to be ready. * Waits for an HTTP proxy on the specified port to be ready.
* Returns false on timeout of the specified number of seconds. * Returns false on timeout of the specified number of seconds.
@ -420,13 +511,11 @@ public class I2PCommonBrowser {
* @since 0.0.1 * @since 0.0.1
*/ */
public boolean waitForProxy(int timeout, int port, String host) { public boolean waitForProxy(int timeout, int port, String host) {
logger.info("waiting up to " + timeout + "seconds for a proxy");
if (timeout <= 0) { if (timeout <= 0) {
return true; return true;
} }
for (int i = 0; i < timeout; i++) { for (int i = 0; i < timeout; i++) {
logger.info("Waiting for proxy"); if (isPortOccupied(port, host)) {
if (checkifPortIsOccupied(port, host)) {
return true; return true;
} }
try { try {
@ -437,15 +526,23 @@ public class I2PCommonBrowser {
} }
return false; return false;
} }
public boolean checkifPortIsOccupied(int port, String host) {
/**
* Determines if a given port on a specified host is occupied.
*
* @param port the port number to check
* @param host the host address to check
* @return true if the port is occupied, false otherwise
*/
public boolean isPortOccupied(int port, String host) {
try { try {
Socket socket = new Socket(host, port); new Socket(host, port).close();
socket.close();
return true; return true;
} catch (IOException e) { } catch (IOException e) {
return false; return false;
} }
} }
/** /**
* Alters the proxy timeout to customized value time, in seconds. * Alters the proxy timeout to customized value time, in seconds.
* May be zero. * May be zero.
@ -455,36 +552,50 @@ public class I2PCommonBrowser {
public void setProxyTimeoutTime(int time) { CONFIGURED_TIMEOUT = time; } public void setProxyTimeoutTime(int time) { CONFIGURED_TIMEOUT = time; }
/** /**
* Joins the elements of the given string array into a single string.
* *
* @param arr the string array to be joined
* @return the joined string
*/ */
protected static String join(String[] arr) { protected String join(String[] arr) {
StringBuilder val = new StringBuilder(""); StringBuilder result = new StringBuilder();
for (int x = 0; x < arr.length; x++) { for (String item : arr) {
val.append(" \""); result.append(" \"").append(item).append("\"");
val.append(arr[x]);
val.append("\"");
} }
return val.toString(); return result.toString();
} }
public static void sleep(int millis) {
/**
* Sleeps for a specified number of milliseconds.
*
* @param millis the number of milliseconds to sleep
*/
public void sleep(int millis) {
try { try {
Thread.sleep(millis); Thread.sleep(millis);
} catch (InterruptedException bad) { } catch (InterruptedException e) {
bad.printStackTrace(); throw new RuntimeException(e);
throw new RuntimeException(bad);
} }
} }
public static File searchFile(File file, String search) {
if (file.isDirectory()) { /**
File[] arr = file.listFiles(); * Searches for a file in a given directory and its subdirectories.
for (File f : arr) { *
File found = searchFile(f, search); * @param directory the directory to search in
if (found != null) * @param search the name of the file to search for
return found; * @return the found file or null if not found
*/
public File searchFile(File directory, String search) {
if (directory.isDirectory()) {
File[] files = directory.listFiles();
for (File file : files) {
File foundFile = searchFile(file, search);
if (foundFile != null)
return foundFile;
} }
} else { } else {
if (file.getName().equals(search)) { if (directory.getName().equals(search)) {
return file; return directory;
} }
} }
return null; return null;

View File

@ -27,12 +27,13 @@ import java.util.stream.Stream;
* @author idk * @author idk
* @since 0.0.1 * @since 0.0.1
*/ */
public class I2PFirefox extends I2PCommonBrowser { public class I2PFirefox extends I2PFirefoxProfileUnpacker {
private final String[] FIREFOX_SEARCH_PATHS = FIREFOX_FINDER(); private final String[] FIREFOX_SEARCH_PATHS = FIREFOX_FINDER();
private Process process = null; private Process process = null;
public static boolean usability = false; private String firefoxPath;
public boolean usability = false;
private static String baseMode() { private String baseMode() {
if (usability) if (usability)
return "usability"; return "usability";
return "base"; return "base";
@ -55,37 +56,37 @@ public class I2PFirefox extends I2PCommonBrowser {
} }
} }
public static void storeFirefoxDefaults() { public void storeFirefoxDefaults() {
List<String> list = new ArrayList<String>(); List<String> list = new ArrayList<String>();
list = Arrays.asList(firefoxPathsWindows()); list = Arrays.asList(firefoxPathsWindows());
prop.setProperty("firefox.paths.windows", getProperties().setProperty("firefox.paths.windows",
list.stream().collect(Collectors.joining(","))); list.stream().collect(Collectors.joining(",")));
list = Arrays.asList(firefoxPathsUnix()); list = Arrays.asList(firefoxPathsUnix());
prop.setProperty("firefox.paths.linux", getProperties().setProperty("firefox.paths.linux",
list.stream().collect(Collectors.joining(","))); list.stream().collect(Collectors.joining(",")));
list = Arrays.asList(firefoxPathsOSX()); list = Arrays.asList(firefoxPathsOSX());
prop.setProperty("firefox.paths.osx", getProperties().setProperty("firefox.paths.osx",
list.stream().collect(Collectors.joining(","))); list.stream().collect(Collectors.joining(",")));
list = Arrays.asList(firefoxBinsWindows()); list = Arrays.asList(firefoxBinsWindows());
prop.setProperty("firefox.bins.windows", getProperties().setProperty("firefox.bins.windows",
list.stream().collect(Collectors.joining(","))); list.stream().collect(Collectors.joining(",")));
list = Arrays.asList(firefoxBinsUnix()); list = Arrays.asList(firefoxBinsUnix());
prop.setProperty("firefox.bins.linux", getProperties().setProperty("firefox.bins.linux",
list.stream().collect(Collectors.joining(","))); list.stream().collect(Collectors.joining(",")));
list = Arrays.asList(firefoxBinsUnix()); list = Arrays.asList(firefoxBinsUnix());
prop.setProperty("firefox.bins.osx", getProperties().setProperty("firefox.bins.osx",
list.stream().collect(Collectors.joining(","))); list.stream().collect(Collectors.joining(",")));
try (OutputStream fos = new FileOutputStream( try (OutputStream fos = new FileOutputStream(
new File(runtimeDirectory(""), "browser.config"))) { new File(runtimeDirectory(""), "browser.config"))) {
prop.store(fos, "Firefox Configuration Section"); getProperties().store(fos, "Firefox Configuration Section");
} catch (IOException ioe) { } catch (IOException ioe) {
logger.warning(ioe.toString()); logger.warning(ioe.toString());
} }
} }
public static String[] firefoxPathsUnix() { public String[] firefoxPathsUnix() {
String firefoxPathsProp = prop.getProperty("firefox.paths.unix"); String firefoxPathsProp = getProperties().getProperty("firefox.paths.unix");
if (firefoxPathsProp != null) if (firefoxPathsProp != null)
if (!firefoxPathsProp.equals("")) if (!firefoxPathsProp.equals(""))
return firefoxPathsProp.split(","); return firefoxPathsProp.split(",");
@ -93,15 +94,15 @@ public class I2PFirefox extends I2PCommonBrowser {
"/snap/bin"}; "/snap/bin"};
} }
public static String[] firefoxBinsUnix() { public String[] firefoxBinsUnix() {
String firefoxPathsProp; String firefoxPathsProp;
if (isOSX()) { if (isOSX()) {
firefoxPathsProp = prop.getProperty("firefox.bins.osx"); firefoxPathsProp = getProperties().getProperty("firefox.bins.osx");
if (firefoxPathsProp != null) if (firefoxPathsProp != null)
if (!firefoxPathsProp.equals("")) if (!firefoxPathsProp.equals(""))
return firefoxPathsProp.split(","); return firefoxPathsProp.split(",");
} }
firefoxPathsProp = prop.getProperty("firefox.bins.unix"); firefoxPathsProp = getProperties().getProperty("firefox.bins.unix");
if (firefoxPathsProp != null) if (firefoxPathsProp != null)
if (!firefoxPathsProp.equals("")) if (!firefoxPathsProp.equals(""))
return firefoxPathsProp.split(","); return firefoxPathsProp.split(",");
@ -110,7 +111,7 @@ public class I2PFirefox extends I2PCommonBrowser {
"waterfox", "waterfox-bin", "librewolf"}; "waterfox", "waterfox-bin", "librewolf"};
} }
private static String[] FIND_FIREFOX_SEARCH_PATHS_UNIX() { private String[] FIND_FIREFOX_SEARCH_PATHS_UNIX() {
String[] path = firefoxPathsUnix(); String[] path = firefoxPathsUnix();
String[] exes = firefoxBinsUnix(); String[] exes = firefoxBinsUnix();
String[] exePath = new String[path.length * exes.length]; String[] exePath = new String[path.length * exes.length];
@ -123,8 +124,8 @@ public class I2PFirefox extends I2PCommonBrowser {
} }
return exePath; return exePath;
} }
public static String[] firefoxPathsOSX() { public String[] firefoxPathsOSX() {
String firefoxPathsProp = prop.getProperty("firefox.paths.osx"); String firefoxPathsProp = getProperties().getProperty("firefox.paths.osx");
if (firefoxPathsProp != null) if (firefoxPathsProp != null)
if (!firefoxPathsProp.equals("")) if (!firefoxPathsProp.equals(""))
return firefoxPathsProp.split(","); return firefoxPathsProp.split(",");
@ -133,7 +134,7 @@ public class I2PFirefox extends I2PCommonBrowser {
"/Applications/Waterfox.app/Contents/MacOS", "/Applications/Waterfox.app/Contents/MacOS",
"/Applications/Librewolf.app/Contents/MacOS"}; "/Applications/Librewolf.app/Contents/MacOS"};
} }
private static 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();
String[] exePath = new String[path.length * exes.length]; String[] exePath = new String[path.length * exes.length];
@ -146,8 +147,9 @@ public class I2PFirefox extends I2PCommonBrowser {
} }
return exePath; return exePath;
} }
public static String[] firefoxPathsWindows() { public String[] firefoxPathsWindows() {
String firefoxPathsProp = prop.getProperty("firefox.paths.windows"); String firefoxPathsProp =
getProperties().getProperty("firefox.paths.windows");
if (firefoxPathsProp != null) if (firefoxPathsProp != null)
if (!firefoxPathsProp.equals("")) if (!firefoxPathsProp.equals(""))
return firefoxPathsProp.split(","); return firefoxPathsProp.split(",");
@ -179,8 +181,9 @@ public class I2PFirefox extends I2PCommonBrowser {
new File(programFiles, "Librewolf/").toString(), new File(programFiles, "Librewolf/").toString(),
}; };
} }
private static String[] firefoxBinsWindows() { private String[] firefoxBinsWindows() {
String firefoxPathsProp = prop.getProperty("firefox.bins.windows"); String firefoxPathsProp =
getProperties().getProperty("firefox.bins.windows");
if (firefoxPathsProp != null) if (firefoxPathsProp != null)
if (!firefoxPathsProp.equals("")) if (!firefoxPathsProp.equals(""))
return firefoxPathsProp.split(","); return firefoxPathsProp.split(",");
@ -189,7 +192,7 @@ public class I2PFirefox extends I2PCommonBrowser {
"waterfox.exe", "waterfox-bin.exe", "librewolf.exe", "waterfox.exe", "waterfox-bin.exe", "librewolf.exe",
}; };
} }
private static 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();
String[] exePath = new String[path.length * exes.length]; String[] exePath = new String[path.length * exes.length];
@ -203,7 +206,7 @@ public class I2PFirefox extends I2PCommonBrowser {
return exePath; return exePath;
} }
private static String[] FIND_ALL_FIREFOX_SEARCH_PATHS() { private String[] FIND_ALL_FIREFOX_SEARCH_PATHS() {
String[] Unix = FIND_FIREFOX_SEARCH_PATHS_UNIX(); String[] Unix = FIND_FIREFOX_SEARCH_PATHS_UNIX();
String[] Windows = FIND_FIREFOX_SEARCH_PATHS_WINDOWS(); String[] Windows = FIND_FIREFOX_SEARCH_PATHS_WINDOWS();
String[] Mac = FIND_FIREFOX_SEARCH_PATHS_OSX(); String[] Mac = FIND_FIREFOX_SEARCH_PATHS_OSX();
@ -223,7 +226,7 @@ public class I2PFirefox extends I2PCommonBrowser {
} }
return exePath; return exePath;
} }
private static String[] FIND_FIREFOX_SEARCH_PATHS() { private String[] FIND_FIREFOX_SEARCH_PATHS() {
switch (getOperatingSystem()) { switch (getOperatingSystem()) {
case "Windows": case "Windows":
return FIND_FIREFOX_SEARCH_PATHS_WINDOWS(); return FIND_FIREFOX_SEARCH_PATHS_WINDOWS();
@ -238,8 +241,10 @@ public class I2PFirefox extends I2PCommonBrowser {
} }
} }
private static String[] NEARBY_FIREFOX_SEARCH_PATHS() { private String[] NEARBY_FIREFOX_SEARCH_PATHS() {
// obtain the PLUGIN environment variable // obtain the PLUGIN environment variable
// crashreporterFolder := utl.CreateFolder(app.DataPath, "crashreporter")
// pluginsFolder := utl.CreateFolder(app.DataPath, "plugins")
String plugin = System.getenv("PLUGIN"); String plugin = System.getenv("PLUGIN");
if (plugin != null && !plugin.isEmpty()) { if (plugin != null && !plugin.isEmpty()) {
File userDir = new File(plugin); File userDir = new File(plugin);
@ -332,7 +337,7 @@ public class I2PFirefox extends I2PCommonBrowser {
return new String[] {}; return new String[] {};
} }
private static 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();
@ -375,6 +380,9 @@ public class I2PFirefox extends I2PCommonBrowser {
* @since 0.0.1 * @since 0.0.1
*/ */
public String topFirefox() { public String topFirefox() {
if (firefoxPath != null) {
return firefoxPath;
}
// get the FIREFOX environment variable // get the FIREFOX environment variable
String firefox = System.getenv("FIREFOX"); String firefox = System.getenv("FIREFOX");
// if it is not null and not empty // if it is not null and not empty
@ -383,11 +391,13 @@ public class I2PFirefox extends I2PCommonBrowser {
File firefoxFile = new File(firefox); File firefoxFile = new File(firefox);
if (firefoxFile.exists()) { if (firefoxFile.exists()) {
// if it does, return it // if it does, return it
firefoxPath = firefox;
return firefox; return firefox;
} }
} }
String[] firefoxes = onlyValidFirefoxes(); String[] firefoxes = onlyValidFirefoxes();
if (firefoxes.length > 0) { if (firefoxes.length > 0) {
firefoxPath = firefoxes[0];
return firefoxes[0]; return firefoxes[0];
} else { } else {
return ""; return "";
@ -556,7 +566,7 @@ public class I2PFirefox extends I2PCommonBrowser {
newArgs[0] = firefox; newArgs[0] = firefox;
newArgs[1] = "--new-instance"; newArgs[1] = "--new-instance";
newArgs[2] = "--profile"; newArgs[2] = "--profile";
newArgs[3] = I2PFirefoxProfileBuilder.profileDirectory(app, baseMode()); newArgs[3] = this.profileDirectory(app, baseMode());
if (args != null) { if (args != null) {
if (arglength > 0) { if (arglength > 0) {
for (int i = 0; i < arglength; i++) { for (int i = 0; i < arglength; i++) {
@ -593,20 +603,86 @@ public class I2PFirefox extends I2PCommonBrowser {
if (!bashScript.canExecute()) { if (!bashScript.canExecute()) {
bashScript.setExecutable(true); bashScript.setExecutable(true);
} }
return new ProcessBuilder(bashScript.getAbsolutePath()) ProcessBuilder pb = new ProcessBuilder(bashScript.getAbsolutePath());
.directory(I2PFirefoxProfileBuilder.runtimeDirectory(true)); File rtd = this.runtimeDirectory(true);
pb.directory(rtd);
String crashreporterFolder =
new File(rtd.getAbsolutePath(), "crashreporter").toString();
String pluginsFolder =
new File(rtd.getAbsolutePath(), "plugins").toString();
pb.environment().put("HOME", rtd.getAbsolutePath());
pb.environment().put("MOZ_CRASHREPORTER", "0");
pb.environment().put("MOZ_CRASHREPORTER_DATA_DIRECTORY",
crashreporterFolder);
pb.environment().put("MOZ_CRASHREPORTER_DISABLE", "1");
pb.environment().put("MOZ_CRASHREPORTER_NO_REPORT", "1");
pb.environment().put("MOZ_DATA_REPORTING", "0");
pb.environment().put("MOZ_MAINTENANCE_SERVICE", "0");
pb.environment().put("MOZ_PLUGIN_PATH", pluginsFolder);
pb.environment().put("MOZ_UPDATER", "0");
pb.environment().put("TB_CUSTOM_HOMEPAGE", newArgs[4]);
pb.environment().put("TOR_FORCE_NET_CONFIG", "0");
pb.environment().put("TOR_SKIP_LAUNCH", "1");
pb.environment().put("TOR_SKIP_CONTROLPORTTEST", "1");
pb.environment().put("TOR_NONTOR_PROXY", "1");
return pb;
} catch (IOException e) { } catch (IOException e) {
logger.warning(e.toString()); logger.warning(e.toString());
} }
return null; return null;
} else { } else {
return new ProcessBuilder(newArgs).directory( ProcessBuilder pb = new ProcessBuilder(newArgs);
I2PFirefoxProfileBuilder.runtimeDirectory(true)); File rtd = this.runtimeDirectory(true);
pb.directory(rtd);
String crashreporterFolder =
new File(rtd.getAbsolutePath(), "crashreporter").toString();
String pluginsFolder =
new File(rtd.getAbsolutePath(), "crashreporter").toString();
pb.environment().put("HOME", rtd.getAbsolutePath());
pb.environment().put("MOZ_CRASHREPORTER", "0");
pb.environment().put("MOZ_CRASHREPORTER_DATA_DIRECTORY",
crashreporterFolder);
pb.environment().put("MOZ_CRASHREPORTER_DISABLE", "1");
pb.environment().put("MOZ_CRASHREPORTER_NO_REPORT", "1");
pb.environment().put("MOZ_DATA_REPORTING", "0");
pb.environment().put("MOZ_MAINTENANCE_SERVICE", "0");
pb.environment().put("MOZ_PLUGIN_PATH", pluginsFolder);
pb.environment().put("MOZ_UPDATER", "0");
if (args.length > 4)
pb.environment().put("TB_CUSTOM_HOMEPAGE", args[4]);
pb.environment().put("TOR_FORCE_NET_CONFIG", "0");
pb.environment().put("TOR_SKIP_LAUNCH", "1");
pb.environment().put("TOR_SKIP_CONTROLPORTTEST", "1");
pb.environment().put("TOR_NONTOR_PROXY", "1");
return pb;
} }
} // else { } // else {
logger.info("No Firefox found."); logger.info("No Firefox found.");
return new ProcessBuilder(args); ProcessBuilder pb = new ProcessBuilder(args);
File rtd = this.runtimeDirectory(true);
pb.directory(rtd);
String crashreporterFolder =
new File(rtd.getAbsolutePath(), "crashreporter").toString();
String pluginsFolder =
new File(rtd.getAbsolutePath(), "crashreporter").toString();
pb.environment().put("HOME", rtd.getAbsolutePath());
pb.environment().put("MOZ_CRASHREPORTER", "0");
pb.environment().put("MOZ_CRASHREPORTER_DATA_DIRECTORY",
crashreporterFolder);
pb.environment().put("MOZ_CRASHREPORTER_DISABLE", "1");
pb.environment().put("MOZ_CRASHREPORTER_NO_REPORT", "1");
pb.environment().put("MOZ_DATA_REPORTING", "0");
pb.environment().put("MOZ_MAINTENANCE_SERVICE", "0");
pb.environment().put("MOZ_PLUGIN_PATH", pluginsFolder);
pb.environment().put("MOZ_UPDATER", "0");
if (args.length > 4)
pb.environment().put("TB_CUSTOM_HOMEPAGE", args[4]);
pb.environment().put("TOR_FORCE_NET_CONFIG", "0");
pb.environment().put("TOR_SKIP_LAUNCH", "1");
pb.environment().put("TOR_SKIP_CONTROLPORTTEST", "1");
pb.environment().put("TOR_NONTOR_PROXY", "1");
return pb;
//} //}
// return null; // return null;
} }
@ -624,20 +700,18 @@ public class I2PFirefox extends I2PCommonBrowser {
return launchAndDetatch(privateWindowInt, url); return launchAndDetatch(privateWindowInt, url);
} }
public Process launchAndDetatch(int privateWindow, String[] url) { public Process launchAndDetatch(int privateWindow, String[] url) {
validateUserDir(); validateUserDirectory();
boolean app = false; boolean app = false;
if (privateWindow == 2) if (privateWindow == 2)
app = true; app = true;
if (waitForProxy()) { if (waitForProxy()) {
String profileDirectory = String profileDirectory = this.profileDirectory(app, baseMode());
I2PFirefoxProfileBuilder.profileDirectory(app, baseMode()); if (this.validateProfileDirectory(profileDirectory)) {
if (I2PFirefoxProfileChecker.validateProfileDirectory(profileDirectory)) {
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 (!I2PFirefoxProfileBuilder.copyBaseProfiletoProfile(usabilityMode(), if (!this.copyBaseProfiletoProfile(usabilityMode(), app)) {
app)) {
logger.info("Failed to rebuild profile directory: " + logger.info("Failed to rebuild profile directory: " +
profileDirectory); profileDirectory);
return null; return null;
@ -761,7 +835,26 @@ public class I2PFirefox extends I2PCommonBrowser {
*/ */
public void launch() { launch(false); } public void launch() { launch(false); }
private static String ValidURL(String inUrl) { /**
* Stop all running processes managed by the browser manager.
*
* @return true if successful, false if not
*/
public boolean stop() {
if (process != null) {
process.destroy();
return true;
}
return false;
}
public boolean running() {
if (process != null)
return process.isAlive();
return false;
}
private String ValidURL(String inUrl) {
String[] schemes = {"http", "https"}; String[] schemes = {"http", "https"};
for (String scheme : schemes) { for (String scheme : schemes) {
if (inUrl.startsWith(scheme)) { if (inUrl.startsWith(scheme)) {
@ -773,34 +866,34 @@ public class I2PFirefox extends I2PCommonBrowser {
} }
public static void main(String[] args) { public static void main(String[] args) {
validateUserDir();
int privateBrowsing = 0; int privateBrowsing = 0;
logger.info("checking for private browsing");
logger.info("I2PFirefox");
I2PFirefox i2pFirefox = new I2PFirefox(); I2PFirefox i2pFirefox = new I2PFirefox();
i2pFirefox.validateUserDirectory();
i2pFirefox.logger.info("checking for private browsing");
i2pFirefox.logger.info("I2PFirefox");
ArrayList<String> visitURL = new ArrayList<String>(); ArrayList<String> visitURL = new ArrayList<String>();
if (args != null) { if (args != null) {
if (args.length > 0) { if (args.length > 0) {
for (String arg : args) { for (String arg : args) {
if (arg.equals("-private")) { if (arg.equals("-private")) {
privateBrowsing = 1; privateBrowsing = 1;
logger.info( i2pFirefox.logger.info(
"private browsing is true, profile will be discarded at end of session"); "private browsing is true, profile will be discarded at end of session");
} }
if (arg.equals("-usability")) { if (arg.equals("-usability")) {
usability = true; i2pFirefox.usability = true;
} }
if (arg.equals("-app")) { if (arg.equals("-app")) {
usability = true; i2pFirefox.usability = true;
privateBrowsing = 2; privateBrowsing = 2;
} }
if (arg.equals("-noproxycheck")) { if (arg.equals("-noproxycheck")) {
logger.info("zeroing out proxy check"); i2pFirefox.logger.info("zeroing out proxy check");
i2pFirefox.setProxyTimeoutTime(0); i2pFirefox.setProxyTimeoutTime(0);
} }
if (!arg.startsWith("-")) { if (!arg.startsWith("-")) {
// check if it's a URL // check if it's a URL
visitURL.add(ValidURL(arg)); visitURL.add(i2pFirefox.ValidURL(arg));
} }
} }
} }
@ -809,7 +902,7 @@ public class I2PFirefox extends I2PCommonBrowser {
visitURL.toArray(new String[visitURL.size()])); visitURL.toArray(new String[visitURL.size()]));
} }
/*private static void sleep(int millis) { /*private void sleep(int millis) {
try { try {
Thread.sleep(millis); Thread.sleep(millis);
} catch (InterruptedException bad) { } catch (InterruptedException bad) {

View File

@ -23,9 +23,9 @@ import java.nio.file.StandardCopyOption;
* @author idk * @author idk
* @since 0.0.1 * @since 0.0.1
*/ */
public class I2PFirefoxProfileBuilder extends I2PCommonBrowser { public class I2PFirefoxProfileBuilder extends I2PFirefoxProfileChecker {
private static boolean strict; private boolean strict;
private static 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";
@ -98,20 +98,11 @@ public class I2PFirefoxProfileBuilder extends I2PCommonBrowser {
* *
* @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 static 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) {
* get the profile directory, creating it if necessary
*
* @return the profile directory, or null if it could not be created
*/
public static String profileDirectory(boolean app, String base) {
return profileDirectory("I2P_FIREFOX_PROFILE", "firefox", base, app);
}
private static String baseProfileDir(String file, String base) {
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()) {
@ -131,7 +122,7 @@ public class I2PFirefoxProfileBuilder extends I2PCommonBrowser {
* *
* @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 static String baseProfileDirectory(String base) { public String baseProfileDirectory(String base) {
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);
@ -155,7 +146,7 @@ public class I2PFirefoxProfileBuilder extends I2PCommonBrowser {
* @return the runtime directory, or null if it could not be created * @return the runtime directory, or null if it could not be created
* @since 0.0.1 * @since 0.0.1
*/ */
public static File runtimeDirectory(boolean create) { public File runtimeDirectory(boolean create) {
String rtd = runtimeDirectory(); String rtd = runtimeDirectory();
return runtimeDirectory(create, rtd); return runtimeDirectory(create, rtd);
} }
@ -166,7 +157,7 @@ public class I2PFirefoxProfileBuilder extends I2PCommonBrowser {
* @return the runtime directory, or null if it could not be created or found * @return the runtime directory, or null if it could not be created or found
* @since 0.0.1 * @since 0.0.1
*/ */
public static String runtimeDirectory() { public String runtimeDirectory() {
// get the I2P_FIREFOX_DIR environment variable // get the I2P_FIREFOX_DIR environment variable
String rtd = System.getenv("I2P_FIREFOX_DIR"); String rtd = System.getenv("I2P_FIREFOX_DIR");
// if it is not null and not empty // if it is not null and not empty
@ -186,7 +177,7 @@ public class I2PFirefoxProfileBuilder extends I2PCommonBrowser {
* *
* @since 0.0.1 * @since 0.0.1
*/ */
public static boolean copyBaseProfiletoProfile(String base, boolean app) { public boolean copyBaseProfiletoProfile(String base, boolean app) {
String baseProfile = baseProfileDirectory(base); String baseProfile = baseProfileDirectory(base);
String profile = profileDirectory(app, base); String profile = profileDirectory(app, base);
logger.info("Copying base profile to profile directory: " + baseProfile + logger.info("Copying base profile to profile directory: " + baseProfile +
@ -219,7 +210,7 @@ public class I2PFirefoxProfileBuilder extends I2PCommonBrowser {
return copyStrictOptions(base, app); return copyStrictOptions(base, app);
} }
protected static boolean writeAppChrome(String profile) { protected boolean writeAppChrome(String profile) {
File dir = new File(profile, "chrome"); File dir = new File(profile, "chrome");
if (!dir.exists()) if (!dir.exists())
dir.mkdirs(); dir.mkdirs();
@ -232,7 +223,7 @@ public class I2PFirefoxProfileBuilder extends I2PCommonBrowser {
} }
return true; return true;
} }
protected static 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())
return true; return true;
@ -247,7 +238,7 @@ public class I2PFirefoxProfileBuilder extends I2PCommonBrowser {
* @return true if successful, false otherwise * @return true if successful, false otherwise
* @since 0.0.1 * @since 0.0.1
*/ */
public static boolean copyStrictOptions(String base, boolean app) { public boolean copyStrictOptions(String base, boolean app) {
logger.info("Checking strict options"); logger.info("Checking strict options");
String baseProfile = baseProfileDirectory(base); String baseProfile = baseProfileDirectory(base);
String profile = profileDirectory(app, base); String profile = profileDirectory(app, base);
@ -282,21 +273,21 @@ public class I2PFirefoxProfileBuilder extends I2PCommonBrowser {
return true; return true;
} }
public static void setupUserChrome(File profileDir, boolean app) { public void setupUserChrome(File profileDir, boolean app) {
File workingUserOverrides = new File(profileDir, "user-overrides.js"); File workingUserOverrides = new File(profileDir, "user-overrides.js");
logger.info(workingUserOverrides.getAbsolutePath()); logger.info(workingUserOverrides.getAbsolutePath());
if (workingUserOverrides.exists()) { if (workingUserOverrides.exists()) {
logger.info("Checking app mode settings"); logger.info("Checking app mode settings");
if (app) { if (app) {
logger.info("Setting profile to app mode"); logger.info("Setting profile to app mode");
I2PFirefoxProfileChecker.undoValue( this.undoValue(
"toolkit.legacyUserProfileCustomizations.stylesheets\", false", "toolkit.legacyUserProfileCustomizations.stylesheets\", false",
"toolkit.legacyUserProfileCustomizations.stylesheets\", true", "toolkit.legacyUserProfileCustomizations.stylesheets\", true",
workingUserOverrides); workingUserOverrides);
writeAppChrome(profileDir.toString()); writeAppChrome(profileDir.toString());
} else { } else {
logger.info("Taking profile out of app mode"); logger.info("Taking profile out of app mode");
I2PFirefoxProfileChecker.undoValue( this.undoValue(
"toolkit.legacyUserProfileCustomizations.stylesheets\", true", "toolkit.legacyUserProfileCustomizations.stylesheets\", true",
"toolkit.legacyUserProfileCustomizations.stylesheets\", false", "toolkit.legacyUserProfileCustomizations.stylesheets\", false",
workingUserOverrides); workingUserOverrides);
@ -310,14 +301,14 @@ public class I2PFirefoxProfileBuilder extends I2PCommonBrowser {
logger.info("Checking app mode settings"); logger.info("Checking app mode settings");
if (app) { if (app) {
logger.info("Setting profile to app mode"); logger.info("Setting profile to app mode");
I2PFirefoxProfileChecker.undoValue( this.undoValue(
"toolkit.legacyUserProfileCustomizations.stylesheets\", false", "toolkit.legacyUserProfileCustomizations.stylesheets\", false",
"toolkit.legacyUserProfileCustomizations.stylesheets\", true", "toolkit.legacyUserProfileCustomizations.stylesheets\", true",
workingPrefOverrides); workingPrefOverrides);
writeAppChrome(profileDir.toString()); writeAppChrome(profileDir.toString());
} else { } else {
logger.info("Taking profile out of app mode"); logger.info("Taking profile out of app mode");
I2PFirefoxProfileChecker.undoValue( this.undoValue(
"toolkit.legacyUserProfileCustomizations.stylesheets\", true", "toolkit.legacyUserProfileCustomizations.stylesheets\", true",
"toolkit.legacyUserProfileCustomizations.stylesheets\", false", "toolkit.legacyUserProfileCustomizations.stylesheets\", false",
workingPrefOverrides); workingPrefOverrides);
@ -331,7 +322,7 @@ public class I2PFirefoxProfileBuilder extends I2PCommonBrowser {
* *
* @since 0.0.1 * @since 0.0.1
*/ */
public I2PFirefoxProfileBuilder() { I2PFirefoxProfileBuilder.strict = false; } public I2PFirefoxProfileBuilder() { this.strict = false; }
/** /**
* Construct a new Profile Builder * Construct a new Profile Builder
@ -339,7 +330,5 @@ public class I2PFirefoxProfileBuilder extends I2PCommonBrowser {
* *
* @since 0.0.1 * @since 0.0.1
*/ */
public I2PFirefoxProfileBuilder(boolean strict) { public I2PFirefoxProfileBuilder(boolean strict) { this.strict = strict; }
I2PFirefoxProfileBuilder.strict = strict;
}
} }

View File

@ -27,23 +27,36 @@ import java.util.Scanner;
public class I2PFirefoxProfileChecker extends I2PCommonBrowser { public class I2PFirefoxProfileChecker extends I2PCommonBrowser {
/** /**
* @param args unused * The main method for executing the Java program.
*
* @param args the command line arguments
*/ */
public static void main(String[] args) { public static void main(String[] args) {
String profileDirectory = I2PFirefoxProfileChecker profileChecker = new I2PFirefoxProfileChecker();
I2PFirefoxProfileBuilder.profileDirectory(false, "base"); String profileDirectory = profileChecker.profileDirectory(false, "base");
if (profileDirectory == null) { if (profileDirectory == null) {
logger.info("No profile directory found"); profileChecker.logger.info("No profile directory found");
return; return;
} }
logger.info("Profile directory: " + profileDirectory); profileChecker.logger.info("Profile directory: " + profileDirectory);
boolean ok = validateProfileDirectory(profileDirectory); boolean isProfileValid =
if (ok) { profileChecker.validateProfileDirectory(profileDirectory);
logger.info("Profile directory is valid"); if (isProfileValid) {
profileChecker.logger.info("Profile directory is valid");
} else { } else {
logger.info("Profile directory is invalid"); profileChecker.logger.info("Profile directory is invalid");
} }
} }
/**
* get the profile directory, creating it if necessary
*
* @return the profile directory, or null if it could not be created
*/
public String profileDirectory(boolean app, String base) {
return profileDirectory("I2P_FIREFOX_PROFILE", "firefox", base, app);
}
/** /**
* Return true if the profile directory is valid. * Return true if the profile directory is valid.
* *
@ -51,82 +64,80 @@ public class I2PFirefoxProfileChecker extends I2PCommonBrowser {
* @return true if the profile directory is valid, false otherwise * @return true if the profile directory is valid, false otherwise
* @since 0.0.1 * @since 0.0.1
*/ */
public static boolean validateProfileDirectory(String profileDirectory) { public boolean validateProfileDirectory(String profileDirectory) {
File profileDir = new File(profileDirectory); File profileDir = new File(profileDirectory);
if (!profileDir.exists()) { if (!profileDir.exists() || !profileDir.isDirectory() ||
logger.info("Profile directory does not exist"); !profileDir.canRead() || !profileDir.canWrite()) {
return false;
}
if (!profileDir.isDirectory()) {
logger.info("Profile directory is not a directory");
return false;
}
if (!profileDir.canRead()) {
logger.info("Profile directory is not readable");
return false;
}
if (!profileDir.canWrite()) {
logger.info("Profile directory is not writable");
return false; return false;
} }
if (!validateFile(profileDir + "/prefs.js")) { if (!validateFile(profileDir + "/prefs.js")) {
logger.info("prefs.js is not valid");
return false; return false;
} }
if (!validateFile(profileDir + "/user.js")) { if (!validateFile(profileDir + "/user.js")) {
logger.info("user.js is not valid");
return false; return false;
} }
if (!validateExtensionDirectory(profileDir + "/extensions")) { if (!validateExtensionDirectory(profileDir + "/extensions")) {
logger.info("extensions directory is invalid");
return false; return false;
} }
return deRestrictHTTPSAndSetupHomepage(profileDir.toString()); return deRestrictHTTPSAndSetupHomepage(profileDir.toString());
} }
private static boolean deRestrictHTTPSAndSetupHomepage(String profile) { /**
// String profile = profileDirectory(); * Verify essential values in prefs.js, user.js, and user-overrides.js
*
* @param profile profile
* @return true if successful
*/
private boolean deRestrictHTTPSAndSetupHomepage(String profile) {
File profileDir = new File(profile); File profileDir = new File(profile);
if (profileDir.exists()) { if (profileDir.exists()) {
File prefOverrides = new File(profile, "prefs.js"); cleanUpFile(new File(profile, "prefs.js"));
if (prefOverrides.exists()) { cleanUpFile(new File(profile, "user.js"));
undoHttpsOnlyMode(prefOverrides); cleanUpFile(new File(profile, "user-overrides.js"));
undoHomepage(prefOverrides); return true;
}
File userSettings = new File(profile, "user.js");
if (userSettings.exists()) {
undoHttpsOnlyMode(userSettings);
undoHomepage(userSettings);
}
File userOverrides = new File(profile, "user-overrides.js");
if (userOverrides.exists()) {
undoHttpsOnlyMode(userOverrides);
undoHomepage(userOverrides);
}
} }
return false; return false;
} }
private static boolean undoHttpsOnlyMode(File fileToBeModified) { /**
* Cleans up a file by undoing specific modifications if the file exists.
*
* @param file the file to be cleaned up
*/
private void cleanUpFile(File file) {
if (file.exists()) {
undoHttpsOnlyMode(file);
undoHomepage(file);
}
}
/**
* Undo the HTTPS-only mode by modifying a file.
*
* @param fileToBeModified the file to be modified
* @return true if the undo operation is successful, false otherwise
*/
private boolean undoHttpsOnlyMode(File fileToBeModified) {
String oldString = "\"dom.security.https_only_mode\", true"; String oldString = "\"dom.security.https_only_mode\", true";
String newString = "\"dom.security.https_only_mode\", false"; String newString = "\"dom.security.https_only_mode\", false";
return undoValue(oldString, newString, fileToBeModified); return undoValue(oldString, newString, fileToBeModified);
} }
private static boolean undoHomepage(File fileToBeModified) { /**
String oldString = "\"browser.startup.homepage\", true"; * Undo the modification of the homepage in a file.
File file = new File("Student.txt"); *
String newString = * @param fileToBeModified the file to be modified
* @return true if the modification was successful, otherwise false
*/
private boolean undoHomepage(File fileToBeModified) {
String oldStringToFind = "\"browser.startup.homepage\", true";
String newStringToReplace =
"\"browser.startup.homepage\", \"http://127.0.0.1:7657\""; "\"browser.startup.homepage\", \"http://127.0.0.1:7657\"";
try { try (Scanner scanner = new Scanner(fileToBeModified)) {
try (Scanner scanner = new Scanner(file)) {
// now read the file line by line...
while (scanner.hasNextLine()) { while (scanner.hasNextLine()) {
String line = scanner.nextLine(); String line = scanner.nextLine();
if (line.contains("browser.startup.homepage")) { if (line.contains(oldStringToFind)) {
oldString = line.toString(); return undoValue(line, newStringToReplace, fileToBeModified);
return undoValue(oldString, newString, fileToBeModified);
}
} }
} }
} catch (FileNotFoundException e) { } catch (FileNotFoundException e) {
@ -135,7 +146,16 @@ public class I2PFirefoxProfileChecker extends I2PCommonBrowser {
return true; return true;
} }
public static boolean undoValue(String oldString, String newString, /**
* Undo the value by replacing the occurrences of the old string with the new
* string in the given file.
*
* @param oldString the string to be replaced
* @param newString the string to replace the old string with
* @param fileToBeModified the file to be modified
* @return true if the value was successfully undone, false otherwise
*/
public boolean undoValue(String oldString, String newString,
File fileToBeModified) { File fileToBeModified) {
String oldContent = ""; String oldContent = "";
BufferedReader reader = null; BufferedReader reader = null;
@ -163,58 +183,38 @@ public class I2PFirefoxProfileChecker extends I2PCommonBrowser {
} }
return false; return false;
} }
/** /**
* Return true if the file is valid. * Return true if the file is valid.
* *
* @param file the file to check * @param filePath the path of the file to check
* @return true if the file is valid, false otherwise * @return true if the file is valid, false otherwise
* @since 0.0.1 * @since 0.0.1
*/ */
public static boolean validateFile(String file) { public boolean validateFile(String filePath) {
File f = new File(file); File file = new File(filePath);
if (!f.exists()) { if (!file.exists() || !file.isFile() || !file.canRead() ||
logger.info("User JavaScript file does not exist"); !file.canWrite()) {
return false;
}
if (!f.isFile()) {
logger.info("User JavaScript file is not a file");
return false;
}
if (!f.canRead()) {
logger.info("User JavaScript file is not readable");
return false;
}
if (!f.canWrite()) {
logger.info("User JavaScript file is not writable");
return false; return false;
} }
return true; return true;
} }
/** /**
* Return true if the extension directory is valid. * Validates the extension directory.
* *
* @param extensionDirectory the extension directory to check * @param extensionDirectory the extension directory to validate
* @return true if the extension directory is valid, false otherwise * @return true if the extension directory is valid, false otherwise
* @since 0.0.1 * @since 0.0.1
*/ */
public static boolean validateExtensionDirectory(String extensionDirectory) { public boolean validateExtensionDirectory(String extensionDirectory) {
File extensionDir = new File(extensionDirectory); File extensionDir = new File(extensionDirectory);
if (!extensionDir.exists()) {
logger.info("Extension directory does not exist"); if (!extensionDir.exists() || !extensionDir.isDirectory() ||
return false; !extensionDir.canRead() || !extensionDir.canWrite()) {
}
if (!extensionDir.isDirectory()) {
logger.info("Extension directory is not a directory");
return false;
}
if (!extensionDir.canRead()) {
logger.info("Extension directory is not readable");
return false;
}
if (!extensionDir.canWrite()) {
logger.info("Extension directory is not writable");
return false; return false;
} }
return true; return true;
} }
} }

View File

@ -18,13 +18,13 @@ package net.i2p.i2pfirefox;
* @author idk * @author idk
* @since 0.0.1 * @since 0.0.1
*/ */
public class I2PFirefoxProfileUnpacker extends I2PCommonBrowser { public class I2PFirefoxProfileUnpacker extends I2PFirefoxProfileBuilder {
public static void main(String[] args) { public static void main(String[] args) {
String profileDirectory = I2PFirefoxProfileUnpacker up = new I2PFirefoxProfileUnpacker();
I2PFirefoxProfileBuilder.profileDirectory(false, "base"); String profileDirectory = up.profileDirectory(false, "base");
if (profileDirectory == null) { if (profileDirectory == null) {
logger.info("No profile directory found"); up.logger.info("No profile directory found");
return; return;
} }
} }

View File

@ -33,14 +33,14 @@ import java.util.stream.Collectors;
public class I2PGenericUnsafeBrowser extends I2PCommonBrowser { public class I2PGenericUnsafeBrowser extends I2PCommonBrowser {
private final int DEFAULT_TIMEOUT = 200; private final int DEFAULT_TIMEOUT = 200;
public static String BROWSER = ""; public String BROWSER = "";
private Process p = null; private Process p = null;
// Ideally, EVERY browser in this list should honor http_proxy, https_proxy, // Ideally, EVERY browser in this list should honor http_proxy, https_proxy,
// ftp_proxy and no_proxy. in practice, this is going to be hard to guarantee. // ftp_proxy and no_proxy. in practice, this is going to be hard to guarantee.
// For now, we're just assuming. So don't use this until I understand the // For now, we're just assuming. So don't use this until I understand the
// situation better, unless you think you know better. // situation better, unless you think you know better.
private static String[] browsers() { private String[] browsers() {
String genericPathsProp = prop.getProperty("generic.bins.unix"); String genericPathsProp = getProperties().getProperty("generic.bins.unix");
if (genericPathsProp != null) if (genericPathsProp != null)
return genericPathsProp.split(","); return genericPathsProp.split(",");
return new String[] { return new String[] {
@ -62,15 +62,15 @@ public class I2PGenericUnsafeBrowser extends I2PCommonBrowser {
"www-browser", "links", "lynx"}; "www-browser", "links", "lynx"};
} }
public static void storeGenericDefaults() { public void storeGenericDefaults() {
List<String> list = new ArrayList<String>(); List<String> list = new ArrayList<String>();
list = Arrays.asList(browsers()); list = Arrays.asList(browsers());
prop.setProperty("generic.bins.unix", getProperties().setProperty("generic.bins.unix",
list.stream().collect(Collectors.joining(","))); list.stream().collect(Collectors.joining(",")));
try (OutputStream fos = new FileOutputStream( try (OutputStream fos = new FileOutputStream(
new File(runtimeDirectory(""), "browser.config"))) { new File(runtimeDirectory(""), "browser.config"))) {
prop.store(fos, "Chromium Configuration Section"); getProperties().store(fos, "Chromium Configuration Section");
} catch (IOException ioe) { } catch (IOException ioe) {
logger.warning(ioe.toString()); logger.warning(ioe.toString());
} }
@ -98,7 +98,7 @@ public class I2PGenericUnsafeBrowser extends I2PCommonBrowser {
* for execution, or null if not found * for execution, or null if not found
* @since 2.0.0 * @since 2.0.0
*/ */
static public String getDefaultWindowsBrowser() { public String getDefaultWindowsBrowser() {
String defaultBrowser; String defaultBrowser;
String key; String key;
// User-Configured HTTPS Browser // User-Configured HTTPS Browser
@ -139,7 +139,7 @@ public class I2PGenericUnsafeBrowser extends I2PCommonBrowser {
* exist/is empty * exist/is empty
* @since 2.0.0 * @since 2.0.0
*/ */
private static String registryQuery(String hkeyquery, String key) { private String registryQuery(String hkeyquery, String key) {
try { try {
// Get registry where we find the default browser // Get registry where we find the default browser
String[] cmd = {"REG", "QUERY", hkeyquery}; String[] cmd = {"REG", "QUERY", hkeyquery};
@ -177,7 +177,7 @@ public class I2PGenericUnsafeBrowser extends I2PCommonBrowser {
* hkeyquery, or null * hkeyquery, or null
* @since 2.0.0 * @since 2.0.0
*/ */
private static String followUserConfiguredBrowserToCommand(String hkeyquery) { private String followUserConfiguredBrowserToCommand(String hkeyquery) {
String progIdValue = registryQuery(hkeyquery, "ProgId"); String progIdValue = registryQuery(hkeyquery, "ProgId");
return followProgIdToCommand(progIdValue); return followProgIdToCommand(progIdValue);
} }
@ -193,7 +193,7 @@ public class I2PGenericUnsafeBrowser extends I2PCommonBrowser {
* hkeyquery, or null * hkeyquery, or null
* @since 2.0.0 * @since 2.0.0
*/ */
private static String followProgIdToCommand(String progid) { private String followProgIdToCommand(String progid) {
String hkeyquery = String hkeyquery =
"HKEY_CLASSES_ROOT\\" + progid + "\\shell\\open\\command"; "HKEY_CLASSES_ROOT\\" + progid + "\\shell\\open\\command";
String finalValue = registryQuery(hkeyquery, "(Default)"); String finalValue = registryQuery(hkeyquery, "(Default)");
@ -212,7 +212,7 @@ public class I2PGenericUnsafeBrowser extends I2PCommonBrowser {
* exist/is empty * exist/is empty
* @since 2.0.0 * @since 2.0.0
*/ */
private static String getDefaultOutOfRegistry(String hkeyquery) { private String getDefaultOutOfRegistry(String hkeyquery) {
String defaultValue = registryQuery(hkeyquery, "(Default)"); String defaultValue = registryQuery(hkeyquery, "(Default)");
if (defaultValue != null) { if (defaultValue != null) {
if (!defaultValue.equals("")) if (!defaultValue.equals(""))
@ -227,7 +227,7 @@ public class I2PGenericUnsafeBrowser extends I2PCommonBrowser {
return null; return null;
} }
private static String scanAPath(String dir) { private String scanAPath(String dir) {
for (String browser : browsers()) { for (String browser : browsers()) {
File test = new File(dir, browser); File test = new File(dir, browser);
if (test.exists()) { if (test.exists()) {
@ -242,7 +242,7 @@ public class I2PGenericUnsafeBrowser extends I2PCommonBrowser {
* *
* @return * @return
*/ */
public static String getAnyUnixBrowser() { public String getAnyUnixBrowser() {
// read the PATH environment variable and split it by ":" // read the PATH environment variable and split it by ":"
String[] path = System.getenv("PATH").split(":"); String[] path = System.getenv("PATH").split(":");
if (path != null && path.length > 0) { if (path != null && path.length > 0) {
@ -261,7 +261,7 @@ public class I2PGenericUnsafeBrowser extends I2PCommonBrowser {
* *
* @return * @return
*/ */
public static String findUnsafeBrowserAnywhere() { public String findUnsafeBrowserAnywhere() {
if (BROWSER != "") { if (BROWSER != "") {
File f = new File(BROWSER); File f = new File(BROWSER);
if (f.exists()) if (f.exists())
@ -322,7 +322,7 @@ public class I2PGenericUnsafeBrowser extends I2PCommonBrowser {
* *
* @return true if successful, false if not * @return true if successful, false if not
*/ */
public static boolean deleteRuntimeDirectory() { public boolean deleteRuntimeDirectory() {
File rtd = runtimeDirectory(true); File rtd = runtimeDirectory(true);
if (rtd.exists()) { if (rtd.exists()) {
rtd.delete(); rtd.delete();
@ -338,7 +338,7 @@ public class I2PGenericUnsafeBrowser extends I2PCommonBrowser {
* @return the runtime directory, or null if it could not be created * @return the runtime directory, or null if it could not be created
* @since 0.0.18 * @since 0.0.18
*/ */
public static File runtimeDirectory(boolean create) { public File runtimeDirectory(boolean create) {
String rtd = runtimeDirectory(); String rtd = runtimeDirectory();
return runtimeDirectory(create, rtd); return runtimeDirectory(create, rtd);
} }
@ -350,7 +350,7 @@ public class I2PGenericUnsafeBrowser extends I2PCommonBrowser {
* found * found
* @since 0.0.18 * @since 0.0.18
*/ */
public static String runtimeDirectory() { public String runtimeDirectory() {
// get the I2P_BROWSER_DIR environment variable // get the I2P_BROWSER_DIR environment variable
String rtd = System.getenv("I2P_BROWSER_DIR"); String rtd = System.getenv("I2P_BROWSER_DIR");
// if it is not null and not empty // if it is not null and not empty
@ -366,7 +366,7 @@ public class I2PGenericUnsafeBrowser extends I2PCommonBrowser {
} }
public Process launchAndDetatch(boolean privateWindow, String[] url) { public Process launchAndDetatch(boolean privateWindow, String[] url) {
validateUserDir(); validateUserDirectory();
if (waitForProxy()) { if (waitForProxy()) {
ProcessBuilder pb; ProcessBuilder pb;
if (privateWindow) { if (privateWindow) {
@ -404,8 +404,26 @@ public class I2PGenericUnsafeBrowser extends I2PCommonBrowser {
} }
} }
} }
/**
* Stop all running processes managed by the browser manager.
*
* @return true if successful, false if not
*/
public boolean stop() {
if (p != null) {
p.destroy();
return true;
}
return false;
}
private static String ValidURL(String inUrl) { public boolean running() {
if (p != null)
return p.isAlive();
return false;
}
private String ValidURL(String inUrl) {
String[] schemes = {"http", "https"}; String[] schemes = {"http", "https"};
for (String scheme : schemes) { for (String scheme : schemes) {
if (inUrl.startsWith(scheme)) { if (inUrl.startsWith(scheme)) {
@ -416,29 +434,28 @@ public class I2PGenericUnsafeBrowser extends I2PCommonBrowser {
return ""; return "";
} }
//
public static void main(String[] args) { public static void main(String[] args) {
validateUserDir(); I2PGenericUnsafeBrowser i2pBrowser = new I2PGenericUnsafeBrowser();
i2pBrowser.validateUserDirectory();
boolean privateBrowsing = false; boolean privateBrowsing = false;
logger.info("checking for private browsing"); i2pBrowser.logger.info("checking for private browsing");
ArrayList<String> visitURL = new ArrayList<String>(); ArrayList<String> visitURL = new ArrayList<String>();
if (args != null) { if (args != null) {
if (args.length > 0) { if (args.length > 0) {
for (String arg : args) { for (String arg : args) {
if (arg.equals("-private")) { if (arg.equals("-private")) {
privateBrowsing = true; privateBrowsing = true;
logger.info( i2pBrowser.logger.info(
"private browsing is true, profile will be discarded at end of session"); "private browsing is true, profile will be discarded at end of session");
} }
if (!arg.startsWith("-")) { if (!arg.startsWith("-")) {
// check if it's a URL // check if it's a URL
visitURL.add(ValidURL(arg)); visitURL.add(i2pBrowser.ValidURL(arg));
} }
} }
} }
} }
logger.info("I2PGenericUnsafeBrowser"); i2pBrowser.logger.info("I2PGenericUnsafeBrowser");
I2PGenericUnsafeBrowser i2pBrowser = new I2PGenericUnsafeBrowser();
i2pBrowser.launch(privateBrowsing, i2pBrowser.launch(privateBrowsing,
visitURL.toArray(new String[visitURL.size()])); visitURL.toArray(new String[visitURL.size()]));
} }

View File

@ -1,4 +1,8 @@
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>
@ -16,5 +20,5 @@ package net.i2p.i2pfirefox;
* @since 1.0.6 * @since 1.0.6
*/ */
public class I2PLibreWolf { public class I2PLibreWolf {
// TODO: provide a librewolf updater here.
} }

View File

@ -6,7 +6,7 @@ import java.io.File;
public class I2PPureJavaBrowser extends I2PCommonBrowser { public class I2PPureJavaBrowser extends I2PCommonBrowser {
private final int DEFAULT_TIMEOUT = 200; private final int DEFAULT_TIMEOUT = 200;
public static String BROWSER = ""; public String BROWSER = "";
// //
public ProcessBuilder baseProcessBuilder(String[] args) { public ProcessBuilder baseProcessBuilder(String[] args) {
@ -18,7 +18,7 @@ public class I2PPureJavaBrowser extends I2PCommonBrowser {
* *
* @return true if successful, false if not * @return true if successful, false if not
*/ */
public static boolean deleteRuntimeDirectory() { public boolean deleteRuntimeDirectory() {
File rtd = runtimeDirectory(true); File rtd = runtimeDirectory(true);
if (rtd.exists()) { if (rtd.exists()) {
rtd.delete(); rtd.delete();
@ -34,7 +34,7 @@ public class I2PPureJavaBrowser extends I2PCommonBrowser {
* @return the runtime directory, or null if it could not be created * @return the runtime directory, or null if it could not be created
* @since 0.0.18 * @since 0.0.18
*/ */
public static File runtimeDirectory(boolean create) { public File runtimeDirectory(boolean create) {
String rtd = runtimeDirectory(); String rtd = runtimeDirectory();
return runtimeDirectory(create, rtd); return runtimeDirectory(create, rtd);
} }
@ -46,7 +46,7 @@ public class I2PPureJavaBrowser extends I2PCommonBrowser {
* found * found
* @since 0.0.18 * @since 0.0.18
*/ */
public static String runtimeDirectory() { public String runtimeDirectory() {
// get the I2P_BROWSER_DIR environment variable // get the I2P_BROWSER_DIR environment variable
String rtd = System.getenv("I2P_BROWSER_DIR"); String rtd = System.getenv("I2P_BROWSER_DIR");
// if it is not null and not empty // if it is not null and not empty

View File

@ -0,0 +1,216 @@
package net.i2p.i2pfirefox.plugin;
import java.awt.GraphicsEnvironment;
import java.io.File;
import net.i2p.I2PAppContext;
import net.i2p.app.ClientApp;
import net.i2p.app.ClientAppManager;
import net.i2p.app.ClientAppState;
import net.i2p.app.MenuCallback;
import net.i2p.app.MenuHandle;
import net.i2p.app.MenuService;
import net.i2p.desktopgui.ExternalMain;
import net.i2p.i2pfirefox.I2PBrowser;
import net.i2p.i2pfirefox.I2PFirefox;
import net.i2p.util.I2PAppThread;
import net.i2p.util.Log;
import net.i2p.util.SystemVersion;
/**
* I2PBrowserPlugin.java
* Copyright (C) 2022 idk <hankhill19580@gmail.com>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the MIT License. See LICENSE.md for details.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @description I2PBrowser is a class that is used to open a browser window to
* the I2P network. It automatically detects the operating system and available
* browsers, and selects the best one to use, with Tor Browser at the top for
* Firefox and Brave at the top for Chrome.
*
* @author idk
* @since 0.0.16
*/
public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
private final I2PAppContext _context;
private final Log _log;
private final ClientAppManager _mgr;
private final String _args[];
private static final String PROP_DTG_ENABLED = "desktopgui.enabled";
private final File pluginDir;
private final File profileDir;
private MenuHandle lmhs;
private MenuHandle lmhf;
public I2PBrowserPlugin() {
_context = new I2PAppContext();
_mgr = null;
_args = new String[] {};
_log = _context.logManager().getLog(I2PBrowserPlugin.class);
pluginDir = new File(_context.getAppDir(), "plugins/i2pfirefox/");
profileDir = new File(pluginDir, "profile/");
}
public I2PBrowserPlugin(I2PAppContext ctx, ClientAppManager mgr,
String args[]) {
_context = ctx;
_mgr = mgr;
_args = args;
_log = ctx.logManager().getLog(I2PBrowserPlugin.class);
pluginDir = new File(_context.getAppDir(), "plugins/i2pfirefox/");
profileDir = new File(pluginDir, "profile/");
}
public String getDisplayName() { return "I2P Browser"; }
public String getName() { return "I2P Browser"; }
public ClientAppState getState() { return ClientAppState.STOPPED; }
public void shutdown(String[] args) {
if (!isSystrayEnabled()) {
_log.info("I2P Browser tray manager not supported");
} else {
_log.info("I2P Browser tray manager shutting down");
MenuService dtg = startTrayApp();
try {
Thread.sleep(1000);
} catch (InterruptedException ie) {
}
if (dtg != null) {
dtg.removeMenu(lmhs);
dtg.removeMenu(lmhf);
}
}
changeState(ClientAppState.STOPPED);
}
public void startup() {
changeState(ClientAppState.STOPPED);
if (!isSystrayEnabled()) {
_log.info("I2P Browser tray manager not supported");
try {
I2PBrowser i2pBrowser = new I2PBrowser(profileDir.getAbsolutePath());
String[] args = {"http://proxy.i2p"};
i2pBrowser.launchFirefox(0, args);
} catch (Exception e) {
_log.error("Error starting I2P Browser", e);
}
} else {
try {
_log.info(
"Starting I2P Browser tray manager by testing http://proxy.i2p");
MenuService dtg = startTrayApp();
try {
Thread.sleep(1000);
} catch (InterruptedException ie) {
}
if (dtg != null) {
_log.info("I2P Browser integrating with I2P tray manager");
lmhs =
dtg.addMenu("Launch I2P Browser (Safe Mode)", new Starter(dtg));
dtg.showMenu(lmhs);
dtg.enableMenu(lmhs);
lmhf = dtg.addMenu("Launch I2P Browser (Flexible Mode)",
new FlexStarter(dtg));
dtg.showMenu(lmhf);
dtg.enableMenu(lmhf);
} else {
_log.info("I2P Browser tray manager not found");
}
I2PBrowser i2pBrowser = new I2PBrowser(profileDir.getAbsolutePath());
String[] args = {"http://proxy.i2p"};
i2pBrowser.launchFirefox(0, args);
} catch (Exception e) {
_log.error("Error starting I2P Browser tray manager", e);
}
}
}
// Copied directly from I2PSnark-standalone
private MenuService startTrayApp() {
try {
if (isSystrayEnabled()) {
System.setProperty("java.awt.headless", "false");
ExternalMain dtg =
new ExternalMain(_context, _context.clientAppManager(), null);
dtg.startup();
return dtg;
}
} catch (Throwable t) {
t.printStackTrace();
}
return null;
}
// Copied directly from I2PSnark-standalone where it is used to determine
// whether to launchFirefox the tray app Our environment should basically
// never be headless, that doesn't make any sense, but something tells me I
// should leave that check in.
private boolean isSystrayEnabled() {
if (GraphicsEnvironment.isHeadless())
return false;
// default false except on OSX and Windows,
// and on Linux KDE and LXDE.
// Xubuntu XFCE works but doesn't look very good
// Ubuntu Unity was far too buggy to enable
// Ubuntu GNOME does not work, SystemTray.isSupported() returns false
String xdg = System.getenv("XDG_CURRENT_DESKTOP");
boolean dflt = SystemVersion.isWindows() || SystemVersion.isMac() ||
//"XFCE".equals(xdg) ||
"KDE".equals(xdg) || "LXDE".equals(xdg);
return _context.getProperty(PROP_DTG_ENABLED, dflt);
}
/**
* Callback when Start I2PBrowser is clicked in systray
* @since 0.9.61
*/
public class Starter implements MenuCallback {
private final MenuService _ms;
public Starter(MenuService ms) { _ms = ms; }
public void clicked(MenuHandle menu) {
// Thread t = new I2PAppThread(new StarterThread(),
//"I2PBrowser-Launcher start", true);
// t.start();
_log.info("I2P Browser starting up");
try {
I2PBrowser i2pBrowser = new I2PBrowser(profileDir.getAbsolutePath());
String[] args = {"http://proxy.i2p"};
i2pBrowser.launchFirefox(0, args);
} catch (Exception e) {
_log.error("Error starting I2P Browser", e);
}
_log.info("I2P Browser ran");
}
}
public class FlexStarter implements MenuCallback {
private final MenuService _ms;
public FlexStarter(MenuService ms) { _ms = ms; }
public void clicked(MenuHandle menu) {
// Thread t = new I2PAppThread(new StarterThread(),
//"I2PBrowser-Launcher start", true);
// t.start();
_log.info("I2P Browser starting up");
try {
I2PBrowser i2pBrowser = new I2PBrowser(profileDir.getAbsolutePath());
i2pBrowser.usability = true;
String[] args = {"http://proxy.i2p"};
i2pBrowser.launchFirefox(0, args);
} catch (Exception e) {
_log.error("Error starting I2P Browser", e);
}
_log.info("I2P Browser ran");
}
}
private synchronized void changeState(ClientAppState state) {
if (_mgr != null)
_mgr.notify(this, state, null, null);
}
public static void main(String[] args) {
I2PBrowserPlugin plugin = new I2PBrowserPlugin();
try {
plugin.startup();
} catch (Exception e) {
e.printStackTrace();
}
}
}

View File

@ -64,3 +64,4 @@ user_pref("dom.image-lazy-loading.enabled", false);
user_pref("extensions.autoDisableScopes", 0); user_pref("extensions.autoDisableScopes", 0);
user_pref("extensions.enabledScopes", 1); user_pref("extensions.enabledScopes", 1);
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", false); user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", false);
user_pref("browser.fixup.domainsuffixwhitelist.i2p", true);

View File

@ -228,3 +228,4 @@ 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);

View File

@ -75,8 +75,6 @@ iframe {
} }
.container { .container {
width: 36vw;
height: 64vh;
display: inline-block; display: inline-block;
margin: 0; margin: 0;
padding: 0; padding: 0;

View File

@ -1,5 +1,8 @@
#! /usr/bin/env sh #! /usr/bin/env sh
ant distclean
ant jar
./test/test.sh ./test/test.sh
./test/test-chromium.sh ./test/test-chromium.sh
./test/test-firefox.sh ./test/test-firefox.sh

View File

@ -1,16 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQIcBAABCgAGBQJjRyYHAAoJEOU9mJqeLUe/HbIQALBTyEB42g2+Dlufv8fvF2E2
549sCPbkFHzKaH8ECeKfiZZDuTfLUmNUbnYD1/lxJtaUDj+u56sSF5V6us3HBgYN
56Mh+miLv4Am9HEZXwCRtE/kRjbE3yuKjSqYpZkviPsK4PT1fBBg+aMtc8fUZk4y
3BQZsvynie1OH2Qlw4XHMZUbHP7VlEAZCUWZTk8ai+mmqegmjtDc2NMNtZ03BGi7
Rd5U03+9mmVQNiWcJZqZkzQg8x/tPQD0XmMH04mZ71dCukfsun+DykjVGUAktloj
9XJ1aq+c3s4r/GXXXJ4sEnDe1QNBPOgEH5SLSiSAwwl531i5Oh2sO1U2ILC/PsnM
MlZMbypMw2eVGIQgfXrWurWlSvKYw193Y7N4bjvvTQYkxmWWHegKtYj1Jmy5y4+q
KypLjwD7QxDViRiQp5v8vzFAQ/0pacwT6D+r7ugAIrk9jFnl5dnHBDuBNHTdjPOI
oyTnSFJkroMjpdzbDnta74FzyLBWMPPMD3L/LepJLW+iYcJDqDYCffTqCPDjJSco
UgD71EiDSyM77wMKqEFzHzbNdW1Tmd88LoDc/erK9akbX4Xkhve0N/HFr+99c5rH
5EzI2j/N3Kzwom/FYzT8saS5ljRdGD+APi7VKE9budDzlu0ZqIhK/zMIJ//JHi/O
rmxTcTn5TaTfAMGhQUi/
=yI0S
-----END PGP SIGNATURE-----

View File

@ -1,19 +0,0 @@
#! /usr/bin/env sh
. ./config.sh
jpackage \
--verbose \
--type exe \
--win-dir-chooser \
--win-help-url "https://geti2p.net" \
--win-menu \
--win-menu-group "I2P Browser Configurer" \
--win-shortcut \
--win-shortcut-prompt \
--win-per-user-install \
--license-file LICENSE.md \
--icon src/icon.png \
--name i2pbrowser \
--app-version "$GITHUB_TAG" \
--input src/build \
--main-jar i2pfirefox.jar \
--main-class net.i2p.i2pfirefox.I2PBrowser

View File

@ -1,19 +0,0 @@
#! /usr/bin/env sh
. ./config.sh
mkdir -p tmp
cp -v LICENSE.md tmp/LICENSE.md
rm -rf i2pbrowser-portable
jpackage \
--verbose \
--type app-image \
--name i2pbrowser-portable \
--app-version "$GITHUB_TAG" \
--input src/build \
--main-jar i2pfirefox.jar \
--resource-dir tmp \
--icon src/icon.png \
--main-class net.i2p.i2pfirefox.I2PBrowser
rm -rf tmp
cp -v LICENSE.md i2pbrowser-portable/LICENSE.md
rm i2pbrowser-portable.zip -f
zip -r i2pbrowser-portable-${GITHUB_TAG}.zip i2pbrowser-portable

View File

@ -4,9 +4,7 @@ git pull --all
. ./config.sh . ./config.sh
. "${HOME}/github-release-config.sh" . "${HOME}/github-release-config.sh"
ant distclean jar ant distclean jar
./windows.sh ant windows-msi-release
./windows-exe.sh
./windows-portable.sh
msisum=$(sha256sum "i2pbrowser-${GITHUB_TAG}.msi") msisum=$(sha256sum "i2pbrowser-${GITHUB_TAG}.msi")
github-release upload --user "${GITHUB_USER}" \ github-release upload --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \ --repo "${GITHUB_REPO}" \
@ -16,6 +14,7 @@ github-release upload --user "${GITHUB_USER}" \
--file "i2pbrowser-${GITHUB_TAG}.msi" \ --file "i2pbrowser-${GITHUB_TAG}.msi" \
--replace --replace
echo "Uploaded MSI package" echo "Uploaded MSI package"
ant windows-exe-release
exesum=$(sha256sum "i2pbrowser-${GITHUB_TAG}.exe") exesum=$(sha256sum "i2pbrowser-${GITHUB_TAG}.exe")
github-release upload --user "${GITHUB_USER}" \ github-release upload --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \ --repo "${GITHUB_REPO}" \
@ -25,6 +24,7 @@ github-release upload --user "${GITHUB_USER}" \
--file "i2pbrowser-${GITHUB_TAG}.exe" \ --file "i2pbrowser-${GITHUB_TAG}.exe" \
--replace --replace
echo "Uploaded EXE package" echo "Uploaded EXE package"
ant windows-portable-release
zipsum=$(sha256sum "i2pbrowser-portable-${GITHUB_TAG}.zip") zipsum=$(sha256sum "i2pbrowser-portable-${GITHUB_TAG}.zip")
github-release upload --user "${GITHUB_USER}" \ github-release upload --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \ --repo "${GITHUB_REPO}" \

View File

@ -1,19 +0,0 @@
#! /usr/bin/env sh
. ./config.sh
jpackage \
--verbose \
--type msi \
--win-dir-chooser \
--win-help-url "https://geti2p.net" \
--win-menu \
--win-menu-group "I2P Browser Configurer" \
--win-shortcut \
--win-shortcut-prompt \
--win-per-user-install \
--license-file LICENSE.md \
--icon src/icon.png \
--name i2pbrowser \
--app-version "$GITHUB_TAG" \
--input src/build \
--main-jar i2pfirefox.jar \
--main-class net.i2p.i2pfirefox.I2PBrowser