* I2PTunnelHTTPClient: Reject 192.168.*

This commit is contained in:
zzz
2010-05-05 17:34:24 +00:00
parent f484ea8c64
commit 7344c2af47
2 changed files with 7 additions and 4 deletions

View File

@@ -508,7 +508,9 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable
}
line = method + " " + request.substring(pos);
} else if (host.toLowerCase().equals("localhost") || host.equals("127.0.0.1")) {
} else if (host.toLowerCase().equals("localhost") || host.equals("127.0.0.1") ||
host.startsWith("192.168.")) {
// if somebody is trying to get to 192.168.example.com, oh well
if (out != null) {
out.write(getErrorPage("localhost", ERR_LOCALHOST));
writeFooter(out);

View File

@@ -5,7 +5,7 @@ Connection: close
Proxy-Connection: close
<html><head>
<title>I2P Warning: Request Denied</title>
<title>I2P Error: Request Denied</title>
<link rel="shortcut icon" href="http://proxy.i2p/themes/console/images/favicon.ico" >
<link href="http://proxy.i2p/themes/console/default/console.css" rel="stylesheet" type="text/css" >
</head>
@@ -18,6 +18,7 @@ Proxy-Connection: close
</div>
------------------------------>
<div class=warning id=warning>
<h3>Warning: Localhost Access</h3>
Your browser is misconfigured. Do not use the proxy to access the router console or other localhost destinations.
<h3>Error: Local Access</h3>
Your browser is misconfigured. Do not use the proxy to access the router console,
localhost, or local LAN destinations.
</div>