forked from I2P_Developers/i2p.i2p
Compare commits
4 Commits
2.3.0-look
...
i2p.i2p.2.
Author | SHA1 | Date | |
---|---|---|---|
82d5bc1080 | |||
a6515a398e | |||
3fc704c445 | |||
d66a7424a7 |
@ -97,6 +97,8 @@ public class HomeHelper extends HelperBase {
|
||||
//"sponge.i2p" + S + _x("Seedless and the Robert BitTorrent applications") + S + "http://sponge.i2p/" + S + I + "user_astronaut.png" + S +
|
||||
"notbob.i2p" + S + _x("Not Bob's Address Services") + S + "http://notbob.i2p/" + S + I + "notblob.png" + S +
|
||||
"[Ramble]" + S + _x("Ramble user-moderated forum aggregator") + S + "http://ramble.i2p/" + S + I + "ramble.png" + S +
|
||||
"Metrics" + S + _x("I2P Network Statistics") + S + "http://metrics.i2p/" + S + I + "plugin.png" + S +
|
||||
"StormyCloud" + S + _x("StormyCloud Outproxy Services") + S + "http://stormycloud.i2p/" + S + I + "plugin.png" + S +
|
||||
"";
|
||||
|
||||
// No commas allowed in text strings!
|
||||
|
@ -18,11 +18,12 @@ public class RouterVersion {
|
||||
/** deprecated */
|
||||
public final static String ID = "Git";
|
||||
public final static String VERSION = CoreVersion.VERSION;
|
||||
public final static long BUILD = 0;
|
||||
|
||||
/** for example: "beta", "alpha", "rc" */
|
||||
public final static String STATUS = "";
|
||||
public final static long BUILD = 1;
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "";
|
||||
public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;
|
||||
public final static String FULL_VERSION = VERSION + "-" + STATUS + BUILD + EXTRA;
|
||||
public static void main(String args[]) {
|
||||
System.out.println("I2P Router version: " + FULL_VERSION);
|
||||
System.out.println("Router ID: " + RouterVersion.ID);
|
||||
|
@ -408,31 +408,27 @@ public abstract class TunnelPeerSelector extends ConnectChecker {
|
||||
* @return true if yes
|
||||
*/
|
||||
private boolean filterUnreachable(boolean isInbound, boolean isExploratory) {
|
||||
if (!isExploratory)
|
||||
if (ctx.router().isHidden())
|
||||
return true;
|
||||
// give them some cover without killing our success rate
|
||||
return ctx.random().nextInt(4) != 0;
|
||||
/*
|
||||
if (SystemVersion.isSlow() || ctx.router().getUptime() < 65*60*1000)
|
||||
return true;
|
||||
if (ctx.random().nextInt(4) != 0) {
|
||||
// give them some cover without killing our success rate
|
||||
return true;
|
||||
}
|
||||
if (isExploratory) {
|
||||
if (isInbound) {
|
||||
if (ctx.router().isHidden())
|
||||
return true;
|
||||
return ctx.getProperty(PROP_INBOUND_EXPLORATORY_EXCLUDE_UNREACHABLE, DEFAULT_INBOUND_EXPLORATORY_EXCLUDE_UNREACHABLE);
|
||||
} else {
|
||||
return ctx.getProperty(PROP_OUTBOUND_EXPLORATORY_EXCLUDE_UNREACHABLE, DEFAULT_OUTBOUND_EXPLORATORY_EXCLUDE_UNREACHABLE);
|
||||
}
|
||||
} else {
|
||||
if (isInbound) {
|
||||
if (ctx.router().isHidden())
|
||||
return true;
|
||||
return ctx.getProperty(PROP_INBOUND_CLIENT_EXCLUDE_UNREACHABLE, DEFAULT_INBOUND_CLIENT_EXCLUDE_UNREACHABLE);
|
||||
} else {
|
||||
return ctx.getProperty(PROP_OUTBOUND_CLIENT_EXCLUDE_UNREACHABLE, DEFAULT_OUTBOUND_CLIENT_EXCLUDE_UNREACHABLE);
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
@ -441,25 +437,27 @@ public abstract class TunnelPeerSelector extends ConnectChecker {
|
||||
private static final String PROP_INBOUND_EXPLORATORY_EXCLUDE_SLOW = "router.inboundExploratoryExcludeSlow";
|
||||
private static final String PROP_INBOUND_CLIENT_EXCLUDE_SLOW = "router.inboundClientExcludeSlow";
|
||||
|
||||
private static final boolean DEFAULT_OUTBOUND_EXPLORATORY_EXCLUDE_SLOW = false;
|
||||
private static final boolean DEFAULT_OUTBOUND_CLIENT_EXCLUDE_SLOW = true;
|
||||
private static final boolean DEFAULT_INBOUND_EXPLORATORY_EXCLUDE_SLOW = false;
|
||||
private static final boolean DEFAULT_INBOUND_CLIENT_EXCLUDE_SLOW = true;
|
||||
|
||||
/**
|
||||
* do we want to skip peers that are slow?
|
||||
* @return true unless configured otherwise
|
||||
*/
|
||||
protected boolean filterSlow(boolean isInbound, boolean isExploratory) {
|
||||
return true;
|
||||
/*
|
||||
if (isExploratory) {
|
||||
if (isInbound)
|
||||
return ctx.getProperty(PROP_INBOUND_EXPLORATORY_EXCLUDE_SLOW, true);
|
||||
return ctx.getProperty(PROP_INBOUND_EXPLORATORY_EXCLUDE_SLOW, DEFAULT_INBOUND_EXPLORATORY_EXCLUDE_SLOW);
|
||||
else
|
||||
return ctx.getProperty(PROP_OUTBOUND_EXPLORATORY_EXCLUDE_SLOW, true);
|
||||
return ctx.getProperty(PROP_OUTBOUND_EXPLORATORY_EXCLUDE_SLOW, DEFAULT_OUTBOUND_EXPLORATORY_EXCLUDE_SLOW);
|
||||
} else {
|
||||
if (isInbound)
|
||||
return ctx.getProperty(PROP_INBOUND_CLIENT_EXCLUDE_SLOW, true);
|
||||
return ctx.getProperty(PROP_INBOUND_CLIENT_EXCLUDE_SLOW, DEFAULT_INBOUND_CLIENT_EXCLUDE_SLOW);
|
||||
else
|
||||
return ctx.getProperty(PROP_OUTBOUND_CLIENT_EXCLUDE_SLOW, true);
|
||||
return ctx.getProperty(PROP_OUTBOUND_CLIENT_EXCLUDE_SLOW, DEFAULT_OUTBOUND_CLIENT_EXCLUDE_SLOW);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
/** see HashComparator */
|
||||
|
Reference in New Issue
Block a user