forked from I2P_Developers/i2p.i2p
Router: Min version for tunnel peers
This commit is contained in:
10
history.txt
10
history.txt
@ -1,3 +1,11 @@
|
|||||||
|
2020-05-07 zzz
|
||||||
|
* Router:
|
||||||
|
- Fix INMP NPE on non-default config (ticket #2688)
|
||||||
|
- Min version for tunnel peers
|
||||||
|
|
||||||
|
2020-05-06 zzz
|
||||||
|
* Streaming: Reduce default ack delay (ticket #2706)
|
||||||
|
|
||||||
2020-05-05 zzz
|
2020-05-05 zzz
|
||||||
* Build: Use --java2 for msgfmt
|
* Build: Use --java2 for msgfmt
|
||||||
* i2ptunnel:
|
* i2ptunnel:
|
||||||
@ -21,7 +29,7 @@
|
|||||||
|
|
||||||
2020-05-01 idk
|
2020-05-01 idk
|
||||||
* i2ptunnel: Collapse/Expand UI elements for advanced features, organize
|
* i2ptunnel: Collapse/Expand UI elements for advanced features, organize
|
||||||
advanced features by category. Replace nested tables.
|
advanced features by category. Replace nested tables.
|
||||||
* SusiMail: Fix missing icon from dark theme (ticket #2726)
|
* SusiMail: Fix missing icon from dark theme (ticket #2726)
|
||||||
|
|
||||||
2020-04-30 zzz
|
2020-04-30 zzz
|
||||||
|
@ -18,7 +18,7 @@ public class RouterVersion {
|
|||||||
/** deprecated */
|
/** deprecated */
|
||||||
public final static String ID = "Monotone";
|
public final static String ID = "Monotone";
|
||||||
public final static String VERSION = CoreVersion.VERSION;
|
public final static String VERSION = CoreVersion.VERSION;
|
||||||
public final static long BUILD = 16;
|
public final static long BUILD = 17;
|
||||||
|
|
||||||
/** for example "-test" */
|
/** for example "-test" */
|
||||||
public final static String EXTRA = "";
|
public final static String EXTRA = "";
|
||||||
|
@ -416,15 +416,15 @@ public abstract class TunnelPeerSelector extends ConnectChecker {
|
|||||||
if (known != null) {
|
if (known != null) {
|
||||||
for (int i = 0; i < known.size(); i++) {
|
for (int i = 0; i < known.size(); i++) {
|
||||||
RouterInfo peer = known.get(i);
|
RouterInfo peer = known.get(i);
|
||||||
// we can skip this check now, uncomment if we have some breaking change
|
|
||||||
//String v = peer.getVersion();
|
|
||||||
// RI sigtypes added in 0.9.16
|
|
||||||
// SSU inbound connection bug fixed in 0.9.17, but it won't bid, so NTCP only,
|
|
||||||
// no need to check
|
|
||||||
//if (VersionComparator.comp(v, "0.9.16") < 0)
|
|
||||||
// rv.add(peer.getIdentity().calculateHash());
|
|
||||||
|
|
||||||
Hash h = peer.getIdentity().calculateHash();
|
Hash h = peer.getIdentity().calculateHash();
|
||||||
|
|
||||||
|
// Uncomment if stricter than in shouldExclude() below
|
||||||
|
//String v = peer.getVersion();
|
||||||
|
//if (VersionComparator.comp(v, "0.9.16") < 0) {
|
||||||
|
// rv.add(h);
|
||||||
|
// continue;
|
||||||
|
//}
|
||||||
|
|
||||||
if (connected.contains(h))
|
if (connected.contains(h))
|
||||||
continue;
|
continue;
|
||||||
boolean canConnect = isInbound ? canConnect(peer, ourMask) : canConnect(ourMask, peer);
|
boolean canConnect = isInbound ? canConnect(peer, ourMask) : canConnect(ourMask, peer);
|
||||||
@ -451,9 +451,10 @@ public abstract class TunnelPeerSelector extends ConnectChecker {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 0.7.8 and earlier had major message corruption bugs */
|
/** NTCP2 */
|
||||||
//private static final String MIN_VERSION = "0.7.9";
|
private static final String MIN_VERSION = "0.9.36";
|
||||||
|
|
||||||
|
/** warning, this is also called by ProfileOrganizer.isSelectable() */
|
||||||
private static boolean shouldExclude(RouterInfo peer, char excl[]) {
|
private static boolean shouldExclude(RouterInfo peer, char excl[]) {
|
||||||
String cap = peer.getCapabilities();
|
String cap = peer.getCapabilities();
|
||||||
for (int j = 0; j < excl.length; j++) {
|
for (int j = 0; j < excl.length; j++) {
|
||||||
@ -477,10 +478,9 @@ public abstract class TunnelPeerSelector extends ConnectChecker {
|
|||||||
// so don't exclude it based on published capacity
|
// so don't exclude it based on published capacity
|
||||||
|
|
||||||
// minimum version check
|
// minimum version check
|
||||||
// we can skip this check now
|
String v = peer.getVersion();
|
||||||
//String v = peer.getVersion();
|
if (VersionComparator.comp(v, MIN_VERSION) < 0)
|
||||||
//if (VersionComparator.comp(v, MIN_VERSION) < 0)
|
return true;
|
||||||
// return true;
|
|
||||||
|
|
||||||
// uptime is always spoofed to 90m, so just remove all this
|
// uptime is always spoofed to 90m, so just remove all this
|
||||||
/******
|
/******
|
||||||
|
Reference in New Issue
Block a user