diff --git a/LICENSE.txt b/LICENSE.txt index e93798548..250261d98 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -121,7 +121,6 @@ Applications: Copyright 2000-2004 Mort Bay Consulting Pty. Ltd. See licenses/LICENSE-Apache1.1.txt See licenses/LICENSE-Apache2.0.txt - See licenses/NOTICE-Ant.txt See licenses/NOTICE-Commons-Logging.txt JRobin 1.4.0: diff --git a/apps/i2ptunnel/java/build.xml b/apps/i2ptunnel/java/build.xml index 5ab73d5e2..a74e328cc 100644 --- a/apps/i2ptunnel/java/build.xml +++ b/apps/i2ptunnel/java/build.xml @@ -55,7 +55,7 @@ - + diff --git a/apps/routerconsole/java/build.xml b/apps/routerconsole/java/build.xml index 23e1ac05b..c0a132a41 100644 --- a/apps/routerconsole/java/build.xml +++ b/apps/routerconsole/java/build.xml @@ -86,7 +86,7 @@ - + diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigTunnelsHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigTunnelsHelper.java index 8b8b2fb16..2e53be6b5 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigTunnelsHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigTunnelsHelper.java @@ -63,6 +63,11 @@ public class ConfigTunnelsHelper extends HelperBase { out.getLength() <= 0 || out.getLength() + out.getLengthVariance() <= 0) buf.append("ANONYMITY WARNING - Settings include 0-hop tunnels"); + else if (in.getLength() <= 1 || + in.getLength() + in.getLengthVariance() <= 1 || + out.getLength() <= 1 || + out.getLength() + out.getLengthVariance() <= 1) + buf.append("ANONYMITY WARNING - Settings include 1-hop tunnels"); if (in.getLength() + Math.abs(in.getLengthVariance()) >= WARN_LENGTH || out.getLength() + Math.abs(out.getLengthVariance()) >= WARN_LENGTH) buf.append("PERFORMANCE WARNING - Settings include very long tunnels"); diff --git a/apps/routerconsole/jsp/logs.jsp b/apps/routerconsole/jsp/logs.jsp index 374a2ed8b..845ad3e8d 100644 --- a/apps/routerconsole/jsp/logs.jsp +++ b/apps/routerconsole/jsp/logs.jsp @@ -26,7 +26,7 @@ jbigi <%=net.i2p.util.NativeBigInteger.loadStatus()%>

Critical logs:


-

Router logs:

+

Router logs (configure):


Service (Wrapper) logs:

diff --git a/apps/susidns/src/build.xml b/apps/susidns/src/build.xml index 6f82b26b1..35fbeb28c 100644 --- a/apps/susidns/src/build.xml +++ b/apps/susidns/src/build.xml @@ -35,7 +35,7 @@ - + diff --git a/apps/susidns/src/java/src/i2p/susi/dns/AddressbookBean.java b/apps/susidns/src/java/src/i2p/susi/dns/AddressbookBean.java index 214e7e292..de4cff527 100644 --- a/apps/susidns/src/java/src/i2p/susi/dns/AddressbookBean.java +++ b/apps/susidns/src/java/src/i2p/susi/dns/AddressbookBean.java @@ -37,11 +37,13 @@ import java.util.Properties; public class AddressbookBean { private String book, action, serial, lastSerial, filter, search, hostname, destination; + private int beginIndex, endIndex; private Properties properties, addressbook; private int trClass; private LinkedList deletionMarks; private static Comparator sorter; - + private static final int DISPLAY_SIZE=100; + static { sorter = new AddressByNameSorter(); } @@ -74,6 +76,8 @@ public class AddressbookBean { properties = new Properties(); deletionMarks = new LinkedList(); + beginIndex = 0; + endIndex = DISPLAY_SIZE - 1; } private long configLastLoaded = 0; private static final String PRIVATE_BOOK = "private_addressbook"; @@ -106,6 +110,8 @@ public class AddressbookBean { loadConfig(); String filename = properties.getProperty( getBook() + "_addressbook" ); + if (filename.startsWith("../")) + return filename.substring(3); return ConfigBean.addressbookPrefix + filename; } private Object[] entries; @@ -174,17 +180,45 @@ public class AddressbookBean } list.addLast( new AddressBean( name, destination ) ); } - // Format a message about filtered addressbook size, and the number of displayed entries - if( filter != null && filter.length() > 0 ) - message = "Filtered l"; - else - message = "L"; - message += "ist contains " + list.size() + " entries"; - if (list.size() > 300) message += ", displaying the first 300."; else message += "."; - Object array[] = list.toArray(); Arrays.sort( array, sorter ); entries = array; + + // Format a message about filtered addressbook size, and the number of displayed entries + // addressbook.jsp catches the case where the whole book is empty. + String filterArg = ""; + if( search != null && search.length() > 0 ) { + message = "Search "; + } + if( filter != null && filter.length() > 0 ) { + if( search != null && search.length() > 0 ) + message += "within "; + message += "Filtered list "; + filterArg = "&filter=" + filter; + } + if (entries.length == 0) { + message += "- no matches"; + } else if (getBeginInt() == 0 && getEndInt() == entries.length - 1) { + if (message.length() == 0) + message = "Addressbook "; + message += "contains " + entries.length + " entries"; + } else { + if (getBeginInt() > 0) { + int newBegin = Math.max(0, getBeginInt() - DISPLAY_SIZE); + int newEnd = Math.max(0, getBeginInt() - 1); + message += "" + newBegin + + '-' + newEnd + " | "; + } + message += "Showing " + getBegin() + '-' + getEnd() + " of " + entries.length; + if (getEndInt() < entries.length - 1) { + int newBegin = Math.min(entries.length - 1, getEndInt() + 1); + int newEnd = Math.min(entries.length, getEndInt() + DISPLAY_SIZE); + message += " | " + newBegin + + '-' + newEnd + ""; + } + } } catch (Exception e) { Debug.debug( e.getClass().getName() + ": " + e.getMessage() ); @@ -302,4 +336,26 @@ public class AddressbookBean public void setHostname(String hostname) { this.hostname = hostname; } + private int getBeginInt() { + return Math.max(0, Math.min(entries.length - 1, beginIndex)); + } + public String getBegin() { + return "" + getBeginInt(); + } + public void setBegin(String s) { + try { + beginIndex = Integer.parseInt(s); + } catch (NumberFormatException nfe) {} + } + private int getEndInt() { + return Math.max(0, Math.max(getBeginInt(), Math.min(entries.length - 1, endIndex))); + } + public String getEnd() { + return "" + getEndInt(); + } + public void setEnd(String s) { + try { + endIndex = Integer.parseInt(s); + } catch (NumberFormatException nfe) {} + } } diff --git a/apps/susidns/src/jsp/addressbook.jsp b/apps/susidns/src/jsp/addressbook.jsp index d36b91354..d3cf0c3b4 100644 --- a/apps/susidns/src/jsp/addressbook.jsp +++ b/apps/susidns/src/jsp/addressbook.jsp @@ -46,10 +46,10 @@