Compare commits

...

12 Commits

Author SHA1 Message Date
idk
3e5b9c049d only add more flags when more flags are passed. 2022-08-21 00:25:27 -04:00
idk
e5d36aff8f fix an issue where passing the -private flag annihilates extension flags 2022-08-20 23:50:08 -04:00
idk
fa3fa165b1 update index.html 2022-08-20 22:49:08 -04:00
idk
5211c6d7e0 move target for chrome extension out of main build process because of requirement on go-crx3 2022-08-20 22:47:51 -04:00
idk
ce6a31166b update index.html 2022-08-20 21:04:45 -04:00
idk
842f4bb992 update CHANGES.html 2022-08-20 20:58:13 -04:00
idk
5fefdab16d update index.html 2022-08-20 20:58:10 -04:00
idk
53d4cf8146 update CHANGES.html 2022-08-20 20:54:21 -04:00
idk
6daeaf8297 update index.html 2022-08-20 20:54:17 -04:00
idk
8645f69067 Bump again 2022-08-20 20:53:31 -04:00
idk
4f22360b2f update index.html 2022-08-20 20:32:55 -04:00
idk
ccfe0af3f6 update index.html 2022-08-20 20:24:35 -04:00
8 changed files with 125 additions and 16 deletions

View File

@ -80,6 +80,14 @@
</div>
</div>
</div>
<h2>
Fri, August 20
</h2>
<ul>
<li>
Chromium is now a first-class citizen
</li>
</ul>
<h2>
Fri, August 19
</h2>

View File

@ -1,3 +1,8 @@
Fri, August 20
--------------
- Chromium is now a first-class citizen
Fri, August 19
--------------

View File

@ -9,7 +9,7 @@ A port of the batch scripts from i2p.firefox to Java.
```sh
mkdir ~/tmp-i2pfirefox && cd ~/tmp-i2pfirefox
wget https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/0.0.9/i2pfirefox.zip
wget https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/0.0.10/i2pfirefox.zip
unzip i2pfirefox.zip
./i2pfirefox.cmd
@ -18,6 +18,27 @@ unzip i2pfirefox.zip
./i2pchromium.cmd
```
### Build Dependencies
You will need `ant`, `java` and for building the Chromium profile, a Go application
called `crx3` which is used to interact with the Chrome app store. I've been using Java 17
on Debian mostly, on Debian and Ubuntu, install the dependencies with:
```sh
sudo apt-get install openjdk-17* ant golang-go
go install github.com/mediabuyerbot/go-crx3/crx3@latest
```
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.
@ -43,6 +64,7 @@ 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");
@ -51,4 +73,15 @@ if (i2pIsRunning()) {
}
```
```java
// Chromium Example
if (i2pIsRunning()) {
logger.warning("I2P is already running");
System.out.println("I2PChromium");
I2PChromium i2pChromium = new I2PChromium();
i2pChromium.launch();
}
```
to add a browser management tool to it.

View File

@ -24,11 +24,7 @@
</exec>
</target>
<target name="i2pChromiumBaseProfileZip">
<exec executable="rm" failonerror="false" dir="src">
<arg value="-rf" />
<arg value="i2p.chromium.base.profile.zip" />
</exec>
<target name="i2pChromiumBaseProfile">
<exec executable="crx3" failonerror="true">
<arg value="download"/>
<arg value="ikdjcmomgldfciocnpekfndklkfgglpe" />
@ -50,6 +46,13 @@
<arg value="-o" />
<arg value="src/i2p.chromium.base.profile/extensions/scriptsafe.js.crx" />
</exec>-->
</target>
<target name="i2pChromiumBaseProfileZip">
<exec executable="rm" failonerror="false" dir="src">
<arg value="-rf" />
<arg value="i2p.chromium.base.profile.zip" />
</exec>
<exec executable="zip" failonerror="true" dir="src">
<arg value="-r"/>
<arg value="i2p.chromium.base.profile.zip"/>
@ -66,7 +69,8 @@
<arg value="-r"/>
<arg value="i2pfirefox.zip"/>
<arg value="src/build/i2pfirefox.jar"/>
<arg value="i2pbrowser.cmd"/>
<arg value="i2pfirefox.cmd"/>
<arg value="i2pchromium.cmd"/>
<arg value="LICENSE.md"/>
<arg value="README.md"/>
</exec>

View File

@ -94,14 +94,54 @@
</h3>
<pre><code>
mkdir ~/tmp-i2pfirefox &amp;&amp; cd ~/tmp-i2pfirefox
wget https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/0.0.8/i2pfirefox.zip
wget https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/0.0.10/i2pfirefox.zip
unzip i2pfirefox.zip
./i2pbrowser.cmd
./i2pfirefox.cmd
#or if you want to use a Chromium
./test-chromium.sh
./i2pchromium.cmd
</code></pre>
<h3>
Build Dependencies
</h3>
<p>
You will need
<code>
ant
</code>
,
<code>
java
</code>
and for building the Chromium profile, a Go application
called
<code>
crx3
</code>
which is used to interact with the Chrome app store. Ive been using Java 17
on Debian mostly, on Debian and Ubuntu, install the dependencies with:
</p>
<pre><code>sudo apt-get install openjdk-17* ant golang-go
go install github.com/mediabuyerbot/go-crx3/crx3@latest
</code></pre>
<p>
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
<code>
$GOPATH/bin/
</code>
to your
<code>
$PATH
</code>
.
</p>
<pre><code>export PATH=$PATH:$HOME/go/bin
</code></pre>
<p>
Will almost always work.
</p>
<h3>
Building
</h3>
@ -127,12 +167,22 @@ java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PFirefox
add a UI element that triggers something along the lines of this:
</p>
<pre><code>
// Firefox Example
if (i2pIsRunning()) {
logger.warning(&#34;I2P is already running&#34;);
System.out.println(&#34;I2PFirefox&#34;);
I2PFirefox i2pFirefox = new I2PFirefox();
i2pFirefox.launch();
}
</code></pre>
<pre><code>
// Chromium Example
if (i2pIsRunning()) {
logger.warning(&#34;I2P is already running&#34;);
System.out.println(&#34;I2PChromium&#34;);
I2PChromium i2pChromium = new I2PChromium();
i2pChromium.launch();
}
</code></pre>
<p>
to add a browser management tool to it.

View File

@ -2,9 +2,9 @@
GITHUB_USER=eyedeekay
GITHUB_REPO=i2p.plugins.firefox
GITHUB_NAME="Which fixes some Chromium issues identified by xip"
GITHUB_NAME="Which fixes another tiny bug that was bothering me"
GITHUB_DESCRIPTION=$(cat CHANGES.md)
GITHUB_TAG=0.0.9
GITHUB_TAG=0.0.12
ant distclean
ant jar freeZip
github-release release --user "${GITHUB_USER}" \
@ -13,6 +13,11 @@ github-release release --user "${GITHUB_USER}" \
--description "${GITHUB_DESCRIPTION}" \
--tag "${GITHUB_TAG}"; true
sleep 2s
github-release edit --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \
--name "${GITHUB_NAME}" \
--description "${GITHUB_DESCRIPTION}" \
--tag "${GITHUB_TAG}"; true
github-release upload --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \
--tag "${GITHUB_TAG}" \

View File

@ -339,8 +339,10 @@ public class I2PChromium {
new File(I2PChromiumProfileBuilder.profileDirectory(),"extensions/ublock.js").getAbsolutePath()
+","+
new File(I2PChromiumProfileBuilder.profileDirectory(),"extensions/scriptsafe.js").getAbsolutePath();*/
for (int i = 0; i < args.length; i++) {
newArgs[i+19] = args[i];
if (args.length > 0) {
for (int i = 0; i < args.length; i++) {
newArgs[i+20] = args[i];
}
}
return new ProcessBuilder(newArgs).directory(I2PChromiumProfileBuilder.runtimeDirectory(true));
} else {

View File

@ -294,8 +294,10 @@ public class I2PFirefox {
newArgs[0] = firefox;
newArgs[1] = "--profile";
newArgs[2] = I2PFirefoxProfileBuilder.profileDirectory();
for (int i = 0; i < args.length; i++) {
newArgs[i+3] = args[i];
if (args.length > 0) {
for (int i = 0; i < args.length; i++) {
newArgs[i+3] = args[i];
}
}
return new ProcessBuilder(newArgs).directory(I2PFirefoxProfileBuilder.runtimeDirectory(true));
} else {