Changeset dbaa659


Ignore:
Timestamp:
Jul 17, 2011 11:54:42 PM (9 years ago)
Author:
dream <dream@…>
Branches:
master
Children:
127aebe
Parents:
41021e1
Message:

Now you can ?i2paddresshelper≤b32>.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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java

    r41021e1 rdbaa659  
    456456                                    pos2 = fragment.indexOf("=");
    457457                                    ahelperKey = fragment.substring(pos2 + 1);
    458 
    459458                                    // Key contains data, lets not ignore it
    460459                                    if (ahelperKey != null) {
     460                                        if(ahelperKey.endsWith(".b32.i2p")) {
     461                                            // allow i2paddresshelper=<b32>.b32.i2p syntax.
     462                                            Destination dest = _context.namingService().lookup(ahelperKey);
     463                                            if(dest==null)
     464                                                throw new RuntimeException("Could not find destination for "+ahelperKey);
     465                                            ahelperKey = dest.toBase64();
     466                                        }
    461467                                        ahelperPresent = true;
    462468                                        // ahelperKey will be validated later
Note: See TracChangeset for help on using the changeset viewer.