From 3718d2edb9074c67cfabe483a8f42e38d8495d28 Mon Sep 17 00:00:00 2001 From: idk Date: Wed, 7 Sep 2022 12:26:11 -0400 Subject: [PATCH] when launching into a router console disable the proxy timeout --- i2pversion | 4 ++-- java/net/i2p/router/WinLauncher.java | 29 +++++++++++++++++++++++++--- router.config | 2 +- 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/i2pversion b/i2pversion index 2185fb6..8046d0b 100644 --- a/i2pversion +++ b/i2pversion @@ -2,8 +2,8 @@ JNA_VERSION=5.11.0 export JNA_VERSION=5.11.0 -I2PFIREFOX_VERSION=0.0.33 -export I2PFIREFOX_VERSION=0.0.33 +I2PFIREFOX_VERSION=0.0.34 +export I2PFIREFOX_VERSION=0.0.34 # Comment this out to build from an alternate branch or # the tip of the master branch. VERSIONMAJOR=1 diff --git a/java/net/i2p/router/WinLauncher.java b/java/net/i2p/router/WinLauncher.java index f053506..6c9d7e6 100644 --- a/java/net/i2p/router/WinLauncher.java +++ b/java/net/i2p/router/WinLauncher.java @@ -51,6 +51,7 @@ public class WinLauncher { boolean privateBrowsing = false; boolean usabilityMode = false; boolean chromiumFirst = false; + int proxyTimeoutTime = 200; ArrayList newArgsList = new ArrayList(); if (args != null) { @@ -67,8 +68,29 @@ public class WinLauncher { usabilityMode = true; logger.info( "Usability mode is true, using alternate extensions loadout."); + } else if (arg.equals("-noproxycheck")) { + proxyTimeoutTime = 0; + logger.info("Proxy timeout time set to zero"); } else { - newArgsList.add(arg); + // make an effort to not let people launch into sites if the proxy + // isn't quite ready yet + if (arg.startsWith("http://localhost:76")) { + newArgsList.add(arg); + proxyTimeoutTime = 0; + } else if (arg.startsWith("http://127.0.0.1:76")) { + newArgsList.add(arg); + proxyTimeoutTime = 0; + } else if (arg.startsWith("https://localhost:76")) { + newArgsList.add(arg); + proxyTimeoutTime = 0; + } else if (arg.startsWith("https://127.0.0.1:76")) { + newArgsList.add(arg); + proxyTimeoutTime = 0; + } else if (proxyTimeoutTime > 0) { + newArgsList.add(arg); + } else if (!isAvailable(4444)) { + newArgsList.add(arg); + } } } } @@ -101,9 +123,10 @@ public class WinLauncher { i2pBrowser.chromiumFirst = chromiumFirst; i2pBrowser.firefox = !chromiumFirst; i2pBrowser.chromium = chromiumFirst; + i2pbrowser.setProxyTimeoutTime(proxyTimeoutTime); System.out.println("I2PBrowser"); - String[] newArgs = new String[newArgsList.size()]; - i2pBrowser.launch(privateBrowsing, newArgsList.toArray(newArgs)); + String[] newArgs = newArgsList.toArray(new String[newArgsList.size()]); + i2pBrowser.launch(privateBrowsing, newArgs); return; } diff --git a/router.config b/router.config index 1d2e09c..4df0b11 100644 --- a/router.config +++ b/router.config @@ -1,5 +1,5 @@ router.updateURL=http://ekm3fu6fr5pxudhwjmdiea5dovc3jdi66hjgop4c7z7dfaw7spca.b32.i2p/i2pwinupdate.su3 router.newsURL=http://dn3tvalnjz432qkqsvpfdqrwpqkw3ye4n4i2uyfr4jexvo3sp5ka.b32.i2p/news/win/beta/news.su3 router.backupNewsURL=http://tc73n4kivdroccekirco7rhgxdg5f3cjvbaapabupeyzrqwv5guq.b32.i2p/win/beta/news.su3 -routerconsole.browser=I2P.exe +routerconsole.browser=I2P.exe -noproxycheck router.disableTunnelTesting=false \ No newline at end of file