* HTTP Proxy:

- Add support for error page translations
      - Add support for external pages for all errors
      - Fix lack of \r in error page headers
      - HTML transitional fixes
      - Cleanups
This commit is contained in:
zzz
2009-11-14 15:05:44 +00:00
parent 1c25c0f408
commit c393e70ca9
14 changed files with 219 additions and 81 deletions

View File

@@ -0,0 +1,28 @@
HTTP/1.1 409 Conflict
Content-Type: text/html; charset=UTF-8
Cache-control: no-cache
Connection: close
Proxy-Connection: close
<html><head>
<title>I2P Warning: Destination key conflict</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>
<body>
<div class=logo>
<a href="http://127.0.0.1:7657/index.jsp" title="Router Console"><img src="http://proxy.i2p/themes/console/images/i2plogo.png" alt="I2P Router Console" border="0"></a><hr>
<a href="http://127.0.0.1:7657/config.jsp">Configuration</a> <a href="http://127.0.0.1:7657/help.jsp">Help</a> <a href="http://127.0.0.1:7657/susidns/">Addressbook</a>
</div>
<div class=warning id=warning>
<h3>Warning: Destination Key Conflict</h3>
The addresshelper link you followed specifies a different destination key
than a host entry in your host database.
Someone could be trying to impersonate another eepsite,
or people have given two eepsites identical names.
<p>
You can resolve the conflict by considering which key you trust,
and either discarding the addresshelper link,
discarding the host entry from your host database,
or naming one of them differently.
<p>

View File

@@ -0,0 +1,20 @@
HTTP/1.1 403 Request Denied
Content-Type: text/html; charset=UTF-8
Cache-control: no-cache
Connection: close
Proxy-Connection: close
<html><head>
<title>I2P Warning: 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>
<body>
<div class=logo>
<a href="http://127.0.0.1:7657/index.jsp" title="Router Console"><img src="http://proxy.i2p/themes/console/images/i2plogo.png" alt="I2P Router Console" border="0"></a><hr>
<a href="http://127.0.0.1:7657/config.jsp">Configuration</a> <a href="http://127.0.0.1:7657/help.jsp">Help</a> <a href="http://127.0.0.1:7657/susidns/">Addressbook</a>
</div>
<div class=warning id=warning>
<h3>Warning: Request Denied</h3>
You attempted to connect to a non-I2P website or location.
</div>

View File

@@ -0,0 +1,24 @@
HTTP/1.1 504 Gateway Timeout
Content-Type: text/html; charset=UTF-8
Cache-control: no-cache
Connection: close
Proxy-Connection: close
<html><head>
<title>I2P Warning: Eepsite not reachable</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>
<body>
<div class=logo>
<a href="http://127.0.0.1:7657/index.jsp" title="Router Console"><img src="http://proxy.i2p/themes/console/images/i2plogo.png" alt="I2P Router Console" border="0"></a><hr>
<a href="http://127.0.0.1:7657/config.jsp">Configuration</a> <a href="http://127.0.0.1:7657/help.jsp">Help</a> <a href="http://127.0.0.1:7657/susidns/index.jsp">Addressbook</a>
</div>
<div class=warning id=warning>
<h3>Warning: Eepsite Unreachable</h3>
The eepsite was not reachable.
The eepsite is offline, there is network congestion,
or your router is not yet well-integrated with peers.
You may want to
<a href="javascript: window.location.reload()">retry</a>.
<hr><b>Could not find the following destination:</b><BR><BR>

View File

@@ -0,0 +1,25 @@
HTTP/1.1 400 Destination Not Found
Content-Type: text/html; charset=UTF-8
Cache-control: no-cache
Connection: close
Proxy-Connection: close
<html><head>
<title>I2P Warning: Invalid eepsite destination</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>
<body>
<div class=logo>
<a href="http://127.0.0.1:7657/index.jsp" title="Router Console"><img src="http://proxy.i2p/themes/console/images/i2plogo.png" alt="I2P Router Console" border="0"></a><hr>
<a href="http://127.0.0.1:7657/config.jsp">Configuration</a> <a href="http://127.0.0.1:7657/help.jsp">Help</a> <a href="http://127.0.0.1:7657/susidns/">Addressbook</a>
</div>
<div class=warning id=warning>
<h3>Warning: Invalid Destination</h3>
The eepsite destination specified was not valid, or was
otherwise unreachable. Perhaps you pasted in the
wrong BASE64 string or the link you are following is
bad. The I2P host could also
be offline. You may want to
<a href="javascript: window.location.reload()">retry</a>.
<hr><b>Could not find the following destination:</b><BR><BR>

View File

@@ -0,0 +1,27 @@
HTTP/1.1 404 Domain Not Found
Content-Type: text/html; charset=UTF-8
Cache-control: no-cache
Connection: close
Proxy-Connection: close
<html><head>
<title>I2P Warning: Eepsite unknown</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>
<body>
<div class=logo>
<a href="http://127.0.0.1:7657/index.jsp" title="Router Console"><img src="http://proxy.i2p/themes/console/images/i2plogo.png" alt="I2P Router Console" border="0"></a><hr>
<a href="http://127.0.0.1:7657/config.jsp">Configuration</a> <a href="http://127.0.0.1:7657/help.jsp">Help</a> <a href="http://127.0.0.1:7657/susidns/index.jsp">Addressbook</a>
</div>
<div class=warning id=warning>
<h3>Warning: Eepsite Not Found in Addressbook</h3>
The eepsite was not found in your router's addressbook.
Check the link or find a BASE64 address.
If you have the BASE64 address, paste it into your userhosts.txt using
<a href="http://127.0.0.1:7657/susidns/addressbook.jsp?book=master">SusiDNS</a>,
use a BASE64 address helper, or use a jump service link below.<br><br>
Seeing this page often? See <a href="http://www.i2p2.i2p/faq.html#subscriptions">the FAQ</a>
for help in <a href="http://127.0.0.1:7657/susidns/config.jsp">adding some subscriptions</a>
to your addressbook.<hr>
<b>Could not find the following destination:</b><BR><BR>

View File

@@ -0,0 +1,29 @@
HTTP/1.1 504 Gateway Timeout
Content-Type: text/html; charset=UTF-8
Cache-control: no-cache
Connection: close
Proxy-Connection: close
<html><head>
<title>I2P Warning: Outproxy Not Found</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>
<body>
<div class=logo>
<a href="http://127.0.0.1:7657/index.jsp" title="Router Console"><img src="http://proxy.i2p/themes/console/images/i2plogo.png" alt="I2P Router Console" border="0"></a><hr>
<a href="http://127.0.0.1:7657/config.jsp">Configuration</a> <a href="http://127.0.0.1:7657/help.jsp">Help</a> <a href="http://127.0.0.1:7657/susidns/">Addressbook</a>
</div>
<div class=warning id=warning>
<h3>Warning: I2P Proxy Not Found</h3>
The WWW Outproxy was not found.
It is offline, there is network congestion,
or your router is not yet well-integrated with peers.
You may want to
<a href="javascript: parent.window.location.reload()">retry</a>
as this will randomly reselect an outproxy from the pool you have defined
<a href="http://127.0.0.1:7657/i2ptunnel/index.jsp">here</a>
(if you have more than one configured).
If you continue to have trouble you may want to edit your outproxy list
<a href="http://127.0.0.1:7657/i2ptunnel/edit.jsp?tunnel=0">here</a>.
<hr><b>Could not find the following destination:</b><BR><BR>

View File

@@ -0,0 +1,23 @@
HTTP/1.1 403 Access Denied
Content-Type: text/html; charset=UTF-8
Cache-control: no-cache
Connection: close
Proxy-Connection: close
<html><head>
<title>I2P Warning: 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>
<body>
<!-----------------------------
Let's not infinite loop here....
<div class=logo>
<a href="http://127.0.0.1:7657/index.jsp" title="Router Console"><img src="http://proxy.i2p/themes/console/images/i2plogo.png" alt="I2P Router Console" border="0"></a><hr>
<a href="http://127.0.0.1:7657/config.jsp">Configuration</a> <a href="http://127.0.0.1:7657/help.jsp">Help</a> <a href="http://127.0.0.1:7657/susidns/">Addressbook</a>
</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.
</div>

View File

@@ -0,0 +1,21 @@
HTTP/1.1 503 Service Unavailable
Content-Type: text/html; charset=UTF-8
Cache-control: no-cache
Connection: close
Proxy-Connection: close
<html><head>
<title>I2P Warning: No outproxy configured</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>
<body>
<div class=logo>
<a href="http://127.0.0.1:7657/index.jsp" title="Router Console"><img src="http://proxy.i2p/themes/console/images/i2plogo.png" alt="I2P Router Console" border="0"></a><hr>
<a href="http://127.0.0.1:7657/config.jsp">Configuration</a> <a href="http://127.0.0.1:7657/help.jsp">Help</a> <a href="http://127.0.0.1:7657/susidns/">Addressbook</a>
</div>
<div class=warning id=warning>
<h3>Warning: No Outproxy Configured</h3>
Your request was for a site outside of I2P, but you have no
HTTP outproxy configured. Please configure an outproxy in I2PTunnel.
</div>

View File

@@ -0,0 +1,21 @@
HTTP/1.1 403 Bad Protocol
Content-Type: text/html; charset=UTF-8
Cache-control: no-cache
Connection: close
Proxy-Connection: close
<html><head>
<title>I2P Warning: Non-HTTP Protocol</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>
<body>
<div class=logo>
<a href="http://127.0.0.1:7657/index.jsp" title="Router Console"><img src="http://proxy.i2p/themes/console/images/i2plogo.png" alt="I2P Router Console" border="0"></a><hr>
<a href="http://127.0.0.1:7657/config.jsp">Configuration</a> <a href="http://127.0.0.1:7657/help.jsp">Help</a> <a href="http://127.0.0.1:7657/susidns/">Addressbook</a>
</div>
<div class=warning id=warning>
<h3>Warning: Non-HTTP Protocol</h3>
The request uses a bad protocol.
The I2P HTTP Proxy supports http:// requests ONLY. Other protocols such as https:// and ftp:// are not allowed.
</div>