forked from I2P_Developers/i2p.i2p
* I2PTunnelHTTPClient: Reject 192.168.*
This commit is contained in:
@@ -508,7 +508,9 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable
|
|||||||
}
|
}
|
||||||
|
|
||||||
line = method + " " + request.substring(pos);
|
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) {
|
if (out != null) {
|
||||||
out.write(getErrorPage("localhost", ERR_LOCALHOST));
|
out.write(getErrorPage("localhost", ERR_LOCALHOST));
|
||||||
writeFooter(out);
|
writeFooter(out);
|
||||||
|
@@ -5,7 +5,7 @@ Connection: close
|
|||||||
Proxy-Connection: close
|
Proxy-Connection: close
|
||||||
|
|
||||||
<html><head>
|
<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 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" >
|
<link href="http://proxy.i2p/themes/console/default/console.css" rel="stylesheet" type="text/css" >
|
||||||
</head>
|
</head>
|
||||||
@@ -18,6 +18,7 @@ Proxy-Connection: close
|
|||||||
</div>
|
</div>
|
||||||
------------------------------>
|
------------------------------>
|
||||||
<div class=warning id=warning>
|
<div class=warning id=warning>
|
||||||
<h3>Warning: Localhost Access</h3>
|
<h3>Error: Local Access</h3>
|
||||||
Your browser is misconfigured. Do not use the proxy to access the router console or other localhost destinations.
|
Your browser is misconfigured. Do not use the proxy to access the router console,
|
||||||
|
localhost, or local LAN destinations.
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user