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
This commit is contained in:
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -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))
|
||||
|
@ -93,6 +93,10 @@
|
||||
OR use the same port configured for SSU
|
||||
(currently <jsp:getProperty name="nethelper" property="udpPort" />)?
|
||||
<input type="checkbox" name="ntcpAutoPort" value="true" <jsp:getProperty name="nethelper" property="tcpAutoPortChecked" /> /><br />
|
||||
<p>A hostname entered here will be published in the network database.
|
||||
It is <b>not private</b>.
|
||||
Also, <b>do not enter a private IP address</b> like 127.0.0.1 or 192.168.1.1.
|
||||
</p>
|
||||
<p>You do <i>not</i> need to allow inbound TCP connections - outbound connections work with no
|
||||
configuration. However, if you want to receive inbound TCP connections, you <b>must</b> poke a hole
|
||||
in your NAT or firewall for unsolicited TCP connections. If you specify the wrong IP address or
|
||||
|
@ -22,6 +22,7 @@
|
||||
<jsp:useBean class="net.i2p.router.web.ConfigUpdateHelper" id="updatehelper" scope="request" />
|
||||
<jsp:setProperty name="updatehelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
|
||||
|
||||
<br /><i><jsp:getProperty name="updatehelper" property="newsStatus" /></i><br /> <br />
|
||||
<form action="configupdate.jsp" method="POST">
|
||||
<% String prev = System.getProperty("net.i2p.router.web.ConfigUpdateHandler.nonce");
|
||||
if (prev != null) System.setProperty("net.i2p.router.web.ConfigUpdateHandler.noncePrev", prev);
|
||||
|
@ -21,6 +21,10 @@ if (System.getProperty("router.consoleNonce") == null) {
|
||||
<jsp:setProperty name="newshelper" property="page" value="docs/news.xml" />
|
||||
<jsp:setProperty name="newshelper" property="maxLines" value="300" />
|
||||
<jsp:getProperty name="newshelper" property="content" />
|
||||
|
||||
<jsp:useBean class="net.i2p.router.web.ConfigUpdateHelper" id="updatehelper" scope="request" />
|
||||
<jsp:setProperty name="updatehelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
|
||||
<br /><i><font size="-1"><jsp:getProperty name="updatehelper" property="newsStatus" /></font></i><br />
|
||||
</div>
|
||||
|
||||
<div class="main" id="main">
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user