public abstract class TunnelPeerSelector extends ConnectChecker
ANY_V4, ctx, log| Modifier | Constructor and Description |
|---|---|
protected |
TunnelPeerSelector(RouterContext context) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkTunnel(boolean isInbound,
List<net.i2p.data.Hash> tunnel)
Connectivity check.
|
protected boolean |
filterSlow(boolean isInbound,
boolean isExploratory)
do we want to skip peers that are slow?
|
protected Set<net.i2p.data.Hash> |
getClosestHopExclude(boolean isInbound)
Pick peers that we want to avoid for the first OB hop or last IB hop.
|
Set<net.i2p.data.Hash> |
getExclude(boolean isInbound,
boolean isExploratory)
Pick peers that we want to avoid
|
protected int |
getLength(TunnelPoolSettings settings) |
protected boolean |
isIPv6Only()
Are we IPv6 only?
|
protected void |
orderPeers(List<net.i2p.data.Hash> rv,
net.i2p.data.Hash hash)
see HashComparator
|
protected List<net.i2p.data.Hash> |
selectExplicit(TunnelPoolSettings settings,
int length)
For debugging, also possibly for restricted routes?
Needs analysis and testing
|
abstract List<net.i2p.data.Hash> |
selectPeers(TunnelPoolSettings settings)
Which peers should go into the next tunnel for the given settings?
|
static boolean |
shouldExclude(RouterContext ctx,
RouterInfo peer)
warning, this is also called by ProfileOrganizer.isSelectable()
|
protected boolean |
shouldSelectExplicit(TunnelPoolSettings settings)
For debugging, also possibly for restricted routes?
Needs analysis and testing
|
canConnect, canConnect, canConnect, getInboundMask, getOutboundMask, isNTCPDisabled, isSSUDisabledprotected TunnelPeerSelector(RouterContext context)
public abstract List<net.i2p.data.Hash> selectPeers(TunnelPoolSettings settings)
protected int getLength(TunnelPoolSettings settings)
protected boolean shouldSelectExplicit(TunnelPoolSettings settings)
protected List<net.i2p.data.Hash> selectExplicit(TunnelPoolSettings settings, int length)
public Set<net.i2p.data.Hash> getExclude(boolean isInbound, boolean isExploratory)
protected boolean isIPv6Only()
protected Set<net.i2p.data.Hash> getClosestHopExclude(boolean isInbound)
isInbound - public static boolean shouldExclude(RouterContext ctx, RouterInfo peer)
protected boolean filterSlow(boolean isInbound,
boolean isExploratory)
protected void orderPeers(List<net.i2p.data.Hash> rv, net.i2p.data.Hash hash)
protected boolean checkTunnel(boolean isInbound,
List<net.i2p.data.Hash> tunnel)
tunnel - ENDPOINT FIRST, GATEWAY LAST!!!!, length 2 or greater