* HTTP Proxy: Don't show jump links for unknown jump hosts

This commit is contained in:
zzz
2008-07-07 14:07:14 +00:00
parent 0cfac58adb
commit e0dcf82697

View File

@@ -672,6 +672,16 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable
if (showAddrHelper) {
out.write("<br><br>Click a link below to look for an address helper by using a \"jump\" service:<br>".getBytes());
for (int i = 0; i < jumpServers.length; i++) {
// Skip jump servers we don't know
String jumphost = jumpServers[i].substring(7); // "http://"
jumphost = jumphost.substring(0, jumphost.indexOf('/'));
try {
Destination dest = I2PTunnel.destFromName(jumphost);
if (dest == null) continue;
} catch (DataFormatException dfe) {
continue;
}
out.write("<br><a href=\"".getBytes());
out.write(jumpServers[i].getBytes());
out.write(uri.getBytes());