Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
*) Bugfix for "peer not accessible via .yacy name if Transparent Proxy Support is enabled" bug See: per Browser nicht erreichbare Peers
thelicb97d2972e99
diff --git a/htroot/proxymsg/error.html b/htroot/proxymsg/error.htmlindex e7015d531..394c53ad4 100644--- a/htroot/proxymsg/error.html+++ b/htroot/proxymsg/error.html@@ -25,7 +25,7 @@</a></td><td width="50%" align="center">- <div class="Headline">Proxy Error</div>+ <div class="Headline">#[peerName]#: Proxy Error</div></td><td width="240" align="right"></td>diff --git a/source/de/anomic/http/httpd.java b/source/de/anomic/http/httpd.javaindex 242833ea4..37396988e 100644--- a/source/de/anomic/http/httpd.java+++ b/source/de/anomic/http/httpd.java@@ -69,6 +69,9 @@ import de.anomic.server.serverHandler;import de.anomic.server.serverObjects;import de.anomic.server.serverSwitch;import de.anomic.server.logging.serverLog;+import de.anomic.yacy.yacyCore;+import de.anomic.yacy.yacyDHTAction;+import de.anomic.yacy.yacySeed;/*** Instances of this class can be passed as argument to the serverCore.@@ -307,7 +310,13 @@ public final class httpd implements serverHandler {if (dstPort.intValue() == 80) {if (dstHost.endsWith(".yacy")) {- this.prop.setProperty(httpd.CONNECTION_PROP_HOST,dstHostSocket);+ // if this peer is accessed via its yacy domain name we need to set the+ // host property to virtualHost to redirect the request to the yacy server+ if (dstHost.endsWith(yacyCore.seedDB.mySeed.getName()+".yacy")) {+ this.prop.setProperty(httpd.CONNECTION_PROP_HOST,virtualHost);+ } else {+ this.prop.setProperty(httpd.CONNECTION_PROP_HOST,dstHostSocket);+ }} else {InetAddress dstHostAddress = InetAddress.getByName(dstHost);if (!(dstHostAddress.isAnyLocalAddress() || dstHostAddress.isLoopbackAddress())) {@@ -1113,7 +1122,8 @@ public final class httpd implements serverHandler {serverObjects tp = new serverObjects();// tp.put("host", serverCore.publicIP().getHostAddress());-// tp.put("port", switchboard.getConfig("port", "8080"));+// tp.put("port", switchboard.getConfig("port", "8080"));+ tp.put("peerName", yacyCore.seedDB.mySeed.getName());tp.put("host", serverCore.publicIP().getHostAddress());tp.put("port", (serverCore.portForwardingEnabled && (serverCore.portForwarding != null))? Integer.toString(serverCore.portForwarding.getPort())