propagate from branch 'i2p.i2p' (head 6ab0f64b9f4992591ed989f8d89a859fc3ceaeaf)

to branch 'i2p.i2p.zzz.test2' (head 3e85c6cfff244d09df42d967d3a3cdf77053890d)
This commit is contained in:
zzz
2009-08-08 14:30:07 +00:00
38 changed files with 452 additions and 102 deletions

View File

@ -401,7 +401,7 @@ public class I2PSnarkServlet extends HttpServlet {
if (i > 0) if (i > 0)
filename = filename.substring(0, i); filename = filename.substring(0, i);
if (filename.length() > MAX_DISPLAYED_FILENAME_LENGTH) if (filename.length() > MAX_DISPLAYED_FILENAME_LENGTH)
filename = filename.substring(0, MAX_DISPLAYED_FILENAME_LENGTH) + "..."; filename = filename.substring(0, MAX_DISPLAYED_FILENAME_LENGTH) + "…";
long total = snark.meta.getTotalLength(); long total = snark.meta.getTotalLength();
// Early typecast, avoid possibly overflowing a temp integer // Early typecast, avoid possibly overflowing a temp integer
long remaining = (long) snark.storage.needed() * (long) snark.meta.getPieceLength(0); long remaining = (long) snark.storage.needed() * (long) snark.meta.getPieceLength(0);
@ -453,7 +453,7 @@ public class I2PSnarkServlet extends HttpServlet {
statusString = "<a title=\"" + err + "\">TrackerErr (" + curPeers + "/" + knownPeers + " peers)"; statusString = "<a title=\"" + err + "\">TrackerErr (" + curPeers + "/" + knownPeers + " peers)";
else { else {
if (err.length() > MAX_DISPLAYED_ERROR_LENGTH) if (err.length() > MAX_DISPLAYED_ERROR_LENGTH)
err = err.substring(0, MAX_DISPLAYED_ERROR_LENGTH) + "..."; err = err.substring(0, MAX_DISPLAYED_ERROR_LENGTH) + "&hellip;";
statusString = "TrackerErr<br />(" + err + ")"; statusString = "TrackerErr<br />(" + err + ")";
} }
} else if (remaining <= 0) { } else if (remaining <= 0) {

View File

@ -373,7 +373,7 @@ public class I2PTunnel implements Logging, EventDispatcher {
privKeyFile = new File(args[2]); privKeyFile = new File(args[2]);
if (!privKeyFile.isAbsolute()) if (!privKeyFile.isAbsolute())
privKeyFile = new File(_context.getAppDir(), args[2]); privKeyFile = new File(_context.getConfigDir(), args[2]);
if (!privKeyFile.canRead()) { if (!privKeyFile.canRead()) {
l.log("private key file does not exist"); l.log("private key file does not exist");
_log.error(getPrefix() + "Private key file does not exist or is not readable: " + args[2]); _log.error(getPrefix() + "Private key file does not exist or is not readable: " + args[2]);
@ -422,7 +422,7 @@ public class I2PTunnel implements Logging, EventDispatcher {
privKeyFile = new File(args[2]); privKeyFile = new File(args[2]);
if (!privKeyFile.isAbsolute()) if (!privKeyFile.isAbsolute())
privKeyFile = new File(_context.getAppDir(), args[2]); privKeyFile = new File(_context.getConfigDir(), args[2]);
if (!privKeyFile.canRead()) { if (!privKeyFile.canRead()) {
l.log("private key file does not exist"); l.log("private key file does not exist");
_log.error(getPrefix() + "Private key file does not exist or is not readable: " + args[2]); _log.error(getPrefix() + "Private key file does not exist or is not readable: " + args[2]);
@ -481,7 +481,7 @@ public class I2PTunnel implements Logging, EventDispatcher {
privKeyFile = new File(args[3]); privKeyFile = new File(args[3]);
if (!privKeyFile.isAbsolute()) if (!privKeyFile.isAbsolute())
privKeyFile = new File(_context.getAppDir(), args[3]); privKeyFile = new File(_context.getConfigDir(), args[3]);
if (!privKeyFile.canRead()) { if (!privKeyFile.canRead()) {
l.log("private key file does not exist"); l.log("private key file does not exist");
_log.error(getPrefix() + "Private key file does not exist or is not readable: " + args[3]); _log.error(getPrefix() + "Private key file does not exist or is not readable: " + args[3]);
@ -877,7 +877,7 @@ public class I2PTunnel implements Logging, EventDispatcher {
File privKeyFile = new File(args[1]); File privKeyFile = new File(args[1]);
if (!privKeyFile.isAbsolute()) if (!privKeyFile.isAbsolute())
privKeyFile = new File(_context.getAppDir(), args[1]); privKeyFile = new File(_context.getConfigDir(), args[1]);
if (!privKeyFile.canRead()) { if (!privKeyFile.canRead()) {
l.log("private key file does not exist"); l.log("private key file does not exist");
_log.error(getPrefix() + "Private key file does not exist or is not readable: " + args[3]); _log.error(getPrefix() + "Private key file does not exist or is not readable: " + args[3]);

View File

@ -404,6 +404,16 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable
} }
line = method + " " + request.substring(pos); line = method + " " + request.substring(pos);
} else if (host.toLowerCase().equals("localhost") || host.equals("127.0.0.1")) {
if (out != null) {
out.write(ERR_LOCALHOST);
out.write("<p /><i>Generated on: ".getBytes());
out.write(new Date().toString().getBytes());
out.write("</i></body></html>\n".getBytes());
out.flush();
}
s.close();
return;
} else if (host.indexOf(".") != -1) { } else if (host.indexOf(".") != -1) {
// rebuild host // rebuild host
host = host + ":" + port; host = host + ":" + port;
@ -431,16 +441,6 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable
usingWWWProxy = true; usingWWWProxy = true;
if (_log.shouldLog(Log.DEBUG)) if (_log.shouldLog(Log.DEBUG))
_log.debug(getPrefix(requestId) + "Host doesnt end with .i2p and it contains a period [" + host + "]: wwwProxy!"); _log.debug(getPrefix(requestId) + "Host doesnt end with .i2p and it contains a period [" + host + "]: wwwProxy!");
} else if (host.toLowerCase().startsWith("localhost:")) {
if (out != null) {
out.write(ERR_LOCALHOST);
out.write("<p /><i>Generated on: ".getBytes());
out.write(new Date().toString().getBytes());
out.write("</i></body></html>\n".getBytes());
out.flush();
}
s.close();
return;
} else { } else {
request = request.substring(pos + 1); request = request.substring(pos + 1);
pos = request.indexOf("/"); pos = request.indexOf("/");

View File

@ -73,7 +73,7 @@ public class TunnelController implements Logging {
File keyFile = new File(getPrivKeyFile()); File keyFile = new File(getPrivKeyFile());
if (!keyFile.isAbsolute()) if (!keyFile.isAbsolute())
keyFile = new File(I2PAppContext.getGlobalContext().getAppDir(), getPrivKeyFile()); keyFile = new File(I2PAppContext.getGlobalContext().getConfigDir(), getPrivKeyFile());
if (keyFile.exists()) { if (keyFile.exists()) {
//log("Not overwriting existing private keys in " + keyFile.getAbsolutePath()); //log("Not overwriting existing private keys in " + keyFile.getAbsolutePath());
return; return;

View File

@ -53,7 +53,7 @@ public class I2PSocketOptionsImpl implements I2PSocketOptions {
_writeTimeout = getInt(opts, PROP_WRITE_TIMEOUT, DEFAULT_WRITE_TIMEOUT); _writeTimeout = getInt(opts, PROP_WRITE_TIMEOUT, DEFAULT_WRITE_TIMEOUT);
} }
protected int getInt(Properties opts, String name, int defaultVal) { protected static int getInt(Properties opts, String name, int defaultVal) {
if (opts == null) return defaultVal; if (opts == null) return defaultVal;
String val = opts.getProperty(name); String val = opts.getProperty(name);
if (val == null) { if (val == null) {

View File

@ -123,6 +123,7 @@
<pathelement location="../../jetty/jettylib/javax.servlet.jar" /> <pathelement location="../../jetty/jettylib/javax.servlet.jar" />
<pathelement location="../../jetty/jettylib/commons-logging.jar" /> <pathelement location="../../jetty/jettylib/commons-logging.jar" />
<pathelement location="../../jetty/jettylib/commons-el.jar" /> <pathelement location="../../jetty/jettylib/commons-el.jar" />
<pathelement location="../../jetty/jettylib/org.mortbay.jetty.jar" />
<pathelement location="../../systray/java/build/obj" /> <pathelement location="../../systray/java/build/obj" />
<pathelement location="../../systray/java/lib/systray4j.jar" /> <pathelement location="../../systray/java/lib/systray4j.jar" />
<pathelement location="../../../installer/lib/wrapper/win32/wrapper.jar" /> <pathelement location="../../../installer/lib/wrapper/win32/wrapper.jar" />

View File

@ -115,7 +115,7 @@ public class GraphHelper extends HelperBase {
+ "\" /> pixels, height: <input size=\"4\" type=\"text\" name=\"height\" value=\"" + _height + "\" /> pixels, height: <input size=\"4\" type=\"text\" name=\"height\" value=\"" + _height
+ "\" /><br />\n"); + "\" /><br />\n");
_out.write("Refresh delay: <select name=\"refreshDelay\"><option value=\"60\">1 minute</option><option value=\"120\">2 minutes</option><option value=\"300\">5 minutes</option><option value=\"600\">10 minutes</option><option value=\"1800\">30 minutes</option><option value=\"3600\">1 hour</option><option value=\"-1\">Never</option></select><br />\n"); _out.write("Refresh delay: <select name=\"refreshDelay\"><option value=\"60\">1 minute</option><option value=\"120\">2 minutes</option><option value=\"300\">5 minutes</option><option value=\"600\">10 minutes</option><option value=\"1800\">30 minutes</option><option value=\"3600\">1 hour</option><option value=\"-1\">Never</option></select><br />\n");
_out.write("<hr /><input type=\"submit\" value=\"Redraw\" /></div>"); _out.write("<hr /><div class=\"formaction\"><input type=\"submit\" value=\"Redraw\" /></div></div>");
} catch (IOException ioe) { } catch (IOException ioe) {
ioe.printStackTrace(); ioe.printStackTrace();
} }

View File

@ -64,24 +64,15 @@ public class SummaryHelper extends HelperBase {
return DataHelper.formatDuration(router.getUptime()); return DataHelper.formatDuration(router.getUptime());
} }
private static final DateFormat _fmt = new java.text.SimpleDateFormat("HH:mm:ss", Locale.UK); private String timeSkew() {
public String getTime() {
if (_context == null) return ""; if (_context == null) return "";
//if (!_context.clock().getUpdatedSuccessfully())
String now = null; // return " (Unknown skew)";
synchronized (_fmt) {
now = _fmt.format(new Date(_context.clock().now()));
}
if (!_context.clock().getUpdatedSuccessfully())
return now + " (Unknown skew)";
long ms = _context.clock().getOffset(); long ms = _context.clock().getOffset();
long diff = Math.abs(ms); long diff = Math.abs(ms);
if (diff < 100) if (diff < 3000)
return now; return "";
return now + " (" + DataHelper.formatDuration(diff) + " skew)"; return " (" + DataHelper.formatDuration(diff) + " skew)";
} }
public boolean allowReseed() { public boolean allowReseed() {
@ -90,9 +81,14 @@ public class SummaryHelper extends HelperBase {
Boolean.valueOf(_context.getProperty("i2p.alwaysAllowReseed")).booleanValue()); Boolean.valueOf(_context.getProperty("i2p.alwaysAllowReseed")).booleanValue());
} }
public int getAllPeers() { return _context.netDb().getKnownRouters(); } /** subtract one for ourselves, so if we know no other peers it displays zero */
public int getAllPeers() { return Math.max(_context.netDb().getKnownRouters() - 1, 0); }
public String getReachability() { public String getReachability() {
return reachability() + timeSkew();
}
private String reachability() {
if (_context.router().getUptime() > 60*1000 && (!_context.router().gracefulShutdownInProgress()) && if (_context.router().getUptime() > 60*1000 && (!_context.router().gracefulShutdownInProgress()) &&
!_context.clientManager().isAlive()) !_context.clientManager().isAlive())
return "ERR-Client Manager I2CP Error - check logs"; // not a router problem but the user should know return "ERR-Client Manager I2CP Error - check logs"; // not a router problem but the user should know
@ -354,7 +350,11 @@ public class SummaryHelper extends HelperBase {
buf.append("<b>*</b> "); buf.append("<b>*</b> ");
buf.append("<a href=\"tunnels.jsp#").append(client.calculateHash().toBase64().substring(0,4)); buf.append("<a href=\"tunnels.jsp#").append(client.calculateHash().toBase64().substring(0,4));
buf.append("\" target=\"_top\" title=\"Show tunnels\">"); buf.append("\" target=\"_top\" title=\"Show tunnels\">");
buf.append(name).append("</a><br />\n"); if (name.length() < 16)
buf.append(name);
else
buf.append(name.substring(0,15)).append("&hellip;");
buf.append("</a><br />\n");
LeaseSet ls = _context.netDb().lookupLeaseSetLocally(client.calculateHash()); LeaseSet ls = _context.netDb().lookupLeaseSetLocally(client.calculateHash());
if (ls != null) { if (ls != null) {
long timeToExpire = ls.getEarliestLeaseDate() - _context.clock().now(); long timeToExpire = ls.getEarliestLeaseDate() - _context.clock().now();

View File

@ -0,0 +1,32 @@
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%
// Let's make this easy...
final Integer ERROR_CODE = (Integer) request.getAttribute(org.mortbay.jetty.servlet.ServletHandler.__J_S_ERROR_STATUS_CODE);
final String ERROR_URI = (String) request.getAttribute(org.mortbay.jetty.servlet.ServletHandler.__J_S_ERROR_REQUEST_URI);
final String ERROR_MESSAGE = (String) request.getAttribute(org.mortbay.jetty.servlet.ServletHandler.__J_S_ERROR_MESSAGE);
if (ERROR_CODE != null && ERROR_MESSAGE != null) {
// this is deprecated but we don't want sendError()
response.setStatus(ERROR_CODE.intValue(), ERROR_MESSAGE);
}
// If it can't find the iframe or viewtheme.jsp I wonder if the whole thing blows up...
%>
<html><head>
<title>I2P Router Console</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<%@include file="css.jsp" %>
<link rel="shortcut icon" href="favicon.ico" />
</head><body>
<%
if (System.getProperty("router.consoleNonce") == null) {
System.setProperty("router.consoleNonce", new java.util.Random().nextLong() + "");
}
%>
<%@include file="summary.jsp" %>
<h1><%=ERROR_CODE%> <%=ERROR_MESSAGE%></h1>
<div class="warning" id="warning">
The Router Console page <%=ERROR_URI%> was not found.
</div>
</body>
</html>

View File

@ -3,9 +3,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head> <html><head>
<%@include file="css.jsp" %>
<title>I2P Router Console - home</title> <title>I2P Router Console - home</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<%@include file="css.jsp" %>
<link rel="shortcut icon" href="/themes/console/images/favicon.ico" /> <link rel="shortcut icon" href="/themes/console/images/favicon.ico" />
</head><body> </head><body>
<% <%

View File

@ -26,9 +26,9 @@
<jsp:getProperty name="linkhelper" property="content" /> <jsp:getProperty name="linkhelper" property="content" />
<% } else { %> <% } else { %>
<u><b>I2P Services</b></u><br /> <u><b>I2P Services</b></u><br />
<a href="susimail/susimail" target="blank">Susimail</a> <a href="susidns/index.jsp" target="_blank">Addressbook</a>
<a href="susidns/index.jsp" target="_blank">SusiDNS</a>
<a href="i2psnark/" target="_blank">Torrents</a> <a href="i2psnark/" target="_blank">Torrents</a>
<a href="susimail/susimail" target="blank">Webmail</a>
<a href="http://127.0.0.1:7658/" target="_blank">Webserver</a><hr /> <a href="http://127.0.0.1:7658/" target="_blank">Webserver</a><hr />
<u><b>I2P Internals</b></u><br /> <u><b>I2P Internals</b></u><br />
<a href="i2ptunnel/index.jsp" target="_blank">I2PTunnel</a> <a href="i2ptunnel/index.jsp" target="_blank">I2PTunnel</a>
@ -48,14 +48,16 @@
<b>Ident:</b> (<a title="Your router identity is <jsp:getProperty name="helper" property="ident" />, never reveal it to anyone" href="netdb.jsp?r=." target="_top">view</a>)<br /> <b>Ident:</b> (<a title="Your router identity is <jsp:getProperty name="helper" property="ident" />, never reveal it to anyone" href="netdb.jsp?r=." target="_top">view</a>)<br />
<b>Version:</b> <jsp:getProperty name="helper" property="version" /><br /> <b>Version:</b> <jsp:getProperty name="helper" property="version" /><br />
<b>Uptime:</b> <jsp:getProperty name="helper" property="uptime" /><br /> <b>Uptime:</b> <jsp:getProperty name="helper" property="uptime" /><br />
<b>Now:</b> <jsp:getProperty name="helper" property="time" /><br />
<b>Reachability:</b> <a href="config.jsp#help" target="_top"><jsp:getProperty name="helper" property="reachability" /></a> <b>Reachability:</b> <a href="config.jsp#help" target="_top"><jsp:getProperty name="helper" property="reachability" /></a>
<% <%
if (helper.updateAvailable()) { if (helper.updateAvailable()) {
// display all the time so we display the final failure message // display all the time so we display the final failure message
out.print("<br />" + update.getStatus()); out.print("<br />" + update.getStatus());
if ("true".equals(System.getProperty("net.i2p.router.web.UpdateHandler.updateInProgress", "false"))) { if ("true".equals(System.getProperty("net.i2p.router.web.UpdateHandler.updateInProgress"))) {
} else if(!update.isDone()) { } else if((!update.isDone()) &&
request.getParameter("action") == null &&
request.getParameter("updateNonce") == null &&
net.i2p.router.web.ConfigRestartBean.getRestartTimeRemaining() > 12*60*1000) {
long nonce = new java.util.Random().nextLong(); long nonce = new java.util.Random().nextLong();
String prev = System.getProperty("net.i2p.router.web.UpdateHandler.nonce"); String prev = System.getProperty("net.i2p.router.web.UpdateHandler.nonce");
if (prev != null) System.setProperty("net.i2p.router.web.UpdateHandler.noncePrev", prev); if (prev != null) System.setProperty("net.i2p.router.web.UpdateHandler.noncePrev", prev);

View File

@ -21,4 +21,8 @@
<welcome-file>index.html</welcome-file> <welcome-file>index.html</welcome-file>
<welcome-file>index.jsp</welcome-file> <welcome-file>index.jsp</welcome-file>
</welcome-file-list> </welcome-file-list>
<error-page>
<error-code>404</error-code>
<location>/error.jsp</location>
</error-page>
</web-app> </web-app>

View File

@ -284,6 +284,8 @@ public class ConnectionManager {
// exporting non-public type through public API, this is a potential bug. // exporting non-public type through public API, this is a potential bug.
public ConnectionHandler getConnectionHandler() { return _connectionHandler; } public ConnectionHandler getConnectionHandler() { return _connectionHandler; }
public PacketQueue getPacketQueue() { return _outboundQueue; } public PacketQueue getPacketQueue() { return _outboundQueue; }
/** do we respond to pings that aren't on an existing connection? */
public boolean answerPings() { return _defaultOptions.getAnswerPings(); }
/** /**
* Something b0rked hard, so kill all of our connections without mercy. * Something b0rked hard, so kill all of our connections without mercy.

View File

@ -9,6 +9,7 @@ import java.util.Properties;
public class ConnectionOptions extends I2PSocketOptionsImpl { public class ConnectionOptions extends I2PSocketOptionsImpl {
private int _connectDelay; private int _connectDelay;
private boolean _fullySigned; private boolean _fullySigned;
private boolean _answerPings;
private volatile int _windowSize; private volatile int _windowSize;
private int _receiveWindow; private int _receiveWindow;
private int _profile; private int _profile;
@ -51,12 +52,15 @@ public class ConnectionOptions extends I2PSocketOptionsImpl {
public static final String PROP_MAX_WINDOW_SIZE = "i2p.streaming.maxWindowSize"; public static final String PROP_MAX_WINDOW_SIZE = "i2p.streaming.maxWindowSize";
public static final String PROP_CONGESTION_AVOIDANCE_GROWTH_RATE_FACTOR = "i2p.streaming.congestionAvoidanceGrowthRateFactor"; public static final String PROP_CONGESTION_AVOIDANCE_GROWTH_RATE_FACTOR = "i2p.streaming.congestionAvoidanceGrowthRateFactor";
public static final String PROP_SLOW_START_GROWTH_RATE_FACTOR = "i2p.streaming.slowStartGrowthRateFactor"; public static final String PROP_SLOW_START_GROWTH_RATE_FACTOR = "i2p.streaming.slowStartGrowthRateFactor";
public static final String PROP_ANSWER_PINGS = "i2p.streaming.answerPings";
private static final int TREND_COUNT = 3; private static final int TREND_COUNT = 3;
static final int INITIAL_WINDOW_SIZE = 6; static final int INITIAL_WINDOW_SIZE = 6;
static final int DEFAULT_MAX_SENDS = 8; static final int DEFAULT_MAX_SENDS = 8;
public static final int DEFAULT_INITIAL_RTT = 8*1000; public static final int DEFAULT_INITIAL_RTT = 8*1000;
static final int MIN_WINDOW_SIZE = 1; static final int MIN_WINDOW_SIZE = 1;
private static final boolean DEFAULT_ANSWER_PINGS = true;
// Syncronization fix, but doing it this way causes NPE... // Syncronization fix, but doing it this way causes NPE...
// private final int _trend[] = new int[TREND_COUNT]; // private final int _trend[] = new int[TREND_COUNT];
private int _trend[]; private int _trend[];
@ -198,6 +202,7 @@ public class ConnectionOptions extends I2PSocketOptionsImpl {
setSlowStartGrowthRateFactor(opts.getSlowStartGrowthRateFactor()); setSlowStartGrowthRateFactor(opts.getSlowStartGrowthRateFactor());
setWriteTimeout(opts.getWriteTimeout()); setWriteTimeout(opts.getWriteTimeout());
setReadTimeout(opts.getReadTimeout()); setReadTimeout(opts.getReadTimeout());
setAnswerPings(opts.getAnswerPings());
} }
} }
@ -221,8 +226,8 @@ public class ConnectionOptions extends I2PSocketOptionsImpl {
setInboundBufferSize(getMaxMessageSize() * (Connection.MAX_WINDOW_SIZE + 2)); setInboundBufferSize(getMaxMessageSize() * (Connection.MAX_WINDOW_SIZE + 2));
setCongestionAvoidanceGrowthRateFactor(getInt(opts, PROP_CONGESTION_AVOIDANCE_GROWTH_RATE_FACTOR, 1)); setCongestionAvoidanceGrowthRateFactor(getInt(opts, PROP_CONGESTION_AVOIDANCE_GROWTH_RATE_FACTOR, 1));
setSlowStartGrowthRateFactor(getInt(opts, PROP_SLOW_START_GROWTH_RATE_FACTOR, 1)); setSlowStartGrowthRateFactor(getInt(opts, PROP_SLOW_START_GROWTH_RATE_FACTOR, 1));
setConnectTimeout(getInt(opts, PROP_CONNECT_TIMEOUT, Connection.DISCONNECT_TIMEOUT)); setConnectTimeout(getInt(opts, PROP_CONNECT_TIMEOUT, Connection.DISCONNECT_TIMEOUT));
setAnswerPings(getBool(opts, PROP_ANSWER_PINGS, DEFAULT_ANSWER_PINGS));
} }
@Override @Override
@ -260,9 +265,10 @@ public class ConnectionOptions extends I2PSocketOptionsImpl {
setCongestionAvoidanceGrowthRateFactor(getInt(opts, PROP_CONGESTION_AVOIDANCE_GROWTH_RATE_FACTOR, 2)); setCongestionAvoidanceGrowthRateFactor(getInt(opts, PROP_CONGESTION_AVOIDANCE_GROWTH_RATE_FACTOR, 2));
if (opts.contains(PROP_SLOW_START_GROWTH_RATE_FACTOR)) if (opts.contains(PROP_SLOW_START_GROWTH_RATE_FACTOR))
setSlowStartGrowthRateFactor(getInt(opts, PROP_SLOW_START_GROWTH_RATE_FACTOR, 2)); setSlowStartGrowthRateFactor(getInt(opts, PROP_SLOW_START_GROWTH_RATE_FACTOR, 2));
if (opts.containsKey(PROP_CONNECT_TIMEOUT)) if (opts.containsKey(PROP_CONNECT_TIMEOUT))
setConnectTimeout(getInt(opts, PROP_CONNECT_TIMEOUT, Connection.DISCONNECT_TIMEOUT)); setConnectTimeout(getInt(opts, PROP_CONNECT_TIMEOUT, Connection.DISCONNECT_TIMEOUT));
if (opts.containsKey(PROP_ANSWER_PINGS))
setAnswerPings(getBool(opts, PROP_ANSWER_PINGS, DEFAULT_ANSWER_PINGS));
} }
/** /**
@ -282,11 +288,22 @@ public class ConnectionOptions extends I2PSocketOptionsImpl {
* or can we deal with signatures on the SYN and FIN packets * or can we deal with signatures on the SYN and FIN packets
* only? * only?
* *
* There is no property name defined for this, so it's safe to
* say this is unused and always false.
*
* @return if we want signatures on all packets. * @return if we want signatures on all packets.
*/ */
public boolean getRequireFullySigned() { return _fullySigned; } public boolean getRequireFullySigned() { return _fullySigned; }
public void setRequireFullySigned(boolean sign) { _fullySigned = sign; } public void setRequireFullySigned(boolean sign) { _fullySigned = sign; }
/**
* Do we respond to a ping?
*
* @return if we do
*/
public boolean getAnswerPings() { return _answerPings; }
public void setAnswerPings(boolean yes) { _answerPings = yes; }
/** /**
* How many messages will we send before waiting for an ACK? * How many messages will we send before waiting for an ACK?
* *
@ -492,6 +509,13 @@ public class ConnectionOptions extends I2PSocketOptionsImpl {
return buf.toString(); return buf.toString();
} }
private static boolean getBool(Properties opts, String name, boolean defaultVal) {
if (opts == null) return defaultVal;
String val = opts.getProperty(name);
if (val == null) return defaultVal;
return Boolean.valueOf(val).booleanValue();
}
public static void main(String args[]) { public static void main(String args[]) {
Properties p = new Properties(); Properties p = new Properties();

View File

@ -129,7 +129,10 @@ public class PacketHandler {
private void receiveKnownCon(Connection con, Packet packet) { private void receiveKnownCon(Connection con, Packet packet) {
if (packet.isFlagSet(Packet.FLAG_ECHO)) { if (packet.isFlagSet(Packet.FLAG_ECHO)) {
if (packet.getSendStreamId() > 0) { if (packet.getSendStreamId() > 0) {
if (con.getOptions().getAnswerPings())
receivePing(packet); receivePing(packet);
else if (_log.shouldLog(Log.WARN))
_log.warn("Dropping Echo packet on existing con: " + packet);
} else if (packet.getReceiveStreamId() > 0) { } else if (packet.getReceiveStreamId() > 0) {
receivePong(packet); receivePong(packet);
} else { } else {
@ -230,7 +233,10 @@ public class PacketHandler {
private void receiveUnknownCon(Packet packet, long sendId, boolean queueIfNoConn) { private void receiveUnknownCon(Packet packet, long sendId, boolean queueIfNoConn) {
if (packet.isFlagSet(Packet.FLAG_ECHO)) { if (packet.isFlagSet(Packet.FLAG_ECHO)) {
if (packet.getSendStreamId() > 0) { if (packet.getSendStreamId() > 0) {
if (_manager.answerPings())
receivePing(packet); receivePing(packet);
else if (_log.shouldLog(Log.WARN))
_log.warn("Dropping Echo packet on unknown con: " + packet);
} else if (packet.getReceiveStreamId() > 0) { } else if (packet.getReceiveStreamId() > 0) {
receivePong(packet); receivePong(packet);
} else { } else {

110
build.xml
View File

@ -205,7 +205,7 @@
<fileset dir="." includes="**/*.java~" /> <fileset dir="." includes="**/*.java~" />
</delete> </delete>
</target> </target>
<target name="pkg" depends="distclean, updaterWithJettyFixes, preppkg, installer" /> <target name="pkg" depends="distclean, updater, preppkg, installer" />
<target name="pkgclean" depends="deletepkg-temp"> <target name="pkgclean" depends="deletepkg-temp">
<delete> <delete>
<fileset dir="." includes="i2p.tar.bz2 install.jar i2pupdate.zip" /> <fileset dir="." includes="i2p.tar.bz2 install.jar i2pupdate.zip" />
@ -571,4 +571,112 @@
<target name="distcleanWithDesktopgui" depends="distclean"> <target name="distcleanWithDesktopgui" depends="distclean">
<ant dir="apps/desktopgui" target="build_clean" /> <ant dir="apps/desktopgui" target="build_clean" />
</target> </target>
<target name="release" depends="pkg">
<echo message="================================================================" />
<echo message="Did you update these files?" />
<exec executable="ls">
<arg value="-l" />
<arg value="history.txt" />
<arg value="initialNews.xml" />
<arg value="installer/install.xml" />
<arg value="news.xml" />
<arg value="core/java/src/net/i2p/CoreVersion.java" />
<arg value="router/java/src/net/i2p/router/RouterVersion.java" />
</exec>
<echo message="Everything is checked in, right?" />
<input message="Enter new version number:" addproperty="release.number" />
<fail message="You must enter a version number." >
<condition>
<equals arg1="${release.number}" arg2=""/>
</condition>
</fail>
<copy file="i2pupdate.zip" tofile="i2pupdate_${release.number}.zip" />
<copy file="i2pinstall.exe" tofile="i2pinstall_${release.number}.exe" />
<delete file="i2pupdate.sud" failonerror="false" />
<input message="Enter private signing key file:" addproperty="release.privkey" />
<fail message="You must enter a path." >
<condition>
<equals arg1="${release.privkey}" arg2=""/>
</condition>
</fail>
<java classname="net.i2p.crypto.TrustedUpdate" fork="true" failonerror="true">
<classpath>
<pathelement location="build/i2p.jar" />
</classpath>
<arg value="sign" />
<arg value="i2pupdate.zip" />
<arg value="i2pupdate.sud" />
<arg value="${release.privkey}" />
<arg value="${release.number}" />
</java>
<fail message="i2pupdate.sud generation failed!" >
<condition>
<length file="i2pupdate.sud" when="lt" length="1000000" />
</condition>
</fail>
<echo message="Verify version and VALID signature:" />
<java classname="net.i2p.crypto.TrustedUpdate" fork="true" failonerror="true">
<classpath>
<pathelement location="build/i2p.jar" />
</classpath>
<arg value="verifysig" />
<arg value="i2pupdate.sud" />
</java>
<java classname="net.i2p.crypto.TrustedUpdate" fork="true" failonerror="true">
<classpath>
<pathelement location="build/i2p.jar" />
</classpath>
<arg value="showversion" />
<arg value="i2pupdate.sud" />
</java>
<!-- will this use the monotonerc file in the current workspace? -->
<echo message="Checking out fresh copy into ../i2p-${release-number} for tarballing:" />
<exec executable="mtn">
<arg value="co" />
<arg value="-b" />
<arg value="i2p.i2p" />
<arg value="../i2p-${release.number}/" />
</exec>
<exec executable="tar">
<arg value="cjf" />
<arg value="i2psource_${release.number}.tar.bz2" />
<arg value="-C" />
<arg value=".." />
<arg value="--exclude" />
<arg value="i2p-${release.number}/_MTN/" />
<arg value="i2p-${release.number}/" />
</exec>
<echo message="Sign the files:" />
<exec executable="gpg">
<arg value="-b" />
<arg value="i2pinstall_${release.number}.exe" />
</exec>
<exec executable="gpg">
<arg value="-b" />
<arg value="i2psource_${release.number}.tar.bz2" />
</exec>
<exec executable="gpg">
<arg value="-b" />
<arg value="i2pupdate_${release.number}.zip" />
</exec>
<echo message="File sizes:" />
<exec executable="ls">
<arg value="-l" />
<arg value="i2pinstall_${release.number}.exe" />
<arg value="i2psource_${release.number}.tar.bz2" />
<arg value="i2pupdate_${release.number}.zip" />
<arg value="i2pupdate.sud" />
<arg value="i2pinstall_${release.number}.exe.sig" />
<arg value="i2psource_${release.number}.tar.bz2.sig" />
<arg value="i2pupdate_${release.number}.zip.sig" />
</exec>
<echo message="SHA256 sums:" />
<exec executable="sha256sum">
<arg value="i2pinstall_${release.number}.exe" />
<arg value="i2psource_${release.number}.tar.bz2" />
<arg value="i2pupdate_${release.number}.zip" />
<arg value="i2pupdate.sud" />
</exec>
<echo message="Don't forget to mtn tag h: i2p-${release-number}" />
</target>
</project> </project>

View File

@ -871,7 +871,7 @@ public class DataHelper {
public static String formatDuration(long ms) { public static String formatDuration(long ms) {
if (ms < 5 * 1000) { if (ms < 5 * 1000) {
return ms + "ms"; return ms + "ms";
} else if (ms < 5 * 60 * 1000) { } else if (ms < 3 * 60 * 1000) {
return (ms / 1000) + "s"; return (ms / 1000) + "s";
} else if (ms < 120 * 60 * 1000) { } else if (ms < 120 * 60 * 1000) {
return (ms / (60 * 1000)) + "m"; return (ms / (60 * 1000)) + "m";

View File

@ -52,6 +52,15 @@ public class Timestamper implements Runnable {
this(ctx, lsnr, true); this(ctx, lsnr, true);
} }
public Timestamper(I2PAppContext ctx, UpdateListener lsnr, boolean daemon) { public Timestamper(I2PAppContext ctx, UpdateListener lsnr, boolean daemon) {
// Don't bother starting a thread if we are disabled.
// This means we no longer check every 5 minutes to see if we got enabled,
// so the property must be set at startup.
// We still need to be instantiated since the router calls clock().getTimestamper().waitForInitialization()
String disabled = ctx.getProperty(PROP_DISABLED, DEFAULT_DISABLED);
if (Boolean.valueOf(disabled).booleanValue()) {
_initialized = true;
return;
}
_context = ctx; _context = ctx;
_daemon = daemon; _daemon = daemon;
_initialized = false; _initialized = false;

View File

@ -76,9 +76,10 @@ public class FileUtil {
} }
public static boolean extractZip(File zipfile, File targetDir) { public static boolean extractZip(File zipfile, File targetDir) {
ZipFile zip = null;
try { try {
byte buf[] = new byte[16*1024]; byte buf[] = new byte[16*1024];
ZipFile zip = new ZipFile(zipfile); zip = new ZipFile(zipfile);
Enumeration entries = zip.entries(); Enumeration entries = zip.entries();
while (entries.hasMoreElements()) { while (entries.hasMoreElements()) {
ZipEntry entry = (ZipEntry)entries.nextElement(); ZipEntry entry = (ZipEntry)entries.nextElement();
@ -124,12 +125,15 @@ public class FileUtil {
} }
} }
} }
zip.close();
return true; return true;
} catch (IOException ioe) { } catch (IOException ioe) {
System.err.println("ERROR: Unable to extract the zip file"); System.err.println("ERROR: Unable to extract the zip file");
ioe.printStackTrace(); ioe.printStackTrace();
return false; return false;
} finally {
if (zip != null) {
try { zip.close(); } catch (IOException ioe) {}
}
} }
} }

View File

@ -1,3 +1,41 @@
2009-08-07 zzz
* build.xml:
- Try to automate the release process
- Take jetty back out of the updater after 4 releases
* Console:
- Add a custom error page
- Don't count ourselves in known peers
- Hide update button when shutting down
- Increase skew warning threshold to 3s (was 100ms)
- Remove UTC time from summary bar
- Truncate long dest names
- Try to reduce servlet problems on index page
* Core:
- Catch unzip fd leaks on error
- Move 2 test classes out of the lib
* Eepsite:
- Quote the jetty.xml path in clients.config,
and adjust the migration function, to fix the
eepsite-won't-start bug on windows
* HTTP Proxy:
- Restore the localhost error message
- Catch 127.0.0.1:xxxx addresses too
* I2PTunnel:
- Move the privkey files from the app dir to the
config dir, in preparation for splitting the two
dirs by default
* Ministreaming:
- Make getInt() static
- Move the big TestSwarm class out of the lib
* NetDb stats: Post-release cleanup
* PersistentKeyRing: Fix broken storage of keys in config file
* Router: Move the WorkingDir class from i2p.jar to router.jar
* Streaming: New option i2p.streaming.answerPings (default true)
* Timestamper: Don't start thread if not enabled
* Wrapper:
- Extend timeout to 20s (was 5s)
- Shorten ping interval to 5m (was 10m)
2009-08-03 dr|z3d 2009-08-03 dr|z3d
* Extensive update to the Classic theme; custom css hacks for IE. * Extensive update to the Classic theme; custom css hacks for IE.

View File

@ -20,7 +20,7 @@ clientApp.2.startOnLoad=true
# run our own eepsite with a seperate jetty instance # run our own eepsite with a seperate jetty instance
clientApp.3.main=org.mortbay.jetty.Server clientApp.3.main=org.mortbay.jetty.Server
clientApp.3.name=My eepsite web server clientApp.3.name=My eepsite web server
clientApp.3.args=eepsite/jetty.xml clientApp.3.args="eepsite/jetty.xml"
clientApp.3.delay=30 clientApp.3.delay=30
clientApp.3.startOnLoad=true clientApp.3.startOnLoad=true

View File

@ -132,6 +132,10 @@ div.routersummary a:hover {
color: #f60; color: #f60;
} }
div.routersummary input[type=text] {
text-align: right !important;
}
div.warning { div.warning {
margin: 20px 20px 10px 260px; margin: 20px 20px 10px 260px;
padding: 0px 20px 20px 75px; padding: 0px 20px 20px 75px;
@ -176,6 +180,7 @@ div.main {
div.main li { div.main li {
padding-bottom: 10px; padding-bottom: 10px;
list-style: square;
} }
div.main li:first-child { div.main li:first-child {
@ -223,6 +228,11 @@ div.news a:link {
text-shadow: 0px 0px 1px rgba(128, 128, 48, 0.3); text-shadow: 0px 0px 1px rgba(128, 128, 48, 0.3);
} }
div.news a:visited {
color: #f00 !important;
text-shadow: 0px 0px 1px rgba(128, 128, 48, 0.3);
}
div.news hr { div.news hr {
color: #cc7; color: #cc7;
background: #cc7; background: #cc7;
@ -331,11 +341,20 @@ table {
} }
table hr { table hr {
padding: 1px 0; padding: 0px 0;
color: #bbf;
background: #bbf;
border: 0px solid #bbf;
margin: 0px -5px;
height: 1px;
}
table tt {
font-size: 7.5pt;
} }
th { th {
background-color: #def; background-color: #fff;
padding: 8px 2px; padding: 8px 2px;
text-align: center; text-align: center;
border-bottom: 1px solid #88f; border-bottom: 1px solid #88f;
@ -345,6 +364,10 @@ tt {
font-size: 8pt; font-size: 8pt;
} }
tt, pre {
font: 8pt "Lucida Console", "DejaVu Sans Mono", Courier, mono;
}
td { td {
padding: 4px; padding: 4px;
} }

View File

@ -36,8 +36,10 @@ div.configure table {
} }
h1 { h1 {
padding: 15px 10px 16px 10px !important; padding: 15px 10px 16px -10px !important;
margin: 0 0px 0 175px !important; margin: 0 0px 0 175px !important;
background-color: #bbf !important;
color: #001;
} }
h2 { h2 {
@ -97,6 +99,11 @@ div.routersummary {
border-left: 5px solid #bbf; border-left: 5px solid #bbf;
} }
div.routersummary submit {
padding: 0;
margin-bottom: 5px;
}
div.news li { div.news li {
padding-top: 0px 0px !important; padding-top: 0px 0px !important;
margin-bottom: -23px !important; margin-bottom: -23px !important;
@ -132,3 +139,14 @@ div.configure hr{
input { input {
padding: 0; padding: 0;
} }
div.graphspanel img {
border: 1px solid #99f;
margin: 6px 0 !important;
background: #ddf;
-moz-box-shadow: inset 0px 0px 1px 1px #99f;
}
div.graphspanel hr {
margin: 20px 0;
}

View File

@ -89,7 +89,7 @@ div.routersummary {
width: 175px; width: 175px;
padding: 10px; padding: 10px;
text-align: center; text-align: center;
border: 1px solid #9999ff; border: 1px solid #99f;
background: #003; background: #003;
background: url(images/darkbluebg.png); background: url(images/darkbluebg.png);
color: #eef; color: #eef;
@ -102,6 +102,28 @@ div.routersummary {
-moz-box-shadow: inset 0px 0px 1px 0px #eef; -moz-box-shadow: inset 0px 0px 1px 0px #eef;
} }
div.routersummary input[type=text] {
text-align: right !important;
-moz-box-shadow: inset 1px 1px 1px 0px #000;
}
div.routersummary hr {
color: #99f;
background: #99f;
height: 1px;
border-bottom: 1px outset #bbf;
margin: 5px -10px 4px -10px;
}
div.routersummary hr {
color: #bbf;
background: #bbf;
height: 2px;
border-bottom: 1px outset #bbf;
margin: 8px -10px 7px -10px;
-moz-box-shadow: inset 0px -4px 2px 1px #001;
}
div.warning { div.warning {
margin: 5px 20px 10px 240px; margin: 5px 20px 10px 240px;
padding: 0px 25px 20px 75px; padding: 0px 25px 20px 75px;
@ -254,6 +276,16 @@ table {
background: #003; background: #003;
} }
table hr {
padding: 0px 0;
color: #99f;
background: #99f;
border: 0px solid #99f;
margin: 0px 0px;
height: 1px;
display: none;
}
th { th {
padding: 6px 2px; padding: 6px 2px;
color: #eef; color: #eef;
@ -392,7 +424,7 @@ h2 {
color: #fff; color: #fff;
text-shadow: 0px 0px 1px rgba(255, 255, 255, 0.5); text-shadow: 0px 0px 1px rgba(255, 255, 255, 0.5);
letter-spacing: 0.05em; letter-spacing: 0.05em;
background: #003 url('images/darkbluebg.png'); background: #003 url('images/titletile.png');
padding: 5px 10px 8px 10px; padding: 5px 10px 8px 10px;
wordwrap: none; wordwrap: none;
border: 1px solid #99f; border: 1px solid #99f;
@ -435,9 +467,9 @@ h4 {
font-size: 11pt; font-size: 11pt;
} }
button { button, button:visited {
font: bold 9pt "Lucida Sans Unicode", "Bitstream Vera Sans", Verdana, Tahoma, Helvetica, sans-serif; font: bold 9pt "Lucida Sans Unicode", "Bitstream Vera Sans", Verdana, Tahoma, Helvetica, sans-serif;
border: 1px outset #ddddc0; border: 1px outset #77f;
padding: 1px 3px; padding: 1px 3px;
background: #bbf; background: #bbf;
text-decoration: none; text-decoration: none;
@ -450,12 +482,23 @@ button {
text-align: center; text-align: center;
vertical-align: middle; vertical-align: middle;
min-width: 76px; min-width: 76px;
-moz-box-shadow: inset 0px 1px 1px 0px #55f;
background: #003;
color: #99f;
}
button:hover {
border: 1px solid #f60;
-moz-box-shadow: inset 0px 1px 1px 0px #eef;
background: #001;
color: #f60;
} }
button:active { button:active {
border: 1px inset #f60; border: 1px inset #f60;
background: #f60; background: #f60;
color: #fff; color: #fff;
-moz-box-shadow: inset 0px 0px 0px 0px #f60;
} }
.underline { .underline {
@ -488,9 +531,10 @@ sidebarlogo {
} }
input { input {
border: 1px outset #bbf; border: 1px outset #55f;
background: #bbf; -moz-box-shadow: inset 0px 1px 1px 0px #55f;
color: #002; background: #003;
color: #99f;
margin: 5px; margin: 5px;
font: bold 8pt "Lucida Sans Unicode", "Bitstream Vera Sans", Verdana, Tahoma, Helvetica, sans-serif; font: bold 8pt "Lucida Sans Unicode", "Bitstream Vera Sans", Verdana, Tahoma, Helvetica, sans-serif;
padding: 1px 2px; padding: 1px 2px;
@ -502,9 +546,10 @@ input {
} }
input:hover { input:hover {
background: #003; background: #001;
color: #f60; color: #f60;
border: 1px solid #f60; border: 1px solid #f60;
-moz-box-shadow: inset 0px 1px 1px 0px #eef;
} }
input:active { input:active {
@ -530,6 +575,7 @@ input[type=text] {
border-radius: 4px; border-radius: 4px;
-moz-border-radius: 4px; -moz-border-radius: 4px;
-khtml-border-radius: 4px; -khtml-border-radius: 4px;
-moz-box-shadow: inset 1px 1px 1px 0px #000;
} }
input[type=text]:active, input[type=text]:hover { input[type=text]:active, input[type=text]:hover {

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -105,6 +105,19 @@ div.routersummary {
-moz-box-shadow: inset 0px 0px 1px 0px #002; -moz-box-shadow: inset 0px 0px 1px 0px #002;
} }
div.routersummary input[type=text] {
text-align: right !important;
}
div.routersummary hr {
color: #eef;
background: #eef;
height: 2px;
border-bottom: 1px solid #eef;
margin: 8px -10px 7px -10px;
-moz-box-shadow: inset 0px 1px 1px 1px #001;
}
div.warning { div.warning {
margin: 5px 20px 10px 240px; margin: 5px 20px 10px 240px;
padding: 0px 25px 20px 75px; padding: 0px 25px 20px 75px;
@ -226,6 +239,7 @@ div.configure {
border-radius: 4px; border-radius: 4px;
border: 1px solid #000022; border: 1px solid #000022;
-moz-box-shadow: inset 0px 0px 1px 0px #002; -moz-box-shadow: inset 0px 0px 1px 0px #002;
min-width: 400px;
} }
div.graphspanel { div.graphspanel {
@ -237,9 +251,9 @@ div.graphspanel {
border-radius: 4px; border-radius: 4px;
border: 1px solid #000022; border: 1px solid #000022;
-moz-box-shadow: inset 0px 0px 1px 0px #002; -moz-box-shadow: inset 0px 0px 1px 0px #002;
text-align: center !important;
} }
div.graphspanel img { div.graphspanel img {
border: 1px solid #003; border: 1px solid #003;
padding: 2px; padding: 2px;
@ -247,7 +261,7 @@ div.graphspanel img {
text-align: center !important; text-align: center !important;
background: #001; background: #001;
-moz-box-shadow: inset 0px 0px 1px 1px #99f; -moz-box-shadow: inset 0px 0px 1px 1px #99f;
opacity: 0.9; opacity: 0.8;
} }
div.graphspanel img:hover { div.graphspanel img:hover {
@ -260,6 +274,10 @@ div.graphspanel img:hover {
opacity: 1; opacity: 1;
} }
div.graphspanel form {
text-align: left;
}
div.messages { div.messages {
padding: 10px; padding: 10px;
margin: 10px 0 20px 0; margin: 10px 0 20px 0;
@ -301,6 +319,16 @@ table {
font: 7pt/130% "Lucida Sans Unicode", Verdana, Bitstream Vera Sans", Tahoma, Helvetica, sans-serif; font: 7pt/130% "Lucida Sans Unicode", Verdana, Bitstream Vera Sans", Tahoma, Helvetica, sans-serif;
} }
table hr {
padding: 0px 0;
color: #99f;
background: #99f;
border: 0px solid #99f;
margin: 0px 0px;
height: 1px;
display: none;
}
th { th {
padding: 6px 2px; padding: 6px 2px;
color: #000; color: #000;
@ -433,7 +461,7 @@ h2 {
font-size: 12pt; font-size: 12pt;
color: #001; color: #001;
letter-spacing: 0.05em; letter-spacing: 0.05em;
background: #ddf url('images/lightbluetile.png'); background: #ddf url('images/titletile.png');
text-shadow: 0px 0px 1px rgba(0, 0, 64, 0.5); text-shadow: 0px 0px 1px rgba(0, 0, 64, 0.5);
padding: 7px 10px; padding: 7px 10px;
wordwrap: none; wordwrap: none;
@ -476,9 +504,9 @@ h4 {
button, button:visited { button, button:visited {
font: bold 9pt "Lucida Sans Unicode", "Bitstream Vera Sans", Verdana, Tahoma, Helvetica, sans-serif; font: bold 9pt "Lucida Sans Unicode", "Bitstream Vera Sans", Verdana, Tahoma, Helvetica, sans-serif;
border: 1px outset #ddddc0; border: 1px outset #999;
padding: 1px 3px; padding: 1px 3px;
background: #bbf !important; background: #ddf !important;
text-decoration: none; text-decoration: none;
border-radius: 4px; border-radius: 4px;
-moz-border-radius: 4px; -moz-border-radius: 4px;
@ -488,18 +516,22 @@ button, button:visited {
margin: 0 1px; margin: 0 1px;
text-align: center; text-align: center;
min-width: 80px; min-width: 80px;
-moz-box-shadow: inset 0px 2px 8px 0px #fff;
color: #006;
} }
button:hover{ button:hover{
border: 1px solid #f60; border: 1px solid #f60;
background: #f60 !important; background: #f60 !important;
color: #fff; color: #fff;
-moz-box-shadow: inset 0px 0px 0px 1px #fff;
} }
button:active{ button:active{
border: 1px solid #f60; border: 1px solid #f60;
background: #001 !important; background: #001 !important;
color: #f60; color: #f60;
-moz-box-shadow: inset 0px 0px 0px 1px #f60;
} }
.underline { .underline {
@ -531,8 +563,8 @@ input {
} }
input, input:visited { input, input:visited {
border: 1px outset #bbf; border: 1px outset #999;
background: #bbf; background: #ddf;
color: #001; color: #001;
margin: 5px; margin: 5px;
font: bold 8pt "Lucida Sans Unicode", "Bitstream Vera Sans", Verdana, Tahoma, Helvetica, sans-serif; font: bold 8pt "Lucida Sans Unicode", "Bitstream Vera Sans", Verdana, Tahoma, Helvetica, sans-serif;
@ -542,6 +574,9 @@ input, input:visited {
border-radius: 4px; border-radius: 4px;
-moz-border-radius: 4px; -moz-border-radius: 4px;
-khtml-border-radius: 4px; -khtml-border-radius: 4px;
-moz-box-shadow: inset 0px 2px 8px 0px #fff;
color: #006;
opacity: 0.9;
} }
@ -549,7 +584,9 @@ input:hover {
background: #f60; background: #f60;
color: #fff; color: #fff;
border: 1px solid #f60; border: 1px solid #f60;
opacity: 0.9; opacity: 1.0;
-moz-box-shadow: inset 0px 0px 0px 1px #fff;
} }
input:active { input:active {
@ -557,6 +594,7 @@ input:active {
color: #f60; color: #f60;
border: 1px solid #f60; border: 1px solid #f60;
opacity: 1.0; opacity: 1.0;
-moz-box-shadow: inset 0px 0px 0px 1px #f60;
} }
input[type=text] { input[type=text] {
@ -595,6 +633,7 @@ select {
border-radius: 4px; border-radius: 4px;
-moz-border-radius: 4px; -moz-border-radius: 4px;
-khtml-border-radius: 4px; -khtml-border-radius: 4px;
text-align: left !important;
} }
textarea { textarea {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -56,8 +56,8 @@ body {
font-size: 9pt; font-size: 9pt;
font-weight: bold; font-weight: bold;
text-align: left; text-align: left;
margin: 0 0 15px 0; margin: 0 0px 10px 0px;
padding: 0px; padding: 0;
border-spacing: 0px; border-spacing: 0px;
-moz-border-radius: 4px 0 0 0; -moz-border-radius: 4px 0 0 0;
-khtml-border-radius: 4px; -khtml-border-radius: 4px;
@ -68,7 +68,7 @@ body {
background: #f40 url('../console/images/orangetile.png'); background: #f40 url('../console/images/orangetile.png');
color: #531; color: #531;
height: 64px; height: 64px;
width: 100%; width: auto;
} }
pre { pre {
@ -95,7 +95,7 @@ th {
border-top: 1px outset #001; border-top: 1px outset #001;
border-bottom: 1px inset #001; border-bottom: 1px inset #001;
background: #f60 url('/themes/console/images/tabletitleorange.png') repeat-x; background: #f60 url('/themes/console/images/tabletitleorange.png') repeat-x;
text-align: left; text-align: right;
whitespace: nowrap; whitespace: nowrap;
} }
@ -107,7 +107,7 @@ th {
td { td {
padding: 5px; padding: 5px;
text-align: left; text-align: right;
} }
.snarkTorrentEven { .snarkTorrentEven {
background-color: #fb1; background-color: #fb1;
@ -176,7 +176,7 @@ hr {
} }
a:link{ a:link{
color: #830; color: #930;
text-decoration: none; text-decoration: none;
font-weight: bold; font-weight: bold;
word-wrap: break-word; word-wrap: break-word;
@ -189,7 +189,7 @@ a:visited{
} }
a:hover{ a:hover{
color: #f40; color: #900;
font-weight: bold; font-weight: bold;
} }

View File

@ -158,8 +158,10 @@ wrapper.jvm_exit.timeout=30
# Let's change the default from 60 to 15 seconds and see if anyone moans.. # Let's change the default from 60 to 15 seconds and see if anyone moans..
wrapper.restart.delay=15 wrapper.restart.delay=15
wrapper.ping.interval=600 wrapper.ping.interval=300
wrapper.ping.timeout=605 # The ping timeout must be at least 5 seconds longer than the value of wrapper.ping.interval.
# Extend this if you are getting 'JVM appears hung' shutdowns.
wrapper.ping.timeout=320
# use the wrapper's internal timer thread. otherwise this would # use the wrapper's internal timer thread. otherwise this would
# force a restart of the router during daylight savings time as well # force a restart of the router during daylight savings time as well

View File

@ -53,7 +53,7 @@ public class PersistentKeyRing extends KeyRing {
if (key == null || key.length() != 44) if (key == null || key.length() != 44)
continue; continue;
String hb = prop.substring(PROP_PFX.length()); String hb = prop.substring(PROP_PFX.length());
hb.replace("$", "="); hb = hb.replace("$", "=");
Hash dest = new Hash(); Hash dest = new Hash();
SessionKey sk = new SessionKey(); SessionKey sk = new SessionKey();
try { try {
@ -71,7 +71,7 @@ public class PersistentKeyRing extends KeyRing {
for (Entry<Hash, SessionKey> e : entrySet()) { for (Entry<Hash, SessionKey> e : entrySet()) {
buf.append("\n<tr><td>"); buf.append("\n<tr><td>");
Hash h = e.getKey(); Hash h = e.getKey();
buf.append(h.toBase64().substring(0, 6)).append("..."); buf.append(h.toBase64().substring(0, 6)).append("&hellip;");
buf.append("<td>"); buf.append("<td>");
LeaseSet ls = _ctx.netDb().lookupLeaseSetLocally(h); LeaseSet ls = _ctx.netDb().lookupLeaseSetLocally(h);
if (ls != null) { if (ls != null) {
@ -81,13 +81,13 @@ public class PersistentKeyRing extends KeyRing {
if (in != null && in.getDestinationNickname() != null) if (in != null && in.getDestinationNickname() != null)
buf.append(in.getDestinationNickname()); buf.append(in.getDestinationNickname());
else else
buf.append(dest.toBase64().substring(0, 6)).append("..."); buf.append(dest.toBase64().substring(0, 6)).append("&hellip;");
} else { } else {
String host = _ctx.namingService().reverseLookup(dest); String host = _ctx.namingService().reverseLookup(dest);
if (host != null) if (host != null)
buf.append(host); buf.append(host);
else else
buf.append(dest.toBase64().substring(0, 6)).append("..."); buf.append(dest.toBase64().substring(0, 6)).append("&hellip;");
} }
} }
buf.append("<td>"); buf.append("<td>");

View File

@ -35,6 +35,7 @@ import net.i2p.data.i2np.GarlicMessage;
import net.i2p.router.message.GarlicMessageHandler; import net.i2p.router.message.GarlicMessageHandler;
import net.i2p.router.networkdb.kademlia.FloodfillNetworkDatabaseFacade; import net.i2p.router.networkdb.kademlia.FloodfillNetworkDatabaseFacade;
import net.i2p.router.startup.StartupJob; import net.i2p.router.startup.StartupJob;
import net.i2p.router.startup.WorkingDir;
import net.i2p.router.transport.FIFOBandwidthLimiter; import net.i2p.router.transport.FIFOBandwidthLimiter;
import net.i2p.stat.Rate; import net.i2p.stat.Rate;
import net.i2p.stat.RateStat; import net.i2p.stat.RateStat;
@ -44,7 +45,6 @@ import net.i2p.util.I2PThread;
import net.i2p.util.Log; import net.i2p.util.Log;
import net.i2p.util.SimpleScheduler; import net.i2p.util.SimpleScheduler;
import net.i2p.util.SimpleTimer; import net.i2p.util.SimpleTimer;
import net.i2p.util.WorkingDir;
/** /**
* Main driver for the router. * Main driver for the router.

View File

@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */ /** deprecated */
public final static String ID = "Monotone"; public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION; public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 07; public final static long BUILD = 8;
/** for example "-test" */ /** for example "-test" */
public final static String EXTRA = ""; public final static String EXTRA = "";
public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA; public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;

View File

@ -139,18 +139,8 @@ public class StatisticsManager implements Service {
//includeRate("tunnel.buildRequestTime", stats, new long[] { 10*60*1000 }); //includeRate("tunnel.buildRequestTime", stats, new long[] { 10*60*1000 });
long rate = 60*60*1000; long rate = 60*60*1000;
boolean commentOutIn076 = RouterVersion.VERSION.equals("0.7.5");
if (commentOutIn076) {
includeRate("tunnel.buildClientExpire", stats, new long[] { rate });
includeRate("tunnel.buildClientReject", stats, new long[] { rate });
includeRate("tunnel.buildClientSuccess", stats, new long[] { rate });
includeRate("tunnel.buildExploratoryExpire", stats, new long[] { rate });
includeRate("tunnel.buildExploratoryReject", stats, new long[] { rate });
includeRate("tunnel.buildExploratorySuccess", stats, new long[] { rate });
} else {
includeTunnelRates("Client", stats, rate); includeTunnelRates("Client", stats, rate);
includeTunnelRates("Exploratory", stats, rate); includeTunnelRates("Exploratory", stats, rate);
}
//includeRate("tunnel.rejectTimeout", stats, new long[] { 10*60*1000 }); //includeRate("tunnel.rejectTimeout", stats, new long[] { 10*60*1000 });
//includeRate("tunnel.rejectOverloaded", stats, new long[] { 10*60*1000 }); //includeRate("tunnel.rejectOverloaded", stats, new long[] { 10*60*1000 });
//includeRate("tunnel.acceptLoad", stats, new long[] { 10*60*1000 }); //includeRate("tunnel.acceptLoad", stats, new long[] { 10*60*1000 });

View File

@ -1,4 +1,4 @@
package net.i2p.util; package net.i2p.router.startup;
import java.io.BufferedWriter; import java.io.BufferedWriter;
import java.io.File; import java.io.File;
@ -195,8 +195,10 @@ public class WorkingDir {
out.println("# Modified by I2P User dir migration script"); out.println("# Modified by I2P User dir migration script");
String s = null; String s = null;
while ((s = DataHelper.readLine(in)) != null) { while ((s = DataHelper.readLine(in)) != null) {
if (s.endsWith("=eepsite/jetty.xml")) { if (s.endsWith("=\"eepsite/jetty.xml\"")) {
s = s.replace("=eepsite", '=' + todir.getAbsolutePath() + File.separatorChar + "eepsite"); s = s.replace("=\"eepsite/jetty.xml\"", "=\"" + todir.getAbsolutePath() +
File.separatorChar + "eepsite" +
File.separatorChar + "jetty.xml\"");
} }
out.println(s); out.println(s);
} }