From e033e79826a8954c1fe1cbaaedbf95b1997e2221 Mon Sep 17 00:00:00 2001 From: reger Date: Wed, 20 Aug 2014 22:45:36 +0200 Subject: [PATCH] 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 --- htroot/ConfigBasic.html | 2 +- htroot/SettingsAck_p.html | 2 -- htroot/SettingsAck_p.java | 32 +++-------------- htroot/Settings_Http.inc | 51 -------------------------- htroot/Settings_ProxyAccess.inc | 63 ++++++++++++++++++++++----------- htroot/Settings_p.html | 1 - htroot/Settings_p.java | 4 --- htroot/Status_p.inc | 4 +-- 8 files changed, 50 insertions(+), 109 deletions(-) delete mode 100644 htroot/Settings_Http.inc 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 @@
    - with SSL (https enabled#(withsslenabled)#:: on port #[sslport]##(/withsslenabled)#) + with SSL (https enabled#(withsslenabled)#:: on port #[sslport]##(/withsslenabled)#)
#(upnp)#::
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 @@ ::

You are now in Cache Mode. Only Proxy-cache ist available in this mode. After a short while you should see the effect on the status page.

:: -

Unable to bild the server to the new Port: #[port]#
- This values seems not to be a valid port configuration.

::

Invalid IP-Number filter: #[filter]#
Error in pattern nr #[nr]# "#[pattern]#": #[error]# 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 @@ -

-
HTTP Networking - - - - - - - - - - - - - - - - - - - -
: - With this you can specify if YaCy can be used as transparent proxy.
- Hint: On linux you can configure your firewall to transparently redirect all http traffic through yacy using this iptables rule:
- iptables -t nat -A PREROUTING -p tcp -s 192.168.0.0/16 --dport 80 -j DNAT --to 192.168.0.1:#[port]# -
: - Specifies if the proxy should send the Via - http header according to RFC 2616 Sect 14.45. -
:Specifies if the proxy should send the X-Forwarded-For http header.
Changes will take effect immediately.
-
-

-
-
HTTP Server - - - - - - - - - - #(server.https)#:: - - - - - #(/server.https)# -
HTTP Server Version:#[httpservername]#
HTTP Server Port:#[port]#
HTTPS Port: 
-
-

\ 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 @@
+
Proxy Settings + + + + + + + + + + + + + + + + + + + +
: + With this you can specify if YaCy can be used as transparent proxy.
+ Hint: On linux you can configure your firewall to transparently redirect all http traffic through yacy using this iptables rule:
+ iptables -t nat -A PREROUTING -p tcp -s 192.168.0.0/16 --dport 80 -j DNAT --to 192.168.0.1:#[port]# +
: + Specifies if the proxy should send the Via + http header according to RFC 2616 Sect 14.45. +
:Specifies if the proxy should send the X-Forwarded-For http header.
Changes will take effect immediately.
+
+
+
Proxy Access Settings

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.
-
- Server/Proxy Port Configuration -

-

- The socket addresses where YaCy should listen for incoming connections from other YaCy peers or http clients.
- You have four possibilities to specify the address:

-
    -
  • defining a port only (e.g. 8090)
  • -
  • defining IP address and port (e.g. 192.168.0.1:8090)
  • -
  • defining host name and port (e.g. home:8090)
  • -
  • defining interface name and port (e.g. #eth0:8090)
  • -
-

Hint: Dont forget to change your firewall configuration after you have changed the port.

- - - - - -
:Changes will take effect in 5-10 seconds
+ + HTTP Server Port: + #[port]# + #(server.https)#:: +   + HTTPS Server Port: +   + + #(/server.https)# + +

Server Access Restrictions

@@ -56,7 +79,7 @@ - +

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 @@
  • Server Access Settings
  • Proxy Access Settings
  • Crawler Settings
  • -
  • HTTP Networking
  • Remote Proxy (optional)
  • Seed Upload Settings
  • Message Forwarding (optional)
  • 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 @@
    Address
    -
    Host: #[host]#:#[port]# #(extPortFormat)#::| (Binding to interface: #[extPort]#)#(/extPortFormat)# #(sslSupport)#::| SSL: enabled (port #[sslPort]#)#(/sslSupport)#
    +
    Host: #[host]#:#[port]# #(extPortFormat)#::| (Binding to interface: #[extPort]#)#(/extPortFormat)# #(sslSupport)#::| SSL: enabled (port #[sslPort]#)#(/sslSupport)#
    #(peerAddress)# peer address not assigned :: @@ -43,7 +43,7 @@ #(/portForwarding)#
    Proxy
    -
    Transparent #(info_isTransparentProxy)#on::off#(/info_isTransparentProxy)#   +
    Transparent #(info_isTransparentProxy)#on::off#(/info_isTransparentProxy)#   URL #(info_proxyURL)#on::off#(/info_proxyURL)#
    Remote: #(remoteProxy)#not used::#[host]#:#[port]# | Used for YaCy -> YaCy communication: #(4Yacy)#Yes::No #(/4Yacy)# #(/remoteProxy)#
    Auto-popup on start-up