Changeset f7dc55f


Ignore:
Timestamp:
Mar 16, 2012 12:07:13 PM (8 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
1de88909
Parents:
d9ba62a
Message:
  • HTTP Proxy: Jump and addresshelper page tweaks
File:
1 edited

Legend:

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

    rd9ba62a rf7dc55f  
    3333import net.i2p.client.streaming.I2PSocketManager;
    3434import net.i2p.client.streaming.I2PSocketOptions;
     35import net.i2p.crypto.SHA256Generator;
    3536import net.i2p.data.Base32;
    3637import net.i2p.data.Base64;
     
    982983        byte[] header = getErrorPage("ahelper-new", ERR_AHELPER_NEW);
    983984        out.write(header);
    984         out.write(("<table><tr><td class=\"mediumtags\" align=\"right\">" + _("Host") + "</td><td class=\"mediumtags\">" + destination + "</td></tr>\n" +
    985                    "<tr><td class=\"mediumtags\" align=\"right\">" + _("Destination") + "</td><td>" +
     985        out.write(("<table><tr><td class=\"mediumtags\" align=\"right\">" + _("Host") +
     986                   "</td><td class=\"mediumtags\">" + destination + "</td></tr>\n").getBytes());
     987        try {
     988            String b32 = Base32.encode(SHA256Generator.getInstance().calculateHash(Base64.decode(ahelperKey)).getData());
     989            out.write(("<tr><td class=\"mediumtags\" align=\"right\">" + _("Base 32") + "</td>" +
     990                       "<td><a href=\"http://" + b32 + ".b32.i2p/\">" + b32 + ".b32.i2p</a></td></tr>").getBytes());
     991        } catch (Exception e) {}
     992        out.write(("<tr><td class=\"mediumtags\" align=\"right\">" + _("Destination") + "</td><td>" +
    986993                   "<textarea rows=\"1\" style=\"height: 4em; min-width: 0; min-height: 0;\" cols=\"70\" wrap=\"off\" readonly=\"readonly\" >" +
    987994                   ahelperKey + "</textarea></td></tr></table>\n" +
     
    11801187                        out.write(uri.getBytes());
    11811188                        out.write("\">".getBytes());
    1182                         out.write(jurl.getBytes());
     1189                        out.write(jurl.substring(7).getBytes());
    11831190                        out.write(uri.getBytes());
    11841191                        out.write("</a>\n".getBytes());
Note: See TracChangeset for help on using the changeset viewer.