Compare commits

..

16 Commits

Author SHA1 Message Date
jrandom
348e845793 *cough* thanks cervantes 2005-04-06 16:38:38 +00:00
jrandom
80827c3aad * 2005-04-06 0.5.0.6 released 2005-04-06 15:43:25 +00:00
jrandom
3b4cf0a024 added 55cancri.i2p 2005-04-06 15:14:00 +00:00
jrandom
941252fd80 2005-04-05 jrandom
* Retry I2PTunnel startup if we are unable to build a socketManager for a
      client or httpclient tunnel.
    * Add some basic sanity checking on the I2CP settings (thanks duck!)
2005-04-05 22:24:32 +00:00
jrandom
bc626ece2d 2005-04-05 jrandom
* After a successfull netDb search for a leaseSet, republish it to all of
      the peers we have tried so far who did not give us the key (up to 10),
      rather than the old K closest (which may include peers who had given us
      the key)
    * Don't wait 5 minutes to publish a leaseSet (duh!), and rather than
      republish it every 5 minutes, republish it every 3.  In addition, always
      republish as soon as the leaseSet changes (duh^2).
    * Minor fix for oddball startup race (thanks travis_bickle!)
    * Minor AES update to allow in-place decryption.
2005-04-05 16:06:14 +00:00
jrandom
400feb3ba7 clarify crypto/hmac usage for simpler implementation 2005-04-05 15:28:54 +00:00
jrandom
756a4e3995 added a section for congestion control describing what I hope to implement. what
/actually/ gets implemented will be documented further once its, er, implemented
2005-04-04 17:21:30 +00:00
aum
578301240e Added constructors to PrivateKey, PublicKey, SigningPrivateKey and
SigningPublicKey, which take a single String argument and construct
the object from the Base64 data in that string (where this data is
the product of a .toBase64() call on a prior instance).
2005-04-04 06:13:50 +00:00
aum
9b8f91c7f9 Added 'toPublic()' methods to PrivateKey and SigningPrivateKey, such
that these return PublicKey and SigningPublicKey objects, respectively.
2005-04-04 06:01:13 +00:00
smeghead
c7c389d4fb added eepget wrapper script for *nix 2005-04-03 13:35:52 +00:00
smeghead
68f7adfa0b *** keyword substitution change *** 2005-04-03 13:33:29 +00:00
jrandom
c4ac5170c7 2005-04-03 jrandom
* EepGet fix for open-ended HTTP fetches (such as the news.xml
      feeding the NewsFetcher)
2005-04-03 12:50:11 +00:00
jrandom
32e0c8ac71 updated status blurb 2005-04-03 07:22:28 +00:00
jrandom
c9c1eae32f 2005-04-01 jrandom
* Allow editing I2PTunnel server instances with five digit ports
      (thanks nickless_head!)
    * More NewsFetcher debugging for reported weirdness
2005-04-01 13:29:26 +00:00
jrandom
33366cc291 2005-04-01 jrandom
* Fix to check for missing news file (thanks smeghead!)
    * Added destination display CLI:
      java -cp lib/i2p.jar net.i2p.data.Destination privKeyFilename
    * Added destination display to the web interface (thanks pnspns)
    * Installed CIA backdoor
2005-04-01 11:28:06 +00:00
jrandom
083ac1f125 n3wz0rz 2005-03-31 02:04:18 +00:00
38 changed files with 759 additions and 294 deletions

View File

@@ -209,8 +209,24 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
props.putAll(System.getProperties());
else
props.putAll(tunnel.getClientOptions());
I2PSocketManager sockManager = I2PSocketManagerFactory.createManager(tunnel.host, Integer.parseInt(tunnel.port), props);
if (sockManager == null) return null;
int portNum = 7654;
if (tunnel.port != null) {
try {
portNum = Integer.parseInt(tunnel.port);
} catch (NumberFormatException nfe) {
_log.log(Log.CRIT, "Invalid port specified [" + tunnel.port + "], reverting to " + portNum);
}
}
I2PSocketManager sockManager = null;
while (sockManager == null) {
sockManager = I2PSocketManagerFactory.createManager(tunnel.host, portNum, props);
if (sockManager == null) {
_log.log(Log.CRIT, "Unable to create socket manager");
try { Thread.sleep(10*1000); } catch (InterruptedException ie) {}
}
}
sockManager.setName("Client");
return sockManager;
}

View File

@@ -75,9 +75,18 @@ public class I2PTunnelServer extends I2PTunnelTask implements Runnable {
I2PClient client = I2PClientFactory.createClient();
Properties props = new Properties();
props.putAll(getTunnel().getClientOptions());
int portNum = 7654;
if (getTunnel().port != null) {
try {
portNum = Integer.parseInt(getTunnel().port);
} catch (NumberFormatException nfe) {
_log.log(Log.CRIT, "Invalid port specified [" + getTunnel().port + "], reverting to " + portNum);
}
}
while (sockMgr == null) {
synchronized (slock) {
sockMgr = I2PSocketManagerFactory.createManager(privData, getTunnel().host, Integer.parseInt(getTunnel().port),
sockMgr = I2PSocketManagerFactory.createManager(privData, getTunnel().host, portNum,
props);
}

View File

@@ -258,8 +258,16 @@ public class TunnelController implements Logging {
if ("localhost".equals(_tunnel.host))
_tunnel.host = "127.0.0.1";
String port = getI2CPPort();
if ( (port != null) && (port.length() > 0) )
_tunnel.port = port;
if ( (port != null) && (port.length() > 0) ) {
try {
int portNum = Integer.parseInt(port);
_tunnel.port = String.valueOf(portNum);
} catch (NumberFormatException nfe) {
_tunnel.port = "7654";
}
} else {
_tunnel.port = "7654";
}
}
public void stopTunnel() {
@@ -324,6 +332,18 @@ public class TunnelController implements Logging {
public String getTargetDestination() { return _config.getProperty("targetDestination"); }
public String getProxyList() { return _config.getProperty("proxyList"); }
public boolean getStartOnLoad() { return "true".equalsIgnoreCase(_config.getProperty("startOnLoad", "true")); }
public String getMyDestination() {
if (_tunnel != null) {
List sessions = _tunnel.getSessions();
for (int i = 0; i < sessions.size(); i++) {
I2PSession session = (I2PSession)sessions.get(i);
Destination dest = session.getMyDestination();
if (dest != null)
return dest.toBase64();
}
}
return null;
}
public boolean getIsRunning() { return _running; }
public boolean getIsStarting() { return _starting; }

View File

@@ -36,14 +36,6 @@ public class EditBean extends IndexBean {
}
}
public String getInternalType(int tunnel) {
TunnelController tun = getController(tunnel);
if (tun != null)
return tun.getType();
else
return "";
}
public String getTargetHost(int tunnel) {
TunnelController tun = getController(tunnel);
if (tun != null)

View File

@@ -311,6 +311,14 @@ public class IndexBean {
else return internalType;
}
public String getInternalType(int tunnel) {
TunnelController tun = getController(tunnel);
if (tun != null)
return tun.getType();
else
return "";
}
public String getClientInterface(int tunnel) {
TunnelController tun = getController(tunnel);
if (tun != null)
@@ -350,6 +358,19 @@ public class IndexBean {
return "";
}
public String getDestinationBase64(int tunnel) {
TunnelController tun = getController(tunnel);
if (tun != null) {
String rv = tun.getMyDestination();
if (rv != null)
return rv;
else
return "";
} else {
return "";
}
}
///
/// bean props for form submission
///
@@ -519,8 +540,10 @@ public class IndexBean {
config.setProperty("description", _description);
if (_i2cpHost != null)
config.setProperty("i2cpHost", _i2cpHost);
if (_i2cpPort != null)
if ( (_i2cpPort != null) && (_i2cpPort.trim().length() > 0) )
config.setProperty("i2cpPort", _i2cpPort);
else
config.setProperty("i2cpPort", "7654");
if (_customOptions != null) {
StringTokenizer tok = new StringTokenizer(_customOptions);

View File

@@ -77,7 +77,7 @@ if (curTunnel >= 0) {
</td>
<td>
Host: <input type="text" size="20" name="targetHost" value="<%=editBean.getTargetHost(curTunnel)%>" />
Port: <input type="text" size="4" maxlength="4" name="targetPort" value="<%=editBean.getTargetPort(curTunnel)%>" />
Port: <input type="text" size="6" maxlength="5" name="targetPort" value="<%=editBean.getTargetPort(curTunnel)%>" />
</td>
</tr>
<% String curType = editBean.getInternalType(curTunnel);
@@ -110,6 +110,10 @@ Port: <input type="text" size="4" maxlength="4" name="targetPort" value="<%=edit
</td>
</tr>
<tr>
<td valign="top" align="left"><b>Local destination:</b><br /><i>(if known)</i></td>
<td valign="top" align="left"><input type="text" size="60" value="<%=editBean.getDestinationBase64(curTunnel)%>" /></td>
</tr>
<tr>
<td colspan="2" align="center">
<b><hr size="1">
Advanced networking options<br />

View File

@@ -118,6 +118,9 @@
case IndexBean.RUNNING:
%><b><span style="color:#00dd00">Running</span></b>
<a href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&action=stop&tunnel=<%=curServer%>">[STOP]</a><%
if ("httpserver".equals(indexBean.getInternalType(curServer))) {
%> (<a href="http://<%=(new java.util.Random()).nextLong()%>.i2p/?i2paddresshelper=<%=indexBean.getDestinationBase64(curServer)%>">preview</a>)<%
}
break;
case IndexBean.NOT_RUNNING:
%><b><span style="color:#dd0000">Not Running</span></b>

View File

@@ -24,15 +24,25 @@ public class NewsFetcher implements Runnable, EepGet.StatusListener {
private boolean _updateAvailable;
private long _lastFetch;
private static NewsFetcher _instance;
public static final NewsFetcher getInstance() { return _instance; }
//public static final synchronized NewsFetcher getInstance() { return _instance; }
public static final synchronized NewsFetcher getInstance(I2PAppContext ctx) {
if (_instance != null)
return _instance;
_instance = new NewsFetcher(ctx);
return _instance;
}
private static final String NEWS_FILE = "docs/news.xml";
private static final String TEMP_NEWS_FILE = "docs/news.xml.temp";
public NewsFetcher(I2PAppContext ctx) {
private NewsFetcher(I2PAppContext ctx) {
_context = ctx;
_log = ctx.logManager().getLog(NewsFetcher.class);
_instance = this;
updateLastFetched();
}
private void updateLastFetched() {
File news = new File(NEWS_FILE);
if (news.exists())
_lastFetch = news.lastModified();
@@ -58,6 +68,7 @@ public class NewsFetcher implements Runnable, EepGet.StatusListener {
}
private boolean shouldFetchNews() {
updateLastFetched();
String freq = _context.getProperty(ConfigUpdateHandler.PROP_REFRESH_FREQUENCY);
if (freq == null)
freq = ConfigUpdateHandler.DEFAULT_REFRESH_FREQUENCY;
@@ -108,8 +119,9 @@ public class NewsFetcher implements Runnable, EepGet.StatusListener {
private static final String VERSION_STRING = "version=\"" + RouterVersion.VERSION + "\"";
private static final String VERSION_PREFIX = "version=\"";
private void checkForUpdates() {
_updateAvailable = false;
File news = new File(NEWS_FILE);
if (!news.exists()) return;
if ( (!news.exists()) || (news.length() <= 0) ) return;
FileInputStream in = null;
try {
in = new FileInputStream(news);
@@ -235,13 +247,20 @@ public class NewsFetcher implements Runnable, EepGet.StatusListener {
}
public void transferComplete(long alreadyTransferred, long bytesTransferred, long bytesRemaining, String url, String outputFile) {
if (_log.shouldLog(Log.INFO))
_log.info("News fetched from " + url);
_log.info("News fetched from " + url + " with " + (alreadyTransferred+bytesTransferred));
File temp = new File(TEMP_NEWS_FILE);
if (temp.exists()) {
boolean copied = FileUtil.copy(TEMP_NEWS_FILE, NEWS_FILE, true);
if (copied)
if (copied) {
temp.delete();
} else {
if (_log.shouldLog(Log.ERROR))
_log.error("Failed to copy the news file!");
}
} else {
if (_log.shouldLog(Log.ERROR))
_log.error("Transfer complete, but no file?");
}
checkForUpdates();
}

View File

@@ -73,7 +73,8 @@ public class RouterConsoleRunner {
t.printStackTrace();
}
I2PThread t = new I2PThread(new NewsFetcher(I2PAppContext.getGlobalContext()), "NewsFetcher");
NewsFetcher fetcher = NewsFetcher.getInstance(I2PAppContext.getGlobalContext());
I2PThread t = new I2PThread(fetcher, "NewsFetcher");
t.setDaemon(true);
t.start();
}

View File

@@ -469,6 +469,6 @@ public class SummaryHelper {
}
public boolean updateAvailable() {
return NewsFetcher.getInstance().updateAvailable();
return NewsFetcher.getInstance(_context).updateAvailable();
}
}

View File

@@ -14,8 +14,8 @@ package net.i2p;
*
*/
public class CoreVersion {
public final static String ID = "$Revision: 1.32 $ $Date: 2005/03/24 02:29:28 $";
public final static String VERSION = "0.5.0.5";
public final static String ID = "$Revision: 1.33 $ $Date: 2005/03/29 19:07:37 $";
public final static String VERSION = "0.5.0.6";
public static void main(String args[]) {
System.out.println("I2P Core version: " + VERSION);

View File

@@ -40,6 +40,19 @@ public class AESEngine {
* @param length how much data to encrypt
*/
public void encrypt(byte payload[], int payloadIndex, byte out[], int outIndex, SessionKey sessionKey, byte iv[], int length) {
encrypt(payload, payloadIndex, out, outIndex, sessionKey, iv, 0, length);
}
/** Encrypt the payload with the session key
* @param payload data to be encrypted
* @param payloadIndex index into the payload to start encrypting
* @param out where to store the result
* @param outIndex where in out to start writing
* @param sessionKey private esession key to encrypt to
* @param iv IV for CBC
* @param length how much data to encrypt
*/
public void encrypt(byte payload[], int payloadIndex, byte out[], int outIndex, SessionKey sessionKey, byte iv[], int ivOffset, int length) {
System.arraycopy(payload, payloadIndex, out, outIndex, length);
_log.warn("Warning: AES is disabled");
}
@@ -120,6 +133,19 @@ public class AESEngine {
* @param length how much data to decrypt
*/
public void decrypt(byte payload[], int payloadIndex, byte out[], int outIndex, SessionKey sessionKey, byte iv[], int length) {
decrypt(payload, payloadIndex, out, outIndex, sessionKey, iv, 0, length);
}
/** Decrypt the data with the session key
* @param payload data to be decrypted
* @param payloadIndex index into the payload to start decrypting
* @param out where to store the cleartext
* @param outIndex where in out to start writing
* @param sessionKey private session key to decrypt to
* @param iv IV for CBC
* @param length how much data to decrypt
*/
public void decrypt(byte payload[], int payloadIndex, byte out[], int outIndex, SessionKey sessionKey, byte iv[], int ivOffset, int length) {
System.arraycopy(payload, payloadIndex, out, outIndex, length);
_log.warn("Warning: AES is disabled");
}

View File

@@ -12,8 +12,10 @@ package net.i2p.crypto;
import java.security.InvalidKeyException;
import net.i2p.I2PAppContext;
import net.i2p.data.ByteArray;
import net.i2p.data.DataHelper;
import net.i2p.data.SessionKey;
import net.i2p.util.ByteCache;
import net.i2p.util.Log;
/**
@@ -31,14 +33,20 @@ public class CryptixAESEngine extends AESEngine {
private final static byte FAKE_KEY = 0x2A;
private CryptixAESKeyCache _cache;
private static final ByteCache _prevCache = ByteCache.getInstance(16, 16);
public CryptixAESEngine(I2PAppContext context) {
super(context);
_log = context.logManager().getLog(CryptixAESEngine.class);
_cache = new CryptixAESKeyCache();
}
public void encrypt(byte payload[], int payloadIndex, byte out[], int outIndex, SessionKey sessionKey, byte iv[], int length) {
if ( (payload == null) || (out == null) || (sessionKey == null) || (iv == null) || (iv.length != 16) )
encrypt(payload, payloadIndex, out, outIndex, sessionKey, iv, 0, length);
}
public void encrypt(byte payload[], int payloadIndex, byte out[], int outIndex, SessionKey sessionKey, byte iv[], int ivOffset, int length) {
if ( (payload == null) || (out == null) || (sessionKey == null) || (iv == null) )
throw new NullPointerException("invalid args to aes");
if (payload.length < payloadIndex + length)
throw new IllegalArgumentException("Payload is too short");
@@ -57,7 +65,7 @@ public class CryptixAESEngine extends AESEngine {
int numblock = length / 16;
DataHelper.xor(iv, 0, payload, payloadIndex, out, outIndex, 16);
DataHelper.xor(iv, ivOffset, payload, payloadIndex, out, outIndex, 16);
encryptBlock(out, outIndex, sessionKey, out, outIndex);
for (int x = 1; x < numblock; x++) {
DataHelper.xor(out, outIndex + (x-1) * 16, payload, payloadIndex + x * 16, out, outIndex + x * 16, 16);
@@ -66,8 +74,10 @@ public class CryptixAESEngine extends AESEngine {
}
public void decrypt(byte payload[], int payloadIndex, byte out[], int outIndex, SessionKey sessionKey, byte iv[], int length) {
if ((iv== null) || (payload == null) || (payload.length <= 0) || (sessionKey == null)
|| (iv.length != 16) )
decrypt(payload, payloadIndex, out, outIndex, sessionKey, iv, 0, length);
}
public void decrypt(byte payload[], int payloadIndex, byte out[], int outIndex, SessionKey sessionKey, byte iv[], int ivOffset, int length) {
if ((iv== null) || (payload == null) || (payload.length <= 0) || (sessionKey == null) )
throw new IllegalArgumentException("bad setup");
else if (out == null)
throw new IllegalArgumentException("out is null");
@@ -84,12 +94,32 @@ public class CryptixAESEngine extends AESEngine {
int numblock = length / 16;
if (length % 16 != 0) numblock++;
ByteArray prevA = _prevCache.acquire();
byte prev[] = prevA.getData();
ByteArray curA = _prevCache.acquire();
byte cur[] = curA.getData();
System.arraycopy(iv, ivOffset, prev, 0, 16);
for (int x = 0; x < numblock; x++) {
System.arraycopy(payload, payloadIndex + (x * 16), cur, 0, 16);
decryptBlock(payload, payloadIndex + (x * 16), sessionKey, out, outIndex + (x * 16));
DataHelper.xor(out, outIndex + x * 16, prev, 0, out, outIndex + x * 16, 16);
iv = prev; // just use IV to switch 'em around
prev = cur;
cur = iv;
}
/*
decryptBlock(payload, payloadIndex, sessionKey, out, outIndex);
DataHelper.xor(out, outIndex, iv, 0, out, outIndex, 16);
for (int x = 1; x < numblock; x++) {
decryptBlock(payload, payloadIndex + (x * 16), sessionKey, out, outIndex + (x * 16));
DataHelper.xor(out, outIndex + x * 16, payload, payloadIndex + (x - 1) * 16, out, outIndex + x * 16, 16);
}
*/
_prevCache.release(prevA);
_prevCache.release(curA);
}
public final void encryptBlock(byte payload[], int inIndex, SessionKey sessionKey, byte out[], int outIndex) {

View File

@@ -63,11 +63,20 @@ public class HMACSHA256Generator {
* Calculate the HMAC of the data with the given key
*/
public Hash calculate(SessionKey key, byte data[]) {
if ((key == null) || (key.getData() == null) || (data == null))
throw new NullPointerException("Null arguments for HMAC");
return calculate(key, data, 0, data.length);
}
/**
* Calculate the HMAC of the data with the given key
*/
public Hash calculate(SessionKey key, byte data[], int offset, int length) {
if ((key == null) || (key.getData() == null) || (data == null))
throw new NullPointerException("Null arguments for HMAC");
Buffer buf = new Buffer(data.length);
calculate(key, data, buf);
Buffer buf = new Buffer(length);
calculate(key, data, offset, length, buf);
Hash rv = new Hash(buf.rv);
buf.releaseCached();
return rv;
@@ -77,10 +86,17 @@ public class HMACSHA256Generator {
* Calculate the HMAC of the data with the given key
*/
public void calculate(SessionKey key, byte data[], Buffer buf) {
calculate(key, data, 0, data.length, buf);
}
/**
* Calculate the HMAC of the data with the given key
*/
public void calculate(SessionKey key, byte data[], int offset, int length, Buffer buf) {
// inner hash
padKey(key.getData(), _IPAD, buf.padded);
System.arraycopy(buf.padded, 0, buf.innerBuf, 0, PAD_LENGTH);
System.arraycopy(data, 0, buf.innerBuf, PAD_LENGTH, data.length);
System.arraycopy(data, offset, buf.innerBuf, PAD_LENGTH, length);
Hash h = _context.sha().calculateHash(buf.innerBuf, buf.innerEntry);

View File

@@ -76,6 +76,20 @@ public class KeyGenerator {
return keys;
}
/** Convert a PrivateKey to its corresponding PublicKey
* @param a PrivateKey object
* @return the corresponding PublicKey object
* @author aum
*/
public static PublicKey getPublicKey(PrivateKey priv) {
BigInteger a = new NativeBigInteger(priv.toByteArray());
BigInteger aalpha = CryptoConstants.elgg.modPow(a, CryptoConstants.elgp);
PublicKey pub = new PublicKey();
byte [] pubBytes = aalpha.toByteArray();
pub.setData(padBuffer(pubBytes, PublicKey.KEYSIZE_BYTES));
return pub;
}
/** Generate a pair of DSA keys, where index 0 is a SigningPublicKey, and
* index 1 is a SigningPrivateKey
* @return pair of keys
@@ -100,6 +114,20 @@ public class KeyGenerator {
return keys;
}
/** Convert a SigningPrivateKey to a SigningPublicKey
* @param a SigningPrivateKey object
* @return a SigningPublicKey object
* @author aum
*/
public static SigningPublicKey getSigningPublicKey(SigningPrivateKey priv) {
BigInteger x = new NativeBigInteger(priv.toByteArray());
BigInteger y = CryptoConstants.dsag.modPow(x, CryptoConstants.dsap);
SigningPublicKey pub = new SigningPublicKey();
byte [] pubBytes = padBuffer(y.toByteArray(), SigningPublicKey.KEYSIZE_BYTES);
pub.setData(pubBytes);
return pub;
}
/**
* Pad the buffer w/ leading 0s or trim off leading bits so the result is the
* given length.

View File

@@ -12,6 +12,7 @@ package net.i2p.data;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.FileInputStream;
import net.i2p.util.Log;
@@ -155,4 +156,22 @@ public class Destination extends DataStructureImpl {
if (__calculatedHash == null) __calculatedHash = super.calculateHash();
return __calculatedHash;
}
public static void main(String args[]) {
if (args.length == 0) {
System.err.println("Usage: Destination filename");
} else {
FileInputStream in = null;
try {
in = new FileInputStream(args[0]);
Destination d = new Destination();
d.readBytes(in);
System.out.println(d.toBase64());
} catch (Exception e) {
e.printStackTrace();
} finally {
if (in != null) try { in.close(); } catch (IOException ioe) {}
}
}
}
}

View File

@@ -14,6 +14,7 @@ import java.io.InputStream;
import java.io.OutputStream;
import net.i2p.util.Log;
import net.i2p.crypto.KeyGenerator;
/**
* Defines the PrivateKey as defined by the I2P data structure spec.
@@ -32,6 +33,16 @@ public class PrivateKey extends DataStructureImpl {
setData(null);
}
/** constructs from base64
* @param a string of base64 data (the output of .toBase64() called
* on a prior instance of PrivateKey
* @author aum
*/
public PrivateKey(String base64Data) throws DataFormatException {
this();
fromBase64(base64Data);
}
public byte[] getData() {
return _data;
}
@@ -77,4 +88,14 @@ public class PrivateKey extends DataStructureImpl {
buf.append("]");
return buf.toString();
}
/** derives a new PublicKey object derived from the secret contents
* of this PrivateKey
* @return a PublicKey object
* @author aum
*/
public PublicKey toPublic() {
return KeyGenerator.getPublicKey(this);
}
}

View File

@@ -32,6 +32,16 @@ public class PublicKey extends DataStructureImpl {
setData(null);
}
/** constructs from base64
* @param a string of base64 data (the output of .toBase64() called
* on a prior instance of PublicKey
* @author aum
*/
public PublicKey(String base64Data) throws DataFormatException {
this();
fromBase64(base64Data);
}
public byte[] getData() {
return _data;
}
@@ -76,4 +86,5 @@ public class PublicKey extends DataStructureImpl {
buf.append("]");
return buf.toString();
}
}

View File

@@ -14,6 +14,7 @@ import java.io.InputStream;
import java.io.OutputStream;
import net.i2p.util.Log;
import net.i2p.crypto.KeyGenerator;
/**
* Defines the SigningPrivateKey as defined by the I2P data structure spec.
@@ -29,9 +30,19 @@ public class SigningPrivateKey extends DataStructureImpl {
public final static int KEYSIZE_BYTES = 20;
public SigningPrivateKey() { this(null); }
public SigningPrivateKey() { this((byte[])null); }
public SigningPrivateKey(byte data[]) { setData(data); }
/** constructs from base64
* @param a string of base64 data (the output of .toBase64() called
* on a prior instance of SigningPrivateKey
* @author aum
*/
public SigningPrivateKey(String base64Data) throws DataFormatException {
this();
fromBase64(base64Data);
}
public byte[] getData() {
return _data;
}
@@ -76,4 +87,12 @@ public class SigningPrivateKey extends DataStructureImpl {
buf.append("]");
return buf.toString();
}
/** converts this signing private key to its public equivalent
* @return a SigningPublicKey object derived from this private key
* @author aum
*/
public SigningPublicKey toPublic() {
return KeyGenerator.getSigningPublicKey(this);
}
}

View File

@@ -29,9 +29,19 @@ public class SigningPublicKey extends DataStructureImpl {
public final static int KEYSIZE_BYTES = 128;
public SigningPublicKey() { this(null); }
public SigningPublicKey() { this((byte[])null); }
public SigningPublicKey(byte data[]) { setData(data); }
/** constructs from base64
* @param a string of base64 data (the output of .toBase64() called
* on a prior instance of SigningPublicKey
* @author aum
*/
public SigningPublicKey(String base64Data) throws DataFormatException {
this();
fromBase64(base64Data);
}
public byte[] getData() {
return _data;
}

View File

@@ -304,12 +304,16 @@ public class EepGet {
readHeaders();
if (_log.shouldLog(Log.DEBUG))
_log.debug("Headers read completely, reading " + _bytesRemaining);
boolean strictSize = (_bytesRemaining >= 0);
int remaining = (int)_bytesRemaining;
byte buf[] = new byte[1024];
while (_keepFetching && remaining > 0) {
while (_keepFetching && ( (remaining > 0) || !strictSize )) {
int toRead = buf.length;
int read = _proxyIn.read(buf, 0, (buf.length > remaining ? remaining : buf.length));
if (strictSize && toRead > remaining)
toRead = remaining;
int read = _proxyIn.read(buf, 0, toRead);
if (read == -1)
break;
_out.write(buf, 0, read);

View File

@@ -1,4 +1,38 @@
$Id: history.txt,v 1.182 2005/03/26 02:13:38 jrandom Exp $
$Id: history.txt,v 1.188 2005/04/05 17:24:32 jrandom Exp $
* 2005-04-06 0.5.0.6 released
2005-04-05 jrandom
* Retry I2PTunnel startup if we are unable to build a socketManager for a
client or httpclient tunnel.
* Add some basic sanity checking on the I2CP settings (thanks duck!)
2005-04-05 jrandom
* After a successfull netDb search for a leaseSet, republish it to all of
the peers we have tried so far who did not give us the key (up to 10),
rather than the old K closest (which may include peers who had given us
the key)
* Don't wait 5 minutes to publish a leaseSet (duh!), and rather than
republish it every 5 minutes, republish it every 3. In addition, always
republish as soon as the leaseSet changes (duh^2).
* Minor fix for oddball startup race (thanks travis_bickle!)
* Minor AES update to allow in-place decryption.
2005-04-03 jrandom
* EepGet fix for open-ended HTTP fetches (such as the news.xml
feeding the NewsFetcher)
2005-04-01 jrandom
* Allow editing I2PTunnel server instances with five digit ports
(thanks nickless_head!)
* More NewsFetcher debugging for reported weirdness
2005-04-01 jrandom
* Fix to check for missing news file (thanks smeghead!)
* Added destination display CLI:
java -cp lib/i2p.jar net.i2p.data.Destination privKeyFilename
* Added destination display to the web interface (thanks pnspns)
* Installed CIA backdoor
* 2005-03-29 0.5.0.5 released

View File

@@ -1,6 +1,7 @@
; TC's hosts.txt guaranteed freshness
; $Id: hosts.txt,v 1.136 2005/03/29 20:49:49 cervantes Exp $
; $Id: hosts.txt,v 1.137 2005/03/29 22:21:18 jrandom Exp $
; changelog:
; (1.159) added 55cancri.i2p
; (1.158) added tracker.fr.i2p
; (1.157) added v2mail.i2p, complication.i2p
; (1.156) added lazyguy.i2p
@@ -373,4 +374,5 @@ lazyguy.i2p=jVkB2blHl6nNSI6rLxNcim5mPrwR5vnMFBFrZRcsZxKFRjbbNBxFqJd5aZmJyykUbpYY
v2mail.i2p=FE~x8chFTUEGogpe8aaDBYES0gnm072OCMJ2M9F9Dt2MZgLsogZH8UDSPdu59QHW695-qZR5CTzSc3IZNTNlPJQRb5EjMXAIYkrvVcghaJ5-QUVhhIE8iXNwcogJclQBP-rDK~CrdXp0FloAczd~WSk48vOjApRVhZFte~GZw~rL85ZZw3-27DFZh77wc57E1y~7MKXNm5PuEF24VMowp0Qnb9WPcennJmTEqNMPSs3-vNRytAASkVN6~Ign7tApUHsvHpFcRkTiERBRDuHOpUAjBGZmBW1mQxPYqueMEKC7nZu3Pxgp3Pzxld-AOrl0wDAbg~uggoWz-edyTKylj3V9JT~4lsBbKnf2hK2LMJ4XOCqv9svlpu7E6bvQopvWy70hHzhest52OcyqhGxIkRf~jozHAYH88rRoOAW~LRtqOvCrqbkSTkT8uAvRKcZDDQGBHU8S~KBzp2Cejk1gljmQdBKCeuLJzr8uq3IgrL1J5GKcrnFENaJNd~BbLvDhAAAA
complication.i2p=oGGGEsxv4TDMS-hCGHDbzDJC6f0R~4NbrPHxPdemxBAJ8JQQR34R6NsY4ocLc-lUqftIzDs7EAR~Qtkj6ixyGgrN4S7~XdoJZQPUCtC2zfiUSeehArzDNGBe~rCF2UzT-bCCejbSG57vE4i4QzI84-c9CEUww56veR2VdCULktv32P156LWlnDO26nyZsWj88sAgcBTwxZC4Lh8ms2YnQLyVJwIRlzX1wUwh4H8nlm0buUHx3tr9raIm6Ru0ORk2LGQss1g3rEVX5hm48S2vbvG9OT5ggghfYrjyJ6CZeIJmPTTYyMJfEJAvEzdlg0YvROd4LjQ9T5DaO36cHtFUYSJPuFeCvR9AWBoGbreZfrN1Q3mJ1g7TnYFbaLYYOC2Aj9DOnZyGaGoFCt4iMP9n6kZ~ktqOrwT-b6evLucxAxfMX6uLCsnwjY5GHywT9opsxtp-XXG4j8cbtz43SBQKurI1NWBrUwLvFqLqJMzJwMLtGrPwt-mH6ysvhzqOTEIoAAAA
tracker.fr.i2p=608f0LeGqSCul8ppxGNMROY5zndsC99Xrm9x5HsySsqusoDw~7UWo41UkOM71qJpFE5XyphFmKNTtiHp7TvED-QFgRyDVQ656R3R8nMuxIO5NSkk-J7ibSYkoDI0qB0~-sWzyC0dDmoZ313ko0szuc9ORzxcejHKXftP4D4a35Q82TxWNn2jeyCf3YlkPSH3YMkJJ-2EvQxBp98vUpmWU-pN~eQdowHBIhkTxhh3jIpnv5ShHD6YeFYYEZlEHmYHHm85C9f1CryuKS2qq5owrafPUpF4ZLTuT6bOE0go8m0FYfWg0XpcP95felXN20~Fq2JQJFqz3Z9YYhfQPScsDQ4bwFH2GihltoegoNSdBp7VTxja4H-lCOQAOGW1xWTrvGuknTfJK2fSPrSbds2KgWdgqzP50ooxblBytAGWjzbkm89VtG7dn3xJBXoIjpSBp4IpIbER83pbfccvdJE9y24AOXQK-VDwmpP6ndq0QnQDNwsrxy-daAk1DRZLbGrSAAAA
55cancri.i2p=ivtLWVLaJFWDE-K8ReYgJ6~E6iBYfUd05kR95aVx2KHVgV4KUqm2Q5j5Qi2aC~KTFXtTiuxmXYD~z9KH5t2FR3kYUgRVZ4zzMMy1CJXGnc7ktDpSPkCVxbAEADTVSIMot3l6LuqoLXTZIMgJAuP1xhIuWbs5QUD2AdeXd1TUhzQFff0vWU5SGiHhtvNgvK4kgR9rpLvEJQdp2vUZGOX7WQ1wTEec6DuRujsPorKlXhj6zE-eV5a73pYF0ZREUbFBJNtLzJ2gwBbKL7qQ1zHHF4pcNXBYhSjV5nibKp6bijvjH~DcAoo-bU3dKPdmYaX4FPyQtS6IbC4CxlU5mr4oqBRFEF9HWTIRS8Ye0vAaA~QbQ03sdve~LWIL3pjcwy8XhkjE8SLsS1vhJLlIQWhyfRnasDWvu0eGnZwsZzJEoDed5MPIqc6cJfQ3GcaVtLkfrzSpGazZFTNZ69YeCvN7tUc1kSRfjXtq-qD9qE3rg7SeAHcHTihwIPkjslgOkVyCAAAA

View File

@@ -1,14 +1,14 @@
<i2p.news date="$Date: 2005/03/24 02:29:27 $">
<i2p.release version="0.5.0.5" date="2005/03/29" minVersion="0.5.0.4"
<i2p.news date="$Date: 2005/03/29 22:27:55 $">
<i2p.release version="0.5.0.6" date="2005/04/06" minVersion="0.5.0.4"
anonurl="http://i2p/NF2RLVUxVulR3IqK0sGJR0dHQcGXAzwa6rEO4WAWYXOHw-DoZhKnlbf1nzHXwMEJoex5nFTyiNMqxJMWlY54cvU~UenZdkyQQeUSBZXyuSweflUXFqKN-y8xIoK2w9Ylq1k8IcrAFDsITyOzjUKoOPfVq34rKNDo7fYyis4kT5bAHy~2N1EVMs34pi2RFabATIOBk38Qhab57Umpa6yEoE~rbyR~suDRvD7gjBvBiIKFqhFueXsR2uSrPB-yzwAGofTXuklofK3DdKspciclTVzqbDjsk5UXfu2nTrC1agkhLyqlOfjhyqC~t1IXm-Vs2o7911k7KKLGjB4lmH508YJ7G9fLAUyjuB-wwwhejoWqvg7oWvqo4oIok8LG6ECR71C3dzCvIjY2QcrhoaazA9G4zcGMm6NKND-H4XY6tUWhpB~5GefB3YczOqMbHq4wi0O9MzBFrOJEOs3X4hwboKWANf7DT5PZKJZ5KorQPsYRSq0E3wSOsFCSsdVCKUGsAAAA/i2p/i2pupdate.sud"
publicurl="http://dev.i2p.net/i2p/i2pupdate.sud"
anonannouncement="http://i2p/NF2RLVUxVulR3IqK0sGJR0dHQcGXAzwa6rEO4WAWYXOHw-DoZhKnlbf1nzHXwMEJoex5nFTyiNMqxJMWlY54cvU~UenZdkyQQeUSBZXyuSweflUXFqKN-y8xIoK2w9Ylq1k8IcrAFDsITyOzjUKoOPfVq34rKNDo7fYyis4kT5bAHy~2N1EVMs34pi2RFabATIOBk38Qhab57Umpa6yEoE~rbyR~suDRvD7gjBvBiIKFqhFueXsR2uSrPB-yzwAGofTXuklofK3DdKspciclTVzqbDjsk5UXfu2nTrC1agkhLyqlOfjhyqC~t1IXm-Vs2o7911k7KKLGjB4lmH508YJ7G9fLAUyjuB-wwwhejoWqvg7oWvqo4oIok8LG6ECR71C3dzCvIjY2QcrhoaazA9G4zcGMm6NKND-H4XY6tUWhpB~5GefB3YczOqMbHq4wi0O9MzBFrOJEOs3X4hwboKWANf7DT5PZKJZ5KorQPsYRSq0E3wSOsFCSsdVCKUGsAAAA/pipermail/i2p/March-2005/000652.html"
publicannouncement="http://dev.i2p.net/pipermail/i2p/March-2005/000662.html" />
<i2p.notes date="2005/03/29"
anonurl="http://i2p/NF2RLVUxVulR3IqK0sGJR0dHQcGXAzwa6rEO4WAWYXOHw-DoZhKnlbf1nzHXwMEJoex5nFTyiNMqxJMWlY54cvU~UenZdkyQQeUSBZXyuSweflUXFqKN-y8xIoK2w9Ylq1k8IcrAFDsITyOzjUKoOPfVq34rKNDo7fYyis4kT5bAHy~2N1EVMs34pi2RFabATIOBk38Qhab57Umpa6yEoE~rbyR~suDRvD7gjBvBiIKFqhFueXsR2uSrPB-yzwAGofTXuklofK3DdKspciclTVzqbDjsk5UXfu2nTrC1agkhLyqlOfjhyqC~t1IXm-Vs2o7911k7KKLGjB4lmH508YJ7G9fLAUyjuB-wwwhejoWqvg7oWvqo4oIok8LG6ECR71C3dzCvIjY2QcrhoaazA9G4zcGMm6NKND-H4XY6tUWhpB~5GefB3YczOqMbHq4wi0O9MzBFrOJEOs3X4hwboKWANf7DT5PZKJZ5KorQPsYRSq0E3wSOsFCSsdVCKUGsAAAA/pipermail/i2p/March-2005/000661.html"
publicurl="http://dev.i2p.net/pipermail/i2p/March-2005/000661.html"
anonlogs="http://i2p/Nf3ab-ZFkmI-LyMt7GjgT-jfvZ3zKDl0L96pmGQXF1B82W2Bfjf0n7~288vafocjFLnQnVcmZd~-p0-Oolfo9aW2Rm-AhyqxnxyLlPBqGxsJBXjPhm1JBT4Ia8FB-VXt0BuY0fMKdAfWwN61-tj4zIcQWRxv3DFquwEf035K~Ra4SWOqiuJgTRJu7~o~DzHVljVgWIzwf8Z84cz0X33pv-mdG~~y0Bsc2qJVnYwjjR178YMcRSmNE0FVMcs6f17c6zqhMw-11qjKpY~EJfHYCx4lBWF37CD0obbWqTNUIbL~78vxqZRT3dgAgnLixog9nqTO-0Rh~NpVUZnoUi7fNR~awW5U3Cf7rU7nNEKKobLue78hjvRcWn7upHUF45QqTDuaM3yZa7OsjbcH-I909DOub2Q0Dno6vIwuA7yrysccN1sbnkwZbKlf4T6~iDdhaSLJd97QCyPOlbyUfYy9QLNExlRqKgNVJcMJRrIual~Lb1CLbnzt0uvobM57UpqSAAAA/meeting135"
publiclogs="http://www.i2p.net/meeting135" />
anonannouncement="http://i2p/NF2RLVUxVulR3IqK0sGJR0dHQcGXAzwa6rEO4WAWYXOHw-DoZhKnlbf1nzHXwMEJoex5nFTyiNMqxJMWlY54cvU~UenZdkyQQeUSBZXyuSweflUXFqKN-y8xIoK2w9Ylq1k8IcrAFDsITyOzjUKoOPfVq34rKNDo7fYyis4kT5bAHy~2N1EVMs34pi2RFabATIOBk38Qhab57Umpa6yEoE~rbyR~suDRvD7gjBvBiIKFqhFueXsR2uSrPB-yzwAGofTXuklofK3DdKspciclTVzqbDjsk5UXfu2nTrC1agkhLyqlOfjhyqC~t1IXm-Vs2o7911k7KKLGjB4lmH508YJ7G9fLAUyjuB-wwwhejoWqvg7oWvqo4oIok8LG6ECR71C3dzCvIjY2QcrhoaazA9G4zcGMm6NKND-H4XY6tUWhpB~5GefB3YczOqMbHq4wi0O9MzBFrOJEOs3X4hwboKWANf7DT5PZKJZ5KorQPsYRSq0E3wSOsFCSsdVCKUGsAAAA/pipermail/i2p/April-2005/000676.html"
publicannouncement="http://dev.i2p.net/pipermail/i2p/April-2005/000676.html" />
<i2p.notes date="2005/04/06"
anonurl="http://i2p/NF2RLVUxVulR3IqK0sGJR0dHQcGXAzwa6rEO4WAWYXOHw-DoZhKnlbf1nzHXwMEJoex5nFTyiNMqxJMWlY54cvU~UenZdkyQQeUSBZXyuSweflUXFqKN-y8xIoK2w9Ylq1k8IcrAFDsITyOzjUKoOPfVq34rKNDo7fYyis4kT5bAHy~2N1EVMs34pi2RFabATIOBk38Qhab57Umpa6yEoE~rbyR~suDRvD7gjBvBiIKFqhFueXsR2uSrPB-yzwAGofTXuklofK3DdKspciclTVzqbDjsk5UXfu2nTrC1agkhLyqlOfjhyqC~t1IXm-Vs2o7911k7KKLGjB4lmH508YJ7G9fLAUyjuB-wwwhejoWqvg7oWvqo4oIok8LG6ECR71C3dzCvIjY2QcrhoaazA9G4zcGMm6NKND-H4XY6tUWhpB~5GefB3YczOqMbHq4wi0O9MzBFrOJEOs3X4hwboKWANf7DT5PZKJZ5KorQPsYRSq0E3wSOsFCSsdVCKUGsAAAA/pipermail/i2p/March-2005/000675.html"
publicurl="http://dev.i2p.net/pipermail/i2p/March-2005/000675.html"
anonlogs="http://i2p/Nf3ab-ZFkmI-LyMt7GjgT-jfvZ3zKDl0L96pmGQXF1B82W2Bfjf0n7~288vafocjFLnQnVcmZd~-p0-Oolfo9aW2Rm-AhyqxnxyLlPBqGxsJBXjPhm1JBT4Ia8FB-VXt0BuY0fMKdAfWwN61-tj4zIcQWRxv3DFquwEf035K~Ra4SWOqiuJgTRJu7~o~DzHVljVgWIzwf8Z84cz0X33pv-mdG~~y0Bsc2qJVnYwjjR178YMcRSmNE0FVMcs6f17c6zqhMw-11qjKpY~EJfHYCx4lBWF37CD0obbWqTNUIbL~78vxqZRT3dgAgnLixog9nqTO-0Rh~NpVUZnoUi7fNR~awW5U3Cf7rU7nNEKKobLue78hjvRcWn7upHUF45QqTDuaM3yZa7OsjbcH-I909DOub2Q0Dno6vIwuA7yrysccN1sbnkwZbKlf4T6~iDdhaSLJd97QCyPOlbyUfYy9QLNExlRqKgNVJcMJRrIual~Lb1CLbnzt0uvobM57UpqSAAAA/meeting136"
publiclogs="http://www.i2p.net/meeting136" />
<h1>Congratulations on getting I2P installed!</h1>
</i2p.news>

View File

@@ -4,7 +4,7 @@
<info>
<appname>i2p</appname>
<appversion>0.5.0.5</appversion>
<appversion>0.5.0.6</appversion>
<authors>
<author name="I2P" email="support@i2p.net"/>
</authors>

View File

@@ -0,0 +1,2 @@
#!/bin/sh
java -cp lib/i2p.jar net.i2p.util.EepGet $*

View File

@@ -38,6 +38,7 @@ start /b /i /d"%INSTALL_PATH%" i2prouter.bat %INSTALL_PATH%
) else (
del "%INSTALL_PATH%eepget"
del "%INSTALL_PATH%i2prouter"
:: del "%INSTALL_PATH%install_i2p_service_unix"
del "%INSTALL_PATH%install_i2p_service_winnt.bat"

View File

@@ -56,6 +56,7 @@ esac
cp $wrapperpath/wrapper.jar ./lib/
cp $wrapperpath/i2psvc .
chmod 744 ./eepget
chmod 744 ./i2psvc
chmod 744 ./scripts/i2pbench.sh
chmod 744 ./scripts/i2ptest.sh

View File

@@ -1,162 +1,162 @@
#********************************************************************
# Wrapper Properties
#********************************************************************
# Java Application
wrapper.java.command=java
# Java Main class. This class must implement the WrapperListener interface
# or guarantee that the WrapperManager class is initialized. Helper
# classes are provided to do this for you. See the Integration section
# of the documentation for details.
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
# Java Classpath (include wrapper.jar) Add class path elements as
# needed starting from 1
# i2p sdk, public domain/BSD/Cryptix
wrapper.java.classpath.1=lib/i2p.jar
# router, depends on i2p.jar, public domain
wrapper.java.classpath.2=lib/router.jar
# compiled jbigi libraries, contains static libGMP, lgpl
wrapper.java.classpath.3=lib/jbigi.jar
# sam bridge, public domain (depends on i2p.jar)
wrapper.java.classpath.4=lib/sam.jar
# ministreaming lib -interfaces for streaming, BSD (depends on i2p.jar)
wrapper.java.classpath.5=lib/mstreaming.jar
# full streaming lib, public domain (depends on mstreaming.jar, i2p.jar)
wrapper.java.classpath.6=lib/streaming.jar
# router console, public domain (depends on i2p.jar, router.jar)
wrapper.java.classpath.7=lib/routerconsole.jar
# i2ptunnel, GPL (depends on mstreaming.jar, i2p.jar)
wrapper.java.classpath.8=lib/i2ptunnel.jar
# jetty libraries (and dependencies), apache licensed
wrapper.java.classpath.9=lib/org.mortbay.jetty.jar
wrapper.java.classpath.10=lib/javax.servlet.jar
wrapper.java.classpath.11=lib/jasper-compiler.jar
wrapper.java.classpath.12=lib/jasper-runtime.jar
wrapper.java.classpath.13=lib/commons-logging.jar
wrapper.java.classpath.14=lib/commons-el.jar
wrapper.java.classpath.15=lib/ant.jar
wrapper.java.classpath.16=lib/xercesImpl.jar
# java service wrapper, BSD
wrapper.java.classpath.17=lib/wrapper.jar
# systray, LGPL
wrapper.java.classpath.18=lib/systray.jar
wrapper.java.classpath.19=lib/systray4j.jar
# Java Library Path (location of Wrapper.DLL or libwrapper.so)
wrapper.java.library.path.1=.
wrapper.java.library.path.2=lib
# Java Additional Parameters
wrapper.java.additional.1=-DloggerFilenameOverride=logs/log-router-@.txt
wrapper.java.additional.2=-Dorg.mortbay.http.Version.paranoid=true
wrapper.java.additional.3=-Dorg.mortbay.util.FileResource.checkAliases=false
# Initial Java Heap Size (in MB)
#wrapper.java.initmemory=4
# Maximum Java Heap Size (in MB)
#wrapper.java.maxmemory=32
# Application parameters. Add parameters as needed starting from 1
wrapper.app.parameter.1=net.i2p.router.Router
#********************************************************************
# Wrapper Logging Properties
#********************************************************************
# Format of output for the console. (See docs for formats)
wrapper.console.format=PM
# Log Level for console output. (See docs for log levels)
wrapper.console.loglevel=INFO
# Log file to use for wrapper output logging.
wrapper.logfile=wrapper.log
# Format of output for the log file. (See docs for formats)
wrapper.logfile.format=LPTM
# Log Level for log file output. (See docs for log levels)
wrapper.logfile.loglevel=INFO
# Maximum size that the log file will be allowed to grow to before
# the log is rolled. Size is specified in bytes. The default value
# of 0, disables log rolling. May abbreviate with the 'k' (kb) or
# 'm' (mb) suffix. For example: 10m = 10 megabytes.
wrapper.logfile.maxsize=1m
# Maximum number of rolled log files which will be allowed before old
# files are deleted. The default value of 0 implies no limit.
wrapper.logfile.maxfiles=2
# Log Level for sys/event log output. (See docs for log levels)
wrapper.syslog.loglevel=NONE
# choose what to do if the JVM kills itself based on the exit code
wrapper.on_exit.default=SHUTDOWN
wrapper.on_exit.0=SHUTDOWN
wrapper.on_exit.1=SHUTDOWN
# OOM
wrapper.on_exit.10=RESTART
# graceful shutdown
wrapper.on_exit.2=SHUTDOWN
# hard shutdown
wrapper.on_exit.3=SHUTDOWN
# hard restart
wrapper.on_exit.4=RESTART
# hard restart
wrapper.on_exit.5=RESTART
# the router may take a few seconds to save state, etc
wrapper.jvm_exit.timeout=10
# give the OS 60s to clear all the old sockets / etc before restarting
wrapper.restart.delay=60
wrapper.ping.interval=600
wrapper.ping.timeout=605
# use the wrapper's internal timer thread. otherwise this would
# force a restart of the router during daylight savings time as well
# as any time that the OS clock changes
wrapper.use_system_time=false
# pid file for the JVM
wrapper.java.pidfile=routerjvm.pid
# pid file for the service monitoring the JVM
#
# From i2prouter:
#
# PIDDIR="."
# APP_NAME="i2p"
# PIDFILE="$PIDDIR/$APP_NAME.pid"
#
# This means i2prouter looks for './i2p.pid'.
wrapper.pidfile=i2p.pid
#********************************************************************
# Wrapper NT Service Properties
#********************************************************************
# WARNING - Do not modify any of these properties when an application
# using this configuration file has been installed as a service.
# Please uninstall the service before modifying this section. The
# service can then be reinstalled.
# Name of the service
wrapper.ntservice.name=i2p
# Display name of the service
wrapper.ntservice.displayname=I2P Service
# Description of the service
wrapper.ntservice.description=The I2P router service
# Service dependencies. Add dependencies as needed starting from 1
wrapper.ntservice.dependency.1=
# Mode in which the service is installed. AUTO_START or DEMAND_START
wrapper.ntservice.starttype=AUTO_START
# Allow the service to interact with the desktop.
wrapper.ntservice.interactive=true
#********************************************************************
# Wrapper Properties
#********************************************************************
# Java Application
wrapper.java.command=java
# Java Main class. This class must implement the WrapperListener interface
# or guarantee that the WrapperManager class is initialized. Helper
# classes are provided to do this for you. See the Integration section
# of the documentation for details.
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
# Java Classpath (include wrapper.jar) Add class path elements as
# needed starting from 1
# i2p sdk, public domain/BSD/Cryptix
wrapper.java.classpath.1=lib/i2p.jar
# router, depends on i2p.jar, public domain
wrapper.java.classpath.2=lib/router.jar
# compiled jbigi libraries, contains static libGMP, lgpl
wrapper.java.classpath.3=lib/jbigi.jar
# sam bridge, public domain (depends on i2p.jar)
wrapper.java.classpath.4=lib/sam.jar
# ministreaming lib -interfaces for streaming, BSD (depends on i2p.jar)
wrapper.java.classpath.5=lib/mstreaming.jar
# full streaming lib, public domain (depends on mstreaming.jar, i2p.jar)
wrapper.java.classpath.6=lib/streaming.jar
# router console, public domain (depends on i2p.jar, router.jar)
wrapper.java.classpath.7=lib/routerconsole.jar
# i2ptunnel, GPL (depends on mstreaming.jar, i2p.jar)
wrapper.java.classpath.8=lib/i2ptunnel.jar
# jetty libraries (and dependencies), apache licensed
wrapper.java.classpath.9=lib/org.mortbay.jetty.jar
wrapper.java.classpath.10=lib/javax.servlet.jar
wrapper.java.classpath.11=lib/jasper-compiler.jar
wrapper.java.classpath.12=lib/jasper-runtime.jar
wrapper.java.classpath.13=lib/commons-logging.jar
wrapper.java.classpath.14=lib/commons-el.jar
wrapper.java.classpath.15=lib/ant.jar
wrapper.java.classpath.16=lib/xercesImpl.jar
# java service wrapper, BSD
wrapper.java.classpath.17=lib/wrapper.jar
# systray, LGPL
wrapper.java.classpath.18=lib/systray.jar
wrapper.java.classpath.19=lib/systray4j.jar
# Java Library Path (location of Wrapper.DLL or libwrapper.so)
wrapper.java.library.path.1=.
wrapper.java.library.path.2=lib
# Java Additional Parameters
wrapper.java.additional.1=-DloggerFilenameOverride=logs/log-router-@.txt
wrapper.java.additional.2=-Dorg.mortbay.http.Version.paranoid=true
wrapper.java.additional.3=-Dorg.mortbay.util.FileResource.checkAliases=false
# Initial Java Heap Size (in MB)
#wrapper.java.initmemory=4
# Maximum Java Heap Size (in MB)
#wrapper.java.maxmemory=32
# Application parameters. Add parameters as needed starting from 1
wrapper.app.parameter.1=net.i2p.router.Router
#********************************************************************
# Wrapper Logging Properties
#********************************************************************
# Format of output for the console. (See docs for formats)
wrapper.console.format=PM
# Log Level for console output. (See docs for log levels)
wrapper.console.loglevel=INFO
# Log file to use for wrapper output logging.
wrapper.logfile=wrapper.log
# Format of output for the log file. (See docs for formats)
wrapper.logfile.format=LPTM
# Log Level for log file output. (See docs for log levels)
wrapper.logfile.loglevel=INFO
# Maximum size that the log file will be allowed to grow to before
# the log is rolled. Size is specified in bytes. The default value
# of 0, disables log rolling. May abbreviate with the 'k' (kb) or
# 'm' (mb) suffix. For example: 10m = 10 megabytes.
wrapper.logfile.maxsize=1m
# Maximum number of rolled log files which will be allowed before old
# files are deleted. The default value of 0 implies no limit.
wrapper.logfile.maxfiles=2
# Log Level for sys/event log output. (See docs for log levels)
wrapper.syslog.loglevel=NONE
# choose what to do if the JVM kills itself based on the exit code
wrapper.on_exit.default=SHUTDOWN
wrapper.on_exit.0=SHUTDOWN
wrapper.on_exit.1=SHUTDOWN
# OOM
wrapper.on_exit.10=RESTART
# graceful shutdown
wrapper.on_exit.2=SHUTDOWN
# hard shutdown
wrapper.on_exit.3=SHUTDOWN
# hard restart
wrapper.on_exit.4=RESTART
# hard restart
wrapper.on_exit.5=RESTART
# the router may take a few seconds to save state, etc
wrapper.jvm_exit.timeout=10
# give the OS 60s to clear all the old sockets / etc before restarting
wrapper.restart.delay=60
wrapper.ping.interval=600
wrapper.ping.timeout=605
# use the wrapper's internal timer thread. otherwise this would
# force a restart of the router during daylight savings time as well
# as any time that the OS clock changes
wrapper.use_system_time=false
# pid file for the JVM
wrapper.java.pidfile=routerjvm.pid
# pid file for the service monitoring the JVM
#
# From i2prouter:
#
# PIDDIR="."
# APP_NAME="i2p"
# PIDFILE="$PIDDIR/$APP_NAME.pid"
#
# This means i2prouter looks for './i2p.pid'.
wrapper.pidfile=i2p.pid
#********************************************************************
# Wrapper NT Service Properties
#********************************************************************
# WARNING - Do not modify any of these properties when an application
# using this configuration file has been installed as a service.
# Please uninstall the service before modifying this section. The
# service can then be reinstalled.
# Name of the service
wrapper.ntservice.name=i2p
# Display name of the service
wrapper.ntservice.displayname=I2P Service
# Description of the service
wrapper.ntservice.description=The I2P router service
# Service dependencies. Add dependencies as needed starting from 1
wrapper.ntservice.dependency.1=
# Mode in which the service is installed. AUTO_START or DEMAND_START
wrapper.ntservice.starttype=AUTO_START
# Allow the service to interact with the desktop.
wrapper.ntservice.interactive=true

View File

@@ -1,40 +1,16 @@
<!-- this comment is filler to work around a bug in the 0.5.0.4 updater, where
** it would try to *resume* instead of overwriting the old news file. oops.
** so, to get around this, i need to babble on a bit, otherwise the
** oh-so-interesting text below wouldn't be seen by the router. still, i
** think the updater might not get the updated announcement, but perhaps it
** will. Or maybe i should put in a message telling people to delete their
** news.xml file (at least, until 0.5.0.5 is out)? hmm...
**
** ok, this is getting a bit tedious. come hither, ^C^V!
<i2p.news date="$Date: 2005/03/24 02:29:27 $">
<i2p.release version="0.5.0.5" date="2005/03/29" minVersion="0.5.0.4"
<i2p.news date="$Date: 2005/04/03 02:22:28 $">
<i2p.release version="0.5.0.6" date="2005/04/06" minVersion="0.5.0.4"
anonurl="http://i2p/NF2RLVUxVulR3IqK0sGJR0dHQcGXAzwa6rEO4WAWYXOHw-DoZhKnlbf1nzHXwMEJoex5nFTyiNMqxJMWlY54cvU~UenZdkyQQeUSBZXyuSweflUXFqKN-y8xIoK2w9Ylq1k8IcrAFDsITyOzjUKoOPfVq34rKNDo7fYyis4kT5bAHy~2N1EVMs34pi2RFabATIOBk38Qhab57Umpa6yEoE~rbyR~suDRvD7gjBvBiIKFqhFueXsR2uSrPB-yzwAGofTXuklofK3DdKspciclTVzqbDjsk5UXfu2nTrC1agkhLyqlOfjhyqC~t1IXm-Vs2o7911k7KKLGjB4lmH508YJ7G9fLAUyjuB-wwwhejoWqvg7oWvqo4oIok8LG6ECR71C3dzCvIjY2QcrhoaazA9G4zcGMm6NKND-H4XY6tUWhpB~5GefB3YczOqMbHq4wi0O9MzBFrOJEOs3X4hwboKWANf7DT5PZKJZ5KorQPsYRSq0E3wSOsFCSsdVCKUGsAAAA/i2p/i2pupdate.sud"
publicurl="http://dev.i2p.net/i2p/i2pupdate.sud"
anonannouncement="http://i2p/NF2RLVUxVulR3IqK0sGJR0dHQcGXAzwa6rEO4WAWYXOHw-DoZhKnlbf1nzHXwMEJoex5nFTyiNMqxJMWlY54cvU~UenZdkyQQeUSBZXyuSweflUXFqKN-y8xIoK2w9Ylq1k8IcrAFDsITyOzjUKoOPfVq34rKNDo7fYyis4kT5bAHy~2N1EVMs34pi2RFabATIOBk38Qhab57Umpa6yEoE~rbyR~suDRvD7gjBvBiIKFqhFueXsR2uSrPB-yzwAGofTXuklofK3DdKspciclTVzqbDjsk5UXfu2nTrC1agkhLyqlOfjhyqC~t1IXm-Vs2o7911k7KKLGjB4lmH508YJ7G9fLAUyjuB-wwwhejoWqvg7oWvqo4oIok8LG6ECR71C3dzCvIjY2QcrhoaazA9G4zcGMm6NKND-H4XY6tUWhpB~5GefB3YczOqMbHq4wi0O9MzBFrOJEOs3X4hwboKWANf7DT5PZKJZ5KorQPsYRSq0E3wSOsFCSsdVCKUGsAAAA/pipermail/i2p/March-2005/000652.html"
publicannouncement="http://dev.i2p.net/pipermail/i2p/March-2005/000662.html" />
<i2p.notes date="2005/03/29"
anonurl="http://i2p/NF2RLVUxVulR3IqK0sGJR0dHQcGXAzwa6rEO4WAWYXOHw-DoZhKnlbf1nzHXwMEJoex5nFTyiNMqxJMWlY54cvU~UenZdkyQQeUSBZXyuSweflUXFqKN-y8xIoK2w9Ylq1k8IcrAFDsITyOzjUKoOPfVq34rKNDo7fYyis4kT5bAHy~2N1EVMs34pi2RFabATIOBk38Qhab57Umpa6yEoE~rbyR~suDRvD7gjBvBiIKFqhFueXsR2uSrPB-yzwAGofTXuklofK3DdKspciclTVzqbDjsk5UXfu2nTrC1agkhLyqlOfjhyqC~t1IXm-Vs2o7911k7KKLGjB4lmH508YJ7G9fLAUyjuB-wwwhejoWqvg7oWvqo4oIok8LG6ECR71C3dzCvIjY2QcrhoaazA9G4zcGMm6NKND-H4XY6tUWhpB~5GefB3YczOqMbHq4wi0O9MzBFrOJEOs3X4hwboKWANf7DT5PZKJZ5KorQPsYRSq0E3wSOsFCSsdVCKUGsAAAA/pipermail/i2p/March-2005/000661.html"
publicurl="http://dev.i2p.net/pipermail/i2p/March-2005/000661.html"
anonlogs="http://i2p/Nf3ab-ZFkmI-LyMt7GjgT-jfvZ3zKDl0L96pmGQXF1B82W2Bfjf0n7~288vafocjFLnQnVcmZd~-p0-Oolfo9aW2Rm-AhyqxnxyLlPBqGxsJBXjPhm1JBT4Ia8FB-VXt0BuY0fMKdAfWwN61-tj4zIcQWRxv3DFquwEf035K~Ra4SWOqiuJgTRJu7~o~DzHVljVgWIzwf8Z84cz0X33pv-mdG~~y0Bsc2qJVnYwjjR178YMcRSmNE0FVMcs6f17c6zqhMw-11qjKpY~EJfHYCx4lBWF37CD0obbWqTNUIbL~78vxqZRT3dgAgnLixog9nqTO-0Rh~NpVUZnoUi7fNR~awW5U3Cf7rU7nNEKKobLue78hjvRcWn7upHUF45QqTDuaM3yZa7OsjbcH-I909DOub2Q0Dno6vIwuA7yrysccN1sbnkwZbKlf4T6~iDdhaSLJd97QCyPOlbyUfYy9QLNExlRqKgNVJcMJRrIual~Lb1CLbnzt0uvobM57UpqSAAAA/meeting135"
publiclogs="http://www.i2p.net/meeting135" />
** Bah, enough
-->
<i2p.news date="$Date: 2005/03/24 02:29:27 $">
<i2p.release version="0.5.0.5" date="2005/03/29" minVersion="0.5.0.4"
anonurl="http://i2p/NF2RLVUxVulR3IqK0sGJR0dHQcGXAzwa6rEO4WAWYXOHw-DoZhKnlbf1nzHXwMEJoex5nFTyiNMqxJMWlY54cvU~UenZdkyQQeUSBZXyuSweflUXFqKN-y8xIoK2w9Ylq1k8IcrAFDsITyOzjUKoOPfVq34rKNDo7fYyis4kT5bAHy~2N1EVMs34pi2RFabATIOBk38Qhab57Umpa6yEoE~rbyR~suDRvD7gjBvBiIKFqhFueXsR2uSrPB-yzwAGofTXuklofK3DdKspciclTVzqbDjsk5UXfu2nTrC1agkhLyqlOfjhyqC~t1IXm-Vs2o7911k7KKLGjB4lmH508YJ7G9fLAUyjuB-wwwhejoWqvg7oWvqo4oIok8LG6ECR71C3dzCvIjY2QcrhoaazA9G4zcGMm6NKND-H4XY6tUWhpB~5GefB3YczOqMbHq4wi0O9MzBFrOJEOs3X4hwboKWANf7DT5PZKJZ5KorQPsYRSq0E3wSOsFCSsdVCKUGsAAAA/i2p/i2pupdate.sud"
publicurl="http://dev.i2p.net/i2p/i2pupdate.sud"
anonannouncement="http://i2p/NF2RLVUxVulR3IqK0sGJR0dHQcGXAzwa6rEO4WAWYXOHw-DoZhKnlbf1nzHXwMEJoex5nFTyiNMqxJMWlY54cvU~UenZdkyQQeUSBZXyuSweflUXFqKN-y8xIoK2w9Ylq1k8IcrAFDsITyOzjUKoOPfVq34rKNDo7fYyis4kT5bAHy~2N1EVMs34pi2RFabATIOBk38Qhab57Umpa6yEoE~rbyR~suDRvD7gjBvBiIKFqhFueXsR2uSrPB-yzwAGofTXuklofK3DdKspciclTVzqbDjsk5UXfu2nTrC1agkhLyqlOfjhyqC~t1IXm-Vs2o7911k7KKLGjB4lmH508YJ7G9fLAUyjuB-wwwhejoWqvg7oWvqo4oIok8LG6ECR71C3dzCvIjY2QcrhoaazA9G4zcGMm6NKND-H4XY6tUWhpB~5GefB3YczOqMbHq4wi0O9MzBFrOJEOs3X4hwboKWANf7DT5PZKJZ5KorQPsYRSq0E3wSOsFCSsdVCKUGsAAAA/pipermail/i2p/March-2005/000652.html"
publicannouncement="http://dev.i2p.net/pipermail/i2p/March-2005/000662.html" />
<i2p.notes date="2005/03/29"
anonurl="http://i2p/NF2RLVUxVulR3IqK0sGJR0dHQcGXAzwa6rEO4WAWYXOHw-DoZhKnlbf1nzHXwMEJoex5nFTyiNMqxJMWlY54cvU~UenZdkyQQeUSBZXyuSweflUXFqKN-y8xIoK2w9Ylq1k8IcrAFDsITyOzjUKoOPfVq34rKNDo7fYyis4kT5bAHy~2N1EVMs34pi2RFabATIOBk38Qhab57Umpa6yEoE~rbyR~suDRvD7gjBvBiIKFqhFueXsR2uSrPB-yzwAGofTXuklofK3DdKspciclTVzqbDjsk5UXfu2nTrC1agkhLyqlOfjhyqC~t1IXm-Vs2o7911k7KKLGjB4lmH508YJ7G9fLAUyjuB-wwwhejoWqvg7oWvqo4oIok8LG6ECR71C3dzCvIjY2QcrhoaazA9G4zcGMm6NKND-H4XY6tUWhpB~5GefB3YczOqMbHq4wi0O9MzBFrOJEOs3X4hwboKWANf7DT5PZKJZ5KorQPsYRSq0E3wSOsFCSsdVCKUGsAAAA/pipermail/i2p/March-2005/000661.html"
publicurl="http://dev.i2p.net/pipermail/i2p/March-2005/000661.html"
anonlogs="http://i2p/Nf3ab-ZFkmI-LyMt7GjgT-jfvZ3zKDl0L96pmGQXF1B82W2Bfjf0n7~288vafocjFLnQnVcmZd~-p0-Oolfo9aW2Rm-AhyqxnxyLlPBqGxsJBXjPhm1JBT4Ia8FB-VXt0BuY0fMKdAfWwN61-tj4zIcQWRxv3DFquwEf035K~Ra4SWOqiuJgTRJu7~o~DzHVljVgWIzwf8Z84cz0X33pv-mdG~~y0Bsc2qJVnYwjjR178YMcRSmNE0FVMcs6f17c6zqhMw-11qjKpY~EJfHYCx4lBWF37CD0obbWqTNUIbL~78vxqZRT3dgAgnLixog9nqTO-0Rh~NpVUZnoUi7fNR~awW5U3Cf7rU7nNEKKobLue78hjvRcWn7upHUF45QqTDuaM3yZa7OsjbcH-I909DOub2Q0Dno6vIwuA7yrysccN1sbnkwZbKlf4T6~iDdhaSLJd97QCyPOlbyUfYy9QLNExlRqKgNVJcMJRrIual~Lb1CLbnzt0uvobM57UpqSAAAA/meeting135"
publiclogs="http://www.i2p.net/meeting135" />
<b>I2P news online!</b> For those still on 0.5.0.4, please update ASAP. If you
don't see a link to update with, delete the docs/news.xml file and wait 10
minutes. Otherwise, swing on by the website to download it.<br />
anonannouncement="http://i2p/NF2RLVUxVulR3IqK0sGJR0dHQcGXAzwa6rEO4WAWYXOHw-DoZhKnlbf1nzHXwMEJoex5nFTyiNMqxJMWlY54cvU~UenZdkyQQeUSBZXyuSweflUXFqKN-y8xIoK2w9Ylq1k8IcrAFDsITyOzjUKoOPfVq34rKNDo7fYyis4kT5bAHy~2N1EVMs34pi2RFabATIOBk38Qhab57Umpa6yEoE~rbyR~suDRvD7gjBvBiIKFqhFueXsR2uSrPB-yzwAGofTXuklofK3DdKspciclTVzqbDjsk5UXfu2nTrC1agkhLyqlOfjhyqC~t1IXm-Vs2o7911k7KKLGjB4lmH508YJ7G9fLAUyjuB-wwwhejoWqvg7oWvqo4oIok8LG6ECR71C3dzCvIjY2QcrhoaazA9G4zcGMm6NKND-H4XY6tUWhpB~5GefB3YczOqMbHq4wi0O9MzBFrOJEOs3X4hwboKWANf7DT5PZKJZ5KorQPsYRSq0E3wSOsFCSsdVCKUGsAAAA/pipermail/i2p/April-2005/000676.html"
publicannouncement="http://dev.i2p.net/pipermail/i2p/April-2005/000676.html" />
<i2p.notes date="2005/04/06"
anonurl="http://i2p/NF2RLVUxVulR3IqK0sGJR0dHQcGXAzwa6rEO4WAWYXOHw-DoZhKnlbf1nzHXwMEJoex5nFTyiNMqxJMWlY54cvU~UenZdkyQQeUSBZXyuSweflUXFqKN-y8xIoK2w9Ylq1k8IcrAFDsITyOzjUKoOPfVq34rKNDo7fYyis4kT5bAHy~2N1EVMs34pi2RFabATIOBk38Qhab57Umpa6yEoE~rbyR~suDRvD7gjBvBiIKFqhFueXsR2uSrPB-yzwAGofTXuklofK3DdKspciclTVzqbDjsk5UXfu2nTrC1agkhLyqlOfjhyqC~t1IXm-Vs2o7911k7KKLGjB4lmH508YJ7G9fLAUyjuB-wwwhejoWqvg7oWvqo4oIok8LG6ECR71C3dzCvIjY2QcrhoaazA9G4zcGMm6NKND-H4XY6tUWhpB~5GefB3YczOqMbHq4wi0O9MzBFrOJEOs3X4hwboKWANf7DT5PZKJZ5KorQPsYRSq0E3wSOsFCSsdVCKUGsAAAA/pipermail/i2p/March-2005/000675.html"
publicurl="http://dev.i2p.net/pipermail/i2p/March-2005/000675.html"
anonlogs="http://i2p/Nf3ab-ZFkmI-LyMt7GjgT-jfvZ3zKDl0L96pmGQXF1B82W2Bfjf0n7~288vafocjFLnQnVcmZd~-p0-Oolfo9aW2Rm-AhyqxnxyLlPBqGxsJBXjPhm1JBT4Ia8FB-VXt0BuY0fMKdAfWwN61-tj4zIcQWRxv3DFquwEf035K~Ra4SWOqiuJgTRJu7~o~DzHVljVgWIzwf8Z84cz0X33pv-mdG~~y0Bsc2qJVnYwjjR178YMcRSmNE0FVMcs6f17c6zqhMw-11qjKpY~EJfHYCx4lBWF37CD0obbWqTNUIbL~78vxqZRT3dgAgnLixog9nqTO-0Rh~NpVUZnoUi7fNR~awW5U3Cf7rU7nNEKKobLue78hjvRcWn7upHUF45QqTDuaM3yZa7OsjbcH-I909DOub2Q0Dno6vIwuA7yrysccN1sbnkwZbKlf4T6~iDdhaSLJd97QCyPOlbyUfYy9QLNExlRqKgNVJcMJRrIual~Lb1CLbnzt0uvobM57UpqSAAAA/meeting136"
publiclogs="http://www.i2p.net/meeting136" />
<b>0.5.0.6 release available!</b> Thanks everyone for upgrading to 0.5.0.5 so
quickly - this new 0.5.0.6 should help out with eepsite reliability
substantially, fixing several major bugs in the netDb operation. <br />
</i2p.news>

View File

@@ -1,4 +1,4 @@
<code>$Id: udp.html,v 1.6 2005/03/27 17:08:16 jrandom Exp $</code>
<code>$Id: udp.html,v 1.8 2005/04/04 12:21:30 jrandom Exp $</code>
<h1>Secure Semireliable UDP (SSU)</h1>
<b>DRAFT</b>
@@ -48,7 +48,8 @@ key. The specific construct of the MAC is the first 16 bytes from:</p>
<p>The payload itself is AES256/CBC encrypted with the IV and the
sessionKey, with replay prevention addressed within its body,
explained below.</p>
explained below. The payloadLength in the MAC is a 2 byte unsigned
integer in 2s complement.</p>
<h2><a name="payload">Payload</a></h2>
@@ -136,14 +137,17 @@ around briefly, to address packet loss and reordering.</p>
<li>1 byte IP address size</li>
<li>that many byte representation of Alice's IP address</li>
<li>2 byte port number (unsigned, big endian 2s complement)</li>
<li>0-15 pad bytes to reach the 16 byte boundary</li>
<li>4 byte relay tag which Alice can publish (else 0x0)</li>
<li>40 byte DSA signature of the critical exchanged data</li>
<li>40 byte DSA signature of the critical exchanged data, encrypted
with another layer of encryption using the negotiated sessionKey.
The IV is reused here (but with the sessionKey, not the introKey).</li>
<li>8 bytes padding, encrypted with an additional layer of encryption
using the negotiated session key as part of the DSA block</li>
<li>N bytes, currently uninterpreted (later, for challenges)</li>
</ul></td></tr>
<tr><td align="right" valign="top"><b>Key used:</b></td>
<td>introKey for the data through the pad bytes, and the
sessionKey for the DSA signature</td></tr>
<td>introKey, with an additional layer of encryption over the 40 byte
signature and the following 8 bytes padding.</td></tr>
</table>
<pre>
@@ -155,18 +159,21 @@ around briefly, to address packet loss and reordering.</p>
+----+----+----+----+----+----+----+----+
|size| that many byte IP address (4-16) |
+----+----+----+----+----+----+----+----+
| Port (A)| (pad to 16 byte boundary) |
| Port (A)| public relay tag | |
+----+----+----+----+----+----+ |
| DSA signature |
| |
| |
| |
| +----+----+
| |
+----+----+----+----+----+----+----+----+
| public relay tag | DSA signature |
+----+----+----+----+ |
(8 bytes of padding) | |
+----+----+----+----+----+----+ |
| arbitrary amount |
| of uninterpreted data |
. . .
| |
| |
| |
| |
+ +----+----+----+----+
| | arbitrary amount |
+----+----+----+----+ |
| of uninterpreted data |
+----+----+----+----+----+----+----+----+
</pre>
@@ -328,9 +335,11 @@ bits 4-7: total identity fragments</pre></li>
bit 0: explicit ACKs included
bit 1: explicit NACKs included
bit 2: numACKs included
bits 3-4: reserved for congestion control
bit 3: explicit congestion notification
bit 4: request previous ACKs
bit 5: want reply
bits 6-7: reserved</pre></li>
bit 6: extended data included
bit 7: reserved</pre></li>
<li>if explicit ACKs are included:<ul>
<li>a 1 byte number of ACKs</li>
<li>that many 4 byte MessageIds being fully ACKed</li>
@@ -342,6 +351,9 @@ bits 6-7: reserved</pre></li>
<li>if numACKs included:<ul>
<li>a 2 byte number for how many messages were fully
received in the last minute.</li></ul></li>
<li>If extended data included:<ul>
<li>1 byte data size</li>
<li>that many bytes of extended data (currently uninterpreted)</li</ul></li>
<li>1 byte number of fragments</li>
<li>that many message fragments:<ul>
<li>4 byte messageId</li>
@@ -387,6 +399,99 @@ bits 6-7: unused</pre></li>
+----+----+----+----+----+----+----+----+
</pre>
<h2><a name="congestioncontrol">Congestion control</a></h2>
<p>SSU's need for only semireliable delivery, TCP-friendly operation,
and the capacity for high throughput allows a great deal of latitude in
congestion control. The congestion control algorithm outlined below is
meant to be both efficient in bandwidth as well as simple to implement.</p>
<p>Data is transmitted in volleys of up to 1 second, sending N bytes within
P packets. The volley a packet is a part of is defined by the second field
in the encrypted <a href="#payload">payload</a>. The receiver of a volley
should send back a full set of ACKs and NACKs for message IDs received in
the previous volley - these ACKs and NACKs should be included in all messages
sent until either the volley changes again or the the receiver gets a message
in the current volley stating that the previous ACKs are no longer required.
Subsequent responses from the receiver in the current volley should not
contain the ACKs.</p>
<p>After receiving a volley with at least one data message fragment, the
receiver should send back at least one message with the ACKs. Each time
subsequent messages arrive on the current volley with the "request previous
ACKs" flag set, if no messages in the current volley have arrived without
that being set the receiver should send back a data message with the ACKs,
if the receiver has the bandwidth to do so.</p>
<p>The number of bytes sent in each volley (N) should be initialized as
8192 bytes (an arbitrarily high value). At the beginning of a volley, if
the ACKs/NACKs received for the volley two periods back contain any NACKs,
N should be set to the minimum of N and the number of bytes fully ACKed,
though no less than 1/2 of N. If there were no NACKs and all of the
messages sent were ACKed, N is increased by the average packet size. If
a message is received in a volley with the explicit congestion
notification bit set, at the beginning of the next volley N is set to
1/2 N.</p>
<p>Messages which are partially sent or NACKed have the unsent fragments
transmitted in the next volley, unless the message expiration occurs, in
which case it is dropped entirely.</p>
<p>The simplest possible implementation does not need to pad the packets to
any particular size, but instead just places a single message fragment into
a packet and sends it off (careful not to exceed the MTU). A more efficient
strategy would be to bundle multiple message fragments into the same packet,
so long as it doesn't exceed the MTU, but this is not necessary. Eventually,
a set of fixed packet sizes may be appropriate to further hide the data
fragmentation to external adversaries, but the tunnel, garlic, and end to
end padding should be sufficient for most needs until then.</p>
<h3><a name="congestionscenarios">Congestion scenarios</a></h3>
<b>Unidirectional transfer</b><br />
<pre>
Alice Bob
Data 1, volley 1, no ACKs---------&gt;
Data 2, volley 1, no ACKs---------&gt;
Data 3, volley 1, no ACKs---------&gt;
Data 4, volley 1, no ACKs---------&gt;
Data 5, volley 2, want ACKs-------&gt;
Data 6, volley 2, want ACKs-------&gt; // want ACK since ACKs not received
&lt;------------------ACK 1, 2, 3, 4 // automatically sent
&lt;------------------ACK 1, 2, 3, 4 // sent due to Data 6
Data 7, volley 2, no ACKs---------&gt; // no further ACKs required
Data 8, volley 2, no ACKs---------&gt;
Data 9, volley 3, want ACKs-------&gt; // new volley, we want ACKs!
&lt;------------------ACK 5, 6, 7, 8 // automatically sent
Data 10, volley 3, no ACKs---------&gt;
Data 11, volley 3, no ACKs---------&gt;
Data 12, volley 3, no ACKs---------&gt;
&lt;------------------ACK 9, 10, 11, 12 // automatically sent
</pre>
<b>Bidirectional transfer</b><br />
<pre>
Alice Bob
Data 1, volley 1, no ACKs-------------------------&gt;
&lt;-----------------------------Data 1, volley 1, no ACKs
Data 2, volley 1, no ACKs-------------------------&gt;
&lt;-----------------------------Data 2, volley 1, no ACKs
Data 3, volley 1, no ACKs-------------------------&gt;
&lt;-----------------------------Data 3, volley 1, no ACKs
Data 4, volley 1, no ACKs-------------------------&gt;
&lt;-----------------------------Data 4, volley 1, no ACKs
Data 5, volley 2, want ACKs, ACK 1, 2, 3, 4-------&gt; // new volley, send ACKs
&lt;---------------Data 5, volley 2, no ACKs, ACK 1, 2, 3, 4 // received ACKs, no need to ask for them
Data 6, volley 2, no ACKs-------------------------&gt;
&lt;-----------------------------Data 6, volley 2, no ACKs
Data 7, volley 2, no ACKs-------------------------&gt;
&lt;-----------------------------Data 8, volley 2, no ACKs
Data 8, volley 2, no ACKs-------------------------&gt;
&lt;-----------------------------Data 9, volley 2, no ACKs
ACK 5, 6, 7, 8, 9---------------------------------&gt;
&lt;-----------------------------------ACK 5, 6, 7, 8
</pre>
<h2><a name="keys">Keys</a></h2>
<p>All encryption used is AES256/CBC with 32 byte keys and 16 byte IVs.

View File

@@ -15,8 +15,8 @@ import net.i2p.CoreVersion;
*
*/
public class RouterVersion {
public final static String ID = "$Revision: 1.175 $ $Date: 2005/03/26 02:13:38 $";
public final static String VERSION = "0.5.0.5";
public final static String ID = "$Revision: 1.182 $ $Date: 2005/04/06 10:43:25 $";
public final static String VERSION = "0.5.0.6";
public final static long BUILD = 0;
public static void main(String args[]) {
System.out.println("I2P Router version: " + VERSION);

View File

@@ -288,8 +288,10 @@ public class OutboundClientMessageOneShotJob extends JobImpl {
getContext().statManager().addRateData("client.leaseSetFailedRemoteTime", lookupTime, lookupTime);
}
if (_log.shouldLog(Log.ERROR))
_log.error("Unable to send to " + _toString + " because we couldn't find their leaseSet");
if (!_finished) {
if (_log.shouldLog(Log.WARN))
_log.warn("Unable to send to " + _toString + " because we couldn't find their leaseSet");
}
dieFatal();
}

View File

@@ -65,12 +65,12 @@ public class KademliaNetworkDatabaseFacade extends NetworkDatabaseFacade {
private PeerSelector _peerSelector;
private RouterContext _context;
/**
* set of Hash objects of leases we're already managing (via RepublishLeaseSetJob).
* Map of Hash to RepublishLeaseSetJob for leases we'realready managing.
* This is added to when we create a new RepublishLeaseSetJob, and the values are
* removed when the job decides to stop running.
*
*/
private Set _publishingLeaseSets;
private Map _publishingLeaseSets;
/**
* Hash of the key currently being searched for, pointing the SearchJob that
@@ -126,7 +126,7 @@ public class KademliaNetworkDatabaseFacade extends NetworkDatabaseFacade {
_log = _context.logManager().getLog(KademliaNetworkDatabaseFacade.class);
_initialized = false;
_peerSelector = new PeerSelector(_context);
_publishingLeaseSets = new HashSet(8);
_publishingLeaseSets = new HashMap(8);
_lastExploreNew = 0;
_knownRouters = 0;
_activeRequests = new HashMap(8);
@@ -440,14 +440,16 @@ public class KademliaNetworkDatabaseFacade extends NetworkDatabaseFacade {
synchronized (_explicitSendKeys) {
_explicitSendKeys.add(h);
}
Job j = null;
RepublishLeaseSetJob j = null;
synchronized (_publishingLeaseSets) {
boolean isNew = _publishingLeaseSets.add(h);
if (isNew)
j = (RepublishLeaseSetJob)_publishingLeaseSets.get(h);
if (j == null) {
j = new RepublishLeaseSetJob(_context, this, h);
_publishingLeaseSets.put(h, j);
}
}
if (j != null)
_context.jobQueue().addJob(j);
j.getTiming().setStartAfter(_context.clock().now());
_context.jobQueue().addJob(j);
}
void stopPublishing(Hash target) {

View File

@@ -22,7 +22,7 @@ import net.i2p.util.Log;
*/
public class RepublishLeaseSetJob extends JobImpl {
private Log _log;
private final static long REPUBLISH_LEASESET_DELAY = 5*60*1000; // 5 mins
private final static long REPUBLISH_LEASESET_DELAY = 3*60*1000; // 3 mins
private final static long REPUBLISH_LEASESET_TIMEOUT = 60*1000;
private Hash _dest;
private KademliaNetworkDatabaseFacade _facade;
@@ -32,7 +32,7 @@ public class RepublishLeaseSetJob extends JobImpl {
_log = ctx.logManager().getLog(RepublishLeaseSetJob.class);
_facade = facade;
_dest = destHash;
getTiming().setStartAfter(ctx.clock().now()+REPUBLISH_LEASESET_DELAY);
//getTiming().setStartAfter(ctx.clock().now()+REPUBLISH_LEASESET_DELAY);
}
public String getName() { return "Republish a local leaseSet"; }
public void runJob() {
@@ -40,23 +40,29 @@ public class RepublishLeaseSetJob extends JobImpl {
if (getContext().clientManager().isLocal(_dest)) {
LeaseSet ls = _facade.lookupLeaseSetLocally(_dest);
if (ls != null) {
_log.warn("Client " + _dest + " is local, so we're republishing it");
if (_log.shouldLog(Log.INFO))
_log.info("Client " + _dest + " is local, so we're republishing it");
if (!ls.isCurrent(Router.CLOCK_FUDGE_FACTOR)) {
_log.warn("Not publishing a LOCAL lease that isn't current - " + _dest, new Exception("Publish expired LOCAL lease?"));
if (_log.shouldLog(Log.WARN))
_log.warn("Not publishing a LOCAL lease that isn't current - " + _dest, new Exception("Publish expired LOCAL lease?"));
} else {
getContext().jobQueue().addJob(new StoreJob(getContext(), _facade, _dest, ls, new OnSuccess(getContext()), new OnFailure(getContext()), REPUBLISH_LEASESET_TIMEOUT));
}
} else {
_log.warn("Client " + _dest + " is local, but we can't find a valid LeaseSet? perhaps its being rebuilt?");
if (_log.shouldLog(Log.WARN))
_log.warn("Client " + _dest + " is local, but we can't find a valid LeaseSet? perhaps its being rebuilt?");
}
requeue(REPUBLISH_LEASESET_DELAY);
long republishDelay = getContext().random().nextLong(2*REPUBLISH_LEASESET_DELAY);
requeue(republishDelay);
return;
} else {
_log.info("Client " + _dest + " is no longer local, so no more republishing their leaseSet");
if (_log.shouldLog(Log.INFO))
_log.info("Client " + _dest + " is no longer local, so no more republishing their leaseSet");
}
_facade.stopPublishing(_dest);
} catch (RuntimeException re) {
_log.error("Uncaught error republishing the leaseSet", re);
if (_log.shouldLog(Log.ERROR))
_log.error("Uncaught error republishing the leaseSet", re);
_facade.stopPublishing(_dest);
throw re;
}

View File

@@ -16,10 +16,12 @@ import java.util.Set;
import net.i2p.data.DataHelper;
import net.i2p.data.DataStructure;
import net.i2p.data.Hash;
import net.i2p.data.LeaseSet;
import net.i2p.data.RouterInfo;
import net.i2p.data.TunnelId;
import net.i2p.data.i2np.DatabaseLookupMessage;
import net.i2p.data.i2np.DatabaseSearchReplyMessage;
import net.i2p.data.i2np.DatabaseStoreMessage;
import net.i2p.router.Job;
import net.i2p.router.JobImpl;
import net.i2p.router.RouterContext;
@@ -97,6 +99,7 @@ class SearchJob extends JobImpl {
getContext().statManager().createRateStat("netDb.searchReplyValidated", "How many search replies we get that we are able to validate (fetch)", "NetworkDatabase", new long[] { 5*60*1000l, 10*60*1000l, 60*60*1000l, 3*60*60*1000l, 24*60*60*1000l });
getContext().statManager().createRateStat("netDb.searchReplyNotValidated", "How many search replies we get that we are NOT able to validate (fetch)", "NetworkDatabase", new long[] { 5*60*1000l, 10*60*1000l, 60*60*1000l, 3*60*60*1000l, 24*60*60*1000l });
getContext().statManager().createRateStat("netDb.searchReplyValidationSkipped", "How many search replies we get from unreliable peers that we skip?", "NetworkDatabase", new long[] { 5*60*1000l, 10*60*1000l, 60*60*1000l, 3*60*60*1000l, 24*60*60*1000l });
getContext().statManager().createRateStat("netDb.republishQuantity", "How many peers do we need to send a found leaseSet to?", "NetworkDatabase", new long[] { 10*60*1000l, 60*60*1000l, 3*60*60*1000l, 24*60*60*1000l });
if (_log.shouldLog(Log.DEBUG))
_log.debug("Search (" + getClass().getName() + " for " + key.toBase64(), new Exception("Search enqueued by"));
}
@@ -204,8 +207,12 @@ class SearchJob extends JobImpl {
+ peer + " : " + (ds == null ? "null" : ds.getClass().getName()));
_state.replyTimeout(peer);
} else {
sendSearch((RouterInfo)ds);
sent++;
if (getContext().shitlist().isShitlisted(peer)) {
// dont bother
} else {
sendSearch((RouterInfo)ds);
sent++;
}
}
}
if (sent <= 0) {
@@ -582,6 +589,15 @@ class SearchJob extends JobImpl {
resend();
}
/**
* After a successful search for a leaseSet, we resend that leaseSet to all
* of the peers we tried and failed to query. This var bounds how many of
* those peers will get the data, in case a search had to crawl about
* substantially.
*
*/
private static final int MAX_LEASE_RESEND = 10;
/**
* After we get the data we were searching for, rebroadcast it to the peers
* we would query first if we were to search for it again (healing the network).
@@ -589,12 +605,54 @@ class SearchJob extends JobImpl {
*/
private void resend() {
DataStructure ds = _facade.lookupLeaseSetLocally(_state.getTarget());
if (ds == null)
if (ds == null) {
ds = _facade.lookupRouterInfoLocally(_state.getTarget());
if (ds != null)
getContext().jobQueue().addJob(new StoreJob(getContext(), _facade, _state.getTarget(),
ds, null, null, RESEND_TIMEOUT,
_state.getSuccessful()));
if (ds != null)
getContext().jobQueue().addJob(new StoreJob(getContext(), _facade, _state.getTarget(),
ds, null, null, RESEND_TIMEOUT,
_state.getSuccessful()));
} else {
Set sendTo = _state.getFailed();
sendTo.addAll(_state.getPending());
int numSent = 0;
for (Iterator iter = sendTo.iterator(); iter.hasNext(); ) {
Hash peer = (Hash)iter.next();
RouterInfo peerInfo = _facade.lookupRouterInfoLocally(peer);
if (peerInfo == null) continue;
if (resend(peerInfo, (LeaseSet)ds))
numSent++;
if (numSent >= MAX_LEASE_RESEND)
break;
}
getContext().statManager().addRateData("netDb.republishQuantity", numSent, numSent);
}
}
/**
* Resend the leaseSet to the peer who had previously failed to
* provide us with the data when we asked them.
*/
private boolean resend(RouterInfo toPeer, LeaseSet ls) {
DatabaseStoreMessage msg = new DatabaseStoreMessage(getContext());
msg.setKey(ls.getDestination().calculateHash());
msg.setLeaseSet(ls);
msg.setMessageExpiration(getContext().clock().now() + RESEND_TIMEOUT);
TunnelInfo outTunnel = getContext().tunnelManager().selectOutboundTunnel();
if (outTunnel != null) {
TunnelId targetTunnelId = null; // not needed
Job onSend = null; // not wanted
if (_log.shouldLog(Log.DEBUG))
_log.debug("resending leaseSet out to " + toPeer.getIdentity().getHash() + " through " + outTunnel + ": " + msg);
getContext().tunnelDispatcher().dispatchOutbound(msg, outTunnel.getSendTunnelId(0), null, toPeer.getIdentity().getHash());
return true;
} else {
if (_log.shouldLog(Log.WARN))
_log.warn("unable to resend a leaseSet - no outbound exploratory tunnels!");
return false;
}
}
/**

View File

@@ -475,7 +475,7 @@ public class TunnelPool {
int added = refreshBuilders();
if ( (added > 0) && (_log.shouldLog(Log.WARN)) )
_log.warn("Passive rebuilding a tunnel for " + TunnelPool.this.toString());
requeue(60*1000);
requeue(30*1000);
}
}
}

View File

@@ -267,8 +267,13 @@ public class TunnelPoolManager implements TunnelManagerFacade {
*/
int allocateBuilds(int wanted) {
synchronized (this) {
if (_outstandingBuilds >= _maxOutstandingBuilds)
if (_outstandingBuilds >= _maxOutstandingBuilds) {
// ok, as a failsafe, always let one through
// nah, its failsafe for a reason. fix the cause.
//_outstandingBuilds++;
//return 1;
return 0;
}
if (_outstandingBuilds + wanted < _maxOutstandingBuilds) {
_outstandingBuilds += wanted;
return wanted;