From dbaa659912657c6ea082a1de805f338571ba994a Mon Sep 17 00:00:00 2001 From: dream Date: Sun, 17 Jul 2011 23:54:42 +0000 Subject: [PATCH] Now you can ?i2paddresshelper=.b32.i2p and the address helper will look up the b32 for you. (Can't/shouldn't add b32s to your addressbook). Tested and it works for me. --- .../java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java index 3f7db9068..55473717f 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java @@ -455,9 +455,15 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn !Boolean.valueOf(getTunnel().getClientOptions().getProperty(PROP_DISABLE_HELPER)).booleanValue()) { pos2 = fragment.indexOf("="); ahelperKey = fragment.substring(pos2 + 1); - // Key contains data, lets not ignore it if (ahelperKey != null) { + if(ahelperKey.endsWith(".b32.i2p")) { + // allow i2paddresshelper=.b32.i2p syntax. + Destination dest = _context.namingService().lookup(ahelperKey); + if(dest==null) + throw new RuntimeException("Could not find destination for "+ahelperKey); + ahelperKey = dest.toBase64(); + } ahelperPresent = true; // ahelperKey will be validated later if (host == null || "i2p".equals(host)) {