2022-08-07 03:11:33 +00:00
|
|
|
# i2p.plugins.firefox
|
|
|
|
|
|
|
|
A port of the batch scripts from i2p.firefox to Java.
|
|
|
|
|
|
|
|
## Getting started
|
|
|
|
|
2022-08-07 13:59:32 -04:00
|
|
|
### Building
|
2022-08-07 03:11:33 +00:00
|
|
|
|
2022-08-07 13:59:32 -04:00
|
|
|
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:
|
2022-08-07 03:11:33 +00:00
|
|
|
|
2022-08-07 13:59:32 -04:00
|
|
|
```sh
|
2022-08-07 22:22:49 -04:00
|
|
|
|
2022-08-07 13:59:32 -04:00
|
|
|
cd src
|
|
|
|
ant
|
2022-08-07 22:22:49 -04:00
|
|
|
cd ..
|
2022-08-07 03:11:33 +00:00
|
|
|
```
|
|
|
|
|
2022-08-07 13:59:32 -04:00
|
|
|
To build just the jar. You'll know it worked if you can:
|
2022-08-07 03:11:33 +00:00
|
|
|
|
2022-08-07 13:59:32 -04:00
|
|
|
```sh
|
2022-08-07 22:22:49 -04:00
|
|
|
|
2022-08-07 13:59:32 -04:00
|
|
|
java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PFirefox
|
|
|
|
```
|
2022-08-07 03:11:33 +00:00
|
|
|
|
2022-08-07 13:59:32 -04:00
|
|
|
and a new Firefox instance comes up with a fresh profile. This is just a default Firefox
|
|
|
|
profile, configuring it for I2P requires you to put a pre-configured Firefox profile into
|
|
|
|
the `i2p.firefox.base.profile` directory or otherwise supply a static, pre-configured
|
|
|
|
profile.
|
2022-08-07 22:21:13 -04:00
|
|
|
|
|
|
|
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
|
2022-08-07 22:22:49 -04:00
|
|
|
|
2022-08-07 22:21:13 -04:00
|
|
|
if (i2pIsRunning()) {
|
|
|
|
logger.warning("I2P is already running");
|
|
|
|
System.out.println("I2PFirefox");
|
|
|
|
I2PFirefox i2pFirefox = new I2PFirefox();
|
|
|
|
i2pFirefox.launch();
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2022-08-07 22:24:19 -04:00
|
|
|
to add a browser management tool to it.
|