From eaf596a2571bb4131189b06383880e76ac3cea73 Mon Sep 17 00:00:00 2001 From: reger Date: Sat, 4 Jan 2014 16:10:54 +0100 Subject: [PATCH] adding proxy status to (private) status box (show also transparent and url proxy status) show search result via url proxy only if status=on --- htroot/Status.java | 5 ++++- htroot/Status_p.inc | 9 +++++---- htroot/yacysearchitem.java | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/htroot/Status.java b/htroot/Status.java index 68933ec9e..efe738d2d 100644 --- a/htroot/Status.java +++ b/htroot/Status.java @@ -198,6 +198,7 @@ public class Status prop.put("sslSupport", sb.getConfig("keyStore", "").isEmpty() || !sb.getConfigBool("server.https", false) ? 0 : 1); if (sb.getConfigBool("server.https", false)) prop.put("sslSupport_sslPort", sb.getHttpServer().getSslPort()); + // proxy information if ( sb.getConfigBool("remoteProxyUse", false) ) { prop.put("remoteProxy", "1"); prop.putXML("remoteProxy_host", sb.getConfig("remoteProxyHost", "")); @@ -206,7 +207,9 @@ public class Status } else { prop.put("remoteProxy", "0"); // not used } - + prop.put("info_isTransparentProxy", sb.getConfigBool("isTransparentProxy", false) ? "on" : "off"); + prop.put("info_proxyURL", sb.getConfigBool("proxyURL", false) ? "on" : "off"); + // peer information String thisHash = ""; final String thisName = sb.peers.mySeed().getName(); diff --git a/htroot/Status_p.inc b/htroot/Status_p.inc index affed50e4..9247fceb4 100644 --- a/htroot/Status_p.inc +++ b/htroot/Status_p.inc @@ -42,9 +42,10 @@
#[host]#:#[port]# (#(status)#broken::connected#(/status)#)
#(/portForwarding)# -
Remote Proxy
-
#(remoteProxy)#not used::#[host]#:#[port]# | Used for YaCy -> YaCy communication: #(4Yacy)#Yes::No #(/4Yacy)# #(/remoteProxy)#
- +
Proxy
+
Transparent #[info_isTransparentProxy]#   + URL #[info_proxyURL]#
+
Remote: #(remoteProxy)#not used::#[host]#:#[port]# | Used for YaCy -> YaCy communication: #(4Yacy)#Yes::No #(/4Yacy)# #(/remoteProxy)#
Auto-popup on start-up
#(popup)# @@ -77,7 +78,7 @@
Incoming Connections
Active: #[connectionsActive]# | Max: #[connectionsMax]#
-
Queues
+
Queues
Loader Queue: diff --git a/htroot/yacysearchitem.java b/htroot/yacysearchitem.java index 7144db267..7ace4a33d 100644 --- a/htroot/yacysearchitem.java +++ b/htroot/yacysearchitem.java @@ -158,7 +158,7 @@ public class yacysearchitem { // START interaction String modifyURL = resultUrlstring; - if (sb.getConfigBool("proxyURL.useforresults", false)) { + if (sb.getConfigBool("proxyURL.useforresults", false) && sb.getConfigBool("proxyURL", false)) { // check if url is allowed to view if (sb.getConfig("proxyURL.rewriteURLs", "all").equals("all")) { modifyURL = "./proxy.html?url="+modifyURL;