*) Bugfix for useRemoteProxy4YACY and useRemoteProxy4SSL check

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@969 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
theli 19 years ago
parent 02d9af1a70
commit 5a25ad9109

@ -1042,7 +1042,11 @@ public final class httpdProxyHandler extends httpdAbstractHandler implements htt
} }
// possibly branch into PROXY-PROXY connection // possibly branch into PROXY-PROXY connection
if ((switchboard.remoteProxyConfig != null) && (switchboard.remoteProxyConfig.useProxy4SSL())) { if (
(switchboard.remoteProxyConfig != null) &&
(switchboard.remoteProxyConfig.useProxy()) &&
(switchboard.remoteProxyConfig.useProxy4SSL())
) {
httpc remoteProxy = null; httpc remoteProxy = null;
try { try {
remoteProxy = httpc.getInstance( remoteProxy = httpc.getInstance(

@ -103,7 +103,9 @@ public final class yacyClient {
final URL url = new URL("http://" + address + "/yacy/hello.html"); final URL url = new URL("http://" + address + "/yacy/hello.html");
// should we use the proxy? // should we use the proxy?
boolean useProxy = (yacyCore.seedDB.sb.remoteProxyConfig != null) && (yacyCore.seedDB.sb.remoteProxyConfig.useProxy4Yacy()); boolean useProxy = (yacyCore.seedDB.sb.remoteProxyConfig != null) &&
(yacyCore.seedDB.sb.remoteProxyConfig.useProxy()) &&
(yacyCore.seedDB.sb.remoteProxyConfig.useProxy4Yacy());
// adding all needed parameters // adding all needed parameters
final serverObjects obj = new serverObjects(6); final serverObjects obj = new serverObjects(6);
@ -228,7 +230,9 @@ public final class yacyClient {
final String key = crypt.randomSalt(); final String key = crypt.randomSalt();
try { try {
// should we use the proxy? // should we use the proxy?
boolean useProxy = (yacyCore.seedDB.sb.remoteProxyConfig != null) && (yacyCore.seedDB.sb.remoteProxyConfig.useProxy4Yacy()); boolean useProxy = (yacyCore.seedDB.sb.remoteProxyConfig != null) &&
(yacyCore.seedDB.sb.remoteProxyConfig.useProxy()) &&
(yacyCore.seedDB.sb.remoteProxyConfig.useProxy4Yacy());
// sending request // sending request
final HashMap result = nxTools.table( final HashMap result = nxTools.table(
@ -260,7 +264,9 @@ public final class yacyClient {
public static int queryRWICount(yacySeed target, String wordHash) { public static int queryRWICount(yacySeed target, String wordHash) {
try { try {
// should we use the proxy? // should we use the proxy?
boolean useProxy = (yacyCore.seedDB.sb.remoteProxyConfig != null) && (yacyCore.seedDB.sb.remoteProxyConfig.useProxy4Yacy()); boolean useProxy = (yacyCore.seedDB.sb.remoteProxyConfig != null) &&
(yacyCore.seedDB.sb.remoteProxyConfig.useProxy()) &&
(yacyCore.seedDB.sb.remoteProxyConfig.useProxy4Yacy());
// sending request // sending request
final HashMap result = nxTools.table( final HashMap result = nxTools.table(
@ -294,7 +300,9 @@ public final class yacyClient {
if (yacyCore.seedDB.mySeed == null) return -1; if (yacyCore.seedDB.mySeed == null) return -1;
// should we use the proxy? // should we use the proxy?
boolean useProxy = (yacyCore.seedDB.sb.remoteProxyConfig != null) && (yacyCore.seedDB.sb.remoteProxyConfig.useProxy4Yacy()); boolean useProxy = (yacyCore.seedDB.sb.remoteProxyConfig != null) &&
(yacyCore.seedDB.sb.remoteProxyConfig.useProxy()) &&
(yacyCore.seedDB.sb.remoteProxyConfig.useProxy4Yacy());
// building url // building url
final String querystr = final String querystr =
@ -351,7 +359,9 @@ public final class yacyClient {
final String key = crypt.randomSalt(); final String key = crypt.randomSalt();
try { try {
// should we use the proxy? // should we use the proxy?
boolean useProxy = (yacyCore.seedDB.sb.remoteProxyConfig != null) && (yacyCore.seedDB.sb.remoteProxyConfig.useProxy4Yacy()); boolean useProxy = (yacyCore.seedDB.sb.remoteProxyConfig != null) &&
(yacyCore.seedDB.sb.remoteProxyConfig.useProxy()) &&
(yacyCore.seedDB.sb.remoteProxyConfig.useProxy4Yacy());
// building url // building url
final String url = "http://" + targetPeer.getAddress() + "/yacy/search.html"; final String url = "http://" + targetPeer.getAddress() + "/yacy/search.html";
@ -469,7 +479,9 @@ public final class yacyClient {
if (yacyCore.seedDB == null || yacyCore.seedDB.mySeed == null) { return null; } if (yacyCore.seedDB == null || yacyCore.seedDB.mySeed == null) { return null; }
// should we use the proxy? // should we use the proxy?
boolean useProxy = (yacyCore.seedDB.sb.remoteProxyConfig != null) && (yacyCore.seedDB.sb.remoteProxyConfig.useProxy4Yacy()); boolean useProxy = (yacyCore.seedDB.sb.remoteProxyConfig != null) &&
(yacyCore.seedDB.sb.remoteProxyConfig.useProxy()) &&
(yacyCore.seedDB.sb.remoteProxyConfig.useProxy4Yacy());
// adding all needed parameters // adding all needed parameters
final String key = crypt.randomSalt(); final String key = crypt.randomSalt();
@ -516,7 +528,9 @@ public final class yacyClient {
// this post a message to the remote message board // this post a message to the remote message board
// should we use the proxy? // should we use the proxy?
boolean useProxy = (yacyCore.seedDB.sb.remoteProxyConfig != null) && (yacyCore.seedDB.sb.remoteProxyConfig.useProxy4Yacy()); boolean useProxy = (yacyCore.seedDB.sb.remoteProxyConfig != null) &&
(yacyCore.seedDB.sb.remoteProxyConfig.useProxy()) &&
(yacyCore.seedDB.sb.remoteProxyConfig.useProxy4Yacy());
// adding all needed parameters // adding all needed parameters
final String key = crypt.randomSalt(); final String key = crypt.randomSalt();
@ -563,7 +577,9 @@ public final class yacyClient {
if (yacyCore.seedDB.mySeed == targetSeed) { return null; } if (yacyCore.seedDB.mySeed == targetSeed) { return null; }
// should we use the proxy? // should we use the proxy?
boolean useProxy = (yacyCore.seedDB.sb.remoteProxyConfig != null) && (yacyCore.seedDB.sb.remoteProxyConfig.useProxy4Yacy()); boolean useProxy = (yacyCore.seedDB.sb.remoteProxyConfig != null) &&
(yacyCore.seedDB.sb.remoteProxyConfig.useProxy()) &&
(yacyCore.seedDB.sb.remoteProxyConfig.useProxy4Yacy());
// construct request // construct request
final String key = crypt.randomSalt(); final String key = crypt.randomSalt();
@ -634,7 +650,9 @@ public final class yacyClient {
*/ */
// should we use the proxy? // should we use the proxy?
boolean useProxy = (yacyCore.seedDB.sb.remoteProxyConfig != null) && (yacyCore.seedDB.sb.remoteProxyConfig.useProxy4Yacy()); boolean useProxy = (yacyCore.seedDB.sb.remoteProxyConfig != null) &&
(yacyCore.seedDB.sb.remoteProxyConfig.useProxy()) &&
(yacyCore.seedDB.sb.remoteProxyConfig.useProxy4Yacy());
// construct request // construct request
final String key = crypt.randomSalt(); final String key = crypt.randomSalt();
@ -715,7 +733,9 @@ public final class yacyClient {
if (address == null) { return null; } if (address == null) { return null; }
// should we use the proxy? // should we use the proxy?
boolean useProxy = (yacyCore.seedDB.sb.remoteProxyConfig != null) && (yacyCore.seedDB.sb.remoteProxyConfig.useProxy4Yacy()); boolean useProxy = (yacyCore.seedDB.sb.remoteProxyConfig != null) &&
(yacyCore.seedDB.sb.remoteProxyConfig.useProxy()) &&
(yacyCore.seedDB.sb.remoteProxyConfig.useProxy4Yacy());
// prepare post values // prepare post values
final serverObjects post = new serverObjects(7); final serverObjects post = new serverObjects(7);
@ -784,7 +804,9 @@ public final class yacyClient {
if (address == null) { return null; } if (address == null) { return null; }
// should we use the proxy? // should we use the proxy?
boolean useProxy = (yacyCore.seedDB.sb.remoteProxyConfig != null) && (yacyCore.seedDB.sb.remoteProxyConfig.useProxy4Yacy()); boolean useProxy = (yacyCore.seedDB.sb.remoteProxyConfig != null) &&
(yacyCore.seedDB.sb.remoteProxyConfig.useProxy()) &&
(yacyCore.seedDB.sb.remoteProxyConfig.useProxy4Yacy());
// prepare post values // prepare post values
final serverObjects post = new serverObjects(5+urls.length); final serverObjects post = new serverObjects(5+urls.length);
@ -833,7 +855,9 @@ public final class yacyClient {
public static HashMap getProfile(yacySeed targetSeed) { public static HashMap getProfile(yacySeed targetSeed) {
// should we use the proxy? // should we use the proxy?
boolean useProxy = (yacyCore.seedDB.sb.remoteProxyConfig != null) && (yacyCore.seedDB.sb.remoteProxyConfig.useProxy4Yacy()); boolean useProxy = (yacyCore.seedDB.sb.remoteProxyConfig != null) &&
(yacyCore.seedDB.sb.remoteProxyConfig.useProxy()) &&
(yacyCore.seedDB.sb.remoteProxyConfig.useProxy4Yacy());
// this post a message to the remote message board // this post a message to the remote message board
final serverObjects post = new serverObjects(2); final serverObjects post = new serverObjects(2);
@ -869,7 +893,9 @@ public final class yacyClient {
//System.out.println("permission=" + permissionMessage(args[1])); //System.out.println("permission=" + permissionMessage(args[1]));
// should we use the proxy? // should we use the proxy?
boolean useProxy = (yacyCore.seedDB.sb.remoteProxyConfig != null) && (yacyCore.seedDB.sb.remoteProxyConfig.useProxy4Yacy()); boolean useProxy = (yacyCore.seedDB.sb.remoteProxyConfig != null) &&
(yacyCore.seedDB.sb.remoteProxyConfig.useProxy()) &&
(yacyCore.seedDB.sb.remoteProxyConfig.useProxy4Yacy());
final HashMap result = nxTools.table( final HashMap result = nxTools.table(
httpc.wget( httpc.wget(

Loading…
Cancel
Save