2005-01-15 cervantes

* Added support to the eepproxy for URLs such as
      http://localhost:4444/eepproxy/foo.i2p/bar/baz or even
      http://localhost:4444/eepproxy/foo.i2p/?i2paddresshelper=base64
This commit is contained in:
jrandom
2005-01-15 23:16:12 +00:00
committed by zzz
parent ecd971c0e5
commit 2c783e9876
3 changed files with 19 additions and 3 deletions

View File

@ -211,7 +211,18 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable
String request = line.substring(pos + 1);
if (request.startsWith("/") && getTunnel().getClientOptions().getProperty("i2ptunnel.noproxy") != null) {
request = "http://i2p" + request;
} else if (request.startsWith("/eepproxy/")) {
// /eepproxy/foo.i2p/bar/baz.html HTTP/1.0
String subRequest = request.substring("/eepproxy/".length());
int protopos = subRequest.indexOf(" ");
String uri = subRequest.substring(0, protopos);
if (uri.indexOf("/") == -1) {
uri = uri + "/";
}
// "http://" + "foo.i2p/bar/baz.html" + " HTTP/1.0"
request = "http://" + uri + subRequest.substring(protopos);
}
pos = request.indexOf("//");
if (pos == -1) {
method = null;

View File

@ -1,4 +1,9 @@
$Id: history.txt,v 1.126 2005/01/06 15:59:13 jrandom Exp $
$Id: history.txt,v 1.127 2005/01/15 16:03:15 jrandom Exp $
2005-01-15 cervantes
* Added support to the eepproxy for URLs such as
http://localhost:4444/eepproxy/foo.i2p/bar/baz or even
http://localhost:4444/eepproxy/foo.i2p/?i2paddresshelper=base64
2005-01-15 jrandom
* Caught a series of (previously unhandled) errors caused by requeueing

View File

@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
*
*/
public class RouterVersion {
public final static String ID = "$Revision: 1.131 $ $Date: 2005/01/06 15:59:13 $";
public final static String ID = "$Revision: 1.132 $ $Date: 2005/01/15 16:03:14 $";
public final static String VERSION = "0.4.2.6";
public final static long BUILD = 1;
public final static long BUILD = 2;
public static void main(String args[]) {
System.out.println("I2P Router version: " + VERSION);
System.out.println("Router ID: " + RouterVersion.ID);