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.")%>
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
-
Starting Up… If you've just started I2P, the number of Active Peers indicated under the Peers Section in the sidepanel on the left should start to grow over the next few minutes and you'll see a Local Destination named Shared Clients listed at the bottom of the lefthand sidepanel and possibly other clients and servers depending on how I2P is configured
- (if not, see below). These Local Destinations provide connections on different ports (and sometimes protocols) to the I2P network enabling your bittorrent, e-mail, web proxy and other services to function.
+
Starting Up… If you've just started I2P, the number of Active Peers indicated under the Peers Section in the lefthand sidepanel should start to grow over the next few minutes and you'll also see a Local Destination named Shared Clients listed there, and possibly other clients and servers depending on how I2P is configured
+ (if not, see the troubleshooting section below). These Local Destinations provide connections on different ports (and sometimes protocols) to the I2P network enabling your bittorrent, e-mail, web proxy and other services to function.
Network integration The first time you start I2P it may take a few minutes to bootstrap (integrate) you into the network and find additional peers to optimize your integration, so please be patient. Once green stars are indicated next to your Local Destinations, there is a wide variety of things you can do with I2P, and below we introduce you to some of them.
@@ -23,13 +23,13 @@
Anonymous E-mail Postman's I2P-based mail system can be accessed either via I2P's built-in webmail (aka susimail) or using any mail client that supports smtp and pop3. Accounts can send and receive mail from the normal internet. For an account, visit hq.postman.i2p. Additionally, I2P-Bote is a new serverless, end-to-end encrypted e-mail system (with web interface) developed by HungryHobo, installable as a plugin.
-
Invisible Internet & Public Web Browsing On I2P you can host anonymous websites (aka eepsites) and other services (eg. ssh over I2p, your own IRC server etc), and you can also access the normal web anonymously via I2P. Configure your browser to use the HTTP proxy I2P provides at 127.0.0.1 port 4444, then browse to an eepsite or a normal http:// address. Below we list some of the sites hosted on I2P.
+
Invisible Internet & Public Web Browsing On I2P you can access anonymous websites (aka eepsites) and other services (eg. ssh over I2p, your own IRC server etc) in addition to being able to host your own services, and you can also access the normal web anonymously via I2P. Configure your browser to use the HTTP proxy I2P provides at 127.0.0.1 port 4444, then browse to an eepsite or a normal http:// address. Below we list some of the sites hosted on I2P.
Anonymous File Transfer I2PSnark is integrated into I2P, providing anonymous, encrypted BitTorrent transfers. In addition, Sponge develops a bittorrent client called Robert written in Python. There is also a port of eMule to I2P called iMule [Needs developers!], an anonymous, secure implementation of a Gnutella network, accessible using I2Phex, and additional facilities including browser-based file hosting etc.
-
Anonymous Chat Start your IRC client (eg. chatzilla)
- and connect to the server at 127.0.0.1 port 6668. Your local I2P IRC proxy on localhost:6668 will direct you to one of two IRC servers hosted on I2P by Postman and Badger, but neither you nor they know where the other is, and your mom, ISP or government is unable to intercept your conversation! Once you're there, #i2p, #i2p-help, #i2p-chat and #i2p-dev are just a few of the available channels you may wish to /join. There's also a I2P based instant messenger for unmonitorable, uncensorable, anonymous chat.
+
Anonymous Chat Start your IRC client (eg. Chatzilla, Pidgin, XChat)
+ and connect to the server at 127.0.0.1 port 6668. Your local I2P IRC proxy on localhost:6668 will direct you to one of two IRC servers hosted on I2P by Postman and Badger, but neither you nor they know where the other is, and your mom, ISP or government is unable to intercept your conversation! Once you're there, #i2p, #i2p-help, #i2p-chat and #i2p-dev are just a few of the available channels you may wish to /join. There's also a I2P based instant messenger for unmonitorable, uncensorable, anonymous chat.
Forums & Blogging Syndie is a distributed forum and blogging platform for I2P [Needs developers!]. There's also an I2P plugin port of the Java-based pebble blogging platform ported to I2P by zzz, available on i2plugins.i2p. And of course all normal blogging, forum and cms software will run over I2P, though you're advised to take extra precautions with security when setting up and keep all associated software (eg. Php, MySql, Python, Apache etc) up to date and locked down! Also, there are quite a few forums running on I2P in various languages; see below for some suggestions.
-
Plugins for I2P Extend the usefulness of I2P by installing plugins… blogging, chatting, filesharing and other plugins have already been written or ported and await your installation! Browse the plugins and related info at i2plugins.i2p. If you're a developer, a complete language agnostic framework for writing your own plugins is provided with documentation; I2P plugins can be coded in any language.
+
Plugins for I2P Extend the usefulness of I2P by installing plugins… blogging, chatting, filesharing and other plugins have already been written or ported and await your installation! Browse the plugins and related info at i2plugins.i2p. If you're a developer, a complete language agnostic framework for writing your own plugins is provided with documentation; I2P plugins can be coded in any language.
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
Be patient! I2P may be slow to start the first time as it searches for peers.
If, after 30 minutes, your Active: connected/recent count has less than 10 connected
- peers, you should open I2P's port on your modem, router and/or firewall(s) for better connectivity. More information on how to go about port forwarding can be found at portforward.com, in addition to our forums and irc channels listed below.
+ peers, you should open I2P's port on your modem, router and/or firewall(s) for better connectivity. More information on how to go about port forwarding can be found at portforward.com, in addition to our forums and IRC channels listed below.
Check your proxy setttings If
you cannot see any eepsites at all (even www.i2p2.i2p),
be sure your browser proxy is set to access http traffic (not https, not socks) via 127.0.0.1 port 4444. If you need some help, there's a guide to configuring your browser for I2P use, also available on the normal net.
@@ -84,5 +86,5 @@ your eepsite will be visible (but not discoverable) to others. Detailed instruct
Get Involved! I2P is developed and maintained mostly through unfunded, voluntary participation by community members. We're happy to accept donations, which go towards essential hosting and administrative costs. We have cash bounties for aspects of I2P for developers looking for incentives to participate, and we're always looking for more Java coders, translators, promoters and users to help I2P grow. For further info on how you can help visit the website. Thanks in advance!
+
Get Involved! I2P is developed and maintained mostly through unfunded, voluntary participation by community members. We're happy to accept donations, which go towards essential hosting and administrative costs. We have cash bounties for aspects of I2P for developers looking for incentives to participate, and we're always looking for more Java coders, translators, promoters and users to help I2P grow. For further info on how you can help visit the volunteers page on the website. Thanks in advance!