2005-03-04 jrandom
* Filter HTTP response headers in the eepproxy, forcing Connection: close so that broken (/malicious) webservers can't allow persistent connections. All HTTP compliant browsers should now always close the socket. * Enabled the GZIPInputStream's cache (they were'nt cached before) * Make sure our first send is always a SYN (duh) * Workaround for some buggy compilers
This commit is contained in:
@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
|
||||
*
|
||||
*/
|
||||
public class RouterVersion {
|
||||
public final static String ID = "$Revision: 1.157 $ $Date: 2005/03/02 22:36:53 $";
|
||||
public final static String ID = "$Revision: 1.158 $ $Date: 2005/03/04 01:09:20 $";
|
||||
public final static String VERSION = "0.5.0.1";
|
||||
public final static long BUILD = 9;
|
||||
public final static long BUILD = 10;
|
||||
public static void main(String args[]) {
|
||||
System.out.println("I2P Router version: " + VERSION);
|
||||
System.out.println("Router ID: " + RouterVersion.ID);
|
||||
|
@ -27,7 +27,7 @@ public class InboundGatewayReceiver implements TunnelGateway.Receiver {
|
||||
if (_target == null) {
|
||||
ReceiveJob j = null;
|
||||
if (!alreadySearched)
|
||||
j = new ReceiveJob(encrypted);
|
||||
j = new ReceiveJob(_context, encrypted);
|
||||
_context.netDb().lookupRouterInfo(_config.getSendTo(), j, j, 5*1000);
|
||||
return;
|
||||
}
|
||||
@ -47,8 +47,8 @@ public class InboundGatewayReceiver implements TunnelGateway.Receiver {
|
||||
|
||||
private class ReceiveJob extends JobImpl {
|
||||
private byte[] _encrypted;
|
||||
public ReceiveJob(byte data[]) {
|
||||
super(_context);
|
||||
public ReceiveJob(RouterContext ctx, byte data[]) {
|
||||
super(ctx);
|
||||
_encrypted = data;
|
||||
}
|
||||
public String getName() { return "lookup first hop"; }
|
||||
|
@ -42,7 +42,7 @@ class OutboundReceiver implements TunnelGateway.Receiver {
|
||||
if (_log.shouldLog(Log.DEBUG))
|
||||
_log.debug("lookup of " + _config.getPeer(1).toBase64().substring(0,4)
|
||||
+ " required for " + msg);
|
||||
_context.netDb().lookupRouterInfo(_config.getPeer(1), new SendJob(msg), new FailedJob(), 10*1000);
|
||||
_context.netDb().lookupRouterInfo(_config.getPeer(1), new SendJob(_context, msg), new FailedJob(_context), 10*1000);
|
||||
}
|
||||
}
|
||||
|
||||
@ -60,8 +60,8 @@ class OutboundReceiver implements TunnelGateway.Receiver {
|
||||
|
||||
private class SendJob extends JobImpl {
|
||||
private TunnelDataMessage _msg;
|
||||
public SendJob(TunnelDataMessage msg) {
|
||||
super(_context);
|
||||
public SendJob(RouterContext ctx, TunnelDataMessage msg) {
|
||||
super(ctx);
|
||||
_msg = msg;
|
||||
}
|
||||
public String getName() { return "forward a tunnel message"; }
|
||||
@ -78,8 +78,8 @@ class OutboundReceiver implements TunnelGateway.Receiver {
|
||||
}
|
||||
|
||||
private class FailedJob extends JobImpl {
|
||||
public FailedJob() {
|
||||
super(_context);
|
||||
public FailedJob(RouterContext ctx) {
|
||||
super(ctx);
|
||||
}
|
||||
public String getName() { return "failed looking for our outbound gateway"; }
|
||||
public void runJob() {
|
||||
|
@ -77,7 +77,7 @@ public class TunnelParticipant {
|
||||
if (_log.shouldLog(Log.WARN))
|
||||
_log.warn("Lookup the nextHop (" + _config.getSendTo().toBase64().substring(0,4)
|
||||
+ " for " + msg);
|
||||
_context.netDb().lookupRouterInfo(_config.getSendTo(), new SendJob(msg), new TimeoutJob(msg), 10*1000);
|
||||
_context.netDb().lookupRouterInfo(_config.getSendTo(), new SendJob(_context, msg), new TimeoutJob(_context, msg), 10*1000);
|
||||
}
|
||||
} else {
|
||||
_inboundEndpointProcessor.getConfig().incrementProcessedMessages();
|
||||
@ -112,8 +112,8 @@ public class TunnelParticipant {
|
||||
|
||||
private class SendJob extends JobImpl {
|
||||
private TunnelDataMessage _msg;
|
||||
public SendJob(TunnelDataMessage msg) {
|
||||
super(_context);
|
||||
public SendJob(RouterContext ctx, TunnelDataMessage msg) {
|
||||
super(ctx);
|
||||
_msg = msg;
|
||||
}
|
||||
public String getName() { return "forward a tunnel message"; }
|
||||
@ -132,8 +132,8 @@ public class TunnelParticipant {
|
||||
|
||||
private class TimeoutJob extends JobImpl {
|
||||
private TunnelDataMessage _msg;
|
||||
public TimeoutJob(TunnelDataMessage msg) {
|
||||
super(_context);
|
||||
public TimeoutJob(RouterContext ctx, TunnelDataMessage msg) {
|
||||
super(ctx);
|
||||
_msg = msg;
|
||||
}
|
||||
public String getName() { return "timeout looking for next hop info"; }
|
||||
|
Reference in New Issue
Block a user