mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
yacyDebugMode - allow Lan-IPs for testing
where was the Code from 0.25 lost? git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@53 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
parent
2d9fc71af1
commit
d005d7484e
|
@ -137,12 +137,12 @@ public class natLib {
|
|||
return null;
|
||||
}
|
||||
|
||||
public static String retrieveIP(boolean DI604, String password) {
|
||||
public static String retrieveIP(boolean DI604, String password, boolean yacyDebugMode) {
|
||||
String ip;
|
||||
if (DI604) {
|
||||
// first try the simple way...
|
||||
ip = getDI604(password);
|
||||
if (isProper(ip)) {
|
||||
if (isProper(ip)||yacyDebugMode) {
|
||||
//System.out.print("{DI604}");
|
||||
return ip;
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ public class natLib {
|
|||
InetAddress ia = serverCore.publicIP();
|
||||
if (ia != null) {
|
||||
ip = ia.getHostAddress();
|
||||
if (isProper(ip)) return ip;
|
||||
if (isProper(ip)||yacyDebugMode) return ip;
|
||||
}
|
||||
|
||||
// now go the uneasy way and ask some web responder
|
||||
|
|
|
@ -361,7 +361,7 @@ public class yacyCore {
|
|||
// still no success: ask own NAT or internet responder
|
||||
boolean DI604use = switchboard.getConfig("DI604use", "false").equals("true");
|
||||
String DI604pw = switchboard.getConfig("DI604pw", "");
|
||||
String ip = natLib.retrieveIP(DI604use, DI604pw);
|
||||
String ip = natLib.retrieveIP(DI604use, DI604pw, (switchboard.getConfig("yacyDebugMode", "false")=="false" ? false : true));
|
||||
//System.out.println("DEBUG: new IP=" + ip);
|
||||
seedDB.mySeed.put("IP", ip);
|
||||
if (seedDB.mySeed.get("PeerType", "junior").equals("junior")) // ???????????????
|
||||
|
|
|
@ -79,7 +79,7 @@ public final class yacy {
|
|||
|
||||
// static objects
|
||||
private static final String vString = "@REPL_VERSION@";
|
||||
private static final String vDATE = "@REPL_DATE@";
|
||||
private static final String vDATE = "20050420";
|
||||
private static final String copyright = "[ YACY Proxy v" + vString + ", build " + vDATE + " by Michael Christen / www.yacy.net ]";
|
||||
private static final String hline = "-------------------------------------------------------------------------------";
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user