Changeset cbeaca6
- Timestamp:
- May 9, 2019 11:31:06 AM (2 years ago)
- Branches:
- master
- Children:
- be6b200
- Parents:
- 585778cd
- Location:
- router/java/src/net/i2p/router
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
router/java/src/net/i2p/router/CommSystemFacade.java
r585778cd rcbeaca6 115 115 116 116 /** @since 0.8.13 */ 117 public boolean isIn BadCountry() { return false; }117 public boolean isInStrictCountry() { return false; } 118 118 119 119 /** @since 0.9.16 */ 120 public boolean isIn BadCountry(Hash peer) { return false; }120 public boolean isInStrictCountry(Hash peer) { return false; } 121 121 122 122 /** @since 0.9.16 */ 123 public boolean isIn BadCountry(RouterInfo ri) { return false; }123 public boolean isInStrictCountry(RouterInfo ri) { return false; } 124 124 125 125 public String getCountry(Hash peer) { return null; } -
router/java/src/net/i2p/router/Router.java
r585778cd rcbeaca6 1165 1165 if (h != null) 1166 1166 return Boolean.parseBoolean(h); 1167 return _context.commSystem().isIn BadCountry();1167 return _context.commSystem().isInStrictCountry(); 1168 1168 } 1169 1169 -
router/java/src/net/i2p/router/networkdb/kademlia/FloodfillMonitorJob.java
r585778cd rcbeaca6 126 126 return false; 127 127 128 if (getContext().commSystem().isIn BadCountry())128 if (getContext().commSystem().isInStrictCountry()) 129 129 return false; 130 130 String country = getContext().commSystem().getOurCountry(); -
router/java/src/net/i2p/router/networkdb/kademlia/FloodfillPeerSelector.java
r585778cd rcbeaca6 254 254 if (_log.shouldLog(Log.DEBUG)) 255 255 _log.debug("Old: " + entry); 256 } else if (info != null && _context.commSystem().isIn BadCountry(info)) {256 } else if (info != null && _context.commSystem().isInStrictCountry(info)) { 257 257 badff.add(entry); 258 258 if (_log.shouldLog(Log.DEBUG)) -
router/java/src/net/i2p/router/networkdb/reseed/ReseedBundler.java
r585778cd rcbeaca6 113 113 if (!hasIPv4) 114 114 continue; 115 if (_context.commSystem().isIn BadCountry(ri))115 if (_context.commSystem().isInStrictCountry(ri)) 116 116 continue; 117 117 -
router/java/src/net/i2p/router/peermanager/ProfileOrganizer.java
r585778cd rcbeaca6 1392 1392 if (_thresholdCapacityValue <= profile.getCapacityValue() && 1393 1393 isSelectable(peer) && 1394 !_context.commSystem().isIn BadCountry(peer)) {1394 !_context.commSystem().isInStrictCountry(peer)) { 1395 1395 _highCapacityPeers.put(peer, profile); 1396 1396 if (_log.shouldLog(Log.DEBUG)) -
router/java/src/net/i2p/router/transport/CommSystemFacadeImpl.java
r585778cd rcbeaca6 437 437 */ 438 438 @Override 439 public boolean isIn BadCountry() {439 public boolean isInStrictCountry() { 440 440 String us = getOurCountry(); 441 441 return (us != null && StrictCountries.contains(us)) || _context.getBooleanProperty("router.forceBadCountry"); … … 448 448 */ 449 449 @Override 450 public boolean isIn BadCountry(Hash peer) {450 public boolean isInStrictCountry(Hash peer) { 451 451 String c = getCountry(peer); 452 452 return c != null && StrictCountries.contains(c); … … 459 459 */ 460 460 @Override 461 public boolean isIn BadCountry(RouterInfo ri) {461 public boolean isInStrictCountry(RouterInfo ri) { 462 462 byte[] ip = getIP(ri); 463 463 if (ip == null) -
router/java/src/net/i2p/router/transport/GeoIP.java
r585778cd rcbeaca6 484 484 if (country != null && !country.equals(oldCountry)) { 485 485 ctx.router().saveConfig(PROP_IP_COUNTRY, country); 486 if (ctx.commSystem().isIn BadCountry() && ctx.getProperty(Router.PROP_HIDDEN_HIDDEN) == null) {486 if (ctx.commSystem().isInStrictCountry() && ctx.getProperty(Router.PROP_HIDDEN_HIDDEN) == null) { 487 487 String name = fullName(country); 488 488 if (name == null)
Note: See TracChangeset
for help on using the changeset viewer.