Compare commits

...

8 Commits

3 changed files with 13 additions and 7 deletions

View File

@ -66,7 +66,7 @@ if [ ! -f "$HERE/build/jna-platform.jar" ]; then
fi
if [ ! -f "$HERE/build/i2pfirefox.jar" ]; then
wget -O "$HERE/build/i2pfirefox.jar" https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/0.0.8/i2pfirefox.jar
wget -O "$HERE/build/i2pfirefox.jar" https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/0.0.13/i2pfirefox.jar
fi
cd java

View File

@ -52,9 +52,10 @@ public class WinLauncher {
}
boolean privateBrowsing = false;
if (args != null && args.length > 0) {
logger.info("checking for private browsing");
if (args[0].equals("-private")) {
privateBrowsing = true;
return;
logger.info("private browsing is true, profile will be discarded at end of session");
}
}
@ -112,18 +113,24 @@ public class WinLauncher {
}
private static boolean i2pIsRunning() {
// check if there's something listening on port 7657
sleep(2000);
// check if there's something listening on port 7657(Router Console)
if (!isAvailable(7657)) {
return true;
}
// check if there's something listening on port 7654(I2CP)
if (!isAvailable(7654)) {
return true;
}
// check for the existence of router.ping file, if it's less then 2 minutes old,
// exit
File home = selectHome();
File ping = new File(home, "router.ping");
if (ping.exists()) {
long diff = System.currentTimeMillis() - ping.lastModified();
if (diff < 2 * 60 * 1000) {
logger.info("router.ping exists and is less than 2 minutes old, I2P appears to be running already.");
if (diff < 60 * 1000) {
logger.info("router.ping exists and is less than 1 minute old, I2P appears to be running already.");
logger.info("If I2P is not running, wait 60 seconds and try again.");
return true;
}
}

View File

@ -202,8 +202,6 @@ Function routerDetect
File /nonfatal /a /r "I2P/config/router.config"
IfFileExists $I2PINSTEXE\clients.config +2 0
File /nonfatal /a /r "I2P/config/clients.config"
IfFileExists $I2PINSTEXE\i2ptunnel.config +2 0
File /nonfatal /a /r "I2P/config/i2ptunnel.config"
IfFileExists $I2PINSTEXE\wrapper.config +2 0
File /nonfatal /a /r "I2P/config/wrapper.config"
IfFileExists $I2PINSTEXE\eepsite +2 0
@ -212,6 +210,7 @@ Function routerDetect
File /nonfatal /a /r "I2P/config/webapps"
File /nonfatal /a /r "I2P/config/certificates"
File /nonfatal /a /r "I2P/config/geoip"
File /nonfatal /a /r "I2P/config/i2ptunnel.config"
Abort directory
FunctionEnd