Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
Added UI setting for optional encryption with https on p2p searches
lucciomand42c1773c84b
diff --git a/htroot/ConfigPortal_p.html b/htroot/ConfigPortal_p.htmlindex 319cdd082..eafb39ccc 100644--- a/htroot/ConfigPortal_p.html+++ b/htroot/ConfigPortal_p.html@@ -62,6 +62,15 @@</label></dd>+ <dt>Remote search encryption</dt>+ <dd>+ <label>+ <input type="checkbox" name="remotesearch.https.preferred" value="true" #(remotesearch.https.preferred)#::checked="checked"#(/remotesearch.https.preferred)# />Prefer https for search queries on remote peers.+ </label>+ When SSL/TLS is enabled on remote peers, https should be used to encrypt data exchanged with them when performing peer-to-peer searches.+ Please note that contrary to strict TLS, certificates are not validated against trusted certificate authorities (CA), thus allowing YaCy peers to use self-signed certificates.+ </dd>+<dt>Snippet Fetch Strategy & Link Verification</dt><dd><img src="env/grafics/idea.png" width="32" height="32" alt="idea" align="center"/>Speed up search results with this option! (use CACHEONLY or FALSE to switch off verification)<br/>diff --git a/htroot/ConfigPortal_p.java b/htroot/ConfigPortal_p.javaindex 24ef68097..ca87241f1 100644--- a/htroot/ConfigPortal_p.java+++ b/htroot/ConfigPortal_p.java@@ -96,6 +96,9 @@ public class ConfigPortal_p {/* When this setting has changed we must clean up the search event cache as it affects how search results are retrieved */cleanSearchCache = oldJsResort != newJsResort;sb.setConfig(SwitchboardConstants.SEARCH_JS_RESORT, newJsResort);++ sb.setConfig(SwitchboardConstants.REMOTESEARCH_HTTPS_PREFERRED,+ post.getBoolean(SwitchboardConstants.REMOTESEARCH_HTTPS_PREFERRED));sb.setConfig(SwitchboardConstants.GREEDYLEARNING_ACTIVE, post.getBoolean(SwitchboardConstants.GREEDYLEARNING_ACTIVE));@@ -163,7 +166,10 @@ public class ConfigPortal_p {cleanSearchCache = oldJsResort != newJsResort;sb.setConfig(SwitchboardConstants.SEARCH_JS_RESORT, newJsResort);-+ sb.setConfig(SwitchboardConstants.REMOTESEARCH_HTTPS_PREFERRED,+ Boolean.parseBoolean(config.getProperty(SwitchboardConstants.REMOTESEARCH_HTTPS_PREFERRED,+ String.valueOf(SwitchboardConstants.REMOTESEARCH_HTTPS_PREFERRED_DEFAULT))));+sb.setConfig(SwitchboardConstants.GREEDYLEARNING_ACTIVE, config.getProperty(SwitchboardConstants.GREEDYLEARNING_ACTIVE));sb.setConfig(SwitchboardConstants.REMOTESEARCH_RESULT_STORE, config.getProperty(SwitchboardConstants.REMOTESEARCH_RESULT_STORE));sb.setConfig(SwitchboardConstants.REMOTESEARCH_RESULT_STORE_MAXSIZE, config.getProperty(SwitchboardConstants.REMOTESEARCH_RESULT_STORE_MAXSIZE));@@ -193,6 +199,10 @@ public class ConfigPortal_p {prop.put(SwitchboardConstants.PUBLIC_SEARCHPAGE, sb.getConfigBool(SwitchboardConstants.PUBLIC_SEARCHPAGE, false) ? 1 : 0);prop.put("search.options", sb.getConfigBool("search.options", false) ? 1 : 0);prop.put(SwitchboardConstants.SEARCH_JS_RESORT, sb.getConfigBool(SwitchboardConstants.SEARCH_JS_RESORT, SwitchboardConstants.SEARCH_JS_RESORT_DEFAULT) ? 1 : 0);++ prop.put(SwitchboardConstants.REMOTESEARCH_HTTPS_PREFERRED,+ sb.getConfigBool(SwitchboardConstants.REMOTESEARCH_HTTPS_PREFERRED,+ SwitchboardConstants.REMOTESEARCH_HTTPS_PREFERRED_DEFAULT) ? 1 : 0);prop.put(SwitchboardConstants.GREEDYLEARNING_ACTIVE, sb.getConfigBool(SwitchboardConstants.GREEDYLEARNING_ACTIVE, false) ? 1 : 0);prop.put(SwitchboardConstants.GREEDYLEARNING_LIMIT_DOCCOUNT, sb.getConfig(SwitchboardConstants.GREEDYLEARNING_LIMIT_DOCCOUNT, "0"));