diff --git a/.github/workflows/ant.yml b/.github/workflows/ant.yml
index b09762f..6a42432 100644
--- a/.github/workflows/ant.yml
+++ b/.github/workflows/ant.yml
@@ -36,7 +36,7 @@ jobs:
- name: build with Ant
run: |
export PATH=$PATH:$(go env GOPATH)/bin
- ant distclean jpackage debian
+ ant distclean jpackage debian pluginzip
- name: Upload Firefox Profile Strict
uses: actions/upload-artifact@v4
with:
@@ -77,6 +77,11 @@ jobs:
with:
name: i2pbrowser_${{ github.sha }}_amd64.deb
path: ./i2pbrowser_1.0.0_amd64.deb
+ - name: Upload i2pfirefox.zip (unsigned plugin)
+ uses: actions/upload-artifact@v4
+ with:
+ name: i2pfirefox-${{ github.sha }}_amd64.zip
+ path: ./plugin.zip
buildrpm:
diff --git a/build.xml b/build.xml
index e9fc014..088333d 100755
--- a/build.xml
+++ b/build.xml
@@ -340,6 +340,51 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -370,12 +415,6 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
-
-
-
-
-
-
@@ -384,6 +423,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
+
diff --git a/scripts/build.number b/scripts/build.number
index 9601e02..f91fa45 100644
--- a/scripts/build.number
+++ b/scripts/build.number
@@ -1,3 +1,3 @@
#Build Number for ANT. Do not edit!
-#Mon Mar 04 20:11:29 EST 2024
-build.number=640
+#Tue Mar 05 16:05:51 EST 2024
+build.number=649
diff --git a/src/java/net/i2p/i2pfirefox/I2PBrowser.java b/src/java/net/i2p/i2pfirefox/I2PBrowser.java
index acd443a..5480b84 100644
--- a/src/java/net/i2p/i2pfirefox/I2PBrowser.java
+++ b/src/java/net/i2p/i2pfirefox/I2PBrowser.java
@@ -55,27 +55,30 @@ public class I2PBrowser extends I2PGenericUnsafeBrowser {
private boolean outputConfig = false;
private boolean useSystray = true;
- private void launchFirefox(int privateWindow, String[] url) {
- logger.info("I2PFirefox" + privateWindow);
+ public void launchFirefox(int privateWindow, String[] url) {
+ String priv = privateWindow == 1 ? "private-window" : "long-profile";
+ logger.info("I2PFirefox" + priv);
i2pFirefox.usability = usability;
if (outputConfig)
i2pFirefox.storeFirefoxDefaults();
i2pFirefox.launch(privateWindow, url);
}
- private void launchChromium(int privateWindow, String[] url) {
- logger.info("I2PChromium" + privateWindow);
+ public void launchChromium(int privateWindow, String[] url) {
+ String priv = privateWindow == 1 ? "private-window" : "long-profile";
+ logger.info("I2PChromium" + priv);
i2pChromium.usability = usability;
if (outputConfig)
i2pChromium.storeChromiumDefaults();
i2pChromium.launch(privateWindow, url);
}
private void launchGeneric(int privateWindowInt, String[] url) {
+ String priv = privateWindowInt == 1 ? "private-window" : "long-profile";
boolean privateWindow = false;
if (privateWindowInt == 1)
privateWindow = true;
if (outputConfig)
i2pGeneral.storeGenericDefaults();
- logger.info("I2PGeneric" + privateWindowInt);
+ logger.info("I2PGeneric" + priv);
i2pGeneral.launch(privateWindow, url);
}
diff --git a/src/plugin/net/i2p/i2pfirefox/plugin/plugin/I2PBrowserPlugin.java b/src/plugin/net/i2p/i2pfirefox/plugin/plugin/I2PBrowserPlugin.java
index 205f79b..8e2004a 100644
--- a/src/plugin/net/i2p/i2pfirefox/plugin/plugin/I2PBrowserPlugin.java
+++ b/src/plugin/net/i2p/i2pfirefox/plugin/plugin/I2PBrowserPlugin.java
@@ -52,6 +52,9 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
pluginDir = new File(_context.getAppDir(), "plugins/i2pfirefox/");
profileDir = new File(pluginDir, "profile/");
i2pBrowser = new I2PBrowser(profileDir.getAbsolutePath());
+ i2pBrowser.firefox = true;
+ i2pBrowser.chromiumFirst = false;
+ i2pBrowser.generic = false;
}
public I2PBrowserPlugin(I2PAppContext ctx, ClientAppManager mgr,
String args[]) {
@@ -62,6 +65,9 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
pluginDir = new File(_context.getAppDir(), "plugins/i2pfirefox/");
profileDir = new File(pluginDir, "profile/");
i2pBrowser = new I2PBrowser(profileDir.getAbsolutePath());
+ i2pBrowser.firefox = true;
+ i2pBrowser.chromiumFirst = false;
+ i2pBrowser.generic = false;
}
public String getDisplayName() { return "I2P Browser"; }
public String getName() { return "I2P Browser"; }
@@ -69,16 +75,15 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
if (i2pBrowser == null)
return ClientAppState.STOPPED;
if (!isSystrayEnabled())
- return ClientAppState.STOPPED;
- if (!i2pBrowser.running())
- return ClientAppState.STOPPED;
+ if (!i2pBrowser.running())
+ return ClientAppState.STOPPED;
if (i2pBrowser.running())
return ClientAppState.RUNNING;
return ClientAppState.STOPPED;
}
public void shutdown(String[] args) {
if (!isSystrayEnabled()) {
- System.out.println("I2P Browser tray manager not supported");
+ i2pBrowser.logger.info("I2P Browser tray manager not supported");
i2pBrowser.stop();
changeState(ClientAppState.STOPPED);
return;
@@ -86,10 +91,10 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
}
public void startup() {
if (!isSystrayEnabled()) {
- System.out.println("I2P Browser tray manager not supported");
+ i2pBrowser.logger.info("I2P Browser tray manager not supported");
try {
String url = "http://proxy.i2p";
- i2pBrowser.launch(false, new String[] {url});
+ i2pBrowser.launchFirefox(0, new String[] {url});
} catch (Exception e) {
e.printStackTrace();
}
@@ -97,14 +102,14 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
}
try {
String url = "http://proxy.i2p";
- System.out.println(
+ i2pBrowser.logger.info(
"Starting I2P Browser tray manager by testing http://proxy.i2p");
MenuService dtg = startTrayApp();
try {
Thread.sleep(1000);
} catch (InterruptedException ie) {
}
- i2pBrowser.launch(false, new String[] {url});
+ i2pBrowser.launchFirefox(0, new String[] {url});
if (dtg != null) {
dtg.addMenu("Launch I2P Browser", new Starter(dtg));
dtg.addMenu("Quit I2P Browser", new Stopper(dtg));
@@ -131,7 +136,7 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
}
// Copied directly from I2PSnark-standalone where it is used to determine
- // whether to launch the tray app Our environment should basically never be
+ // 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() {
@@ -171,7 +176,7 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
*/
public class StarterThread implements Runnable {
public void run() {
- i2pBrowser.launch(false);
+ i2pBrowser.launchFirefox(0, null);
changeState(ClientAppState.RUNNING);
}
}