diff --git a/apps/i2psnark/java/src/org/klomp/snark/PeerConnectionOut.java b/apps/i2psnark/java/src/org/klomp/snark/PeerConnectionOut.java index d4bc3b346..66399aa34 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/PeerConnectionOut.java +++ b/apps/i2psnark/java/src/org/klomp/snark/PeerConnectionOut.java @@ -229,12 +229,9 @@ class PeerConnectionOut implements Runnable /** * Adds a message to the sendQueue and notifies the method waiting * on the sendQueue to change. - * If a PIECE message only, add a timeout. */ private void addMessage(Message m) { - if (m.type == Message.PIECE) - SimpleScheduler.getInstance().addEvent(new RemoveTooSlow(m), SEND_TIMEOUT); synchronized(sendQueue) { sendQueue.add(m); @@ -430,7 +427,11 @@ class PeerConnectionOut implements Runnable return total; } - /** @since 0.8.2 */ + /** + * Queue a piece message with a callback to load the data + * from disk when required. + * @since 0.8.2 + */ void sendPiece(int piece, int begin, int length, DataLoader loader) { boolean sendNow = false; @@ -457,6 +458,11 @@ class PeerConnectionOut implements Runnable addMessage(m); } + /** + * Queue a piece message with the data already loaded from disk + * Also add a timeout. + * We don't use this anymore. + */ void sendPiece(int piece, int begin, int length, byte[] bytes) { Message m = new Message(); @@ -467,6 +473,8 @@ class PeerConnectionOut implements Runnable m.data = bytes; m.off = 0; m.len = length; + // since we have the data already loaded, queue a timeout to remove it + SimpleScheduler.getInstance().addEvent(new RemoveTooSlow(m), SEND_TIMEOUT); addMessage(m); } diff --git a/apps/i2psnark/java/src/org/klomp/snark/PeerCoordinator.java b/apps/i2psnark/java/src/org/klomp/snark/PeerCoordinator.java index 0967f2461..bcff20a9d 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/PeerCoordinator.java +++ b/apps/i2psnark/java/src/org/klomp/snark/PeerCoordinator.java @@ -75,7 +75,9 @@ public class PeerCoordinator implements PeerListener private final byte[] id; - // Some random wanted pieces + /** The wanted pieces. We could use a TreeSet but we'd have to clear and re-add everything + * when priorities change. + */ private final List wantedPieces; /** partial pieces - lock by synching on wantedPieces */ diff --git a/apps/i2psnark/java/src/org/klomp/snark/PeerState.java b/apps/i2psnark/java/src/org/klomp/snark/PeerState.java index 38ed62029..4db84ad68 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/PeerState.java +++ b/apps/i2psnark/java/src/org/klomp/snark/PeerState.java @@ -110,6 +110,9 @@ class PeerState implements DataLoader if (choked) { out.cancelRequestMessages(); // old Roberts thrash us here, choke+unchoke right together + // The only problem with returning the partials to the coordinator + // is that chunks above a missing request are lost. + // Future enhancements to PartialPiece could keep track of the holes. List pcs = returnPartialPieces(); if (!pcs.isEmpty()) { if (_log.shouldLog(Log.DEBUG)) diff --git a/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java b/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java index d696cbdf8..71022a084 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java +++ b/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java @@ -1525,7 +1525,7 @@ public class I2PSnarkServlet extends Default { buf.append("').append(_("Ignore")); + buf.append('>').append(_("Skip")); showSaveButton = true; } buf.append(""); diff --git a/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketOptionsImpl.java b/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketOptionsImpl.java index 4ecf34d6a..b1fedcea7 100644 --- a/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketOptionsImpl.java +++ b/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketOptionsImpl.java @@ -6,7 +6,7 @@ import java.util.Properties; * Define the configuration for streaming and verifying data on the socket. * */ -public class I2PSocketOptionsImpl implements I2PSocketOptions { +class I2PSocketOptionsImpl implements I2PSocketOptions { private long _connectTimeout; private long _readTimeout; private long _writeTimeout; diff --git a/apps/routerconsole/jsp/logs.jsp b/apps/routerconsole/jsp/logs.jsp index 019564bbe..b6fe3fe71 100644 --- a/apps/routerconsole/jsp/logs.jsp +++ b/apps/routerconsole/jsp/logs.jsp @@ -24,11 +24,12 @@ Processor: <%=net.i2p.util.NativeBigInteger.cpuModel()%> (<%=net.i2p.util.NativeBigInteger.cpuType()%>)
Jbigi: <%=net.i2p.util.NativeBigInteger.loadStatus()%>
Encoding: <%=System.getProperty("file.encoding")%>

+

<%=intl._("Note that system information, log timestamps, and log messages may provide clues to your location; please review everything you include in a bug report.")%>

" />

<%=intl._("Critical Logs")%>

-

<%=intl._("Router Logs")%> (<%=intl._("configure")%>)

+

<%=intl._("Router Logs")%> (<%=intl._("configure")%>)

<%=intl._("Service (Wrapper) Logs")%>

diff --git a/apps/routerconsole/locale/messages_de.po b/apps/routerconsole/locale/messages_de.po index 873ab0924..c8fc40627 100644 --- a/apps/routerconsole/locale/messages_de.po +++ b/apps/routerconsole/locale/messages_de.po @@ -3250,7 +3250,7 @@ msgstr "Konfiguration des I2P-Routers" #: ../java/src/net/i2p/router/web/SummaryBarRenderer.java:93 msgid "I2P Internals" -msgstr "Router-Einstellungen" +msgstr "Einstellungen" #: ../java/src/net/i2p/router/web/SummaryBarRenderer.java:99 #: ../java/src/net/i2p/router/web/SummaryBarRenderer.java:379 diff --git a/apps/routerconsole/locale/messages_fr.po b/apps/routerconsole/locale/messages_fr.po index a779abf81..47ba8991a 100644 --- a/apps/routerconsole/locale/messages_fr.po +++ b/apps/routerconsole/locale/messages_fr.po @@ -3292,7 +3292,7 @@ msgstr "I2P Routeur Configuration" #: ../java/src/net/i2p/router/web/SummaryBarRenderer.java:93 msgid "I2P Internals" -msgstr "I2P Configuration Interne" +msgstr "Configuration" #: ../java/src/net/i2p/router/web/SummaryBarRenderer.java:99 #: ../java/src/net/i2p/router/web/SummaryBarRenderer.java:379 diff --git a/apps/streaming/java/src/net/i2p/client/streaming/Connection.java b/apps/streaming/java/src/net/i2p/client/streaming/Connection.java index 20b1a0f01..239c77d1b 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/Connection.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/Connection.java @@ -22,7 +22,7 @@ import net.i2p.util.SimpleTimer2; * destinations. * */ -public class Connection { +class Connection { private I2PAppContext _context; private Log _log; private ConnectionManager _connectionManager; @@ -1067,7 +1067,7 @@ public class Connection { /** * Coordinate the resends of a given packet */ - public class ResendPacketEvent extends SimpleTimer2.TimedEvent { + class ResendPacketEvent extends SimpleTimer2.TimedEvent { private PacketLocal _packet; private long _nextSendTime; public ResendPacketEvent(PacketLocal packet, long delay) { diff --git a/apps/streaming/java/src/net/i2p/client/streaming/ConnectionHandler.java b/apps/streaming/java/src/net/i2p/client/streaming/ConnectionHandler.java index ba801ae95..6ba876dd9 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/ConnectionHandler.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/ConnectionHandler.java @@ -17,7 +17,7 @@ import net.i2p.util.SimpleTimer; * * @author zzz modded to use concurrent and bound queue size */ -public class ConnectionHandler { +class ConnectionHandler { private I2PAppContext _context; private Log _log; private ConnectionManager _manager; diff --git a/apps/streaming/java/src/net/i2p/client/streaming/ConnectionManager.java b/apps/streaming/java/src/net/i2p/client/streaming/ConnectionManager.java index 630d84422..69ace81a2 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/ConnectionManager.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/ConnectionManager.java @@ -20,7 +20,7 @@ import net.i2p.util.SimpleTimer; * * */ -public class ConnectionManager { +class ConnectionManager { private I2PAppContext _context; private Log _log; private I2PSession _session; diff --git a/apps/streaming/java/src/net/i2p/client/streaming/ConnectionOptions.java b/apps/streaming/java/src/net/i2p/client/streaming/ConnectionOptions.java index 72eb38e60..ae14daa15 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/ConnectionOptions.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/ConnectionOptions.java @@ -15,7 +15,7 @@ import net.i2p.util.Log; * Define the current options for the con (and allow custom tweaking midstream) * */ -public class ConnectionOptions extends I2PSocketOptionsImpl { +class ConnectionOptions extends I2PSocketOptionsImpl { private int _connectDelay; private boolean _fullySigned; private boolean _answerPings; diff --git a/apps/streaming/java/src/net/i2p/client/streaming/ConnectionPacketHandler.java b/apps/streaming/java/src/net/i2p/client/streaming/ConnectionPacketHandler.java index e4a8efbc0..aafc7fbcd 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/ConnectionPacketHandler.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/ConnectionPacketHandler.java @@ -14,7 +14,7 @@ import net.i2p.util.SimpleTimer; * queue, marking packets as acked, updating various fields, etc. * */ -public class ConnectionPacketHandler { +class ConnectionPacketHandler { private I2PAppContext _context; private Log _log; diff --git a/apps/streaming/java/src/net/i2p/client/streaming/I2PServerSocketFull.java b/apps/streaming/java/src/net/i2p/client/streaming/I2PServerSocketFull.java index 83f7c8376..262b49624 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/I2PServerSocketFull.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/I2PServerSocketFull.java @@ -7,7 +7,7 @@ import net.i2p.I2PException; * Bridge to allow accepting new connections * */ -public class I2PServerSocketFull implements I2PServerSocket { +class I2PServerSocketFull implements I2PServerSocket { private I2PSocketManagerFull _socketManager; public I2PServerSocketFull(I2PSocketManagerFull mgr) { diff --git a/apps/streaming/java/src/net/i2p/client/streaming/I2PSocketFull.java b/apps/streaming/java/src/net/i2p/client/streaming/I2PSocketFull.java index 19867ed06..dfcfacfa1 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/I2PSocketFull.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/I2PSocketFull.java @@ -10,7 +10,7 @@ import net.i2p.data.Destination; * Bridge between the full streaming lib and the I2PSocket API * */ -public class I2PSocketFull implements I2PSocket { +class I2PSocketFull implements I2PSocket { private Connection _connection; private I2PSocket.SocketErrorListener _listener; private Destination _remotePeer; diff --git a/apps/streaming/java/src/net/i2p/client/streaming/I2PSocketManagerFull.java b/apps/streaming/java/src/net/i2p/client/streaming/I2PSocketManagerFull.java index c26a27fe2..f71067698 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/I2PSocketManagerFull.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/I2PSocketManagerFull.java @@ -23,7 +23,7 @@ import net.i2p.util.Log; * or receive any messages with its .receiveMessage * */ -public class I2PSocketManagerFull implements I2PSocketManager { +class I2PSocketManagerFull implements I2PSocketManager { private I2PAppContext _context; private Log _log; private I2PSession _session; diff --git a/apps/streaming/java/src/net/i2p/client/streaming/MessageHandler.java b/apps/streaming/java/src/net/i2p/client/streaming/MessageHandler.java index cfd208c01..4097c568f 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/MessageHandler.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/MessageHandler.java @@ -15,7 +15,7 @@ import net.i2p.util.ConcurrentHashSet; * Packets, if we can. * */ -public class MessageHandler implements I2PSessionListener { +class MessageHandler implements I2PSessionListener { private ConnectionManager _manager; private I2PAppContext _context; private Log _log; diff --git a/apps/streaming/java/src/net/i2p/client/streaming/MessageInputStream.java b/apps/streaming/java/src/net/i2p/client/streaming/MessageInputStream.java index 216a2cdf4..883fc332c 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/MessageInputStream.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/MessageInputStream.java @@ -19,7 +19,7 @@ import net.i2p.util.Log; * yet present them in order. * */ -public class MessageInputStream extends InputStream { +class MessageInputStream extends InputStream { private final I2PAppContext _context; private final Log _log; /** diff --git a/apps/streaming/java/src/net/i2p/client/streaming/MessageOutputStream.java b/apps/streaming/java/src/net/i2p/client/streaming/MessageOutputStream.java index ed45972be..e61435680 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/MessageOutputStream.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/MessageOutputStream.java @@ -15,7 +15,7 @@ import net.i2p.util.SimpleTimer2; * on flush or when the buffer is full. It also blocks according * to the data receiver's needs. */ -public class MessageOutputStream extends OutputStream { +class MessageOutputStream extends OutputStream { private final I2PAppContext _context; private final Log _log; private byte _buf[]; diff --git a/apps/streaming/java/src/net/i2p/client/streaming/Packet.java b/apps/streaming/java/src/net/i2p/client/streaming/Packet.java index 14ebb61d5..faff2ff72 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/Packet.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/Packet.java @@ -53,7 +53,7 @@ import net.i2p.util.Log; * packet that should not be ACKed

* */ -public class Packet { +class Packet { private long _sendStreamId; private long _receiveStreamId; private long _sequenceNum; diff --git a/apps/streaming/java/src/net/i2p/client/streaming/PacketHandler.java b/apps/streaming/java/src/net/i2p/client/streaming/PacketHandler.java index 95674b433..bcf5610ef 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/PacketHandler.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/PacketHandler.java @@ -15,7 +15,7 @@ import net.i2p.util.Log; * the server socket, or queue a reply RST packet. * */ -public class PacketHandler { +class PacketHandler { private ConnectionManager _manager; private I2PAppContext _context; private Log _log; diff --git a/apps/streaming/java/src/net/i2p/client/streaming/PacketLocal.java b/apps/streaming/java/src/net/i2p/client/streaming/PacketLocal.java index cbe913e05..dd5fe1ceb 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/PacketLocal.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/PacketLocal.java @@ -12,7 +12,7 @@ import net.i2p.util.SimpleTimer2; * coordinate local attributes about a packet - send time, ack time, number of * retries, etc. */ -public class PacketLocal extends Packet implements MessageOutputStream.WriteStatus { +class PacketLocal extends Packet implements MessageOutputStream.WriteStatus { private I2PAppContext _context; private Log _log; private Connection _connection; diff --git a/apps/streaming/java/src/net/i2p/client/streaming/PacketQueue.java b/apps/streaming/java/src/net/i2p/client/streaming/PacketQueue.java index 8a4692ada..fa0aa87ce 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/PacketQueue.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/PacketQueue.java @@ -18,7 +18,7 @@ import net.i2p.util.Log; * mode=bestEffort doesnt block in the SDK. * */ -public class PacketQueue { +class PacketQueue { private I2PAppContext _context; private Log _log; private I2PSession _session; diff --git a/apps/streaming/java/src/net/i2p/client/streaming/RetransmissionTimer.java b/apps/streaming/java/src/net/i2p/client/streaming/RetransmissionTimer.java index 92c4cf1c2..6f3bc3054 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/RetransmissionTimer.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/RetransmissionTimer.java @@ -3,7 +3,10 @@ package net.i2p.client.streaming; import net.i2p.util.SimpleTimer2; /** - * + * Not clear that we really need to create our own timer group, but we do, + * to prevent us clogging the router's timer group. + * Use from outside this package is deprecated. + * (BOB instantiates this for thread group reasons) */ public class RetransmissionTimer extends SimpleTimer2 { private static final RetransmissionTimer _instance = new RetransmissionTimer(); diff --git a/apps/streaming/java/src/net/i2p/client/streaming/SchedulerChooser.java b/apps/streaming/java/src/net/i2p/client/streaming/SchedulerChooser.java index 2c8f5df01..c9c9e0d38 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/SchedulerChooser.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/SchedulerChooser.java @@ -10,7 +10,7 @@ import net.i2p.util.Log; * Examine a connection's state and pick the right scheduler for it. * */ -public class SchedulerChooser { +class SchedulerChooser { private I2PAppContext _context; private Log _log; private TaskScheduler _nullScheduler; diff --git a/apps/streaming/java/src/net/i2p/client/streaming/TCBShare.java b/apps/streaming/java/src/net/i2p/client/streaming/TCBShare.java index 7c8df3e3e..d2d02021a 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/TCBShare.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/TCBShare.java @@ -20,7 +20,7 @@ import net.i2p.util.SimpleTimer2; * same router. * */ -public class TCBShare { +class TCBShare { private I2PAppContext _context; private Log _log; private Map _cache; diff --git a/core/java/src/net/i2p/util/Log.java b/core/java/src/net/i2p/util/Log.java index 63d44cb13..922df7885 100644 --- a/core/java/src/net/i2p/util/Log.java +++ b/core/java/src/net/i2p/util/Log.java @@ -107,6 +107,9 @@ public class Log { } public void log(int priority, String msg, Throwable t) { + // Boost the priority of NPE and friends so they get seen and reported + if (t != null && t instanceof RuntimeException && !(t instanceof IllegalArgumentException)) + priority = CRIT; if (priority >= _minPriority) { _manager.addRecord(new LogRecord(_class, _name, Thread.currentThread().getName(), priority, diff --git a/core/java/src/net/i2p/util/LogManager.java b/core/java/src/net/i2p/util/LogManager.java index 6c9a062e4..54a3b9e13 100644 --- a/core/java/src/net/i2p/util/LogManager.java +++ b/core/java/src/net/i2p/util/LogManager.java @@ -13,6 +13,7 @@ import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; +import java.text.DateFormat; import java.text.DecimalFormat; import java.text.SimpleDateFormat; import java.util.ArrayList; @@ -23,6 +24,7 @@ import java.util.List; import java.util.Map; import java.util.Properties; import java.util.Set; +import java.util.TimeZone; import java.util.TreeMap; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.LinkedBlockingQueue; @@ -57,7 +59,9 @@ public class LogManager { public final static String PROP_RECORD_PREFIX = "logger.record."; public final static String DEFAULT_FORMAT = DATE + " " + PRIORITY + " [" + THREAD + "] " + CLASS + ": " + MESSAGE; - public final static String DEFAULT_DATEFORMAT = "HH:mm:ss.SSS"; + //public final static String DEFAULT_DATEFORMAT = "HH:mm:ss.SSS"; + /** blank means default short date and medium time for the locale - see DateFormat */ + public final static String DEFAULT_DATEFORMAT = ""; public final static String DEFAULT_FILENAME = "logs/log-#.txt"; public final static String DEFAULT_FILESIZE = "10m"; public final static boolean DEFAULT_DISPLAYONSCREEN = true; @@ -225,6 +229,7 @@ public class LogManager { startLogWriter(); _records.offer(record); + /**** don't burden the logging thread with counting int numRecords = _records.size(); if (numRecords > 100) { @@ -234,6 +239,7 @@ public class LogManager { _writer.notifyAll(); } } + ****/ } /** @@ -292,8 +298,7 @@ public class LogManager { _format = fmt.toCharArray(); String df = config.getProperty(PROP_DATEFORMAT, DEFAULT_DATEFORMAT); - _dateFormatPattern = df; - _dateFormat = new SimpleDateFormat(df); + setDateFormat(df); String disp = config.getProperty(PROP_DISPLAYONSCREEN); if (disp == null) @@ -386,13 +391,24 @@ public class LogManager { /** * Update the date format * + * @param format null or empty string means use default format for the locale + * (with a SHORT date and a MEDIUM time - see DateFormat) * @return true if the format was updated, false if it was invalid */ public boolean setDateFormat(String format) { - if (format == null) return false; + if (format == null) + format = ""; + if (format.equals(_dateFormatPattern) && _dateFormat != null) + return true; try { - SimpleDateFormat fmt = new SimpleDateFormat(format); + SimpleDateFormat fmt = (SimpleDateFormat) DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM); + if (!format.equals("")) + fmt.applyPattern(format); + // the router sets the JVM time zone to UTC but saves the original here so we can get it + String systemTimeZone = _context.getProperty("i2p.systemTimeZone"); + if (systemTimeZone != null) + fmt.setTimeZone(TimeZone.getTimeZone(systemTimeZone)); _dateFormatPattern = format; _dateFormat = fmt; return true; diff --git a/core/java/src/net/i2p/util/LogWriter.java b/core/java/src/net/i2p/util/LogWriter.java index 7dca7ba96..b4d6e4395 100644 --- a/core/java/src/net/i2p/util/LogWriter.java +++ b/core/java/src/net/i2p/util/LogWriter.java @@ -27,7 +27,8 @@ import net.i2p.I2PAppContext; */ class LogWriter implements Runnable { /** every 10 seconds? why? Just have the gui force a reread after a change?? */ - private final static long CONFIG_READ_ITERVAL = 10 * 1000; + private final static long CONFIG_READ_INTERVAL = 50 * 1000; + private final static long FLUSH_INTERVAL = 11 * 1000; private long _lastReadConfig = 0; private long _numBytesInCurrentFile = 0; private Writer _currentOut; @@ -71,14 +72,14 @@ class LogWriter implements Runnable { try { List records = _manager._removeAll(); if (records == null) return; - for (LogRecord rec : records) { - writeRecord(rec); - } if (!records.isEmpty()) { + for (LogRecord rec : records) { + writeRecord(rec); + } try { _currentOut.flush(); } catch (IOException ioe) { - System.err.println("Error flushing the records"); + System.err.println("Error writing the router log"); } } } catch (Throwable t) { @@ -87,7 +88,7 @@ class LogWriter implements Runnable { if (shouldWait) { try { synchronized (this) { - this.wait(10*1000); + this.wait(FLUSH_INTERVAL); } } catch (InterruptedException ie) { // nop } @@ -101,7 +102,7 @@ class LogWriter implements Runnable { private void rereadConfig() { long now = Clock.getInstance().now(); - if (now - _lastReadConfig > CONFIG_READ_ITERVAL) { + if (now - _lastReadConfig > CONFIG_READ_INTERVAL) { _manager.rereadConfig(); _lastReadConfig = now; } diff --git a/history.txt b/history.txt index 57a905e8c..84b9cb95c 100644 --- a/history.txt +++ b/history.txt @@ -1,3 +1,23 @@ +20-11-29 dr|z3d + * Updated console theme "light". + +2010-11-29 zzz + * i2psnark: + - Don't timeout queued piece messages + * Logging: + - Use System locale and time zone for default date/time format, + so it matches the wrapper log time (we can't set the wrapper log time zone). + (existing installs must remove logger.dateFormat line + in logger.config to get system default format) + - Force RuntimeExceptions to CRIT level + - Don't have log() count buffer size + * Streaming: Make all classes outside the API package private + * UDP: + - Fix bug causing PacketPusher to loop quickly instead of sleeping + - Fix udp.sendCycleTime stat + - Fix speed values on peers.jsp + - Try to fix rare NPE (ticket 298) + 2010-11-28 zzz * Build: Move all dependencies to top-level build.xml, so each sub-build.xml is only executed once diff --git a/installer/resources/readme/readme.html b/installer/resources/readme/readme.html index 51828d968..ebee7e198 100644 --- a/installer/resources/readme/readme.html +++ b/installer/resources/readme/readme.html @@ -13,8 +13,8 @@

Welcome to the Invisible Internet

-

Anonymous Encrypted Webserving on I2P

@@ -37,7 +37,7 @@
  • Ready to roll!
    I2P comes built-in with a ready-to-go webserver for hosting your own anonymous website (eepsite) on the I2P network: a Jetty instance listening on http://127.0.0.1:7658/. To host your own content simply place your files in the eepsite/docroot/ directory (or place - any standard JSP/Servlet .war files under eepsite/webapps, + any standard JSP/Servlet .war files under eepsite/webapps, or standard CGI script under eepsite/cgi-bin) and they'll show up. You can also run any alternative webserver platform over I2P and replace the built-in server, or run it on another tunnel.
  • Start your tunnel
    @@ -60,10 +60,12 @@ your eepsite will be visible (but not discoverable) to others. Detailed instruct
  • Ugha's Wiki
    ugha.i2p: An open wiki that anyone can edit with plenty of information about I2P, help for beginners, additional links into the network etc.
  • I2P to Freenet Proxy
    fproxy.tino.i2p: Peer into the filesharing world of the Freenet darknet with Tino's I2P to Freenet proxy.
  • +
  • The Planet (on I2P)
    planet.i2p: An RSS aggregator site that takes news and events from around I2P and publishes them all in one place. A good site to visit to see the community at work!
  • Eepsite Search Engine
    eepsites.i2p: An anonymously hosted eepsite search engine.
  • +
  • I2P Network Health
    stats.i2p: Check out various aspects of network performance with this I2P network monitoring site run by zzz.
  • Discover I2P
    There are many more eepsites - just follow the links from the ones you see, - bookmark your favorites, and visit them often! There's a custom build of Firefox built especially for I2P called I2PFox you might like to investigate for locked down darknet exploration!
  • + bookmark your favorites, and visit them often! There's a custom build of Firefox built especially for I2P called I2PFox you might like to investigate for locked down darknet exploration! @@ -71,7 +73,7 @@ your eepsite will be visible (but not discoverable) to others. Detailed instruct diff --git a/installer/resources/themes/console/dark/console.css b/installer/resources/themes/console/dark/console.css index 25053d785..ef764f364 100644 --- a/installer/resources/themes/console/dark/console.css +++ b/installer/resources/themes/console/dark/console.css @@ -45,6 +45,14 @@ div.logo { box-shadow: inset 0px 0px 1px 0px #009; } +div.logo hr { + color: #494; + background: #494; + height: 1px; + border: 0px solid #494; + margin: 10px 0 5px; +} + div.toolbar { margin: 0; padding: 10px; @@ -559,13 +567,21 @@ div.main li b { } .tidylist:first-child { - padding-top: 5px; +/* padding-top: 5px;*/ } .tidylist:last-child { padding-bottom: 15px; } +.tidylist code { + text-align: left; + font: 9pt "Lucida Console", "DejaVu Sans Mono", Courier, mono; + color: #dd0; + padding: 1px 2px; + background: #030; +} + ol { display: inline; margin: 1px 0 0 0; @@ -583,7 +599,6 @@ code { font: 9pt "Lucida Console", "DejaVu Sans Mono", Courier, mono; color: #dd0; padding: 1px 2px; - background: #030; } a:link, h2 a:link{ @@ -918,24 +933,36 @@ div.joblog { text-align: justify !important; overflow-x: scroll; /* Opera fix */ } + +div.main li { + text-align: left; + list-style: square; + margin: 2px 0px 2px 30px; + padding: 2px 20px 2px 0px; +/* line-height: 150%;*/ + word-wrap: break-word; +} - div.joblog:li { +div.joblog li { word-wrap: break-word !important; text-align: justify !important; - line-height: 80% !important; + line-height: 120% !important; + margin: 2px 0px 2px 30px; + padding: 2px 20px 2px 0px; } -div.joblog:ul { +div.joblog ul { word-wrap: break-word !important; text-align: justify; + margin: 0px 0 10px; } div.joblog li:first-child { - margin-top: 10px; + margin-top: 0px; } div.joblog li:last-child { - margin-bottom: 0; + margin-bottom: -25px; } div.joblog form:first-child { diff --git a/installer/resources/themes/console/dark/console_big.css b/installer/resources/themes/console/dark/console_big.css new file mode 100644 index 000000000..cf2c46374 --- /dev/null +++ b/installer/resources/themes/console/dark/console_big.css @@ -0,0 +1,57 @@ +/* I2P Theme Override: Dark */ +/* Comment: Larger text (and other tweaks) for Chinese & other doublebyte charactersets */ +/* Author: dr|z3d */ + +body { + font: 9pt/130% Verdana, "Bitstream Vera Sans", Tahoma, Helvetica, sans-serif; +} + +div.news { + font-size: 9.5pt; + font-style: normal !important; +} + +div.routersummary table { + font-size: 8.5pt; +} + +div.routersummary h3, div.routersummary h4, div.routersummary p, div.routersummary h3 a, div.routersummary a { + text-shadow: 0 0 0 #fff !important; +} + +div.routersummary h4 { + font-size: 10pt; + font-weight: normal; +} + +div.routersummary b { + font-size: 9pt; + font-weight: normal; +} + +div.routersummary a { + font-size: 10pt; + font-weight: normal; +} + +b, a, a:link, a:hover, a:visited { + font-weight: normal; +} + +button, button:visited { + font: normal 10pt Verdana,"Bitstream Vera Sans",Tahoma,Helvetica,sans-serif !important; +} + +code, pre, tt { + font-size: 10pt; + font-weight: normal; +} + +.smallhead, th { + font-size: 8.5pt; + font-weight: normal; +} + +table { + font: 8.5pt/130% Verdana, "Bitstream Vera Sans", Tahoma, Helvetica, sans-serif; +} \ No newline at end of file diff --git a/installer/resources/themes/console/light/console.css b/installer/resources/themes/console/light/console.css index 7f19b7bf0..bcdf92201 100644 --- a/installer/resources/themes/console/light/console.css +++ b/installer/resources/themes/console/light/console.css @@ -1,12 +1,12 @@ /* I2P Theme: Light */ -/* I2P Description: Light theme with soft blue highlights. */ +/* Description: Light blue highlights. */ /* Author: dr|z3d */ body { - margin: 15px 0 0 10px; + margin: 15px 0 0 15px; padding: 0em; text-align: center; - background: #eef; + background: #eef url('images/snowcamo.png'); color: #000; font: 9pt/130% "Lucida Sans Unicode", "Bitstream Vera Sans", Verdana, Tahoma, Helvetica, sans-serif; } @@ -34,13 +34,13 @@ div.logo { text-align: center; font-color: #fff; margin: 0 20px 0 20px; - border: 1px solid #002; + border: 1px solid #447; -moz-border-radius: 4px; -khtml-border-radius: 4px; border-radius: 4px; - background: #ddddff url('images/lightbluetile.png'); + background: #eef; /*url('images/lightbluetile.png')*/ width: 175px; - -moz-box-shadow: inset 0px 0px 1px 0px #002; + -moz-box-shadow: inset 0px 0px 1px 1px #bbf; } div.toolbar { @@ -48,7 +48,7 @@ div.toolbar { padding: 10px; font-weight: bold; background: #eef; - border: 1px solid #002; + border: 1px solid #447; display: none !important; } @@ -80,7 +80,7 @@ a:active{ div.routersummaryouter { float: left; - width: 215px; + width: 210px; margin: 0 0 10px 0px; padding: 0; border: 0; @@ -94,18 +94,19 @@ div.routersummary { width: 175px; padding: 10px; text-align: center !important; - border: 1px solid #000033; - background: #ddf url('images/lightbluetile.png'); + border: 1px solid #447; + background: #ccddf6); color: #000; font-size: 8pt; clear: left;/* fixes a bug in Opera */ -moz-border-radius: 4px; -khtml-border-radius: 4px; border-radius: 4px; + background: #eef; /* float: left; */ - -moz-box-shadow: inset 0px 0px 1px 0px #002; + -moz-box-shadow: inset 0px 0px 1px 1px #bbf; } div.routersummary input[type=text] { @@ -118,7 +119,7 @@ div.routersummary hr { height: 2px; border-bottom: 1px solid #eef; margin: 8px -10px 7px -10px; - -moz-box-shadow: inset 0px 1px 1px 1px #001; + -moz-box-shadow: inset 0px 1px 1px 1px #ddf; } div routersummary hr:last-child { @@ -130,11 +131,22 @@ div.routersummary h3 { border: 0; font-size: 9.5pt; letter-spacing: 0.04em; - margin: -7px -9px -7px -9px; - padding: 1px 0; + margin: -4px -6px; + padding: 2px 0; background: #c5d5fb; text-transform: uppercase; - background-image: -moz-linear-gradient(top, bottom, from(#ddf), to(#c5d5fb), color-stop(25%, #c5d5fb), color-stop(100%, #ddf)); + background: #ddf url('images/header_on.png') center center repeat-x; + border: 1px solid #99f !important; + -moz-border-radius: 3px; +} + +div.routersummary h3 a { + text-decoration: none; +} + +div.routersummary h3:hover { + background: #ddf url('images/header.png') center center repeat-x; + text-shadow: 0 0 0; } div.routersummary h4 { @@ -144,10 +156,11 @@ div.routersummary h4 { letter-spacing: 0.02em; margin: -7px -9px -7px -9px !important; padding: 0px 3px 1px 3px; - background: #c1d1f7; + background: #eef; text-transform: capitalize; text-decoration: none !important; color: #2b2; + line-height: 105%; } div.routersummary table { @@ -175,16 +188,31 @@ div.tunnels { padding-top: 3px !important; } +div.tunnels table { + margin: -7px 0 -5px -4px !important; +} + .tunnels tr { padding: 4px 0 !important; } +div.tunnels td:first-child { + width: 16px; + text-align: left; + padding-right: 1px; +} + +div.tunnels td:last-child { + text-align: right; + padding-right: 1px; +} + div.routersummary form { margin: -6px 0 -5px 0; } div.routersummary form:last-child { - margin: 0 !important; + margin: 6px 0 0 0 !important; padding: 0; } @@ -203,7 +231,7 @@ div.routersummary a:hover { } div.routersummary td { - padding: 1px 3px; + padding: 0 3px; background-image: none !important; border: 0 !important; } @@ -214,7 +242,7 @@ div.warning { margin: 5px 20px 10px 240px; padding: 5px 25px 20px 75px; background: #fff; - border: 1px solid #002; + border: 1px solid #447; text-align: left; color: inherit; -moz-border-radius: 4px; @@ -234,8 +262,8 @@ div.warning { div.sorry { margin: 5px 15px 10px 220px; padding: 20px 20px 20px 75px; - background: #ffb; - border: 1px solid #002; + background: #eef; + border: 1px solid #447; -moz-border-radius: 4px; -khtml-border-radius: 4px; border-radius: 4px; @@ -246,32 +274,37 @@ div.sorry { -moz-box-shadow: inset 0px 0px 0px 1px #d00; word-wrap: break-word; font-weight: bold; - color: #331; + color: #531; } div.sorry hr { - color: #552; - background: #552; + color: #531; + background: #531; height: 1px; - border: 1px solid #552; - margin: 10px 0; + border: 1px solid #531; + margin: 10px 0 15px 0; } div.main { - margin: 0px 0px 20px 195px; - padding: 0 15px 15px 25px; + margin: 15px 15px 20px 220px; + padding: 0 15px 15px 15px; background: #eef; text-align: left; color: #001; width: auto; min-width: 500px; + border: 1px solid #447; + -moz-border-radius: 4px; + -khtml-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: inset 0px 0px 1px 1px #bbf; } div.main hr, hr { - color: #003; - background: #003; + color: #447; + background: #447; height: 1px; - border: 0px solid #003; + border: 0px solid #447; margin: 10px 0; } @@ -288,46 +321,48 @@ div.main textarea { div.news { margin: 0px 15px 10px 220px; padding: 10px 25px 7px 25px; - border: 1px solid #003; - color: #410; + border: 1px solid #447; + color: #000; border-radius: 4px; -moz-border-radius: 4px; -khtml-border-radius: 4px; text-align: right !important; - font-size: 7pt; + font-size: 7.5pt; line-height: 140%; - background: #fea url('images/sandtile.png'); + background: #eef; /*url('images/sandtile.png');*/ -moz-box-shadow: inset 0px 0px 1px 0px #410; + background: #eef; /*url("images/bg2.png")no-repeat scroll bottom right;*/ } div.news p { font-size: 8.5pt; text-align: justify !important; } - +/* div.news a:link{ - color: #630; + color: #a30; text-decoration: none; } div.news a:visited{ - color: #830; + color: #930; } div.news a:hover{ - color: #a30; + color: #d20; text-decoration: underline; } div.news a:active{ color: #c30; } +*/ div.news hr{ - color: #410; - background: #410; + color: #447; + background: #447; height: 1px; - border: 0px solid #410; + border: 0px solid #447; margin: 10px 0 5px; } @@ -335,19 +370,25 @@ div.news li { text-align: justify; list-style: none; margin: 10px 0 20px 0 !important; - padding: 5px 0; vertical-align: bottom; - border: 1px solid #410; - border-left: 5px solid #410; - padding: 3px 5px 3px 5px; + border: 1px solid #447; + border-left: 5px solid #447; + padding: 4px 5px; border-radius: 0 4px 4px 0; -moz-border-radius: 0 4px 4px 0; -khtml-border-radius: 0 4px 4px 0; - background: #fb1; font-size: 10pt; - opacity: 0.7; + opacity: 1; + background: #fff url('images/header.png') center center repeat-x; } +/* +div.news h4 a{ + color: #910 !important; + opacity: 1 !important; +} +*/ + div.news h4 { border-bottom: 0px; padding: 0; @@ -357,34 +398,35 @@ div.news h4 { div.confignav { padding: 15px 10px !important; - margin: 0 0px 15px 0; - background: #ddf url('images/lightbluetile.png'); + margin: 15px 0 15px 0; + background: #ddf url('images/header.png') center center repeat-x; -moz-border-radius: 4px; -khtml-border-radius: 4px; border-radius: 4px; - border: 1px solid #000022; + border: 1px solid #447; font-size: 9.5pt !important; font-weight: bold !important; line-height: 160% !important; - -moz-box-shadow: inset 0px 0px 1px 0px #002; + -moz-box-shadow: inset 0px 0px 1px 1px #bbf; min-width: 400px; } div.configure { - padding: 5px 15px 0px 15px !important; +/* padding: 5px 15px 0px 15px !important; margin: 0px 0px 15px 0; - background: #ddf url('images/lightbluetile.png'); + background: #eef; url('images/lightbluetile.png') -moz-border-radius: 4px; -khtml-border-radius: 4px; border-radius: 4px; - border: 1px solid #000022; - -moz-box-shadow: inset 0px 0px 1px 0px #002; + border: 1px solid #447; + -moz-box-shadow: inset 0px 0px 1px 1px #bbf;*/ min-width: 400px; + margin-bottom: 0px; } div.configure h3, div.graphspanel h3 { - border: 1px solid #002; - border-left: 5px solid #002; + border: 1px solid #447; + border-left: 5px solid #447; padding: 3px 5px 3px 5px; margin: 15px 0 15px 0; border-radius: 0 4px 4px 0; @@ -394,19 +436,20 @@ div.configure h3, div.graphspanel h3 { } div.graphspanel { - padding: 12px; +/* padding: 12px; margin: 10px 0px 25px 0; background: #ddf url('images/lightbluetile.png'); -moz-border-radius: 4px; -khtml-border-radius: 4px; border-radius: 4px; - border: 1px solid #000022; - -moz-box-shadow: inset 0px 0px 1px 0px #002; - text-align: center !important; + border: 1px solid #447; + -moz-box-shadow: inset 0px 0px 1px 1px #bbf;*/ + text-align: center !important; + margin: 15px 0px -15px; } div.graphspanel img { - border: 1px solid #003; + border: 1px solid #447; padding: 2px; margin: 6px; text-align: center !important; @@ -416,7 +459,7 @@ div.graphspanel img { } div.graphspanel img:hover { - border: 1px solid #003; + border: 1px solid #447; padding: 2px; margin: 6px; text-align: center !important; @@ -436,10 +479,10 @@ div.messages { -moz-border-radius: 4px; -khtml-border-radius: 4px; border-radius: 4px; - border: 1px solid #000033; - background: #008 url('images/lightbluetile.png'); + border: 1px solid #447; + background: #eef; /*url('images/lightbluetile.png');*/ font-weight: bold; - -moz-box-shadow: inset 0px 0px 1px 0px #002; + -moz-box-shadow: inset 0px 0px 1px 1px #bbf; } div.messages span.error { @@ -462,7 +505,7 @@ div.messages li { table { border-collapse: collapse; width: 100%; - border: 1px solid #000022; + border: 1px solid #447; margin: 1px -15px 5px 0px; cell-padding: 1px; font-size: 7pt; @@ -483,12 +526,12 @@ table hr { th { padding: 6px 2px; color: #000; - background: #b4c8ff url('images/tabletitlelight.png') repeat-x; + background: #ddf url('images/header.png') center center repeat-x; text-align: center; font-size: 9pt; line-height: 110%; - border-bottom: 1px solid #001 !important; - border-top: 1px solid #001 !important; + border-bottom: 1px solid #447 !important; + border-top: 1px solid #447 !important; } tr { @@ -497,11 +540,11 @@ tr { } tr:nth-child(even) { - background: #99f url('images/tabletile.png') !important; + background: #eef; /*url('images/tabletile.png') !important;*/ } tr:nth-child(odd) { - background: #bbf url('images/tabletile_alt.png') !important; + background: #ddf; /*url('images/tabletile_alt.png') !important;*/ } /* tr:last-child { @@ -514,7 +557,7 @@ td { padding: 5px 3px; color: #000; vertical-align: middle; - border-top: 1px inset #001; + border-top: 1px inset #447; border-bottom: 1px outset #99f; } @@ -524,6 +567,15 @@ tt { padding: 1px 5px; } +div.main li { + text-align: left; + list-style: square; + margin: 2px 5px 0px 20px; + padding: 1px 10px 1px 10px; + line-height: 150%; + word-wrap: break-word; +} + div.main li { text-align: left; list-style: square; @@ -534,14 +586,14 @@ div.main li { } div.main li b { - color: #404 !important; - letter-spacing: 0.04em; + color: #700 !important; + letter-spacing: 0.02em; font-size: 9.5pt; - line-height: 200%; + line-height: 170%; } div.main li:first-child { - margin-top: 10px; + margin-top: 10px !important; } .tidylist { text-align: justify !important; @@ -555,6 +607,15 @@ div.main li:first-child { padding-bottom: 5px; } +.tidylist code { + text-align: left; + font: 9pt "Lucida Console", "DejaVu Sans Mono", Courier, mono; + color: #390; + padding: 2px 3px; + background: #eeb; + font-weight: bold; +} + ol { margin: 1px 0 0 5px; @@ -572,15 +633,24 @@ code { font: 8pt "Lucida Console", "DejaVu Sans Mono", Courier, mono; } + +code { + text-align: left; + font: 9pt "Lucida Console", "DejaVu Sans Mono", Courier, mono; + color: #390; + padding: 2px 3px; + font-weight: bold; +} + a:link{ - color: #008; + color: #005; text-decoration: none; font-weight: bold; word-wrap: break-word; } a:visited{ - color: #004; + color: #309; text-decoration: none; font-weight: bold; } @@ -602,6 +672,7 @@ a:active{ padding-bottom: -2px; text-align: justify; line-height: 120% !important; + padding-right: -100px !important; } .links li:first-child { @@ -629,11 +700,11 @@ h1 { font: normal bold 16pt/120% "Lucida Sans Unicode", "Bitstream Vera Sans", Verdana, Tahoma, Helvetica, sans-serif; letter-spacing: 0.15em; text-transform: uppercase; - text-shadow: 0px 0px 1px rgba(0, 0, 148, 0.9); - -moz-box-shadow: inset 0px 0px 1px 0px #002; + text-shadow: 0px 0px 1px #77f;; + -moz-box-shadow: inset 0px 0px 1px 1px #bbf; white-space: normal; - background: #ddddff url('images/lightbluetile.png'); - border: 1px solid #002; + background: #ddf url('images/header.png') center center repeat-x; + border: 1px solid #447; border-radius: 4px; -moz-border-radius: 4px; -khtml-border-radius: 4px; @@ -643,42 +714,43 @@ h2 { font-size: 12pt; color: #001; letter-spacing: 0.05em; - background: #ddf url('images/titletile.png'); + background: #ddf url('images/header.png') center center repeat-x; text-shadow: 0px 0px 1px rgba(0, 0, 64, 0.5); - padding: 7px 10px; + padding: 10px 10px; wordwrap: none; - border: 1px solid #002; + border: 1px solid #447; border-radius: 4px; -moz-border-radius: 4px; -khtml-border-radius: 4px; margin: 15px 0px 12px 0 !important; - -moz-box-shadow: inset 0px 0px 1px 0px #002; + -moz-box-shadow: inset 0px 0px 1px 1px #bbf; word-wrap: break-word; + text-transform: uppercase; } h2 a:hover { text-shadow: 0px 0px 1px rgba(255, 255, 72, 0.9); border-bottom: 1px #ff6600; - border-bottom-style: solid; - border-bottom-color: #002; padding-bottom: 5px; } h3 { - border: 1px solid #002; - border-left: 5px solid #002; - padding: 3px 5px 3px 5px; + border: 1px solid #447; + border-left: 5px solid #447; + padding: 5px 5px 5px 5px; margin: 12px 0 12px 0; border-radius: 0 4px 4px 0; -moz-border-radius: 0 4px 4px 0; -khtml-border-radius: 0 4px 4px 0; - background: #eef; + background: #ddf url('images/header.png') center center repeat-x !important; + text-transform: uppercase; + text-shadow: 0px 0px 1px #77f; } h4 { border-bottom: 1px; border-bottom-style: solid; - border-bottom-color: #001; + border-bottom-color: #447; padding: 0 0 10px 0; margin: 5px 0 10px 0; font-size: 11pt; @@ -723,8 +795,8 @@ button:active{ } .langbox { - margin: 4px 10px 4px 5px; - padding: 5px 5px; + margin: 20px 10px 4px 5px; + padding: 8px 5px; color: #001; font-size: 7pt; width: 260px; @@ -733,13 +805,23 @@ button:active{ valign: middle; } +.langbox img { + opacity: 0.8; + -moz-box-shadow: 0 0 1px #447; +} + +.langbox img:hover { + opacity: 1; + -moz-box-shadow: 0 0 1px #f60; +} + input { background: #eef; color: #001; margin: 5px 10px 5px 10px; padding: 4px 2px; font: bold 8pt "Lucida Sans Unicode", "Bitstream Vera Sans", Verdana, Tahoma, Helvetica, sans-serif; - border: 1px solid #001; + border: 1px solid #447; text-decoration: none; min-width: 110px; } @@ -785,7 +867,7 @@ input[type=text] { margin: 5px 10px 5px 10px; padding: 4px 2px; font: bold 8pt "Lucida Sans Unicode", "Bitstream Vera Sans", Verdana, Tahoma, Helvetica, sans-serif; - border: 1px solid #001; + border: 1px solid #447; text-decoration: none; } @@ -796,7 +878,7 @@ submit { padding: 2px; font-family: "Lucida Sans Unicode", "Bitstream Vera Sans", Verdana, Tahoma, Helvetica, sans-serif; font-weight: bold; - border: 1px solid #001; + border: 1px solid #447; text-decoration: none; } @@ -809,7 +891,7 @@ select { color: #003; margin: 5px 10px 5px 10px; padding: 4px; - border: 1px solid #001; + border: 1px solid #447; min-width: 110px; font: 9pt "Lucida Sans Unicode", "Bitstream Vera Sans", Verdana, Tahoma, Helvetica, sans-serif; border-radius: 4px; @@ -829,7 +911,7 @@ textarea { font: 8pt "Lucida Console", "DejaVu Sans Mono", Courier, mono; min-height: 100px; min-width: 97%; - border: 1px solid #001; + border: 1px solid #447; } form {} @@ -843,7 +925,7 @@ form {} border-radius: 4px; -moz-border-radius: 4px; -khtml-border-radius: 4px; - border: 1px solid #001; + border: 1px solid #447; display: none; } @@ -852,18 +934,19 @@ form {} font-size: 8pt; font-color: #001 !important; text-align: center; - border: 1px solid #001 !important; + border: 1px solid #447 !important; border-top: 0 !important; margin: -5px 0 5px 0; padding: 7px; background: #bcf; -moz-box-shadow: inset 0px 0px 2px 1px #eef; } + /* .joblog { margin: 15px 0; padding: 10px 20px !important; - border: 1px solid #003; + border: 1px solid #447; background-color: #004; background: #ddf url('images/lightbluetile.png'); color: #001; @@ -871,7 +954,7 @@ form {} -moz-border-radius: 4px; -khtml-border-radius: 4px; text-align: justify; - -moz-box-shadow: inset 0px 0px 1px 0px #002; + -moz-box-shadow: inset 0px 0px 1px 1px #bbf; overflow: auto; } @@ -889,18 +972,20 @@ form {} */ div.joblog { - margin: 15px 0; +/* margin: 15px 0; padding: 10px 20px !important; - border: 1px solid #003; + border: 1px solid #447; background-color: #004; - background: #ddf url('images/lightbluetile.png'); + background: #eef; /*url('images/lightbluetile.png') color: #001; border-radius: 4px; -moz-border-radius: 4px; -khtml-border-radius: 4px; text-align: justify; - -moz-box-shadow: inset 0px 0px 1px 0px #002; + -moz-box-shadow: inset 0px 0px 1px 1px #bbf;*/ overflow: auto; + border: 0; + margin-top: 5px; } div.joblog:ul { @@ -987,9 +1072,9 @@ div.joblog hr { } .tablefooter tr, .tablefooter td { - background: #b4c8ff url('images/tabletitlelight.png') repeat-x; - border-top: 1px solid #001; - border-bottom: 1px solid #001 !important; + background: #ddf url('images/header.png') center center repeat-x; + border-top: 1px solid #447; + border-bottom: 1px solid #447 !important; padding: 8px 2px !important; font-size: 7pt; line-height: 110%; diff --git a/installer/resources/themes/console/light/default.css b/installer/resources/themes/console/light/default.css index ab0e677bb..3dca407ce 100644 --- a/installer/resources/themes/console/light/default.css +++ b/installer/resources/themes/console/light/default.css @@ -3,7 +3,7 @@ body { padding: 0px; text-align: center; font-family: "Lucida Sans Unicode", Verdana, Helvetica, sans-serif; - background-color: #eef; + background: #eef url('images/snowcamo.png'); color: #001; font-size: 10pt; /* we've avoided Tantek Hacks so far, @@ -45,7 +45,7 @@ h4 { border: 1px solid #225; margin: 5px 0 15px 0; padding: 5px 10px; - background: #b4c8ff url(images/tabletitlelight.png) repeat-x; + background: #b4c8ff url(images/header_on.png) repeat-x center center; text-transform: uppercase; letter-spacing: 0.08em; -moz-box-shadow: inset 0px 0px 4px 0px #bbf; @@ -200,7 +200,7 @@ hr { -khtml-border-radius: 4px; border-radius: 4px; margin-top: 8px; - background: #bbf url(images/tabletitlelight.png) 0 0 repeat: x !important; + background: #bbf url(images/header_on.png) center center repeat:x !important; text-decoration: none; } @@ -218,6 +218,9 @@ hr { border: 1px solid #002; padding: 10px 20px; -moz-box-shadow: inset 0px 0px 1px 0px #002; + background: none repeat scroll 0 0 #EEEEFF; + border: 1px solid #444477; + color: #000011; } .panel .footer { @@ -262,6 +265,11 @@ hr { padding: 5px 20px 11px 10px; background: url(images/lightbluetile.png); -moz-box-shadow: inset 0px 0px 0px 1px #f00; + -moz-box-shadow: inset 0px 0px 1px 0px #002; + background: none repeat scroll 0 0 #EEEEFF; + border: 1px solid #444477; + color: #000011; + } #globalOperationsPanel .control { @@ -288,7 +296,7 @@ globalOperationsPanel .control:link { -khtml-border-radius: 4px; border-radius: 4px; margin-top: 8px; - background: url(images/tabletitlelight.png) 0 0 repeat: x !important; + background: url(images/header_on.png) 0 0 repeat: x !important; } @@ -307,7 +315,7 @@ globalOperationsPanel .control:visited { -khtml-border-radius: 4px; border-radius: 4px; margin-top: 8px; - background: url(images/tabletitlelight.png) 0 0 repeat: x !important; + background: url(images/header_on.png) 0 0 repeat: x !important; } globalOperationsPanel .control:hover { @@ -325,7 +333,7 @@ globalOperationsPanel .control:hover { -khtml-border-radius: 4px; border-radius: 4px; margin-top: 8px; - background: url(images/tabletitlelight.png) 0 0 repeat: x !important; + background: url(images/header_on.png) 0 0 repeat: x !important; } .header { -moz-border-radius: 4px; diff --git a/installer/resources/themes/console/light/i2ptunnel.css b/installer/resources/themes/console/light/i2ptunnel.css index d091a0e9b..172e5ce65 100644 --- a/installer/resources/themes/console/light/i2ptunnel.css +++ b/installer/resources/themes/console/light/i2ptunnel.css @@ -90,7 +90,7 @@ font-size: 9pt !important; font-weight: bold; text-align: justify !important; - background: #ddf url(images/tabletile.png); + background: #ddf; /*url(images/tabletile.png);*/ } #tunnelListPage .footer .control { diff --git a/installer/resources/themes/console/light/images/darkbluetile.png b/installer/resources/themes/console/light/images/darkbluetile.png deleted file mode 100644 index 89df70b96..000000000 Binary files a/installer/resources/themes/console/light/images/darkbluetile.png and /dev/null differ diff --git a/installer/resources/themes/console/light/images/darkerbluetile.png b/installer/resources/themes/console/light/images/darkerbluetile.png deleted file mode 100644 index 854d46f40..000000000 Binary files a/installer/resources/themes/console/light/images/darkerbluetile.png and /dev/null differ diff --git a/installer/resources/themes/console/light/images/header.png b/installer/resources/themes/console/light/images/header.png new file mode 100644 index 000000000..15eed8973 Binary files /dev/null and b/installer/resources/themes/console/light/images/header.png differ diff --git a/installer/resources/themes/console/light/images/header_on.png b/installer/resources/themes/console/light/images/header_on.png new file mode 100644 index 000000000..8137db9ae Binary files /dev/null and b/installer/resources/themes/console/light/images/header_on.png differ diff --git a/installer/resources/themes/console/light/images/i2plogo.png b/installer/resources/themes/console/light/images/i2plogo.png index c8ad1d23d..11fc69c16 100644 Binary files a/installer/resources/themes/console/light/images/i2plogo.png and b/installer/resources/themes/console/light/images/i2plogo.png differ diff --git a/installer/resources/themes/console/light/images/lightbluetile.png b/installer/resources/themes/console/light/images/lightbluetile.png deleted file mode 100644 index 53f9d54de..000000000 Binary files a/installer/resources/themes/console/light/images/lightbluetile.png and /dev/null differ diff --git a/installer/resources/themes/console/light/images/sandtile.png b/installer/resources/themes/console/light/images/sandtile.png deleted file mode 100644 index 4d88cb847..000000000 Binary files a/installer/resources/themes/console/light/images/sandtile.png and /dev/null differ diff --git a/installer/resources/themes/console/light/images/snowcamo.png b/installer/resources/themes/console/light/images/snowcamo.png new file mode 100644 index 000000000..4c645d52e Binary files /dev/null and b/installer/resources/themes/console/light/images/snowcamo.png differ diff --git a/installer/resources/themes/console/light/images/tabletile.png b/installer/resources/themes/console/light/images/tabletile.png deleted file mode 100644 index f34c06324..000000000 Binary files a/installer/resources/themes/console/light/images/tabletile.png and /dev/null differ diff --git a/installer/resources/themes/console/light/images/tabletile_alt.png b/installer/resources/themes/console/light/images/tabletile_alt.png deleted file mode 100644 index ea691b8e2..000000000 Binary files a/installer/resources/themes/console/light/images/tabletile_alt.png and /dev/null differ diff --git a/installer/resources/themes/console/light/images/tabletilelighter.png b/installer/resources/themes/console/light/images/tabletilelighter.png deleted file mode 100644 index 5586bb063..000000000 Binary files a/installer/resources/themes/console/light/images/tabletilelighter.png and /dev/null differ diff --git a/installer/resources/themes/console/light/images/titletile.png b/installer/resources/themes/console/light/images/titletile.png deleted file mode 100644 index beb9552ba..000000000 Binary files a/installer/resources/themes/console/light/images/titletile.png and /dev/null differ diff --git a/installer/resources/themes/console/light/images/warning.png b/installer/resources/themes/console/light/images/warning.png index c2b7e8c09..199663311 100644 Binary files a/installer/resources/themes/console/light/images/warning.png and b/installer/resources/themes/console/light/images/warning.png differ diff --git a/installer/resources/themes/snark/vanilla/images/delete.png b/installer/resources/themes/snark/vanilla/images/delete.png index 6cbf85f3f..c19834172 100644 Binary files a/installer/resources/themes/snark/vanilla/images/delete.png and b/installer/resources/themes/snark/vanilla/images/delete.png differ diff --git a/installer/resources/themes/snark/vanilla/images/details.png b/installer/resources/themes/snark/vanilla/images/details.png index 852e6aae7..5f9c04a60 100644 Binary files a/installer/resources/themes/snark/vanilla/images/details.png and b/installer/resources/themes/snark/vanilla/images/details.png differ diff --git a/installer/resources/themes/snark/vanilla/images/remove.png b/installer/resources/themes/snark/vanilla/images/remove.png index 90fdd2160..0d8616f6b 100644 Binary files a/installer/resources/themes/snark/vanilla/images/remove.png and b/installer/resources/themes/snark/vanilla/images/remove.png differ diff --git a/installer/resources/themes/snark/vanilla/images/snark_add.png b/installer/resources/themes/snark/vanilla/images/snark_add.png new file mode 100644 index 000000000..e2c291a6c Binary files /dev/null and b/installer/resources/themes/snark/vanilla/images/snark_add.png differ diff --git a/installer/resources/themes/snark/vanilla/images/snark_create.png b/installer/resources/themes/snark/vanilla/images/snark_create.png new file mode 100644 index 000000000..3424b07df Binary files /dev/null and b/installer/resources/themes/snark/vanilla/images/snark_create.png differ diff --git a/installer/resources/themes/snark/vanilla/images/start.png b/installer/resources/themes/snark/vanilla/images/start.png index df83a64b4..2a68bf9f7 100644 Binary files a/installer/resources/themes/snark/vanilla/images/start.png and b/installer/resources/themes/snark/vanilla/images/start.png differ diff --git a/installer/resources/themes/snark/vanilla/images/start_all.png b/installer/resources/themes/snark/vanilla/images/start_all.png index 091ce38e4..953809668 100644 Binary files a/installer/resources/themes/snark/vanilla/images/start_all.png and b/installer/resources/themes/snark/vanilla/images/start_all.png differ diff --git a/installer/resources/themes/snark/vanilla/images/stop.png b/installer/resources/themes/snark/vanilla/images/stop.png index 3d35f6bd1..334949fba 100644 Binary files a/installer/resources/themes/snark/vanilla/images/stop.png and b/installer/resources/themes/snark/vanilla/images/stop.png differ diff --git a/installer/resources/themes/snark/vanilla/images/stop_all.png b/installer/resources/themes/snark/vanilla/images/stop_all.png index 098a3d1fb..2ec69fed2 100644 Binary files a/installer/resources/themes/snark/vanilla/images/stop_all.png and b/installer/resources/themes/snark/vanilla/images/stop_all.png differ diff --git a/installer/resources/themes/snark/vanilla/snark.css b/installer/resources/themes/snark/vanilla/snark.css index f96e8e2b3..7f2c3c6bb 100644 --- a/installer/resources/themes/snark/vanilla/snark.css +++ b/installer/resources/themes/snark/vanilla/snark.css @@ -139,13 +139,17 @@ tr { } thead, tfoot { - text-shadow:0 1px 0px #930; - background: url("images/bling.png") repeat-x scroll center center #867; + text-shadow: 0px 1px 1px #707; + background: url("images/bling2.png") repeat-x scroll center center #867; + font-weight: bold; + color: #503; } +/* thead a, tfoot a { -text-shadow:1px 1px #101; +text-shadow: 1px 1px 1px #f00; } +*/ thead { border-bottom: 1px solid #604; @@ -156,7 +160,6 @@ th { font-size: 9pt; border-top: 1px outset #001; border-bottom: 1px inset #604; - color: #b30; whitespace: nowrap; font-variant: small-caps !important; letter-spacing: 0.05em; @@ -218,7 +221,7 @@ tfoot th { td { padding: 1px; - color: #001 !important; + color: #501 !important; opacity: 1; font-size: 9.5pt; } @@ -274,7 +277,7 @@ td:first-child { padding-left: 0px; min-width: 120px; font-weight: bold; - color: #404 !important; + color: #402 !important; font-size: 8pt; } @@ -435,6 +438,24 @@ a:hover { font-weight: bold; } +a:link { + color: #d30; + text-decoration: none; + font-weight: bold; + word-wrap: break-word; +} + +a:visited { + color: #a60; + text-decoration: none; + font-weight: bold; +} + +a:hover { + color: #fa0; + font-weight: bold; +} + input { font-size: 9pt; font-weight: bold; @@ -590,7 +611,7 @@ div.newtorrentsection { -khtml-box-shadow: inset 0px 0px 1px 0px #fff; box-shadow: inset 0px 0px 1px 0px #fff; word-wrap: break-word; - background: #ffd url('/themes/snark/ubergine/images/snark_create.png') no-repeat scroll right center; + background: #ffd url('images/snark_create.png') no-repeat scroll right center; opacity: 1.0; } @@ -607,7 +628,7 @@ div.addtorrentsection { -khtml-box-shadow: inset 0px 0px 1px 0px #fff; box-shadow: inset 0px 0px 1px 0px #fff; word-wrap: break-word; - background: #ffd url('/themes/snark/ubergine/images/snark_add.png') no-repeat scroll right center; + background: #ffd url('images/snark_add.png') no-repeat scroll right center; opacity: 1.0; } @@ -655,7 +676,7 @@ div.configsection table{ } div.configsection a { - color: #f60; + color: #f30; text-shadow: 1px 1px #500; } @@ -665,8 +686,8 @@ div.configsection a:hover { } code { - font-size: 9.5pt; - color: #227; + font-size: 9pt; + color: #930; padding: 0 2px; font-weight: bold; font-family: "Lucida Console", "DejaVu Sans Mono", Courier, mono; diff --git a/router/java/src/net/i2p/router/Router.java b/router/java/src/net/i2p/router/Router.java index 459be0ec7..7f8b2788e 100644 --- a/router/java/src/net/i2p/router/Router.java +++ b/router/java/src/net/i2p/router/Router.java @@ -96,6 +96,7 @@ public class Router { public final static String PROP_SHUTDOWN_IN_PROGRESS = "__shutdownInProgress"; public final static String DNS_CACHE_TIME = "" + (5*60); + private static final String originalTimeZoneID; static { // grumble about sun's java caching DNS entries *forever* by default // so lets just keep 'em for a short time @@ -106,6 +107,8 @@ public class Router { System.setProperty("http.agent", "I2P"); // (no need for keepalive) System.setProperty("http.keepAlive", "false"); + // Save it for LogManager + originalTimeZoneID = TimeZone.getDefault().getID(); System.setProperty("user.timezone", "GMT"); // just in case, lets make it explicit... TimeZone.setDefault(TimeZone.getTimeZone("GMT")); @@ -180,6 +183,8 @@ public class Router { if (envProps.getProperty("i2p.dir.config") == null) envProps.setProperty("i2p.dir.config", userDir); + // Save this in the context for the logger and apps that need it + envProps.setProperty("i2p.systemTimeZone", originalTimeZoneID); // The important thing that happens here is the directory paths are set and created // i2p.dir.router defaults to i2p.dir.config diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index 7f4edb975..e1f87e077 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -18,7 +18,7 @@ public class RouterVersion { /** deprecated */ public final static String ID = "Monotone"; public final static String VERSION = CoreVersion.VERSION; - public final static long BUILD = 13; + public final static long BUILD = 16; /** for example "-test" */ public final static String EXTRA = ""; diff --git a/router/java/src/net/i2p/router/transport/udp/InboundEstablishState.java b/router/java/src/net/i2p/router/transport/udp/InboundEstablishState.java index 334a075fb..f659c59f8 100644 --- a/router/java/src/net/i2p/router/transport/udp/InboundEstablishState.java +++ b/router/java/src/net/i2p/router/transport/udp/InboundEstablishState.java @@ -19,6 +19,7 @@ import net.i2p.util.Log; * initiated the connection with us. In other words, they are Alice and * we are Bob. * + * TODO do all these methods need to be synchronized? */ class InboundEstablishState { private final RouterContext _context; @@ -27,7 +28,8 @@ class InboundEstablishState { private byte _receivedX[]; private byte _bobIP[]; private final int _bobPort; - private DHSessionKeyBuilder _keyBuilder; + // try to fix NPE in getSentY() ????? + private volatile DHSessionKeyBuilder _keyBuilder; // SessionCreated message private byte _sentY[]; private final byte _aliceIP[]; diff --git a/router/java/src/net/i2p/router/transport/udp/OutboundMessageFragments.java b/router/java/src/net/i2p/router/transport/udp/OutboundMessageFragments.java index 58e700f09..81a787abf 100644 --- a/router/java/src/net/i2p/router/transport/udp/OutboundMessageFragments.java +++ b/router/java/src/net/i2p/router/transport/udp/OutboundMessageFragments.java @@ -33,6 +33,8 @@ class OutboundMessageFragments { /** which peer should we build the next packet out of? */ private int _nextPeer; private PacketBuilder _builder; + private long _lastCycleTime = System.currentTimeMillis(); + /** if we can handle more messages explicitly, set this to true */ // private boolean _allowExcess; // LINT not used?? // private volatile long _packetsRetransmitted; // LINT not used?? @@ -176,13 +178,13 @@ class OutboundMessageFragments { if (!_activePeers.contains(peer)) { if (_log.shouldLog(Log.DEBUG)) _log.debug("Add a new message to a new peer " + peer.getRemotePeer().toBase64()); + if (_activePeers.isEmpty()) + _lastCycleTime = System.currentTimeMillis(); _activePeers.add(peer); } else { if (_log.shouldLog(Log.DEBUG)) _log.debug("Add a new message to an existing peer " + peer.getRemotePeer().toBase64()); } - if (_activePeers.size() == 1) - _lastCycleTime = System.currentTimeMillis(); _activePeers.notifyAll(); } _context.statManager().addRateData("udp.outboundActiveCount", active, 0); @@ -227,8 +229,6 @@ class OutboundMessageFragments { } } - private long _lastCycleTime = System.currentTimeMillis(); - /** * Fetch all the packets for a message volley, blocking until there is a * message which can be fully transmitted (or the transport is shut down). @@ -248,18 +248,24 @@ class OutboundMessageFragments { for (int i = 0; i < _activePeers.size(); i++) { int cur = (i + _nextPeer) % _activePeers.size(); if (cur == 0) { + // FIXME or delete, these stats aren't much help since they include the sleep time long ts = System.currentTimeMillis(); long cycleTime = ts - _lastCycleTime; + _lastCycleTime = ts; _context.statManager().addRateData("udp.sendCycleTime", cycleTime, _activePeers.size()); - if (cycleTime > 1000) + // make longer than the default sleep time below + if (cycleTime > 1100) _context.statManager().addRateData("udp.sendCycleTimeSlow", cycleTime, _activePeers.size()); } peer = _activePeers.get(i); state = peer.allocateSend(); if (state != null) { + // we have something to send and we will be returning it _nextPeer = i + 1; break; } else { + // Update the minimum delay for all peers (getNextDelay() returns 1 for "now") + // which will be used if we found nothing to send across all peers int delay = peer.getNextDelay(); if ( (nextSendDelay <= 0) || (delay < nextSendDelay) ) nextSendDelay = delay; @@ -274,8 +280,9 @@ class OutboundMessageFragments { if (_log.shouldLog(Log.DEBUG)) _log.debug("wait for " + nextSendDelay); // wait.. or somethin' + // wait a min of 10 and a max of 3000 ms no matter what peer.getNextDelay() says if (nextSendDelay > 0) - _activePeers.wait(nextSendDelay); + _activePeers.wait(Math.min(Math.max(nextSendDelay, 10), 3000)); else _activePeers.wait(1000); } else { diff --git a/router/java/src/net/i2p/router/transport/udp/PeerState.java b/router/java/src/net/i2p/router/transport/udp/PeerState.java index 54ece24c2..1006f52a3 100644 --- a/router/java/src/net/i2p/router/transport/udp/PeerState.java +++ b/router/java/src/net/i2p/router/transport/udp/PeerState.java @@ -1270,7 +1270,7 @@ class PeerState { if (_dead) return -1; synchronized (msgs) { if (_retransmitter != null) { - rv = (int)(now - _retransmitter.getNextSendTime()); + rv = (int)(_retransmitter.getNextSendTime() - now); if (rv <= 0) return 1; else diff --git a/router/java/src/net/i2p/router/transport/udp/UDPTransport.java b/router/java/src/net/i2p/router/transport/udp/UDPTransport.java index e287d1426..dead5e003 100644 --- a/router/java/src/net/i2p/router/transport/udp/UDPTransport.java +++ b/router/java/src/net/i2p/router/transport/udp/UDPTransport.java @@ -1986,8 +1986,8 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority buf.append(DataHelper.formatDuration2(idleOut)); buf.append(""); - int recvBps = (idleIn > 2 ? 0 : peer.getReceiveBps()); - int sendBps = (idleOut > 2 ? 0 : peer.getSendBps()); + int recvBps = (idleIn > 15*1000 ? 0 : peer.getReceiveBps()); + int sendBps = (idleOut > 15*1000 ? 0 : peer.getSendBps()); buf.append(""); buf.append(formatKBps(recvBps));