added peer-Name settings to Settings page

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@172 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 20 years ago
parent 5f90daa265
commit 6f09251bbc

@ -28,14 +28,20 @@ Your request cannot be processed.<br>Nothing changed.
<b>Your administration account setting has been made.</b><br>
Your new administration account name is #[user]#. The password has been accepted.<br>If you go back to the Settings page, you must log-in again.
::
<b>Your proxy account setting has been changed.<br>
<b>Your proxy access setting has been changed.<br>
Your proxy account check has been disabled, since you did not supply a password.</b><br>
The new proxy IP filter is set to #[filter]#
The new proxy IP filter is set to #[filter]#<br>
Transparent Proxy Support is: <font color="#556699">#[isTransparentProxy]#</font><p>
The proxy port is: <font color="#556699">#[port]#</font><br>
<u>if you changed the Port, you need to restart YaCy.</u>
::
<b>Your proxy account setting has been changed.</b><br>
<b>Your proxy access setting has been changed.</b><br>
Your new proxy account name is #[user]#. The password has been accepted.<br>
If you open any public web page through the proxy, you must log-in then.<br>
The new proxy IP filter is set to #[filter]#.
The new proxy IP filter is set to #[filter]#.<br>
Transparent Proxy Support is: <font color="#556699">#[isTransparentProxy]#</font><p>
The proxy port is: <font color="#556699">#[port]#</font><br>
<u>if you changed the Port, you need to restart YaCy.</u>
::
<b>Your server access filter is now set to #[filter]#</b><br>
<!--Your new server account name is #[user]#. The password has been accepted.<br>
@ -47,12 +53,10 @@ Auto pop-up of the Status page is now <b>enabled</b><br>
::
You are now permanently <b>online</b>. After a short while you should see the effect on the <a href="Status.html">status</a> page.<br>
::
<b>Port is: <font color="#556699">#[port]#</font></b><br>
<b>PeerName is: <font color="#556699">#[peerName]#</font></b><br>
<b>Transparent Proxy Support is: <font color="#556699">#[isTransparentProxy]#</font></b><p>
<u>if you changed the Port, you need to restart the Proxy.</u>
<b>The Peer Name is: <font color="#556699">#[peerName]#</font><br>
Your Peer Language is: <font color="#556699">#[peerLang]#</font><br>
::
<b>Seed Settings changed.#(success)#::You are now a principal peer.#(/success)#</b><br>
<b>Seed Settings changed.#(success)#::You are now a principal peer.#(/success)#<br>
::
<p><b>Seed Settings changed, but something is wrong.</b></p>
<p><font color="red">#[errormsg]#</font></p>
@ -62,12 +66,12 @@ Please return to the settings page and modify the data.<br>
<b>The remote-proxy setting has been changed</b><br>
The new setting is effective immediately, you don't need to re-start.
::
<b>The submitted peer name is already used by another peer. Please choose a different name.</b><br>
The settings have not been changed.
<b>The submitted peer name is already used by another peer. Please choose a different name.</b> The Peer name has not been changed.<br>
Your Peer Language is: <font color="#556699">#[peerLang]#</font><br>
::
<b>The submitted peer name is not well-formed. Please choose a different name.</b><br>
<b>The submitted peer name is not well-formed. Please choose a different name.</b> The Peer name has not been changed.<br>
Peer names must not contain characters other than (a-z, A-Z, 0-9, '-', '_') and must not be longer than 80 characters.
The settings have not been changed.
Your Peer Language is: <font color="#556699">#[peerLang]#</font><br>
::
The new parser settings where changed successfully.<br>
Parsing of the following mime-types was enabled:<br>

@ -49,6 +49,7 @@ import java.util.Collection;
import java.util.Collections;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
@ -66,6 +67,17 @@ public class SettingsAck_p {
private static boolean nothingChanged;
public static HashMap langMap(serverSwitch env) {
String[] ms = env.getConfig("htLocaleLang", "").split(",");
HashMap map = new HashMap();
int p;
for (int i = 0; i < ms.length; i++) {
p = ms[i].indexOf("/");
if (p > 0) map.put(ms[i].substring(0, p), ms[i].substring(p + 1));
}
return map;
}
public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) {
// return variable that accumulates replacements
serverObjects prop = new serverObjects();
@ -111,6 +123,16 @@ public class SettingsAck_p {
// proxy password
if (post.containsKey("proxyaccount")) {
// set new port
String port = (String) post.get("port");
env.setConfig("port", port);
prop.put("info_port", port);
// set transparent proxy flag
httpdProxyHandler.isTransparentProxy = post.containsKey("isTransparentProxy");
env.setConfig("isTransparentProxy", httpdProxyHandler.isTransparentProxy ? "true" : "false");
prop.put("info_isTransparentProxy", httpdProxyHandler.isTransparentProxy ? "on" : "off");
// read and process data
String filter = (String) post.get("proxyfilter");
String user = (String) post.get("proxyuser");
@ -202,12 +224,16 @@ public class SettingsAck_p {
}
if (post.containsKey("generalsettings")) {
String port = (String) post.get("port");
String peerName = (String) post.get("peername");
httpdProxyHandler.isTransparentProxy = post.containsKey("isTransparentProxy");
// 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");
yacySeed oldSeed = yacyCore.seedDB.lookupByName(peerName);
if ((oldSeed == null) || (env.getConfig("peerName","").equals(peerName))) {
@ -222,14 +248,9 @@ public class SettingsAck_p {
} else {
// set values
env.setConfig("port", port);
env.setConfig("peerName", peerName);
env.setConfig("isTransparentProxy", httpdProxyHandler.isTransparentProxy ? "true" : "false");
prop.put("info", 12);//port or peername changed
prop.put("info_port", port);
prop.put("info_peerName", peerName);
prop.put("info_isTransparentProxy", httpdProxyHandler.isTransparentProxy ? "on" : "off");
}
} else {
// deny change
@ -352,8 +373,6 @@ public class SettingsAck_p {
}
}
if (post.containsKey("parserSettings")) {
plasmaSwitchboard sb = (plasmaSwitchboard)env;
post.remove("parserSettings");

@ -1,210 +1,223 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<title>YaCy: Settings</title>
#[metas]#
</head>
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
#[header]#
<br><br>
<h2>Settings</h2>
<p>This is the configuration page for the AnomicHTTPProxy. Access to this page should be limited to an administration person only.
To restrict the access to this page, please set an administrator account and password below.</p>
<p>If you want to restore all settings to the default values,
but <b>forgot your administration password</b>, you must stop the proxy,
delete the file 'DATA/SETTINGS/httpProxy.conf' in the YaCy application root folder and start YaCy again.
<p><form action="SettingsAck_p.html" method="post" enctype="multipart/form-data">
<fieldset><legend>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>
<td valign="bottom" align="right" rowspan="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" name="adminaccount" value="submit"></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>
</table>
</fieldset>
</form><br>
<p><form action="SettingsAck_p.html" method="post" enctype="multipart/form-data">
<fieldset><legend>General Settings</legend>
<p>
<table border="0" cellspacing="5">
<tr valign="top">
<td>Proxy and Administration Port:</td>
<td><input name="port" type="text" size="5" maxlength="5" value="#[port]#"></td>
<td><i>Changes will take effect after restart only.</i></td>
</tr>
<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.
Using your 'Home Page' and 'File Share' - zones you also have a platform to provide content to your new domain.</b><br>
<i>(hint: choose a name that appears on a web page that tells something about you, vistit the page, get the 'senior' status, and you can be found..)</i></td>
</tr>
<tr valign="top">
<td>Transparent Proxy:</td>
<td><input type="checkbox" name="isTransparentProxy" align="top" #(isTransparentProxy)#::checked#(/isTransparentProxy)#></td>
<td>With this you can specify if YaCy can be used as transparent proxy.<br>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<title>YaCy: Settings</title>
#[metas]#
</head>
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
#[header]#
<br><br>
<h2>Settings</h2>
<p>This is the configuration page for the AnomicHTTPProxy. Access to this page should be limited to an administration person only.
To restrict the access to this page, please set an administrator account and password below.</p>
<p>If you want to restore all settings to the default values,
but <b>forgot your administration password</b>, you must stop the proxy,
delete the file 'DATA/SETTINGS/httpProxy.conf' in the YaCy application root folder and start YaCy again.
<p><form action="SettingsAck_p.html" method="post" enctype="multipart/form-data">
<fieldset><legend>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>
<td valign="bottom" align="right" rowspan="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" name="adminaccount" value="submit"></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>
</table>
</fieldset>
</form><br>
<p><form action="SettingsAck_p.html" method="post" enctype="multipart/form-data">
<fieldset><legend>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.
Using your 'Home Page' and 'File Share' - zones you also have a platform to provide content to your new domain.</b><br>
<i>(hint: choose a name that appears on a web page that tells something about you, vistit the page, get the 'senior' status, and you can be found..)</i></td>
</tr>
<tr valign="top">
<td>Peer Language:</td>
<td><input name="peerlang" type="text" size="2" maxlength="2" value="#[peerLang]#"></td>
<td>Enter 'de' for Deutsch, 'en' for English</td> <!-- make a selection box here -->
</tr>
<tr>
<td><input type="submit" name="generalsettings" value="submit"></td>
<td></td>
<td></td>
</tr>
</table>
</fieldset>
</form><br>
<p><form action="SettingsAck_p.html" method="post" enctype="multipart/form-data">
<fieldset><legend>Proxy Access Settings</legend>
<table border="0" cellspacing="5">
<tr valign="top">
<td>Proxy and Administration Port:</td>
<td><input name="port" type="text" size="5" maxlength="5" value="#[port]#"></td>
<td><i>Changes will take effect after restart only.</i></td>
</tr>
<tr valign="top">
<td>Transparent Proxy:</td>
<td><input type="checkbox" name="isTransparentProxy" align="top" #(isTransparentProxy)#::checked#(/isTransparentProxy)#></td>
<td>With this you can specify if YaCy can be used as transparent proxy.<br>
<i>Hint: On linux you can configure your firewall to transparently redirect all http traffic through yacy using this iptables rule:</i><br>
<small><code>iptables -t nat -A PREROUTING -p tcp -s 192.168.0.0/16 --dport 80 -j DNAT --to 192.168.0.1:#[port]#</code></small>
</td>
</tr>
<tr>
<td><input type="submit" name="generalsettings" value="submit"></td>
<td></td>
<td></td>
</tr>
</table>
</fieldset>
</form><br>
<p><form action="SettingsAck_p.html" method="post" enctype="multipart/form-data">
<fieldset><legend>Remote Proxy (optional)</legend>
<p>YaCy can use another proxy to connect to the internet. You can enter the address for the remote proxy here:</p>
<p><table border="0" cellspacing="5">
<tr valign="top">
<td>Remote proxy host:</td>
<td><input name="remoteProxyHost" type="text" size="32" maxlength="128" value="#[remoteProxyHost]#"></td>
</tr>
<tr valign="top">
<td>Remote proxy port:</td>
<td><input name="remoteProxyPort" type="text" size="5" maxlength="5" value="#[remoteProxyPort]#"></td>
</tr>
<tr valign="top">
<td>no-proxy adresses:</td>
<td><input name="remoteProxyNoProxy" type="text" size="32" maxlength="128" value="#[remoteProxyNoProxy]#"></td>
</tr>
<tr valign="top">
<td>Use remote proxy:</td>
<td><input type="checkbox" name="remoteProxyUse" align="top" #(remoteProxyUseChecked)#::checked#(/remoteProxyUseChecked)#></td>
</tr>
<tr valign="top">
<td></td>
<td><input type="submit" name="proxysettings" value="submit"></td>
</tr>
</table>
</fieldset>
</form><br>
<p>You can restrict the access to this proxy using a two-stage security barrier:
<ul>
<li>define an <i>access domain</i> with a list of granted client IP-numbers or with wildcards</li>
<li>define an <i>user account</i> with an user:password - pair</li>
</ul><br>
<p><form action="SettingsAck_p.html" method="post" enctype="multipart/form-data">
<fieldset><legend>Proxy Access Settings</legend>
<p>This is the account that restricts access to the proxy function. You probably don't want to share the proxy to the internet, so you should set the IP-Number Access Domain to a pattern that corresponds to you local intranet. The default setting should be right in most cases. If you want, you can also set a proxy account so that every proxy user must authenticate first, but this is rather unusual.</p>
<p><table border="0" cellspacing="5">
<tr valign="top"><td>IP-Number filter:</td><td colspan ="2"><input name="proxyfilter" type="text" size="50" maxlength="1000" value="#[proxyfilter]#"></td></tr>
<tr valign="top"><td>Account Name:</td><td><input name="proxyuser" type="text" size="16" maxlength="16" value="#[proxyuser]#"></td>
<td valign="bottom" align="right" rowspan="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" name="proxyaccount" value="Submit"></td></tr>
<tr valign="top"><td>Password:</td><td><input name="proxypw1" type="password" size="16" maxlength="16" value=""></td></tr>
<tr valign="top"><td>Password (repeat same as above):</td><td><input name="proxypw2" type="password" size="16" maxlength="16" value=""></td></tr>
</table>
</fieldset>
</form><br>
<p><form action="SettingsAck_p.html" method="post" enctype="multipart/form-data">
<fieldset><legend>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 any more</p>
<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>
<tr valign="top"><td><!--Account Name:</td><td><input name="serveruser" type="text" size="16" maxlength="16" value="#[serveruser]#">--></td>
<td valign="bottom" align="right" rowspan="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<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>
<p><form action="SettingsAck_p.html" method="post" enctype="multipart/form-data">
<fieldset><legend>System Behaviour Settings</legend>
<table>
<tr><td>Auto pop-up of status page on start-up:</td>
<td><input type="submit" name="enpop" value="enable"> / <input type="submit" name="dispop" value="disable"></td></tr>
</table>
</fieldset>
</form><br>
<p>
<fieldset>
<legend>Seed Upload Settings</legend>
<p>With these settings you can configure if you have an account on a public accessible
server where you can host a seed-list file.</p>
<p><b>General Settings:</b></p>
If you enable one of the available uploading methods, you will become a principal peer.
Your peer will then upload the seed-bootstrap information periodically,
but only if there had been changes to the seed-list.
</p>
<form action="SettingsAck_p.html" method="post" enctype="multipart/form-data">
<table border="0" cellspacing="5">
<tr valign="top">
<td>Upload Method:</td>
<td><select name="seedUploadMethod" size="1">
#{seedUploadMethods}#
<option value="#[name]#" #(selected)#::selected#(/selected)#>#[name]#</option>
#{/seedUploadMethods}#
</select></td>
<td><i>Here you can specify which upload method should be used. Select 'none' to deactivate uploading.</i></td>
</tr>
<tr valign="top">
<td>URL:</td>
<td><input name="seedURL" type="text" size="40" value="#[seedURL]#"></td>
<td><i>The URL that can be used to retrieve the uploaded seed file, like
http://www.&lt;my-host&gt;.net/yacy/seed.txt'</i></td>
</tr>
<tr>
<td colspan="3"><input type="submit" name="seedSettings" value="submit"></td>
</tr>
</table>
</form>
#{seedUploadMethods}#
#%[file]%#
#{/seedUploadMethods}#
</fieldset>
<br>
<p><form action="SettingsAck_p.html" method="post" enctype="multipart/form-data">
<fieldset><legend>Content Parser Settings</legend>
<p>With this settings you can activate or deactivate parsing of additional content types based on their MIME-types.<br>
For a detailed description of the various MIME-types take a look at <a href="http://www.iana.org/assignments/media-types/">http://www.iana.org/assignments/media-types/</a></p>
<p>
<table border="0" cellpadding="2" cellspacing="1">
<tr class="TableHeader" valign="bottom">
<td class="small" >Activate</td>
<td class="small" >Mime-Type</td>
<td class="small" >Parser&nbsp;Class&nbsp;Name</td>
<td class="small" ></td>
</tr>
#{parser}#
<tr class="TableCellDark">
<td class="small" align="center"><input type="checkbox" name="#[mime]#" align="top" #(status)#::checked#(/status)#></td>
<td class="small" >#[mime]#</td>
<td class="small" title="Full qualified name: #[name]#">#[shortname]#</td>
<td class="small" width="100%"></td>
</tr>
#{/parser}#
<tr class="TableCellLight">
<td class="small" align="center"><input type="checkbox" name="allParserEnabled" align="top" #(allParserEnabled)#::checked#(/allParserEnabled)#>
<td colspan="2" class="small" >Enable all parsers</td>
<td class="small">&nbsp;</td>
</tr>
<tr class="TableCellLight">
<td colspan="4" class="small" ><input type="submit" name="parserSettings" value="submit">&nbsp;Changes take effect immediately</td>
</tr>
</table>
</fieldset>
</form><br>
#[footer]#
</body>
</html>
</td>
</tr>
</table>
<p>You can restrict the access to this proxy using a two-stage security barrier:
<ul>
<li>define an <i>access domain</i> with a list of granted client IP-numbers or with wildcards</li>
<li>define an <i>user account</i> with an user:password - pair</li>
</ul><br>
<p>This is the account that restricts access to the proxy function. You probably don't want to share the proxy to the internet, so you should set the IP-Number Access Domain to a pattern that corresponds to you local intranet. The default setting should be right in most cases. If you want, you can also set a proxy account so that every proxy user must authenticate first, but this is rather unusual.</p>
<p><table border="0" cellspacing="5">
<tr valign="top"><td>IP-Number filter:</td><td colspan ="2"><input name="proxyfilter" type="text" size="50" maxlength="1000" value="#[proxyfilter]#"></td></tr>
<tr valign="top"><td>Account Name:</td><td><input name="proxyuser" type="text" size="16" maxlength="16" value="#[proxyuser]#"></td>
<td valign="bottom" align="right" rowspan="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" name="proxyaccount" value="Submit"></td></tr>
<tr valign="top"><td>Password:</td><td><input name="proxypw1" type="password" size="16" maxlength="16" value=""></td></tr>
<tr valign="top"><td>Password (repeat same as above):</td><td><input name="proxypw2" type="password" size="16" maxlength="16" value=""></td></tr>
</table>
</fieldset>
</form><br>
<p><form action="SettingsAck_p.html" method="post" enctype="multipart/form-data">
<fieldset><legend>Remote Proxy (optional)</legend>
<p>YaCy can use another proxy to connect to the internet. You can enter the address for the remote proxy here:</p>
<p><table border="0" cellspacing="5">
<tr valign="top">
<td>Remote proxy host:</td>
<td><input name="remoteProxyHost" type="text" size="32" maxlength="128" value="#[remoteProxyHost]#"></td>
</tr>
<tr valign="top">
<td>Remote proxy port:</td>
<td><input name="remoteProxyPort" type="text" size="5" maxlength="5" value="#[remoteProxyPort]#"></td>
</tr>
<tr valign="top">
<td>no-proxy adresses:</td>
<td><input name="remoteProxyNoProxy" type="text" size="32" maxlength="128" value="#[remoteProxyNoProxy]#"></td>
</tr>
<tr valign="top">
<td>Use remote proxy:</td>
<td><input type="checkbox" name="remoteProxyUse" align="top" #(remoteProxyUseChecked)#::checked#(/remoteProxyUseChecked)#></td>
</tr>
<tr valign="top">
<td></td>
<td><input type="submit" name="proxysettings" value="submit"></td>
</tr>
</table>
</fieldset>
</form><br>
<p><form action="SettingsAck_p.html" method="post" enctype="multipart/form-data">
<fieldset><legend>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 any more</p>
<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>
<tr valign="top"><td><!--Account Name:</td><td><input name="serveruser" type="text" size="16" maxlength="16" value="#[serveruser]#">--></td>
<td valign="bottom" align="right" rowspan="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<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>
<p><form action="SettingsAck_p.html" method="post" enctype="multipart/form-data">
<fieldset><legend>System Behaviour Settings</legend>
<table>
<tr><td>Auto pop-up of status page on start-up:</td>
<td><input type="submit" name="enpop" value="enable"> / <input type="submit" name="dispop" value="disable"></td></tr>
</table>
</fieldset>
</form><br>
<p>
<fieldset>
<legend>Seed Upload Settings</legend>
<p>With these settings you can configure if you have an account on a public accessible
server where you can host a seed-list file.</p>
<p><b>General Settings:</b></p>
If you enable one of the available uploading methods, you will become a principal peer.
Your peer will then upload the seed-bootstrap information periodically,
but only if there had been changes to the seed-list.
</p>
<form action="SettingsAck_p.html" method="post" enctype="multipart/form-data">
<table border="0" cellspacing="5">
<tr valign="top">
<td>Upload Method:</td>
<td><select name="seedUploadMethod" size="1">
#{seedUploadMethods}#
<option value="#[name]#" #(selected)#::selected#(/selected)#>#[name]#</option>
#{/seedUploadMethods}#
</select></td>
<td><i>Here you can specify which upload method should be used. Select 'none' to deactivate uploading.</i></td>
</tr>
<tr valign="top">
<td>URL:</td>
<td><input name="seedURL" type="text" size="40" value="#[seedURL]#"></td>
<td><i>The URL that can be used to retrieve the uploaded seed file, like
http://www.&lt;my-host&gt;.net/yacy/seed.txt'</i></td>
</tr>
<tr>
<td colspan="3"><input type="submit" name="seedSettings" value="submit"></td>
</tr>
</table>
</form>
#{seedUploadMethods}#
#%[file]%#
#{/seedUploadMethods}#
</fieldset>
<br>
<p><form action="SettingsAck_p.html" method="post" enctype="multipart/form-data">
<fieldset><legend>Content Parser Settings</legend>
<p>With this settings you can activate or deactivate parsing of additional content types based on their MIME-types.<br>
For a detailed description of the various MIME-types take a look at <a href="http://www.iana.org/assignments/media-types/">http://www.iana.org/assignments/media-types/</a></p>
<p>
<table border="0" cellpadding="2" cellspacing="1">
<tr class="TableHeader" valign="bottom">
<td class="small" >Activate</td>
<td class="small" >Mime-Type</td>
<td class="small" >Parser&nbsp;Class&nbsp;Name</td>
<td class="small" ></td>
</tr>
#{parser}#
<tr class="TableCellDark">
<td class="small" align="center"><input type="checkbox" name="#[mime]#" align="top" #(status)#::checked#(/status)#></td>
<td class="small" >#[mime]#</td>
<td class="small" title="Full qualified name: #[name]#">#[shortname]#</td>
<td class="small" width="100%"></td>
</tr>
#{/parser}#
<tr class="TableCellLight">
<td class="small" align="center"><input type="checkbox" name="allParserEnabled" align="top" #(allParserEnabled)#::checked#(/allParserEnabled)#>
<td colspan="2" class="small" >Enable all parsers</td>
<td class="small">&nbsp;</td>
</tr>
<tr class="TableCellLight">
<td colspan="4" class="small" ><input type="submit" name="parserSettings" value="submit">&nbsp;Changes take effect immediately</td>
</tr>
</table>
</fieldset>
</form><br>
#[footer]#
</body>
</html>

@ -66,8 +66,11 @@ public final class Settings_p {
//if (post == null) System.out.println("POST: NULL"); else System.out.println("POST: " + post.toString());
prop.put("port", env.getConfig("port", "8080"));
prop.put("peerName", env.getConfig("peerName", "nameless"));
prop.put("isTransparentProxy", env.getConfig("isTransparentProxy", "false").equals("true") ? 1 : 0);
prop.put("peerName", env.getConfig("peerName", "nameless"));
String peerLang = env.getConfig("htLocaleSelection", "default");
if (peerLang.equals("default")) peerLang = "en";
prop.put("peerLang", peerLang);
// set values
String s;

Loading…
Cancel
Save