update version nums
This commit is contained in:
10
VERSION.md
10
VERSION.md
@ -9,11 +9,11 @@ i2p-in-private-browsing
|
|||||||
1.48
|
1.48
|
||||||
https://addons.mozilla.org/firefox/downloads/file/4123613/i2p_in_private_browsing-1.48.xpi
|
https://addons.mozilla.org/firefox/downloads/file/4123613/i2p_in_private_browsing-1.48.xpi
|
||||||
noscript
|
noscript
|
||||||
11.4.28
|
11.4.29
|
||||||
https://addons.mozilla.org/firefox/downloads/file/4178438/noscript-11.4.28.xpi
|
https://addons.mozilla.org/firefox/downloads/file/4206186/noscript-11.4.29.xpi
|
||||||
localcdn-fork-of-decentraleyes
|
localcdn-fork-of-decentraleyes
|
||||||
2.6.59
|
2.6.60
|
||||||
https://addons.mozilla.org/firefox/downloads/file/4197044/localcdn_fork_of_decentraleyes-2.6.59.xpi
|
https://addons.mozilla.org/firefox/downloads/file/4208268/localcdn_fork_of_decentraleyes-2.6.60.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
|
||||||
@ -35,7 +35,7 @@ NoScript
|
|||||||
11.4.18
|
11.4.18
|
||||||
https://clients2.google.com/service/update2/crx
|
https://clients2.google.com/service/update2/crx
|
||||||
LocalCDN
|
LocalCDN
|
||||||
2.6.59
|
2.6.60
|
||||||
https://clients2.google.com/service/update2/crx
|
https://clients2.google.com/service/update2/crx
|
||||||
uBlock Origin
|
uBlock Origin
|
||||||
1.54.0
|
1.54.0
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#! /usr/bin/env sh
|
#! /usr/bin/env sh
|
||||||
export GITHUB_USER=eyedeekay
|
export GITHUB_USER=eyedeekay
|
||||||
export GITHUB_REPO=i2p.plugins.firefox
|
export GITHUB_REPO=i2p.plugins.firefox
|
||||||
export GITHUB_NAME="Updates extensions, last version with old plugin style"
|
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.1.0
|
export GITHUB_TAG=1.2.0
|
@ -1,6 +1,6 @@
|
|||||||
#Build Number for ANT. Do not edit!
|
#Build Number for ANT. Do not edit!
|
||||||
#Mon Dec 11 13:13:24 EST 2023
|
#Wed Dec 27 16:40:21 EST 2023
|
||||||
=\=\=\=\=\=\=
|
build.number=575
|
||||||
build.number=555
|
|
||||||
>>>>>>>=7cdf84bb265e7fda5b98d2386dab1855de8383eb
|
>>>>>>>=7cdf84bb265e7fda5b98d2386dab1855de8383eb
|
||||||
|
=\=\=\=\=\=\=
|
||||||
<<<<<<<=HEAD
|
<<<<<<<=HEAD
|
||||||
|
@ -1,232 +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;
|
|
||||||
import net.i2p.app.MenuCallback;
|
|
||||||
import net.i2p.app.MenuHandle;
|
|
||||||
import net.i2p.app.MenuService;
|
|
||||||
import net.i2p.util.I2PAppThread;
|
|
||||||
import net.i2p.desktopgui.ExternalMain;
|
|
||||||
|
|
||||||
|
|
||||||
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 MenuService startTrayApp() {
|
|
||||||
try {
|
|
||||||
//if (isSystrayEnabled(context)) {
|
|
||||||
System.setProperty("java.awt.headless", "false");
|
|
||||||
ExternalMain dtg = new ExternalMain(context, cam, null);
|
|
||||||
//MenuService dtg = new MenuService(context, cam, null);
|
|
||||||
dtg.startup();
|
|
||||||
return dtg;
|
|
||||||
//}
|
|
||||||
} catch (Throwable t) {
|
|
||||||
t.printStackTrace();
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private File threadLogFile() {
|
|
||||||
validateUserDirectory();
|
|
||||||
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;
|
|
||||||
MenuService dtg = startTrayApp();
|
|
||||||
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();
|
|
||||||
if (dtg != null)
|
|
||||||
dtg.addMenu("Shutdown I2PBrowser", new StandaloneStopper(dtg));
|
|
||||||
}
|
|
||||||
|
|
||||||
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.
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Callback when shutdown is clicked in systray
|
|
||||||
* @since 0.9.60
|
|
||||||
*/
|
|
||||||
public class StandaloneStopper implements MenuCallback {
|
|
||||||
private final MenuService _ms;
|
|
||||||
|
|
||||||
public StandaloneStopper(MenuService ms) { _ms = ms; }
|
|
||||||
|
|
||||||
public void clicked(MenuHandle menu) {
|
|
||||||
_ms.disableMenu(menu);
|
|
||||||
_ms.updateMenu("I2P Browser shutting down", menu);
|
|
||||||
Thread t = new I2PAppThread(new StopperThread(), "Browser Stopper", true);
|
|
||||||
t.start();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Threaded shutdown
|
|
||||||
* @since 0.9.60
|
|
||||||
*/
|
|
||||||
public class StopperThread implements Runnable {
|
|
||||||
public void run() {
|
|
||||||
//shutdown(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Reference in New Issue
Block a user