Compare commits

...

3 Commits

3 changed files with 39 additions and 11 deletions

View File

@ -97,6 +97,8 @@ public class HomeHelper extends HelperBase {
//"sponge.i2p" + S + _x("Seedless and the Robert BitTorrent applications") + S + "http://sponge.i2p/" + S + I + "user_astronaut.png" + S +
"notbob.i2p" + S + _x("Not Bob's Address Services") + S + "http://notbob.i2p/" + S + I + "notblob.png" + S +
"[Ramble]" + S + _x("Ramble user-moderated forum aggregator") + S + "http://ramble.i2p/" + S + I + "ramble.png" + S +
"Metrics" + S + _x("I2P Network Statistics") + S + "http://metrics.i2p/" + S + I + "plugin.png" + S +
"StormyCloud" + S + _x("StormyCloud Outproxy Services") + S + "http://stormycloud.i2p/" + S + I + "plugin.png" + S +
"";
// No commas allowed in text strings!

View File

@ -96,6 +96,23 @@ public class LookupDest {
return rv;
}
private static boolean deleteHostname(I2PAppContext ctx, String hostname) {
try {
Destination dest = lookupHostname(I2PAppContext.getGlobalContext(), hostname);
if (dest == null)
System.err.println("Destination not found!");
else {
NamingService ns = I2PAppContext.getGlobalContext().namingService();
if (ns != null)
return ns.remove(hostname, dest);
System.err.print("ns is null");
}
} catch (I2PSessionException ise) {
ise.printStackTrace();
}
return false;
}
/**
* @since 0.9.40 split out from above
*/
@ -130,14 +147,22 @@ public class LookupDest {
System.err.println("Usage: LookupDest hostname|b32");
System.exit(1);
}
try {
Destination dest = lookupHostname(I2PAppContext.getGlobalContext(), args[0]);
if (dest == null)
System.err.println("Destination not found!");
else
System.out.println(dest.toBase64());
} catch (I2PSessionException ise) {
ise.printStackTrace();
if (args[0].length() == 1) {
try {
Destination dest = lookupHostname(I2PAppContext.getGlobalContext(), args[0]);
if (dest == null)
System.err.println("Destination not found!");
else
System.out.println(dest.toBase64());
} catch (I2PSessionException ise) {
ise.printStackTrace();
}
}
if (args[0].length() == 2) {
if (args[0] == "-d") {
deleteHostname(I2PAppContext.getGlobalContext(), args[1]);
}
}
}
}

View File

@ -18,11 +18,12 @@ public class RouterVersion {
/** deprecated */
public final static String ID = "Git";
public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 0;
/** for example: "beta", "alpha", "rc" */
public final static String STATUS = "";
public final static long BUILD = 1;
/** for example "-test" */
public final static String EXTRA = "";
public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;
public final static String FULL_VERSION = VERSION + "-" + STATUS + BUILD + EXTRA;
public static void main(String args[]) {
System.out.println("I2P Router version: " + FULL_VERSION);
System.out.println("Router ID: " + RouterVersion.ID);