forked from I2P_Developers/i2p.i2p
* NewsFetcher: add last-modified support, reduce number of retries
* Error pages: add icon and logo, clarify 'destination not found' and 'proxy not found' pages
This commit is contained in:
@@ -24,6 +24,7 @@ public class NewsFetcher implements Runnable, EepGet.StatusListener {
|
|||||||
private Log _log;
|
private Log _log;
|
||||||
private boolean _updateAvailable;
|
private boolean _updateAvailable;
|
||||||
private long _lastFetch;
|
private long _lastFetch;
|
||||||
|
private String _lastModified;
|
||||||
private static NewsFetcher _instance;
|
private static NewsFetcher _instance;
|
||||||
//public static final synchronized NewsFetcher getInstance() { return _instance; }
|
//public static final synchronized NewsFetcher getInstance() { return _instance; }
|
||||||
public static final synchronized NewsFetcher getInstance(I2PAppContext ctx) {
|
public static final synchronized NewsFetcher getInstance(I2PAppContext ctx) {
|
||||||
@@ -105,11 +106,12 @@ public class NewsFetcher implements Runnable, EepGet.StatusListener {
|
|||||||
proxyPort = Integer.parseInt(port);
|
proxyPort = Integer.parseInt(port);
|
||||||
EepGet get = null;
|
EepGet get = null;
|
||||||
if (shouldProxy)
|
if (shouldProxy)
|
||||||
get = new EepGet(_context, proxyHost, proxyPort, 10, TEMP_NEWS_FILE, newsURL);
|
get = new EepGet(_context, true, proxyHost, proxyPort, 2, TEMP_NEWS_FILE, newsURL, true, null, _lastModified);
|
||||||
else
|
else
|
||||||
get = new EepGet(_context, 10, TEMP_NEWS_FILE, newsURL);
|
get = new EepGet(_context, false, null, 0, 0, TEMP_NEWS_FILE, newsURL, true, null, _lastModified);
|
||||||
get.addStatusListener(this);
|
get.addStatusListener(this);
|
||||||
get.fetch();
|
if (get.fetch())
|
||||||
|
_lastModified = get.getLastModified();
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
_log.error("Error fetching the news", t);
|
_log.error("Error fetching the news", t);
|
||||||
}
|
}
|
||||||
@@ -212,8 +214,8 @@ public class NewsFetcher implements Runnable, EepGet.StatusListener {
|
|||||||
_log.error("Failed to copy the news file!");
|
_log.error("Failed to copy the news file!");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (_log.shouldLog(Log.ERROR))
|
if (_log.shouldLog(Log.WARN))
|
||||||
_log.error("Transfer complete, but no file?");
|
_log.warn("Transfer complete, but no file? - probably 304 Not Modified");
|
||||||
}
|
}
|
||||||
checkForUpdates();
|
checkForUpdates();
|
||||||
}
|
}
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
$Id: history.txt,v 1.612 2008-01-07 03:09:44 zzz Exp $
|
$Id: history.txt,v 1.613 2008-01-08 21:15:45 zzz Exp $
|
||||||
|
|
||||||
2008-01-08 zzz
|
2008-01-08 zzz
|
||||||
* addressbook: Limit size of subscribed hosts.txt,
|
* addressbook: Limit size of subscribed hosts.txt,
|
||||||
@@ -7,6 +7,11 @@ $Id: history.txt,v 1.612 2008-01-07 03:09:44 zzz Exp $
|
|||||||
enforce size limits even when size not in returned header,
|
enforce size limits even when size not in returned header,
|
||||||
don't return old etag or last-modified data,
|
don't return old etag or last-modified data,
|
||||||
don't call transferFailed listener more than once
|
don't call transferFailed listener more than once
|
||||||
|
* Sign my update signing key
|
||||||
|
* NewsFetcher: add last-modified support, reduce number of retries
|
||||||
|
* Error pages: add icon and logo,
|
||||||
|
clarify 'destination not found' and 'proxy not found' pages
|
||||||
|
|
||||||
|
|
||||||
2008-01-07 zzz
|
2008-01-07 zzz
|
||||||
* profiles.jsp formatting cleanup
|
* profiles.jsp formatting cleanup
|
||||||
|
@@ -6,6 +6,7 @@ Proxy-Connection: close
|
|||||||
|
|
||||||
<html><head>
|
<html><head>
|
||||||
<title>Destination key conflict</title>
|
<title>Destination key conflict</title>
|
||||||
|
<link rel="shortcut icon" href="http://localhost:7657/favicon.ico" />
|
||||||
<style type='text/css'>
|
<style type='text/css'>
|
||||||
div.warning {
|
div.warning {
|
||||||
margin: 0em 1em 1em 224px;
|
margin: 0em 1em 1em 224px;
|
||||||
@@ -31,7 +32,7 @@ div.logo {
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class=logo>
|
<div class=logo>
|
||||||
<a href="http://localhost:7657/index.jsp">Router Console</a><br />
|
<a href="http://localhost:7657/index.jsp" title="Router Console"><img src="http://localhost:7657/i2plogo.png" alt="Router Console" width="187" height="35" border="0"/></a><br />
|
||||||
[<a href="http://localhost:7657/config.jsp">configuration</a> | <a href="http://localhost:7657/help.jsp">help</a>]
|
[<a href="http://localhost:7657/config.jsp">configuration</a> | <a href="http://localhost:7657/help.jsp">help</a>]
|
||||||
</div>
|
</div>
|
||||||
<div class=warning id=warning>
|
<div class=warning id=warning>
|
||||||
|
@@ -6,6 +6,7 @@ Proxy-Connection: close
|
|||||||
|
|
||||||
<html><head>
|
<html><head>
|
||||||
<title>Eepsite not reachable</title>
|
<title>Eepsite not reachable</title>
|
||||||
|
<link rel="shortcut icon" href="http://localhost:7657/favicon.ico" />
|
||||||
<style type='text/css'>
|
<style type='text/css'>
|
||||||
div.warning {
|
div.warning {
|
||||||
margin: 0em 1em 1em 224px;
|
margin: 0em 1em 1em 224px;
|
||||||
@@ -31,12 +32,13 @@ div.logo {
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class=logo>
|
<div class=logo>
|
||||||
<a href="http://localhost:7657/index.jsp">Router Console</a><br />
|
<a href="http://localhost:7657/index.jsp" title="Router Console"><img src="http://localhost:7657/i2plogo.png" alt="Router Console" width="187" height="35" border="0"/></a><br />
|
||||||
[<a href="http://localhost:7657/config.jsp">configuration</a> | <a href="http://localhost:7657/help.jsp">help</a>]
|
[<a href="http://localhost:7657/config.jsp">configuration</a> | <a href="http://localhost:7657/help.jsp">help</a>]
|
||||||
</div>
|
</div>
|
||||||
<div class=warning id=warning>
|
<div class=warning id=warning>
|
||||||
The eepsite was not reachable.
|
The eepsite was not reachable.
|
||||||
The eepsite is temporarily offline, or there is network congestion.
|
The eepsite is temporarily offline, there is network congestion,
|
||||||
|
or your router is not yet well-integrated with peers.
|
||||||
You may want to
|
You may want to
|
||||||
<a href="javascript: window.location.reload()">retry</a>.
|
<a href="javascript: window.location.reload()">retry</a>.
|
||||||
<BR><BR>Could not find the following destination:<BR><BR>
|
<BR><BR>Could not find the following destination:<BR><BR>
|
||||||
|
@@ -6,6 +6,7 @@ Proxy-Connection: close
|
|||||||
|
|
||||||
<html><head>
|
<html><head>
|
||||||
<title>Invalid eepsite destination</title>
|
<title>Invalid eepsite destination</title>
|
||||||
|
<link rel="shortcut icon" href="http://localhost:7657/favicon.ico" />
|
||||||
<style type='text/css'>
|
<style type='text/css'>
|
||||||
div.warning {
|
div.warning {
|
||||||
margin: 0em 1em 1em 224px;
|
margin: 0em 1em 1em 224px;
|
||||||
@@ -31,7 +32,7 @@ div.logo {
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class=logo>
|
<div class=logo>
|
||||||
<a href="http://localhost:7657/index.jsp">Router Console</a><br />
|
<a href="http://localhost:7657/index.jsp" title="Router Console"><img src="http://localhost:7657/i2plogo.png" alt="Router Console" width="187" height="35" border="0"/></a><br />
|
||||||
[<a href="http://localhost:7657/config.jsp">configuration</a> | <a href="http://localhost:7657/help.jsp">help</a>]
|
[<a href="http://localhost:7657/config.jsp">configuration</a> | <a href="http://localhost:7657/help.jsp">help</a>]
|
||||||
</div>
|
</div>
|
||||||
<div class=warning id=warning>
|
<div class=warning id=warning>
|
||||||
|
@@ -6,6 +6,7 @@ Proxy-Connection: close
|
|||||||
|
|
||||||
<html><head>
|
<html><head>
|
||||||
<title>Eepsite unknown</title>
|
<title>Eepsite unknown</title>
|
||||||
|
<link rel="shortcut icon" href="http://localhost:7657/favicon.ico" />
|
||||||
<style type='text/css'>
|
<style type='text/css'>
|
||||||
div.warning {
|
div.warning {
|
||||||
margin: 0em 1em 1em 224px;
|
margin: 0em 1em 1em 224px;
|
||||||
@@ -31,7 +32,7 @@ div.logo {
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class=logo>
|
<div class=logo>
|
||||||
<a href="http://localhost:7657/index.jsp">Router Console</a><br />
|
<a href="http://localhost:7657/index.jsp" title="Router Console"><img src="http://localhost:7657/i2plogo.png" alt="Router Console" width="187" height="35" border="0"/></a><br />
|
||||||
[<a href="http://localhost:7657/config.jsp">configuration</a> | <a href="http://localhost:7657/help.jsp">help</a>]
|
[<a href="http://localhost:7657/config.jsp">configuration</a> | <a href="http://localhost:7657/help.jsp">help</a>]
|
||||||
</div>
|
</div>
|
||||||
<div class=warning id=warning>
|
<div class=warning id=warning>
|
||||||
|
@@ -6,6 +6,7 @@ Proxy-Connection: close
|
|||||||
|
|
||||||
<html><head>
|
<html><head>
|
||||||
<title>Outproxy Not Found</title>
|
<title>Outproxy Not Found</title>
|
||||||
|
<link rel="shortcut icon" href="http://localhost:7657/favicon.ico" />
|
||||||
<style type='text/css'>
|
<style type='text/css'>
|
||||||
div.warning {
|
div.warning {
|
||||||
margin: 0em 1em 1em 224px;
|
margin: 0em 1em 1em 224px;
|
||||||
@@ -32,13 +33,14 @@ div.logo {
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class=logo>
|
<div class=logo>
|
||||||
<a href="http://localhost:7657/index.jsp">Router Console</a><br />
|
<a href="http://localhost:7657/index.jsp" title="Router Console"><img src="http://localhost:7657/i2plogo.png" alt="Router Console" width="187" height="35" border="0"/></a><br />
|
||||||
[<a href="http://localhost:7657/config.jsp">configuration</a> | <a href="http://localhost:7657/help.jsp">help</a>]
|
[<a href="http://localhost:7657/config.jsp">configuration</a> | <a href="http://localhost:7657/help.jsp">help</a>]
|
||||||
</div>
|
</div>
|
||||||
<div class=warning id=warning>
|
<div class=warning id=warning>
|
||||||
The WWW Outproxy was not found.
|
The WWW Outproxy was not found.
|
||||||
It could
|
It is offline, there is network congestion,
|
||||||
be temporarily offline. You may want to
|
or your router is not yet well-integrated with peers.
|
||||||
|
You may want to
|
||||||
<a href="javascript: parent.window.location.reload()">retry</a>
|
<a href="javascript: parent.window.location.reload()">retry</a>
|
||||||
as this will randomly reselect an outproxy from the pool you have defined
|
as this will randomly reselect an outproxy from the pool you have defined
|
||||||
<a href="http://localhost:7657/i2ptunnel/index.jsp">here</a>
|
<a href="http://localhost:7657/i2ptunnel/index.jsp">here</a>
|
||||||
|
@@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class RouterVersion {
|
public class RouterVersion {
|
||||||
public final static String ID = "$Revision: 1.547 $ $Date: 2008-01-07 03:09:43 $";
|
public final static String ID = "$Revision: 1.548 $ $Date: 2008-01-08 21:15:43 $";
|
||||||
public final static String VERSION = "0.6.1.30";
|
public final static String VERSION = "0.6.1.30";
|
||||||
public final static long BUILD = 19;
|
public final static long BUILD = 20;
|
||||||
public static void main(String args[]) {
|
public static void main(String args[]) {
|
||||||
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
|
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
|
||||||
System.out.println("Router ID: " + RouterVersion.ID);
|
System.out.println("Router ID: " + RouterVersion.ID);
|
||||||
|
Reference in New Issue
Block a user