forked from I2P_Developers/i2p.i2p
* Cache DNS and negative DNS for 5m (was 1m and forever)
* Delay shitlist cleaner at startup * Strip wrapper properties from client config * Define multiple cert type * Prohibit negative maxSends in streaming * HTML fixup on configtunnels.jsp * Increase wrapper exit timeout from default 15s to 30s
This commit is contained in:
@@ -81,12 +81,15 @@ public class Router {
|
||||
public final static String PROP_KEYS_FILENAME = "router.keys.location";
|
||||
public final static String PROP_KEYS_FILENAME_DEFAULT = "router.keys";
|
||||
public final static String PROP_SHUTDOWN_IN_PROGRESS = "__shutdownInProgress";
|
||||
public final static String DNS_CACHE_TIME = "" + (5*60);
|
||||
|
||||
static {
|
||||
// grumble about sun's java caching DNS entries *forever* by default
|
||||
// so lets just keep 'em for a minute
|
||||
System.setProperty("sun.net.inetaddr.ttl", "60");
|
||||
System.setProperty("networkaddress.cache.ttl", "60");
|
||||
// so lets just keep 'em for a short time
|
||||
System.setProperty("sun.net.inetaddr.ttl", DNS_CACHE_TIME);
|
||||
System.setProperty("sun.net.inetaddr.negative.ttl", DNS_CACHE_TIME);
|
||||
System.setProperty("networkaddress.cache.ttl", DNS_CACHE_TIME);
|
||||
System.setProperty("networkaddress.cache.negative.ttl", DNS_CACHE_TIME);
|
||||
// until we handle restricted routes and/or all peers support v6, try v4 first
|
||||
System.setProperty("java.net.preferIPv4Stack", "true");
|
||||
System.setProperty("http.agent", "I2P");
|
||||
|
@@ -49,6 +49,7 @@ public class Shitlist {
|
||||
public final static long SHITLIST_DURATION_MAX = 60*60*1000;
|
||||
public final static long SHITLIST_DURATION_PARTIAL = 20*60*1000;
|
||||
public final static long SHITLIST_DURATION_FOREVER = 181l*24*60*60*1000; // will get rounded down to 180d on console
|
||||
public final static long SHITLIST_CLEANER_START_DELAY = SHITLIST_DURATION_PARTIAL;
|
||||
|
||||
public Shitlist(RouterContext context) {
|
||||
_context = context;
|
||||
@@ -62,6 +63,7 @@ public class Shitlist {
|
||||
public Cleanup(RouterContext ctx) {
|
||||
super(ctx);
|
||||
_toUnshitlist = new ArrayList(4);
|
||||
getTiming().setStartAfter(_context.clock().now() + SHITLIST_CLEANER_START_DELAY);
|
||||
}
|
||||
public String getName() { return "Cleanup shitlist"; }
|
||||
public void runJob() {
|
||||
|
Reference in New Issue
Block a user