Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
refactoring of Advanced Config: - removed settings that are in Basic Settings - joined pages that belong together - moved include pages from yacy/ to /
orbiter2e4aa6a17054
diff --git a/htroot/SettingsAck_p.java b/htroot/SettingsAck_p.javaindex cc43be3a1..8195eedeb 100644--- a/htroot/SettingsAck_p.java+++ b/htroot/SettingsAck_p.java@@ -289,9 +289,20 @@ public class SettingsAck_p {}- // server password+ // server accessif (post.containsKey("serveraccount")) {- // read and process data++ // static IP+ String staticIP = (String)post.get("staticIP");+ if(staticIP.equals("")){+ serverCore.useStaticIP=false;+ }else{+ serverCore.useStaticIP=true;+ }+ env.setConfig("staticIP", staticIP);+ if (staticIP.length() > 0) yacyCore.seedDB.mySeed.put(yacySeed.IP, staticIP);++ // server access dataString filter = ((String) post.get("serverfilter")).trim();/*String user = (String) post.get("serveruser");String pw1 = (String) post.get("serverpw1");@@ -377,53 +388,6 @@ public class SettingsAck_p {return prop;}- if (post.containsKey("generalsettings")) {- /*- // set peer language- String peerLang = (String) post.get("peerlang");- if ((peerLang == null) || (peerLang.equals("en"))) peerLang = "default";- HashMap lm = langMap(env);- if (!(lm.containsKey(peerLang))) peerLang = "default";- env.setConfig("htLocaleSelection", peerLang);- prop.put("info_peerLang", (String) lm.get(peerLang));- */-- // check if peer name already exists- String peerName = (String) post.get("peername");- String staticIP = (String)post.get("staticIP");- if(staticIP.equals("")){- serverCore.useStaticIP=false;- }else{- serverCore.useStaticIP=true;- }- env.setConfig("staticIP", staticIP);- if (staticIP.length() > 0) yacyCore.seedDB.mySeed.put(yacySeed.IP, staticIP);- yacySeed oldSeed = yacyCore.seedDB.lookupByName(peerName);-- if ((oldSeed == null) || (env.getConfig("peerName","").equals(peerName))) {- // the name is new- boolean nameOK = (peerName.length() <= 80);- for (int i = 0; i < peerName.length(); i++) {- if ("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_".indexOf(peerName.charAt(i)) < 0) nameOK = false;- }- if (!(nameOK)) {- // deny change- prop.put("info", 17);//peer name is wrong- } else {-- // set values- env.setConfig("peerName", peerName);- prop.put("info", 12);//port or peername changed- prop.put("info_peerName", peerName);- prop.put("info_staticIP", staticIP);- }- } else {- // deny change- prop.put("info", 16);//peer name is already used by another peer- }- return prop;- }-if (post.containsKey("proxysettings")) {/* ====================================================================diff --git a/htroot/Settings_Admin.inc b/htroot/Settings_Admin.incdeleted file mode 100644index 92050d4b0..000000000--- a/htroot/Settings_Admin.inc+++ /dev/null@@ -1,20 +0,0 @@-<p><form action="SettingsAck_p.html" method="post" enctype="multipart/form-data">-<fieldset><legend id="admin">Administration Account Settings</legend>-<p>This is the account that restricts access to this 'Settings' page. If you have not customized it yet, you should do so now:-<p><table border="0" cellspacing="5">- <tr valign="top">- <td>Account Name:</td><td><input name="adminuser" type="text" size="16" maxlength="16" value="#[adminuser]#"></td>- </tr>- <tr valign="top">- <td>Password:</td>- <td><input name="adminpw1" type="password" size="16" maxlength="16" value=""></td></tr>- <tr valign="top">- <td>Password (repeat same as above):</td>- <td><input name="adminpw2" type="password" size="16" maxlength="16" value=""></td>- </tr>- <tr valign="top">- <td colspan="2"><input type="submit" name="adminaccount" value="submit"></td>- </tr>-</table>-</fieldset>-</form><br>\ No newline at end of filediff --git a/htroot/Settings_General.inc b/htroot/Settings_General.incdeleted file mode 100644index 7e24dff2f..000000000--- a/htroot/Settings_General.inc+++ /dev/null@@ -1,28 +0,0 @@-<p><form action="SettingsAck_p.html" method="post" enctype="multipart/form-data">-<fieldset><legend id="general">General Settings</legend>-<p>-<table border="0" cellspacing="5">- <tr valign="top">- <td>Peer Name:</td>- <td><input name="peername" type="text" size="32" maxlength="80" value="#[peerName]#"></td>- <td><b>Your peer name defines also a new '.yacy' - domain, which can be accessed from every peer running this proxy.</b>- Using your 'Home Page' and 'File Share' - zones you also have a platform to provide content to your new domain.<br>- <i>(hint: Choose a name that appears on a web page that tells something about you, visit the page, get the 'senior' status, and you can be found...)</i></td>- </tr>- <tr valign="top">- <td>staticIP (optional):</td>- <td><input name="staticIP" type="text" size="32" maxlength="80" value="#[staticIP]#"></td>- <td><b>The staticIP can help that your peer can be reached by other peers in case that your- peer is behind a firewall or proxy.</b> You can create a tunnel through the firewall/proxy- (look out for 'tunneling through https proxy with connect command') and create- an access point for incoming connections.- This access address can be set here (either as IP number or domain name).- If the address of outgoing connections is equal to the address of incoming connections,- you don't need to set anything here, please leave it blank.<br>- </tr>- <tr valign="top">- <td colspan="3"><input type="submit" name="generalsettings" value="submit"></td>- </tr>-</table>-</fieldset>-</form><br>\ No newline at end of filediff --git a/htroot/yacy/seedUpload/yacySeedUploadFile.html b/htroot/Settings_Seed_UploadFile.incsimilarity index 87%rename from htroot/yacy/seedUpload/yacySeedUploadFile.htmlrename to htroot/Settings_Seed_UploadFile.incindex 64ddeedb3..9c963dea7 100644--- a/htroot/yacy/seedUpload/yacySeedUploadFile.html+++ b/htroot/Settings_Seed_UploadFile.inc@@ -1,4 +1,5 @@-<p><b>Store into filesystem:</b></p>+<p><fieldset>+<b>Store into filesystem:</b></p><p>You must configure this if you want to store the seed-list file onto the file system.</p><form action="SettingsAck_p.html" method="post" enctype="multipart/form-data"><table border="0" cellspacing="5">@@ -11,4 +12,5 @@<td colspan="3"><input type="submit" name="seedFileSettings" value="submit"></td></tr></table>-</form>\ No newline at end of file+</form>+</fieldset>\ No newline at end of filediff --git a/htroot/yacy/seedUpload/yacySeedUploadFtp.html b/htroot/Settings_Seed_UploadFtp.incsimilarity index 93%rename from htroot/yacy/seedUpload/yacySeedUploadFtp.htmlrename to htroot/Settings_Seed_UploadFtp.incindex 14ea41ccf..5de47805e 100644--- a/htroot/yacy/seedUpload/yacySeedUploadFtp.html+++ b/htroot/Settings_Seed_UploadFtp.inc@@ -1,4 +1,5 @@-<p><b>Uploading via FTP:</b></p>+<p><fieldset>+<b>Uploading via FTP:</b></p><p>This is the account for a FTP server where you can host a seed-list file.If you set this, you will become a principal peer.Your peer will then upload the seed-bootstrap information periodically,@@ -31,4 +32,5 @@ but only if there had been changes to the seed-list.<td colspan="3"><input type="submit" name="seedFtpSettings" value="submit"></td></tr></table>-</form>\ No newline at end of file+</form>+</fieldset>\ No newline at end of filediff --git a/htroot/yacy/seedUpload/yacySeedUploadScp.html b/htroot/Settings_Seed_UploadScp.incsimilarity index 93%rename from htroot/yacy/seedUpload/yacySeedUploadScp.htmlrename to htroot/Settings_Seed_UploadScp.incindex e1bc9c7f3..92960b748 100644--- a/htroot/yacy/seedUpload/yacySeedUploadScp.html+++ b/htroot/Settings_Seed_UploadScp.inc@@ -1,4 +1,5 @@-<p><b>Uploading via SCP:</b></p>+<p><fieldset>+<b>Uploading via SCP:</b></p><p>This is the account for a server where you are able to login via ssh.</p><form action="SettingsAck_p.html" method="post" enctype="multipart/form-data"><table border="0" cellspacing="5">@@ -32,5 +33,5 @@<td colspan="3"><input type="submit" name="seedScpSettings" value="submit"></td></tr></table>-</fieldset>-</form>\ No newline at end of file+</form>+</fieldset>\ No newline at end of filediff --git a/htroot/Settings_ServerAccess.inc b/htroot/Settings_ServerAccess.incindex 574e4f96b..1ecbe205c 100644--- a/htroot/Settings_ServerAccess.inc+++ b/htroot/Settings_ServerAccess.inc@@ -1,25 +1,51 @@<p><form action="SettingsAck_p.html" method="post" enctype="multipart/form-data">-<fieldset><legend id="ServerAccess">Server Access Settings</legend>-<p>Here you can restrict access to the server. By default, the access is not limited, because this function is needed to spawn the p2p index-sharing function. If you block access to your server (setting anything else than '*'), then you will also be blocked from using other peers' indexes for search service. However, blocking access may be correct in enterprise environments where you only want to index your company's own web pages.</p>-<p>ATTENTION: Your current IP is recognized as "#[clientIP]#". If the value you enter here does not match with this IP, you will not be able to access the server pages anymore</p>+<fieldset><legend id="general">General Settings</legend><p><table border="0" cellspacing="5">-<tr valign="top">- <td>IP-Number filter:</td>- <td colspan ="2"><input name="serverfilter" type="text" size="50" maxlength="1000" value="#[serverfilter]#"></td>+ <tr valign="top">+ <td>IP-Number filter:</td>+ <td><input name="serverfilter" type="text" size="50" maxlength="1000" value="#[serverfilter]#"></td>+ <td><b>Here you can restrict access to the server.</b> By default, the access is not limited,+ because this function is needed to spawn the p2p index-sharing function.+ If you block access to your server (setting anything else than '*'), then you will also be blocked+ from using other peers' indexes for search service.+ However, blocking access may be correct in enterprise environments where you only want to index your+ company's own web pages.</td></tr><!--<tr valign="top">- <td>Account Name:</td><td><input name="serveruser" type="text" size="16" maxlength="16" value="#[serveruser]#"></td>+ <td><input name="serveruser" type="text" size="16" maxlength="16" value="#[serveruser]#"></td>+ <td></td>+ <td></td>+ </tr>+ <tr valign="top">+ <td>Password:</td>+ <td><input name="serverpw1" type="password" size="16" maxlength="16" value=""></td>+ <td></td>+ </tr>+ <tr valign="top">+ <td>Password (repeat same as above):</td>+ <td><input name="serverpw2" type="password" size="16" maxlength="16" value=""></td>+ <td></td></tr>--><tr valign="top">- <td valign="bottom" rowspan="3"><input type="submit" name="serveraccount" value="Submit"></td>+ <td>staticIP (optional):</td>+ <td><input name="staticIP" type="text" size="32" maxlength="80" value="#[staticIP]#"></td>+ <td><b>The staticIP can help that your peer can be reached by other peers in case that your+ peer is behind a firewall or proxy.</b> You can create a tunnel through the firewall/proxy+ (look out for 'tunneling through https proxy with connect command') and create+ an access point for incoming connections.+ This access address can be set here (either as IP number or domain name).+ If the address of outgoing connections is equal to the address of incoming connections,+ you don't need to set anything here, please leave it blank.<br>+ ATTENTION: Your current IP is recognized as "#[clientIP]#".+ If the value you enter here does not match with this IP,+ you will not be able to access the server pages anymore</td>+ </tr>+ <tr valign="top">+ <td colspan="3"><input type="submit" name="serveraccount" value="submit"></td></tr>-<!---<tr valign="top"><td>Password:</td><td><input name="serverpw1" type="password" size="16" maxlength="16" value=""></td></tr>-<tr valign="top"><td>Password (repeat same as above):</td><td><input name="serverpw2" type="password" size="16" maxlength="16" value=""></td></tr>---></table></fieldset>-</form><br>\ No newline at end of file+</form>\ No newline at end of filediff --git a/htroot/Settings_p.html b/htroot/Settings_p.htmlindex d7af1584c..5c4cdbb93 100644--- a/htroot/Settings_p.html+++ b/htroot/Settings_p.html@@ -30,18 +30,16 @@delete the file 'DATA/SETTINGS/httpProxy.conf' in the YaCy application root folder and start YaCy again.</p><ul class="settingsMenu">- <li><a href="?page=admin">Administration Account Settings</a></li>- <li><a href="?page=general">General Settings</a></li>+ <li><a href="?page=ServerAccess">Server Access Settings</a></li><li><a href="?page=ProxyAccess">Proxy Access Settings</a></li>+ <li><a href="?page=parser">Content Parser Settings</a></li>+ <li><a href="?page=crawler">Crawler Settings</a></li><li><a href="?page=http">HTTP Networking</a></li><li><a href="?page=proxy">Remote Proxy (optional)</a></li><li><a href="?page=portForwarding">Port Forwarding (optional)</a></li>- <li><a href="?page=ServerAccess">Server Access Settings</a></li><li><a href="?page=SystemBehaviour">System Behaviour Settings</a></li><li><a href="?page=seed">Seed Upload Settings</a></li><li><a href="?page=messageForwarding">Message Forwarding (optional)</a></li>- <li><a href="?page=parser">Content Parser Settings</a></li>- <li><a href="?page=crawler">Crawler Settings</a></li></ul>#%[settingsTables]%#diff --git a/htroot/Settings_p.java b/htroot/Settings_p.javaindex 3712d8aab..67032e261 100644--- a/htroot/Settings_p.java+++ b/htroot/Settings_p.java@@ -249,7 +249,7 @@ public final class Settings_p {String uploaderName = (String) uploaderKeys.next();prop.put("seedUploadMethods_" +count+ "_name", uploaderName);prop.put("seedUploadMethods_" +count+ "_selected", uploaderName.equals(enabledUploader)?1:0);- prop.put("seedUploadMethods_" +count+ "_file", "yacy/seedUpload/yacySeedUpload" + uploaderName + ".html");+ prop.put("seedUploadMethods_" +count+ "_file", "Settings_Seed_Upload" + uploaderName + ".inc");yacySeedUploader theUploader = yacyCore.getSeedUploader(uploaderName);String[] configOptions = theUploader.getConfigurationOptions();diff --git a/htroot/yacy/search.java b/htroot/yacy/search.javaindex 0ff673dfa..3a0a3fc3d 100644--- a/htroot/yacy/search.java+++ b/htroot/yacy/search.java@@ -95,7 +95,7 @@ public final class search {// final boolean global = ((String) post.get("resource", "global")).equals("global"); // if true, then result may consist of answers from other peers// Date remoteTime = yacyCore.parseUniversalDate((String) post.get(yacySeed.MYTIME)); // read remote time- //urls = "nQoUx975gJ5C"; // ONLY FOR TESTS!+ // test - http://localhost:8080/yacy/search.html?query=4galTpdpDM5Q// tell all threads to do nothing for a specific timesb.intermissionAllThreads(2 * duetime);