forked from I2P_Developers/i2p.i2p
* Tunnels: Set default priorities for tunnels (ticket #719)
Exploratory: +30 IRC: +15 HTTP Proxy: +10 I2PSnark: -10
This commit is contained in:
@ -219,6 +219,8 @@ public class I2PSnarkUtil {
|
||||
opts.setProperty("inbound.nickname", "I2PSnark");
|
||||
if (opts.getProperty("outbound.nickname") == null)
|
||||
opts.setProperty("outbound.nickname", "I2PSnark");
|
||||
if (opts.getProperty("outbound.priority") == null)
|
||||
opts.setProperty("outbound.priority", "-10");
|
||||
// Dont do this for now, it is set in I2PSocketEepGet for announces,
|
||||
// we don't need fast handshake for peer connections.
|
||||
//if (opts.getProperty("i2p.streaming.connectDelay") == null)
|
||||
|
10
history.txt
10
history.txt
@ -1,8 +1,14 @@
|
||||
2012-11-17 zzz
|
||||
* error500.jsp: Add servlet version
|
||||
* i2psnark: Clear PEX peers set after use, cause of bad peer counts
|
||||
* Tunnels: Set default priorities for tunnels (ticket #719)
|
||||
|
||||
2012-11-16 zzz
|
||||
* i2psnark: Fix rare IOOBE (ticket #777)
|
||||
* NetDB:
|
||||
- Implement automatic reseeding (ticket #521)
|
||||
- Increase minimum routers
|
||||
- Log reseeds in event log
|
||||
* Tunnels: Fix outbound tunnel message priority (ticket #719)
|
||||
|
||||
2012-11-13 zzz
|
||||
@ -16,8 +22,8 @@
|
||||
* stats.jsp: Link to graph page, not single image
|
||||
|
||||
2012-11-10 kytv
|
||||
* eepget: Add logic to figure out the path to java.exe (java isn't always added to the system path
|
||||
in Windows) (ticket #769)
|
||||
* eepget: Add logic to figure out the path to java.exe (java isn't always added to the system path
|
||||
in Windows) (ticket #769)
|
||||
|
||||
2012-11-05 zzz
|
||||
* Console:
|
||||
|
@ -25,6 +25,7 @@ tunnel.0.option.inbound.length=3
|
||||
tunnel.0.option.inbound.lengthVariance=0
|
||||
tunnel.0.option.outbound.length=3
|
||||
tunnel.0.option.outbound.lengthVariance=0
|
||||
tunnel.0.option.outbound.priority=10
|
||||
tunnel.0.startOnLoad=true
|
||||
|
||||
# irc
|
||||
@ -52,6 +53,7 @@ tunnel.1.option.inbound.length=3
|
||||
tunnel.1.option.inbound.lengthVariance=0
|
||||
tunnel.1.option.outbound.length=3
|
||||
tunnel.1.option.outbound.lengthVariance=0
|
||||
tunnel.1.option.outbound.priority=15
|
||||
tunnel.1.startOnLoad=true
|
||||
|
||||
# I2P's mtn server
|
||||
|
@ -67,6 +67,7 @@ public class OutNetMessage implements CDPQEntry {
|
||||
public static final int PRIORITY_MY_BUILD_REQUEST = 500;
|
||||
public static final int PRIORITY_MY_NETDB_LOOKUP = 500;
|
||||
public static final int PRIORITY_MY_NETDB_STORE = 460;
|
||||
public static final int PRIORITY_EXPLORATORY = 455;
|
||||
/** may be adjusted +/- 25 for outbound traffic */
|
||||
public static final int PRIORITY_MY_DATA = 425;
|
||||
public static final int PRIORITY_MY_NETDB_STORE_LOW = 300;
|
||||
@ -387,6 +388,7 @@ public class OutNetMessage implements CDPQEntry {
|
||||
buf.append(getMessageType());
|
||||
}
|
||||
buf.append(" expiring on ").append(new Date(_expiration));
|
||||
buf.append(" priority ").append(_priority);
|
||||
if (_failedTransports != null)
|
||||
buf.append(" failed delivery on transports ").append(_failedTransports);
|
||||
if (_target == null)
|
||||
|
@ -40,11 +40,7 @@ public class OutNetMessagePool {
|
||||
}
|
||||
|
||||
if (_log.shouldLog(Log.DEBUG))
|
||||
_log.debug("Adding outbound message to "
|
||||
+ msg.getTarget().getIdentity().getHash().toBase64().substring(0,6)
|
||||
+ " with id " + msg.getMessage().getUniqueId()
|
||||
+ " expiring on " + msg.getMessage().getMessageExpiration()
|
||||
+ " of type " + msg.getMessageType());
|
||||
_log.debug("Adding " + msg);
|
||||
|
||||
MessageSelector selector = msg.getReplySelector();
|
||||
if (selector != null) {
|
||||
|
@ -18,7 +18,7 @@ public class RouterVersion {
|
||||
/** deprecated */
|
||||
public final static String ID = "Monotone";
|
||||
public final static String VERSION = CoreVersion.VERSION;
|
||||
public final static long BUILD = 7;
|
||||
public final static long BUILD = 8;
|
||||
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "";
|
||||
|
@ -59,6 +59,7 @@ public class TunnelPoolSettings {
|
||||
public static final int DEFAULT_IP_RESTRICTION = 2; // class B (/16)
|
||||
private static final int MIN_PRIORITY = -25;
|
||||
private static final int MAX_PRIORITY = 25;
|
||||
private static final int EXPLORATORY_PRIORITY = 30;
|
||||
|
||||
public TunnelPoolSettings(boolean isExploratory, boolean isInbound) {
|
||||
_isExploratory = isExploratory;
|
||||
@ -74,6 +75,8 @@ public class TunnelPoolSettings {
|
||||
_IPRestriction = DEFAULT_IP_RESTRICTION;
|
||||
_unknownOptions = new Properties();
|
||||
_randomKey = generateRandomKey();
|
||||
if (_isExploratory && !_isInbound)
|
||||
_priority = EXPLORATORY_PRIORITY;
|
||||
}
|
||||
|
||||
/** how many tunnels should be available at all times */
|
||||
@ -168,7 +171,7 @@ public class TunnelPoolSettings {
|
||||
|
||||
/**
|
||||
* Outbound message priority - for outbound tunnels only
|
||||
* @return -25 to +25, default 0
|
||||
* @return -25 to +30, default 30 for outbound exploratory and 0 for others
|
||||
* @since 0.9.4
|
||||
*/
|
||||
public int getPriority() { return _priority; }
|
||||
@ -198,9 +201,11 @@ public class TunnelPoolSettings {
|
||||
_destinationNickname = value;
|
||||
else if (name.equalsIgnoreCase(prefix + PROP_IP_RESTRICTION))
|
||||
_IPRestriction = getInt(value, DEFAULT_IP_RESTRICTION);
|
||||
else if ((!_isInbound) && name.equalsIgnoreCase(prefix + PROP_PRIORITY))
|
||||
_priority = Math.min(MAX_PRIORITY, Math.max(MIN_PRIORITY, getInt(value, 0)));
|
||||
else
|
||||
else if ((!_isInbound) && name.equalsIgnoreCase(prefix + PROP_PRIORITY)) {
|
||||
int def = _isExploratory ? EXPLORATORY_PRIORITY : 0;
|
||||
int max = _isExploratory ? EXPLORATORY_PRIORITY : MAX_PRIORITY;
|
||||
_priority = Math.min(max, Math.max(MIN_PRIORITY, getInt(value, def)));
|
||||
} else
|
||||
_unknownOptions.setProperty(name.substring((prefix != null ? prefix.length() : 0)), value);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user