Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
c7a42e6447 | |||
66e93709ca | |||
a7eba5f5ae | |||
ba0e2fb8c0 | |||
8ee2a1170e | |||
a08046655b | |||
54be1d3acd | |||
e7e40a96ba | |||
6de7e95a4b | |||
b4d9687eed | |||
73b779ba5c |
2
build.sh
2
build.sh
@ -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
|
||||
|
@ -50,6 +50,14 @@ public class WinLauncher {
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
boolean privateBrowsing = false;
|
||||
if (args != null && args.length > 0) {
|
||||
logger.info("checking for private browsing");
|
||||
if (args[0].equals("-private")) {
|
||||
privateBrowsing = true;
|
||||
logger.info("private browsing is true, profile will be discarded at end of session");
|
||||
}
|
||||
}
|
||||
|
||||
File programs = selectProgramFile();
|
||||
if (!programs.exists())
|
||||
@ -71,7 +79,7 @@ public class WinLauncher {
|
||||
logger.warning("I2P is already running");
|
||||
I2PFirefox i2pFirefox = new I2PFirefox();
|
||||
System.out.println("I2PFirefox");
|
||||
i2pFirefox.launch();
|
||||
i2pFirefox.launch(privateBrowsing);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -105,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;
|
||||
}
|
||||
}
|
||||
|
@ -190,21 +190,29 @@ Function firefoxDetect
|
||||
FunctionEnd
|
||||
|
||||
Function routerDetect
|
||||
${If} ${FileExists} "$I2PINSTEXE"
|
||||
Abort directory
|
||||
${Else}
|
||||
createDirectory $I2PINSTEXE
|
||||
SetOutPath $I2PINSTEXE
|
||||
File /nonfatal /a /r "I2P\"
|
||||
File /nonfatal /a /r "I2P\I2P.exe"
|
||||
File /nonfatal "I2P\config\jpackaged"
|
||||
createDirectory $I2PINSTEXE
|
||||
SetOutPath $I2PINSTEXE
|
||||
File /nonfatal /a /r "I2P\"
|
||||
File /nonfatal /a /r "I2P\I2P.exe"
|
||||
File /nonfatal "I2P\config\jpackaged"
|
||||
|
||||
createDirectory "$I2PINSTEXE\"
|
||||
SetOutPath "$I2PINSTEXE\"
|
||||
File /nonfatal /a /r "I2P/config/*"
|
||||
createDirectory "$I2PINSTEXE\"
|
||||
SetOutPath "$I2PINSTEXE\"
|
||||
IfFileExists $I2PINSTEXE\router.config +2 0
|
||||
File /nonfatal /a /r "I2P/config/router.config"
|
||||
IfFileExists $I2PINSTEXE\clients.config +2 0
|
||||
File /nonfatal /a /r "I2P/config/clients.config"
|
||||
IfFileExists $I2PINSTEXE\wrapper.config +2 0
|
||||
File /nonfatal /a /r "I2P/config/wrapper.config"
|
||||
IfFileExists $I2PINSTEXE\eepsite +2 0
|
||||
File /nonfatal /a /r "I2P/config/eepsite"
|
||||
IfFileExists $I2PINSTEXE\webapps +2 0
|
||||
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
|
||||
${EndIf}
|
||||
Abort directory
|
||||
FunctionEnd
|
||||
|
||||
Function installerFunction
|
||||
|
Reference in New Issue
Block a user