forked from I2P_Developers/i2p.i2p
NetDB: More floodfill checks
This commit is contained in:
@@ -11,6 +11,8 @@ import net.i2p.router.JobImpl;
|
|||||||
import net.i2p.router.Router;
|
import net.i2p.router.Router;
|
||||||
import net.i2p.router.RouterContext;
|
import net.i2p.router.RouterContext;
|
||||||
import net.i2p.router.peermanager.PeerProfile;
|
import net.i2p.router.peermanager.PeerProfile;
|
||||||
|
import net.i2p.router.transport.TransportManager;
|
||||||
|
import net.i2p.router.transport.TransportUtil;
|
||||||
import net.i2p.router.transport.udp.UDPTransport;
|
import net.i2p.router.transport.udp.UDPTransport;
|
||||||
import net.i2p.router.util.EventLog;
|
import net.i2p.router.util.EventLog;
|
||||||
import net.i2p.stat.Rate;
|
import net.i2p.stat.Rate;
|
||||||
@@ -109,6 +111,16 @@ class FloodfillMonitorJob extends JobImpl {
|
|||||||
if (getContext().getBooleanProperty(UDPTransport.PROP_LAPTOP_MODE))
|
if (getContext().getBooleanProperty(UDPTransport.PROP_LAPTOP_MODE))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// need IPv4 - The setting is the same for both SSU and NTCP, so just take the SSU one
|
||||||
|
if (TransportUtil.getIPv6Config(getContext(), "SSU") == TransportUtil.IPv6Config.IPV6_ONLY)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// need both transports
|
||||||
|
if (!TransportManager.isNTCPEnabled(getContext()))
|
||||||
|
return false;
|
||||||
|
if (!getContext().getBooleanPropertyDefaultTrue(TransportManager.PROP_ENABLE_UDP))
|
||||||
|
return false;
|
||||||
|
|
||||||
if (getContext().commSystem().isInBadCountry())
|
if (getContext().commSystem().isInBadCountry())
|
||||||
return false;
|
return false;
|
||||||
String country = getContext().commSystem().getOurCountry();
|
String country = getContext().commSystem().getOurCountry();
|
||||||
|
Reference in New Issue
Block a user