summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorreger <reger18@arcor.de>2014-08-25 01:25:22 +0200
committerreger <reger18@arcor.de>2014-08-25 01:25:22 +0200
commit1fdcc2d67b90a584877670db2a1174bbe13b04ca (patch)
tree0e7d411dd404b736ffef6fed5d7d84edda554f8f
parent70bb3d1b38ca78feac263b267f7715e92aeafe2f (diff)
change seedfile upload ip check to allow intranet ip in intranet mode
- this allows to setup a principal peer in intranet environment
-rw-r--r--source/net/yacy/peers/Network.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/net/yacy/peers/Network.java b/source/net/yacy/peers/Network.java
index 00e90f95a..97dfa6c43 100644
--- a/source/net/yacy/peers/Network.java
+++ b/source/net/yacy/peers/Network.java
@@ -754,7 +754,9 @@ public class Network
}
seedURL = new DigestURL(seedURLStr);
final String host = seedURL.getHost();
- if (Domains.isIntranet(host)) { // check seedlist reacheable
+ if (Domains.isLocalhost(host) || (Domains.isIntranet(host) && !sb.isIntranetMode())) { // check seedlist reacheable
+ // TODO: this does not prevent setting a local hostname e.g. "http://testhost_8090/seedlist.txt" (fyi: never did)
+ // but the or part allows to setup a principal peer in intranet environment
final String errorMsg = "seedURL in local network rejected (local hosts can't be reached from outside)";
log.warn("SaveSeedList: " + errorMsg);
return errorMsg;