diff options
| author | reger <reger18@arcor.de> | 2014-08-20 22:45:36 +0200 |
|---|---|---|
| committer | reger <reger18@arcor.de> | 2014-08-20 22:45:36 +0200 |
| commit | e033e79826a8954c1fe1cbaaedbf95b1997e2221 (patch) | |
| tree | 1fb7c65bda1206c854906edf1c7565eb888c7e4c | |
| parent | e4e1bdeba0f5e7518e5c1d87ff51e8759a50c909 (diff) | |
remove old description for proxy port settings (Settings_p.html?page=ProxyAccess)
- The options were not current (only port number accepted, which is part of ConfigBasic.html)
- Deleted options and the port number input field from the proxyaccess page.
- joined both transparent proxy setup pages (Settings_Http.inc & Settings_ProxyAccess.inc) in one page
- adjustments to the related/linked pages
| -rw-r--r-- | htroot/ConfigBasic.html | 2 | ||||
| -rw-r--r-- | htroot/SettingsAck_p.html | 2 | ||||
| -rw-r--r-- | htroot/SettingsAck_p.java | 32 | ||||
| -rw-r--r-- | htroot/Settings_Http.inc | 51 | ||||
| -rw-r--r-- | htroot/Settings_ProxyAccess.inc | 63 | ||||
| -rw-r--r-- | htroot/Settings_p.html | 1 | ||||
| -rw-r--r-- | htroot/Settings_p.java | 4 | ||||
| -rw-r--r-- | htroot/Status_p.inc | 4 |
8 files changed, 50 insertions, 109 deletions
diff --git a/htroot/ConfigBasic.html b/htroot/ConfigBasic.html index be72bfad8..e1dd10e88 100644 --- a/htroot/ConfigBasic.html +++ b/htroot/ConfigBasic.html @@ -93,7 +93,7 @@ <dt><label for="port">Peer Port: </label></dt> <dd> <input type="text" name="port" id="port" value="#[defaultPort]#" size="5" maxlength="5" /> - <input type="checkbox" name="withssl" id="withssl" #(withsslenabled)#::checked="checked"#(/withsslenabled)#>with SSL (https enabled#(withsslenabled)#:: on port <a href="Settings_p.html?page=http">#[sslport]#</a>#(/withsslenabled)#) + <input type="checkbox" name="withssl" id="withssl" #(withsslenabled)#::checked="checked"#(/withsslenabled)#>with SSL (https enabled#(withsslenabled)#:: on port <a href="Settings_p.html?page=ProxyAccess">#[sslport]#</a>#(/withsslenabled)#) </dd> #(upnp)#::<dt> <label for="enableUpnp">Configure your router for YaCy using UPnP: </label> diff --git a/htroot/SettingsAck_p.html b/htroot/SettingsAck_p.html index 0b4464890..94741d49c 100644 --- a/htroot/SettingsAck_p.html +++ b/htroot/SettingsAck_p.html @@ -135,8 +135,6 @@ ::<!-- 25 -->
<p>You are now in <strong>Cache Mode</strong>. Only Proxy-cache ist available in this mode. After a short while you should see the effect on the <a href="Status.html">status</a> page.</p>
::<!-- 26 -->
- <p class="error">Unable to bild the server to the new Port: <span class="settingsValue">#[port]#</span><br />
- This values seems not to be a valid port configuration.</p>
::<!-- 27 -->
<p class="error"><strong>Invalid IP-Number filter:</strong> <tt>#[filter]#</tt><br />
<strong>Error in pattern nr #[nr]#</strong> "<tt>#[pattern]#</tt>": <tt>#[error]#</tt>
diff --git a/htroot/SettingsAck_p.java b/htroot/SettingsAck_p.java index 2ebbcef94..d7609d9c3 100644 --- a/htroot/SettingsAck_p.java +++ b/htroot/SettingsAck_p.java @@ -27,8 +27,6 @@ // javac -classpath .:../Classes SettingsAck_p.java // if the shell's current path is HTROOT -import java.net.InetSocketAddress; -import java.net.SocketException; import java.util.HashMap; import java.util.Iterator; import java.util.StringTokenizer; @@ -37,9 +35,7 @@ import java.util.regex.PatternSyntaxException; import net.yacy.cora.document.id.MultiProtocolURL; import net.yacy.cora.order.Digest; -import net.yacy.cora.protocol.Domains; import net.yacy.cora.protocol.RequestHeader; -import net.yacy.http.YaCyHttpServer; import net.yacy.kelondro.util.Formatter; import net.yacy.peers.Network; import net.yacy.peers.Seed; @@ -101,31 +97,11 @@ public class SettingsAck_p { // proxy password if (post.containsKey("proxyaccount")) { /* - * set new port + * display port info */ - final String port = post.get("port"); - prop.putHTML("info_port", port); - if (!env.getConfig("port", port).equals(port)) { - // validation port - final YaCyHttpServer theServerCore = env.getHttpServer(); - try { - final InetSocketAddress theNewAddress = theServerCore.generateSocketAddress(port); - final String hostName = Domains.getHostName(theNewAddress.getAddress()); - prop.put("info_restart", "1"); - prop.put("info_restart_ip",(hostName.equals("0.0.0.0"))? Domains.LOCALHOST : hostName); - prop.put("info_restart_port", theNewAddress.getPort()); - - env.setConfig("port", port); - - theServerCore.reconnect(5000); - } catch (final SocketException e) { - prop.put("info", "26"); - return prop; - } - } else { - prop.put("info_restart", "0"); - } - + prop.putHTML("info_port", env.getConfig("port", "8090")); + prop.put("info_restart", "0"); + // read and process data String filter = (post.get("proxyfilter")).trim(); final boolean useProxyAccounts = post.containsKey("use_proxyaccounts") && post.get("use_proxyaccounts").equals("on"); diff --git a/htroot/Settings_Http.inc b/htroot/Settings_Http.inc deleted file mode 100644 index f61859b55..000000000 --- a/htroot/Settings_Http.inc +++ /dev/null @@ -1,51 +0,0 @@ -<form action="SettingsAck_p.html" method="post" enctype="multipart/form-data">
-<fieldset><legend id="http">HTTP Networking</legend>
-<table border="0" cellspacing="5">
- <tr valign="top">
- <td><label for="trans_proxy">Transparent Proxy</label>:</td>
- <td><input type="checkbox" name="isTransparentProxy" id="trans_proxy" #(isTransparentProxy)#::checked="checked" #(/isTransparentProxy)#/></td>
- <td>
- With this you can specify if YaCy can be used as transparent proxy.<br />
- <em>Hint: On linux you can configure your firewall to transparently redirect all http traffic through yacy using this iptables rule</em>:<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 valign="top">
- <td><label for="via_header">Send "Via" Header</label>:</td>
- <td><input type="checkbox" name="proxy.sendViaHeader" id="via_header" #(proxy.sendViaHeader)#::checked="checked" #(/proxy.sendViaHeader)#/></td>
- <td>
- Specifies if the proxy should send the <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.45" target="_blank">Via</a>
- http header according to RFC 2616 Sect 14.45.
- </td>
- </tr>
- <tr valign="top">
- <td><label for="x_forwarded_header">Send "X-Forwarded-For" Header</label>:</td>
- <td><input type="checkbox" name="proxy.sendXForwardedForHeader" id="x_forwarded_header" #(proxy.sendXForwardedForHeader)#::checked="checked" #(/proxy.sendXForwardedForHeader)#/></td>
- <td>Specifies if the proxy should send the X-Forwarded-For http header.</td>
- </tr>
- <tr valign="top">
- <td colspan="3"><input type="submit" class="btn-primary btn-sm" name="httpNetworking" value="Submit" /> <em>Changes will take effect immediately.</em></td>
- </tr>
-</table>
-</fieldset>
-</form><br />
-<form action="SettingsAck_p.html">
-<fieldset><legend id="httpserver">HTTP Server</legend>
-<table border="0" cellspacing="5">
- <tr>
- <td>HTTP Server Version:</td>
- <td><b>#[httpservername]#</b></td>
- </tr>
- <tr>
- <td><a href="ConfigBasic.html">HTTP Server Port</a>:</td>
- <td><b>#[port]#</b></td>
- </tr>
- #(server.https)#::
- <tr>
- <td>HTTPS Port:</td>
- <td><input type="text" width="4" name="port.ssl" value="#[port.ssl]#" size="4" maxlength="6"/> <input class="btn-primary btn-xs" type="submit" value="change"/></td>
- </tr>
- #(/server.https)#
-</table>
-</fieldset>
-</form><br />
\ No newline at end of file diff --git a/htroot/Settings_ProxyAccess.inc b/htroot/Settings_ProxyAccess.inc index 4306a64eb..6bfbbd0eb 100644 --- a/htroot/Settings_ProxyAccess.inc +++ b/htroot/Settings_ProxyAccess.inc @@ -1,30 +1,53 @@ <form action="SettingsAck_p.html" method="post" enctype="multipart/form-data">
+<fieldset><legend id="http">Proxy Settings</legend>
+<table border="0" cellspacing="5">
+ <tr valign="top">
+ <td><label for="trans_proxy">Transparent Proxy</label>:</td>
+ <td><input type="checkbox" name="isTransparentProxy" id="trans_proxy" #(isTransparentProxy)#::checked="checked" #(/isTransparentProxy)#/></td>
+ <td>
+ With this you can specify if YaCy can be used as transparent proxy.<br />
+ <em>Hint: On linux you can configure your firewall to transparently redirect all http traffic through yacy using this iptables rule</em>:<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 valign="top">
+ <td><label for="via_header">Send "Via" Header</label>:</td>
+ <td><input type="checkbox" name="proxy.sendViaHeader" id="via_header" #(proxy.sendViaHeader)#::checked="checked" #(/proxy.sendViaHeader)#/></td>
+ <td>
+ Specifies if the proxy should send the <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.45" target="_blank">Via</a>
+ http header according to RFC 2616 Sect 14.45.
+ </td>
+ </tr>
+ <tr valign="top">
+ <td><label for="x_forwarded_header">Send "X-Forwarded-For" Header</label>:</td>
+ <td><input type="checkbox" name="proxy.sendXForwardedForHeader" id="x_forwarded_header" #(proxy.sendXForwardedForHeader)#::checked="checked" #(/proxy.sendXForwardedForHeader)#/></td>
+ <td>Specifies if the proxy should send the X-Forwarded-For http header.</td>
+ </tr>
+ <tr valign="top">
+ <td colspan="3"><input type="submit" class="btn btn-primary btn-sm" name="httpNetworking" value="Submit" /> <em>Changes will take effect immediately.</em></td>
+ </tr>
+</table>
+</fieldset>
+</form>
+<form action="SettingsAck_p.html" method="post" enctype="multipart/form-data">
<fieldset><legend id="ProxyAccess">Proxy Access Settings</legend>
<p>
These settings configure the access method to your own http proxy and server.
All traffic is routed throug one single port, for both proxy and server.<br />
- <br />
- <strong>Server/Proxy Port Configuration</strong>
-</p>
-<p>
- The socket addresses where YaCy should listen for incoming connections from other YaCy peers or http clients.<br />
- You have four possibilities to specify the address:
</p>
-<ul>
- <li>defining a port only (<em>e.g. 8090</em>)</li>
- <li>defining IP address and port (<em>e.g. 192.168.0.1:8090</em>)</li>
- <li>defining host name and port (<em>e.g. home:8090</em>)</li>
- <li>defining interface name and port (<em>e.g. #eth0:8090</em>)</li>
-</ul>
-<p><em>Hint: Dont forget to change your firewall configuration after you have changed the port.</em></p>
<table border="0" cellspacing="5">
- <tr valign="top">
- <td><label for="port">Proxy and http-Server Administration Port</label>:</td>
- <td><input name="port" id="port" type="text" size="30" maxlength="30" value="#[port]#" /></td>
- <td><em>Changes will take effect in 5-10 seconds</em></td>
- </tr>
-</table>
+ <tr>
+ <td><a href="ConfigBasic.html">HTTP Server Port</a>:</td>
+ <td><b>#[port]#</b></td>
+ #(server.https)#::
+ <td style="width:10%"> </td>
+ <td>HTTPS Server Port:</td>
+ <td><input type="text" width="4" name="port.ssl" value="#[port.ssl]#" size="4" maxlength="6"/> <input class="btn btn-primary btn-xs" type="submit" value="change"/></td>
+ </tr>
+ #(/server.https)#
+</table>
+<br />
<p>
<strong>Server Access Restrictions</strong><br />
<br />
@@ -56,7 +79,7 @@ </td>
</tr>
<tr valign="top">
- <td colspan="2"><input type="submit" name="proxyaccount" value="Submit" /></td>
+ <td colspan="2"><input class="btn btn-primary btn-sm" type="submit" name="proxyaccount" value="Submit" /></td>
</tr>
</table>
</fieldset>
diff --git a/htroot/Settings_p.html b/htroot/Settings_p.html index c93c748c5..ca1b067ce 100644 --- a/htroot/Settings_p.html +++ b/htroot/Settings_p.html @@ -23,7 +23,6 @@ <li><a href="?page=ServerAccess">Server Access Settings</a></li> <li><a href="?page=ProxyAccess">Proxy Access 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=seed">Seed Upload Settings</a></li> <li><a href="?page=messageForwarding">Message Forwarding (optional)</a></li> diff --git a/htroot/Settings_p.java b/htroot/Settings_p.java index d2a796c25..6e1adb458 100644 --- a/htroot/Settings_p.java +++ b/htroot/Settings_p.java @@ -49,9 +49,6 @@ public final class Settings_p { if (page.equals("ProxyAccess")) { prop.put("settingsTables", "Settings_ProxyAccess.inc"); } - else if (page.equals("http")) { - prop.put("settingsTables", "Settings_Http.inc"); - } else if (page.equals("proxy")) { prop.put("settingsTables", "Settings_Proxy.inc"); } @@ -186,7 +183,6 @@ public final class Settings_p { prop.putHTML("crawler.file.maxFileSize",sb.getConfig("crawler.file.maxFileSize", "-1")); // http server info - prop.put("httpservername",sb.getHttpServer().getVersion()); prop.put("server.https",sb.getConfigBool("server.https", false)); prop.put("server.https_port.ssl", sb.getConfig("port.ssl","8443")); diff --git a/htroot/Status_p.inc b/htroot/Status_p.inc index d46aa8a40..7a9f4bd11 100644 --- a/htroot/Status_p.inc +++ b/htroot/Status_p.inc @@ -29,7 +29,7 @@ </dd>
<dt>Address</dt>
- <dd>Host: #[host]#:#[port]# #(extPortFormat)#::| (Binding to interface: #[extPort]#)#(/extPortFormat)# #(sslSupport)#::| SSL: <a href="ConfigBasic.html">enabled</a> (port <a href="Settings_p.html?page=http">#[sslPort]#</a>)#(/sslSupport)#<br />
+ <dd>Host: #[host]#:#[port]# #(extPortFormat)#::| (Binding to interface: #[extPort]#)#(/extPortFormat)# #(sslSupport)#::| SSL: <a href="ConfigBasic.html">enabled</a> (port <a href="Settings_p.html?page=ProxyAccess">#[sslPort]#</a>)#(/sslSupport)#<br />
#(peerAddress)#
peer address not assigned
::
@@ -43,7 +43,7 @@ #(/portForwarding)#
<dt>Proxy</dt>
- <dd>Transparent <a href="Settings_p.html?page=http">#(info_isTransparentProxy)#on::off#(/info_isTransparentProxy)#</a>
+ <dd>Transparent <a href="Settings_p.html?page=ProxyAccess">#(info_isTransparentProxy)#on::off#(/info_isTransparentProxy)#</a>
URL <a href="AugmentedBrowsing_p.html">#(info_proxyURL)#on::off#(/info_proxyURL)#</a></dd>
<dd>Remote: <a href="Settings_p.html?page=proxy">#(remoteProxy)#not used::#[host]#:#[port]# | Used for YaCy -> YaCy communication: #(4Yacy)#Yes::No #(/4Yacy)# #(/remoteProxy)#</a></dd>
<dt>Auto-popup on start-up</dt>
|
