diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigUpdateHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigUpdateHelper.java index f35705d14..bcd090268 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigUpdateHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigUpdateHelper.java @@ -119,4 +119,12 @@ public class ConfigUpdateHelper { public String getTrustedKeys() { return new TrustedUpdate(_context).getTrustedKeysString(); } + + public String getNewsStatus() { + return NewsFetcher.getInstance(_context).status(); + } + + public String getUpdateVersion() { + return NewsFetcher.getInstance(_context).updateVersion(); + } } diff --git a/apps/routerconsole/java/src/net/i2p/router/web/NewsFetcher.java b/apps/routerconsole/java/src/net/i2p/router/web/NewsFetcher.java index 92430654e..31c1565eb 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/NewsFetcher.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/NewsFetcher.java @@ -25,6 +25,8 @@ public class NewsFetcher implements Runnable, EepGet.StatusListener { private Log _log; private boolean _updateAvailable; private long _lastFetch; + private long _lastUpdated; + private String _updateVersion; private String _lastModified; private static NewsFetcher _instance; //public static final synchronized NewsFetcher getInstance() { return _instance; } @@ -44,6 +46,8 @@ public class NewsFetcher implements Runnable, EepGet.StatusListener { _instance = this; _lastFetch = 0; updateLastFetched(); + _lastUpdated = _lastFetch; + _updateVersion = ""; } private void updateLastFetched() { @@ -56,6 +60,14 @@ public class NewsFetcher implements Runnable, EepGet.StatusListener { } public boolean updateAvailable() { return _updateAvailable; } + public String updateVersion() { return _updateVersion; } + + public String status() { + long now = _context.clock().now(); + return + (_lastUpdated > 0 ? "News last updated " + DataHelper.formatDuration(now - _lastUpdated) + " ago" : "") + + (_lastFetch > _lastUpdated ? ", last checked " + DataHelper.formatDuration(now - _lastFetch) + " ago" : ""); + } public void run() { try { Thread.sleep(_context.random().nextLong(5*60*1000)); } catch (InterruptedException ie) {} @@ -146,6 +158,7 @@ public class NewsFetcher implements Runnable, EepGet.StatusListener { if (TrustedUpdate.needsUpdate(RouterVersion.VERSION, ver)) { if (_log.shouldLog(Log.DEBUG)) _log.debug("Our version is out of date, update!"); + _updateVersion = ver; break; } else { if (_log.shouldLog(Log.DEBUG)) diff --git a/apps/routerconsole/jsp/config.jsp b/apps/routerconsole/jsp/config.jsp index 1fea0861f..0589e1035 100644 --- a/apps/routerconsole/jsp/config.jsp +++ b/apps/routerconsole/jsp/config.jsp @@ -93,6 +93,10 @@ OR use the same port configured for SSU (currently )? />
+

A hostname entered here will be published in the network database. + It is not private. + Also, do not enter a private IP address like 127.0.0.1 or 192.168.1.1. +

You do not need to allow inbound TCP connections - outbound connections work with no configuration. However, if you want to receive inbound TCP connections, you must poke a hole in your NAT or firewall for unsolicited TCP connections. If you specify the wrong IP address or diff --git a/apps/routerconsole/jsp/configupdate.jsp b/apps/routerconsole/jsp/configupdate.jsp index 634b362ae..276b503ae 100644 --- a/apps/routerconsole/jsp/configupdate.jsp +++ b/apps/routerconsole/jsp/configupdate.jsp @@ -22,6 +22,7 @@ " /> +

 

<% String prev = System.getProperty("net.i2p.router.web.ConfigUpdateHandler.nonce"); if (prev != null) System.setProperty("net.i2p.router.web.ConfigUpdateHandler.noncePrev", prev); diff --git a/apps/routerconsole/jsp/index.jsp b/apps/routerconsole/jsp/index.jsp index 2baf3b45c..6305b9cfe 100644 --- a/apps/routerconsole/jsp/index.jsp +++ b/apps/routerconsole/jsp/index.jsp @@ -21,6 +21,10 @@ if (System.getProperty("router.consoleNonce") == null) { + + + " /> +

diff --git a/history.txt b/history.txt index 370ec2820..7ebbc82d1 100644 --- a/history.txt +++ b/history.txt @@ -1,9 +1,16 @@ +2008-06-09 zzz + * Reachability: Restrict peers with no SSU address at all from inbound tunnels + * News: + - Add display of last updated and last checked time + on index.jsp and configupdate.jsp + - Add a function to get update version (unused for now) + * config.jsp: Add another warning + 2008-06-07 zzz * NetDb: Tweak some logging on lease problems * Shitlist: - Add shitlistForever() and isShitlistedForever(), unused for now - Sort the HTML output by router hash - * config.jsp: Add another warning * netdb.jsp: - Sort the lease HTML output by dest hash, local first - Sort the router HTML output by router hash diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index 3f2309f5f..db2141440 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -17,7 +17,7 @@ import net.i2p.CoreVersion; public class RouterVersion { public final static String ID = "$Revision: 1.548 $ $Date: 2008-02-10 15:00:00 $"; public final static String VERSION = "0.6.1.33"; - public final static long BUILD = 2004; + public final static long BUILD = 2005; public static void main(String args[]) { System.out.println("I2P Router version: " + VERSION + "-" + BUILD); System.out.println("Router ID: " + RouterVersion.ID); diff --git a/router/java/src/net/i2p/router/peermanager/ProfileOrganizer.java b/router/java/src/net/i2p/router/peermanager/ProfileOrganizer.java index 5ad8c64c0..425c31fa5 100644 --- a/router/java/src/net/i2p/router/peermanager/ProfileOrganizer.java +++ b/router/java/src/net/i2p/router/peermanager/ProfileOrganizer.java @@ -459,7 +459,11 @@ public class ProfileOrganizer { l.add(peer); else { RouterAddress ra = info.getTargetAddress("SSU"); - if (ra == null) continue; + // Definitely don't want peers with no SSU address at all + if (ra == null) { + l.add(peer); + continue; + } // This is the quick way of doing UDPAddress.getIntroducerCount() > 0 Properties props = ra.getOptions(); if (props != null && props.getProperty("ihost0") != null)