forked from I2P_Developers/i2p.i2p
rename class
This commit is contained in:
@ -29,7 +29,7 @@ import net.i2p.data.DataFormatException;
|
|||||||
import net.i2p.data.Hash;
|
import net.i2p.data.Hash;
|
||||||
import net.i2p.data.router.RouterAddress;
|
import net.i2p.data.router.RouterAddress;
|
||||||
import net.i2p.data.router.RouterInfo;
|
import net.i2p.data.router.RouterInfo;
|
||||||
import net.i2p.router.transport.BadCountries;
|
import net.i2p.router.transport.StrictCountries;
|
||||||
import net.i2p.router.transport.GeoIP;
|
import net.i2p.router.transport.GeoIP;
|
||||||
import net.i2p.util.FileUtil;
|
import net.i2p.util.FileUtil;
|
||||||
|
|
||||||
@ -227,7 +227,7 @@ public class BundleRouterInfos {
|
|||||||
for (Map.Entry<String, String> e : ipMap.entrySet()) {
|
for (Map.Entry<String, String> e : ipMap.entrySet()) {
|
||||||
String co = geoIP.get(e.getKey());
|
String co = geoIP.get(e.getKey());
|
||||||
if (co != null) {
|
if (co != null) {
|
||||||
if (BadCountries.contains(co)) {
|
if (StrictCountries.contains(co)) {
|
||||||
String name = e.getValue();
|
String name = e.getValue();
|
||||||
File toFile = new File(toDir, name);
|
File toFile = new File(toDir, name);
|
||||||
if (toFile.delete()) {
|
if (toFile.delete()) {
|
||||||
|
@ -438,7 +438,7 @@ public class CommSystemFacadeImpl extends CommSystemFacade {
|
|||||||
@Override
|
@Override
|
||||||
public boolean isInBadCountry() {
|
public boolean isInBadCountry() {
|
||||||
String us = getOurCountry();
|
String us = getOurCountry();
|
||||||
return (us != null && BadCountries.contains(us)) || _context.getBooleanProperty("router.forceBadCountry");
|
return (us != null && StrictCountries.contains(us)) || _context.getBooleanProperty("router.forceBadCountry");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -449,7 +449,7 @@ public class CommSystemFacadeImpl extends CommSystemFacade {
|
|||||||
@Override
|
@Override
|
||||||
public boolean isInBadCountry(Hash peer) {
|
public boolean isInBadCountry(Hash peer) {
|
||||||
String c = getCountry(peer);
|
String c = getCountry(peer);
|
||||||
return c != null && BadCountries.contains(c);
|
return c != null && StrictCountries.contains(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -463,7 +463,7 @@ public class CommSystemFacadeImpl extends CommSystemFacade {
|
|||||||
if (ip == null)
|
if (ip == null)
|
||||||
return false;
|
return false;
|
||||||
String c = _geoIP.get(ip);
|
String c = _geoIP.get(ip);
|
||||||
return c != null && BadCountries.contains(c);
|
return c != null && StrictCountries.contains(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -6,10 +6,11 @@ import java.util.Locale;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Maintain a list of bad places.
|
* Maintain a list of countries that may have
|
||||||
|
* tight restrictions on applications like ours.
|
||||||
* @since 0.8.13
|
* @since 0.8.13
|
||||||
*/
|
*/
|
||||||
public abstract class BadCountries {
|
public abstract class StrictCountries {
|
||||||
|
|
||||||
private static final Set<String> _countries;
|
private static final Set<String> _countries;
|
||||||
|
|
Reference in New Issue
Block a user