|
|
|
@ -294,19 +294,17 @@ public class SettingsAck_p {
|
|
|
|
|
|
|
|
|
|
// static IP
|
|
|
|
|
String staticIP = ((String) post.get("staticIP")).trim();
|
|
|
|
|
if (staticIP.startsWith("http://")) {
|
|
|
|
|
if (staticIP.length() > 7) { staticIP = staticIP.substring(7); } else { staticIP = ""; }
|
|
|
|
|
} else if (staticIP.startsWith("https://")) {
|
|
|
|
|
if (staticIP.length() > 8) { staticIP = staticIP.substring(8); } else { staticIP = ""; }
|
|
|
|
|
}
|
|
|
|
|
if (staticIP.indexOf(":") > 0) {
|
|
|
|
|
staticIP = staticIP.substring(0, staticIP.indexOf(":"));
|
|
|
|
|
}
|
|
|
|
|
if (staticIP.length() == 0) {
|
|
|
|
|
serverCore.useStaticIP = false;
|
|
|
|
|
} else {
|
|
|
|
|
if (staticIP.startsWith("http://")) {
|
|
|
|
|
if (staticIP.length() > 7) { staticIP = staticIP.substring(7); } else { staticIP = ""; }
|
|
|
|
|
} else if (staticIP.startsWith("https://")) {
|
|
|
|
|
if (staticIP.length() > 8) { staticIP = staticIP.substring(8); } else { staticIP = ""; }
|
|
|
|
|
}
|
|
|
|
|
if (staticIP.indexOf(":") > 0) {
|
|
|
|
|
staticIP = staticIP.substring(0, staticIP.indexOf(":"));
|
|
|
|
|
} else {
|
|
|
|
|
staticIP = "";
|
|
|
|
|
}
|
|
|
|
|
serverCore.useStaticIP = true;
|
|
|
|
|
}
|
|
|
|
|
yacyCore.seedDB.mySeed.put(yacySeed.IP, staticIP);
|
|
|
|
|