"Use remote proxy for yacy" has no function, remove option and related config item

see/fix bug http://mantis.tokeek.de/view.php?id=23
http://mantis.tokeek.de/view.php?id=189
pull/1/head
reger 11 years ago
parent 89e2c5e884
commit e31493e139

@ -335,7 +335,6 @@ plasmaBlueList=yacy.blue
# if you want to switch on the proxy use, set remoteProxyUse=true
# remoteProxyNoProxy is a no-proxy pattern list for the remote proxy
remoteProxyUse=false
remoteProxyUse4Yacy=true
remoteProxyUse4SSL=true
remoteProxyHost=192.168.2.2

@ -268,7 +268,6 @@ public class SettingsAck_p {
* Reading out the remote proxy settings
* ==================================================================== */
final boolean useRemoteProxy = post.containsKey("remoteProxyUse");
final boolean useRemoteProxy4Yacy = post.containsKey("remoteProxyUse4Yacy");
final boolean useRemoteProxy4SSL = post.containsKey("remoteProxyUse4SSL");
final String remoteProxyHost = post.get("remoteProxyHost", "");
@ -289,7 +288,6 @@ public class SettingsAck_p {
env.setConfig("remoteProxyPwd", remoteProxyPwd);
env.setConfig("remoteProxyNoProxy", remoteProxyNoProxyStr);
env.setConfig("remoteProxyUse", useRemoteProxy);
env.setConfig("remoteProxyUse4Yacy", useRemoteProxy4Yacy);
env.setConfig("remoteProxyUse4SSL", useRemoteProxy4SSL);
/* ====================================================================

@ -10,14 +10,6 @@
<td>&nbsp;</td>
<td>Enables the usage of the remote proxy by yacy</td>
</tr>
<tr valign="top">
<td colspan="2"><label for="prxy4yacy">Use remote proxy for yacy &lt;-&gt; yacy communication</label></td>
<td><input type="checkbox" name="remoteProxyUse4Yacy" id="prxy4yacy"#(remoteProxyUse4Yacy)#:: checked="checked"#(/remoteProxyUse4Yacy)# /></td>
<td>
Specifies if the remote proxy should be used for the communication of this peer to other yacy peers.<br />
<em>Hint:</em> Enabling this option could cause this peer to remain in junior status.
</td>
</tr>
<tr valign="top">
<td colspan="2"><label for="prxy4ssl">Use remote proxy for HTTPS</label></td>
<td><input type="checkbox" name="remoteProxyUse4SSL" id="prxy4ssl"#(remoteProxyUse4SSL)#:: checked="checked"#(/remoteProxyUse4SSL)# /></td>

@ -91,7 +91,6 @@ public final class Settings_p {
// remote proxy
prop.put("remoteProxyUseChecked", env.getConfigBool("remoteProxyUse", false) ? 1 : 0);
prop.put("remoteProxyUse4Yacy", env.getConfigBool("remoteProxyUse4Yacy", true) ? 1 : 0);
prop.put("remoteProxyUse4SSL", env.getConfigBool("remoteProxyUse4SSL", true) ? 1 : 0);
prop.putHTML("remoteProxyHost", env.getConfig("remoteProxyHost", ""));

@ -200,7 +200,6 @@ public class Status
prop.put("remoteProxy", "1");
prop.putXML("remoteProxy_host", sb.getConfig("remoteProxyHost", "<unknown>"));
prop.putXML("remoteProxy_port", sb.getConfig("remoteProxyPort", "<unknown>"));
prop.put("remoteProxy_4Yacy", sb.getConfigBool("remoteProxyUse4Yacy", true) ? "0" : "1");
} else {
prop.put("remoteProxy", "0"); // not used
}

@ -48,10 +48,10 @@ public final class ProxySettings {
private static final Object PRESENT = new Object();
public static enum Protocol {
HTTP, HTTPS, YACY
HTTP, HTTPS
}
private static boolean use = false, use4YaCy = false, use4ssl = false;
private static boolean use = false, use4ssl = false;
public static String host = null, user = "", password = "";
public static int port = 0;
public static String[] noProxy = null;
@ -64,9 +64,6 @@ public final class ProxySettings {
public static void setProxyUse4HTTPS(boolean use4https0) {
use4ssl = use4https0;
}
public static void setProxyUse4YaCy(boolean use4YaCy0) {
use4YaCy = use4YaCy0;
}
/**
*
@ -117,7 +114,6 @@ public final class ProxySettings {
assert protocol != null;
if (!use) return false;
if (protocol == Protocol.HTTPS && !use4ssl) return false;
if (protocol == Protocol.YACY && !use4YaCy) return false;
if (allowProxy.containsKey(host)) return true;
if (disallowProxy.containsKey(host)) return false;
for (String pattern: noProxy) {

@ -3788,7 +3788,6 @@ public final class Switchboard extends serverSwitch {
ProxySettings.port = port;
ProxySettings.host = host;
ProxySettings.setProxyUse4HTTP(ProxySettings.host != null && ProxySettings.host.length() > 0 && getConfigBool("remoteProxyUse", false));
ProxySettings.setProxyUse4YaCy(getConfig("remoteProxyUse4Yacy", "true").equalsIgnoreCase("true"));
ProxySettings.setProxyUse4HTTPS(getConfig("remoteProxyUse4SSL", "true").equalsIgnoreCase("true"));
ProxySettings.user = getConfig("remoteProxyUser", "").trim();
ProxySettings.password = getConfig("remoteProxyPwd", "").trim();

Loading…
Cancel
Save