I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit c28f707f authored by zzz's avatar zzz
Browse files

cleanup

parent ef96c887
No related branches found
No related tags found
No related merge requests found
...@@ -78,12 +78,6 @@ public class I2PTunnelConnectClient extends I2PTunnelHTTPClientBase implements R ...@@ -78,12 +78,6 @@ public class I2PTunnelConnectClient extends I2PTunnelHTTPClientBase implements R
"Your browser is misconfigured. Do not use the proxy to access the router console or other localhost destinations.<BR>") "Your browser is misconfigured. Do not use the proxy to access the router console or other localhost destinations.<BR>")
.getBytes(); .getBytes();
final static byte[] SUCCESS_RESPONSE =
("HTTP/1.1 200 Connection Established\r\n"+
"Proxy-agent: I2P\r\n"+
"\r\n")
.getBytes();
/** /**
* @throws IllegalArgumentException if the I2PTunnel does not contain * @throws IllegalArgumentException if the I2PTunnel does not contain
* valid config to contact the router * valid config to contact the router
......
...@@ -966,7 +966,7 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn ...@@ -966,7 +966,7 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn
byte[] response; byte[] response;
if (method.toUpperCase(Locale.US).equals("CONNECT")) { if (method.toUpperCase(Locale.US).equals("CONNECT")) {
data = null; data = null;
response = I2PTunnelConnectClient.SUCCESS_RESPONSE; response = SUCCESS_RESPONSE;
} else { } else {
data = newRequest.toString().getBytes("ISO-8859-1"); data = newRequest.toString().getBytes("ISO-8859-1");
response = null; response = null;
...@@ -1099,7 +1099,7 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn ...@@ -1099,7 +1099,7 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn
response = null; response = null;
} else { } else {
data = null; data = null;
response = I2PTunnelConnectClient.SUCCESS_RESPONSE; response = SUCCESS_RESPONSE;
} }
Thread t = new I2PTunnelRunner(s, i2ps, sockLock, data, response, mySockets, onTimeout); Thread t = new I2PTunnelRunner(s, i2ps, sockLock, data, response, mySockets, onTimeout);
t.start(); t.start();
......
...@@ -93,6 +93,12 @@ public abstract class I2PTunnelHTTPClientBase extends I2PTunnelClientBase implem ...@@ -93,6 +93,12 @@ public abstract class I2PTunnelHTTPClientBase extends I2PTunnelClientBase implem
"be temporarily offline. You may want to <b>retry</b>. " + "be temporarily offline. You may want to <b>retry</b>. " +
"Could not find the following Destination:<BR><BR><div>").getBytes(); "Could not find the following Destination:<BR><BR><div>").getBytes();
protected final static byte[] SUCCESS_RESPONSE =
("HTTP/1.1 200 Connection Established\r\n"+
"Proxy-agent: I2P\r\n"+
"\r\n")
.getBytes();
private final byte[] _proxyNonce; private final byte[] _proxyNonce;
private final ConcurrentHashMap<String, NonceInfo> _nonces; private final ConcurrentHashMap<String, NonceInfo> _nonces;
private final AtomicInteger _nonceCleanCounter = new AtomicInteger(); private final AtomicInteger _nonceCleanCounter = new AtomicInteger();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment