This commit is contained in:
Mateusz Gruszczyński committed 2026-11-26 15:19:21 +01:00
1 parent a75893d428
commit bfbeedfad7
43 files changed
+5834 -125

No files matched your search

+75 -25
View File
@@ -2,8 +2,21 @@ mod tests {
use super::*;
#[test]
fn validates_names_without_accepting_cidr_lookalikes_or_urls() {
assert_eq!(hostname("My-Office.DDNS.Example.").unwrap(), "my-office.ddns.example");
for bad in ["localhost", "", "*.example.com", "http://ddns.example", "1.2.3.999", "foo..example", "-x.example", "a_.example", "a.example/24"] {
assert_eq!(
hostname("My-Office.DDNS.Example.").unwrap(),
"my-office.ddns.example"
);
for bad in [
"localhost",
"",
"*.example.com",
"http://ddns.example",
"1.2.3.999",
"foo..example",
"-x.example",
"a_.example",
"a.example/24",
] {
assert!(hostname(bad).is_err(), "{bad}");
}
}
@@ -11,23 +24,35 @@ mod tests {
fn resolver_expiry_fails_closed_and_address_sets_are_exact() {
let name = "test-dynamic-unique.example";
let ip: IpAddr = "198.51.100.4".parse().unwrap();
let entry = Addresses { ips: vec![ip], valid_until: Instant::now() + Duration::from_secs(1) };
let entry = Addresses {
ips: vec![ip],
valid_until: Instant::now() + Duration::from_secs(1),
};
assert!(entry.valid_until > Instant::now());
let mut cache = HashMap::new(); cache.insert(name.to_owned(), entry);
let mut cache = HashMap::new();
cache.insert(name.to_owned(), entry);
CACHE.store(Arc::new(cache));
assert!(matches(name, ip));
assert!(!matches(name, "198.51.100.5".parse().unwrap()));
let mut expired = HashMap::new();
expired.insert(name.to_owned(), Addresses {
ips: vec![ip], valid_until: Instant::now() - Duration::from_secs(1),
});
expired.insert(
name.to_owned(),
Addresses {
ips: vec![ip],
valid_until: Instant::now() - Duration::from_secs(1),
},
);
CACHE.store(Arc::new(expired));
assert!(!matches(name, ip));
let new_ip: IpAddr = "2001:db8::8".parse().unwrap();
let mut rotated = HashMap::new();
rotated.insert(name.to_owned(), Addresses {
ips: vec![new_ip], valid_until: Instant::now() + Duration::from_secs(10),
});
rotated.insert(
name.to_owned(),
Addresses {
ips: vec![new_ip],
valid_until: Instant::now() + Duration::from_secs(10),
},
);
CACHE.store(Arc::new(rotated));
assert!(matches(name, new_ip));
assert!(!matches(name, ip));
@@ -37,14 +62,23 @@ mod tests {
#[test]
fn invalid_dns_answers_do_not_grant_access() {
assert!(validate_addresses(Vec::new()).unwrap_err().contains("no A/AAAA"));
assert!(validate_addresses(Vec::new())
.unwrap_err()
.contains("no A/AAAA"));
let too_many = (1..=33)
.map(|octet| IpAddr::V4(std::net::Ipv4Addr::new(198, 51, 100, octet)))
.collect();
assert!(validate_addresses(too_many).unwrap_err().contains("limit"));
assert!(validate_addresses(vec!["::ffff:198.51.100.42".parse().unwrap()])
.unwrap_err().contains("IPv4-mapped"));
let valid = validate_addresses(vec!["198.51.100.2".parse().unwrap(), "198.51.100.2".parse().unwrap()]).unwrap();
assert!(
validate_addresses(vec!["::ffff:198.51.100.42".parse().unwrap()])
.unwrap_err()
.contains("IPv4-mapped")
);
let valid = validate_addresses(vec![
"198.51.100.2".parse().unwrap(),
"198.51.100.2".parse().unwrap(),
])
.unwrap();
assert_eq!(valid.ips.len(), 1);
}
@@ -64,24 +98,40 @@ mod tests {
let pending = status_for_name(names[0].clone(), &empty, &empty, Instant::now());
assert_eq!(pending.state, "pending");
let ip: IpAddr = "192.0.2.10".parse().unwrap();
let entries = HashMap::from([(names[0].clone(), Addresses {
ips: vec![ip], valid_until: Instant::now() + Duration::from_secs(120),
})]);
let diagnostics = HashMap::from([(names[0].clone(), DnsDiagnostic {
checked_unix_ms: 123, error: None,
})]);
let entries = HashMap::from([(
names[0].clone(),
Addresses {
ips: vec![ip],
valid_until: Instant::now() + Duration::from_secs(120),
},
)]);
let diagnostics = HashMap::from([(
names[0].clone(),
DnsDiagnostic {
checked_unix_ms: 123,
error: None,
},
)]);
let resolved = status_for_name(names[0].clone(), &entries, &diagnostics, Instant::now());
assert_eq!(resolved.state, "resolved");
assert_eq!(resolved.addresses, vec![ip]);
let expired = status_for_name(names[0].clone(), &entries, &diagnostics, Instant::now() + Duration::from_secs(121));
let expired = status_for_name(
names[0].clone(),
&entries,
&diagnostics,
Instant::now() + Duration::from_secs(121),
);
assert_eq!(expired.state, "expired");
assert!(expired.addresses.is_empty());
let failure = HashMap::from([(names[0].clone(), DnsDiagnostic {
checked_unix_ms: 456, error: Some("NXDOMAIN".into()),
})]);
let failure = HashMap::from([(
names[0].clone(),
DnsDiagnostic {
checked_unix_ms: 456,
error: Some("NXDOMAIN".into()),
},
)]);
let failed = status_for_name(names[0].clone(), &empty, &failure, Instant::now());
assert_eq!(failed.state, "failed");
assert_eq!(failed.error.as_deref(), Some("NXDOMAIN"));
}
}
+1
View File
@@ -24,6 +24,7 @@ pub(super) static READER_DOCUMENTS: &[(&str, &str, &str)] = &[
reader_doc!("docs/LOAD_BALANCING.md", "guides"),
reader_doc!("docs/ACCESS.md", "guides"),
reader_doc!("docs/WEB_SERVER.md", "guides"),
reader_doc!("docs/ERROR_PAGES.md", "guides"),
reader_doc!("docs/PHP_FPM.md", "guides"),
reader_doc!("docs/FASTCGI.md", "guides"),
reader_doc!("docs/CACHE.md", "guides"),
+74 -20
View File
@@ -2,7 +2,7 @@
"openapi": "3.0.3",
"info": {
"title": "RustProxy Administration API",
"version": "0.42.2",
"version": "0.42.3",
"description": "Administration API for the active panel origin. Sign in through the panel; the same-origin HttpOnly cookie authenticates all private operations. Mutations also require the exact Origin, X-RustProxy-Request: 1 and a session-bound X-CSRF-Token. Loopback HTTP is the default; Settings can enable HTTPS before using a non-loopback administration bind. This document contains no live configuration or credentials. Object schemas marked extensible are summaries: full configuration validation is authoritative in Rust. The API also permits explicitly scoped GeneralApiBearer tokens on a narrow route allowlist, with RO/RW and source CIDR checks; API-token management and Prometheus-token management are browser-session-only."
},
"servers": [
@@ -3131,9 +3131,12 @@
"enum": [
"welcome",
"empty",
"html"
"html",
"builtin",
"cloudflare"
],
"default": "welcome"
"default": "welcome",
"description": "Optional offline Cloudflare-style page uses a pre-generated static HTML template with inline CSS; no runtime file reads or third-party requests. Existing built-in and custom HTML options are unchanged. Unsupported local statuses fall back to the normal built-in HTML."
},
"status": {
"type": "integer",
@@ -11204,29 +11207,80 @@
"get": {
"summary": "Live DNS/DDNS ACL resolver diagnostics",
"description": "Authenticated read-only snapshot of every DNS ACL name configured globally, in profiles, Vhosts and locations. Status is pending, resolved, failed or expired. Addresses are currently valid A/AAAA records; an error or expired entry grants no access. Check the actual client IP separately. DNS lookups are refreshed every 60 seconds and valid for at most 180 seconds.",
"tags": ["Monitoring"],
"tags": [
"Monitoring"
],
"operationId": "get_api_acl_dns_status",
"responses": {
"200": {
"description": "Resolver state",
"content": {"application/json": {"schema": {
"type": "object",
"required": ["refresh_seconds", "hostnames"],
"properties": {
"refresh_seconds": {"type": "integer", "example": 60},
"hostnames": {"type": "array", "items": {"type": "object", "required": ["hostname", "state", "addresses"], "properties": {
"hostname": {"type": "string"},
"state": {"type": "string", "enum": ["pending", "resolved", "failed", "expired"]},
"addresses": {"type": "array", "items": {"type": "string"}},
"last_checked_unix_ms": {"type": "integer", "nullable": true},
"valid_for_seconds": {"type": "integer", "nullable": true},
"error": {"type": "string", "nullable": true}
}}}
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"refresh_seconds",
"hostnames"
],
"properties": {
"refresh_seconds": {
"type": "integer",
"example": 60
},
"hostnames": {
"type": "array",
"items": {
"type": "object",
"required": [
"hostname",
"state",
"addresses"
],
"properties": {
"hostname": {
"type": "string"
},
"state": {
"type": "string",
"enum": [
"pending",
"resolved",
"failed",
"expired"
]
},
"addresses": {
"type": "array",
"items": {
"type": "string"
}
},
"last_checked_unix_ms": {
"type": "integer",
"nullable": true
},
"valid_for_seconds": {
"type": "integer",
"nullable": true
},
"error": {
"type": "string",
"nullable": true
}
}
}
}
}
}
}
}}}
}
},
"401": {"description": "Authentication required"},
"403": {"description": "Administrative access forbidden"}
"401": {
"description": "Authentication required"
},
"403": {
"description": "Administrative access forbidden"
}
}
}
},
+12
View File
@@ -0,0 +1,12 @@
# Pre-generated Cloudflare-style pages
These `error_*.html` files are static, self-contained, English-language HTML/CSS pages. They were prepared for RustProxy 0.42.3, using the classic three-stage diagnostic layout of the open-source [cloudflare-error-page](https://github.com/donlon/cloudflare-error-page) project (Anthony Donlon, MIT license). They are adapted and branded for RustProxy with a large "RP" gateway symbol, a gray status band and compact two-column help: no Cloudflare logo, hyperlinks, generated Ray ID, service claims, telemetry or remote assets. The short footer reads "Performance & security by RustProxy".
- Each template lives in this directory in the source tree; `scripts/generate_cf_pages.py` regenerates them deterministically.
- `src/pages/mod.rs` selects the file for the configured HTTP code through the **same `include_str!` pattern used by the existing RustProxy `error_*.html` pages**.
- There is **no file I/O on public HTTP requests**, static-file mounting, template engine, JavaScript or external stylesheet.
- The browser receives `text/html; charset=utf-8`, `Cache-Control: no-store` and the correct HTTP status; status 401 keeps `WWW-Authenticate` through existing page replacement logic.
- This directory is not a public document root and these templates are not routed through the admin file server.
- Existing/default error pages remain unchanged unless the `cloudflare` page kind is explicitly selected.
Before distributing modified templates, review the upstream project's [MIT license](https://github.com/donlon/cloudflare-error-page/blob/main/LICENSE.txt) and its trademark disclaimer. The pages here are an independent RustProxy-branded adaptation, not Cloudflare's official error pages.
+387
View File
@@ -0,0 +1,387 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="robots" content="noindex,nofollow">
<title>Error 200: Service ready | RustProxy</title>
<style>
:root {
color-scheme: light;
font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #333
}
* {
box-sizing: border-box
}
body {
margin: 0;
background: #fff;
min-height: 100vh;
font-size: 15px;
line-height: 1.5;
-webkit-font-smoothing: antialiased
}
.container {
max-width: 1030px;
margin: 0 auto;
padding: 0 24px
}
.intro {
padding: 54px 0 44px
}
h1 {
font-size: 49px;
line-height: 1.18;
font-weight: 300;
margin: 0 0 5px;
letter-spacing: -1.1px;
color: #313131
}
.error-code {
font-weight: 300;
color: #8d8d8d
}
.subtitle {
font-weight: 300;
font-size: 25px;
line-height: 1.4;
margin: 2px 0;
color: #777
}
.diagnostics-band {
background: #f1f1f1;
border-top: 1px solid #e9e9e9;
border-bottom: 1px solid #e5e5e5
}
.diagnostics {
display: grid;
grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr) 76px minmax(0, 1fr);
align-items: start;
padding: 39px 0 36px;
text-align: center
}
.node {
min-width: 0;
text-align: center
}
.symbol {
height: 107px;
position: relative;
margin: 0 auto 11px;
width: 142px;
max-width: 100%;
display: flex;
align-items: center;
justify-content: center
}
.symbol svg {
width: 118px;
height: 100px;
display: block;
overflow: visible
}
.symbol .ind {
position: absolute;
right: 10px;
bottom: 10px;
display: grid;
place-items: center;
border: 3px solid #f1f1f1;
border-radius: 50%;
height: 37px;
width: 37px;
font-family: Arial, sans-serif;
font-size: 24px;
font-weight: 700;
line-height: 1;
color: white;
background: #9bca3e
}
.symbol .ind.error {
background: #c93135
}
.symbol .ind.unknown {
background: #aaa;
font-weight: 500;
font-size: 26px
}
.location {
font-size: 14px;
color: #a2a2a2;
margin: 0;
overflow-wrap: anywhere
}
.node h2 {
font-size: 21px;
font-weight: 400;
margin: 1px 0 0;
color: #545454;
overflow-wrap: anywhere
}
.state {
font-size: 16px;
font-weight: 500;
margin: 2px 0 0;
color: #8cbb35;
overflow-wrap: anywhere
}
.state.error {
color: #c93135
}
.state.unknown {
color: #888
}
.connector {
padding-top: 53px;
min-width: 0;
color: #aaa
}
.connector svg {
height: 30px;
width: 100%;
display: block;
fill: none;
stroke: currentColor;
stroke-width: 4;
stroke-linecap: round;
stroke-linejoin: round
}
.help {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 58px;
padding: 41px 0 45px
}
.help h2 {
font-size: 20px;
line-height: 1.35;
font-weight: 400;
color: #333;
margin: 0 0 12px
}
.help p {
font-size: 15px;
line-height: 1.6;
margin: 0;
color: #555
}
.bottom {
border-top: 1px solid #e7e7e7;
margin-top: 7px;
padding: 22px 0 35px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 14px;
color: #999;
font-size: 12px
}
.brand {
color: #858585;
font-weight: 600;
letter-spacing: .02em
}
.bottom .signature {
font-size: 12px
}
@media(max-width:700px) {
.intro {
padding: 35px 0 30px
}
h1 {
font-size: 36px;
letter-spacing: -.7px
}
.subtitle {
font-size: 20px
}
.diagnostics {
grid-template-columns: repeat(3, minmax(0, 1fr));
padding: 25px 0;
gap: 4px
}
.connector {
display: none
}
.symbol {
height: 76px;
width: 86px;
margin-bottom: 6px
}
.symbol svg {
width: 77px;
height: 70px
}
.symbol .ind {
width: 28px;
height: 28px;
font-size: 18px;
border-width: 2px;
right: 0;
bottom: 1px
}
.symbol .ind.unknown {
font-size: 21px
}
.location {
font-size: 12px
}
.node h2 {
font-size: 15px
}
.state {
font-size: 13px
}
.help {
grid-template-columns: 1fr;
gap: 24px;
padding: 31px 0
}
.bottom {
flex-wrap: wrap
}
}
@media(max-width:360px) {
.container {
padding: 0 14px
}
.intro {
padding-top: 27px
}
h1 {
font-size: 31px
}
.symbol {
width: 70px
}
.symbol svg {
width: 69px
}
.node h2 {
font-size: 14px
}
.state {
font-size: 12px
}
}
</style>
</head>
<body>
<header class="container intro">
<h1>Service ready <span class="error-code">Error 200</span></h1>
<p class="subtitle">Error code 200</p>
</header>
<section class="diagnostics-band" aria-label="Request status">
<div class="container diagnostics">
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<rect x="13" y="16" width="94" height="69" rx="4" fill="#aaa" />
<rect x="21" y="33" width="78" height="44" fill="#f1f1f1" />
<circle cx="23" cy="24" r="3" fill="#f1f1f1" />
<circle cx="34" cy="24" r="3" fill="#f1f1f1" />
<path d="M14 31h93" stroke="#f1f1f1" stroke-width="2" />
</svg><span class="ind ok" aria-hidden="true">&#10003;</span></div>
<p class="location">You</p>
<h2>Browser</h2>
<p class="state ok">Working</p>
</div>
<div class="connector" aria-hidden="true"><svg viewBox="0 0 100 30">
<path d="M8 15h84m-74-10L8 15l10 10M82 5l10 10-10 10" />
</svg></div>
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<path d="M60 9 103 33v45L60 101 17 78V33Z" fill="#aaa" />
<path d="M60 21 91 39v32L60 88 29 71V39Z" fill="#f1f1f1" /><text x="60" y="67" text-anchor="middle"
font-size="37" font-weight="700" font-family="Arial,sans-serif" fill="#888">RP</text>
</svg><span class="ind ok" aria-hidden="true">&#10003;</span></div>
<p class="location">Gateway</p>
<h2>RustProxy</h2>
<p class="state ok">Working</p>
</div>
<div class="connector" aria-hidden="true"><svg viewBox="0 0 100 30">
<path d="M8 15h84m-74-10L8 15l10 10M82 5l10 10-10 10" />
</svg></div>
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<rect x="22" y="13" width="76" height="27" rx="4" fill="#aaa" />
<rect x="22" y="46" width="76" height="27" rx="4" fill="#aaa" />
<circle cx="34" cy="27" r="4" fill="#f1f1f1" />
<circle cx="34" cy="60" r="4" fill="#f1f1f1" />
<path d="M48 27h38M48 60h38" stroke="#d9d9d9" stroke-width="4" stroke-linecap="round" />
<path d="M60 73v14m-21 0h42" stroke="#aaa" stroke-width="7" stroke-linecap="round" />
</svg><span class="ind unknown" aria-hidden="true">&#8211;</span></div>
<p class="location">Origin</p>
<h2>Host</h2>
<p class="state unknown">Not checked</p>
</div>
</div>
</section>
<main class="container">
<section class="help" aria-label="Error information">
<div>
<h2>What happened?</h2>
<p>RustProxy received and handled the request.</p>
</div>
<div>
<h2>What can I do?</h2>
<p>You can continue to the requested service.</p>
</div>
</section>
<footer class="bottom"><span class="brand">RustProxy</span><span class="signature">Performance &amp; security by
RustProxy</span></footer>
</main>
</body>
</html>
+387
View File
@@ -0,0 +1,387 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="robots" content="noindex,nofollow">
<title>Error 400: Bad request | RustProxy</title>
<style>
:root {
color-scheme: light;
font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #333
}
* {
box-sizing: border-box
}
body {
margin: 0;
background: #fff;
min-height: 100vh;
font-size: 15px;
line-height: 1.5;
-webkit-font-smoothing: antialiased
}
.container {
max-width: 1030px;
margin: 0 auto;
padding: 0 24px
}
.intro {
padding: 54px 0 44px
}
h1 {
font-size: 49px;
line-height: 1.18;
font-weight: 300;
margin: 0 0 5px;
letter-spacing: -1.1px;
color: #313131
}
.error-code {
font-weight: 300;
color: #8d8d8d
}
.subtitle {
font-weight: 300;
font-size: 25px;
line-height: 1.4;
margin: 2px 0;
color: #777
}
.diagnostics-band {
background: #f1f1f1;
border-top: 1px solid #e9e9e9;
border-bottom: 1px solid #e5e5e5
}
.diagnostics {
display: grid;
grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr) 76px minmax(0, 1fr);
align-items: start;
padding: 39px 0 36px;
text-align: center
}
.node {
min-width: 0;
text-align: center
}
.symbol {
height: 107px;
position: relative;
margin: 0 auto 11px;
width: 142px;
max-width: 100%;
display: flex;
align-items: center;
justify-content: center
}
.symbol svg {
width: 118px;
height: 100px;
display: block;
overflow: visible
}
.symbol .ind {
position: absolute;
right: 10px;
bottom: 10px;
display: grid;
place-items: center;
border: 3px solid #f1f1f1;
border-radius: 50%;
height: 37px;
width: 37px;
font-family: Arial, sans-serif;
font-size: 24px;
font-weight: 700;
line-height: 1;
color: white;
background: #9bca3e
}
.symbol .ind.error {
background: #c93135
}
.symbol .ind.unknown {
background: #aaa;
font-weight: 500;
font-size: 26px
}
.location {
font-size: 14px;
color: #a2a2a2;
margin: 0;
overflow-wrap: anywhere
}
.node h2 {
font-size: 21px;
font-weight: 400;
margin: 1px 0 0;
color: #545454;
overflow-wrap: anywhere
}
.state {
font-size: 16px;
font-weight: 500;
margin: 2px 0 0;
color: #8cbb35;
overflow-wrap: anywhere
}
.state.error {
color: #c93135
}
.state.unknown {
color: #888
}
.connector {
padding-top: 53px;
min-width: 0;
color: #aaa
}
.connector svg {
height: 30px;
width: 100%;
display: block;
fill: none;
stroke: currentColor;
stroke-width: 4;
stroke-linecap: round;
stroke-linejoin: round
}
.help {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 58px;
padding: 41px 0 45px
}
.help h2 {
font-size: 20px;
line-height: 1.35;
font-weight: 400;
color: #333;
margin: 0 0 12px
}
.help p {
font-size: 15px;
line-height: 1.6;
margin: 0;
color: #555
}
.bottom {
border-top: 1px solid #e7e7e7;
margin-top: 7px;
padding: 22px 0 35px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 14px;
color: #999;
font-size: 12px
}
.brand {
color: #858585;
font-weight: 600;
letter-spacing: .02em
}
.bottom .signature {
font-size: 12px
}
@media(max-width:700px) {
.intro {
padding: 35px 0 30px
}
h1 {
font-size: 36px;
letter-spacing: -.7px
}
.subtitle {
font-size: 20px
}
.diagnostics {
grid-template-columns: repeat(3, minmax(0, 1fr));
padding: 25px 0;
gap: 4px
}
.connector {
display: none
}
.symbol {
height: 76px;
width: 86px;
margin-bottom: 6px
}
.symbol svg {
width: 77px;
height: 70px
}
.symbol .ind {
width: 28px;
height: 28px;
font-size: 18px;
border-width: 2px;
right: 0;
bottom: 1px
}
.symbol .ind.unknown {
font-size: 21px
}
.location {
font-size: 12px
}
.node h2 {
font-size: 15px
}
.state {
font-size: 13px
}
.help {
grid-template-columns: 1fr;
gap: 24px;
padding: 31px 0
}
.bottom {
flex-wrap: wrap
}
}
@media(max-width:360px) {
.container {
padding: 0 14px
}
.intro {
padding-top: 27px
}
h1 {
font-size: 31px
}
.symbol {
width: 70px
}
.symbol svg {
width: 69px
}
.node h2 {
font-size: 14px
}
.state {
font-size: 12px
}
}
</style>
</head>
<body>
<header class="container intro">
<h1>Bad request <span class="error-code">Error 400</span></h1>
<p class="subtitle">Error code 400</p>
</header>
<section class="diagnostics-band" aria-label="Request status">
<div class="container diagnostics">
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<rect x="13" y="16" width="94" height="69" rx="4" fill="#aaa" />
<rect x="21" y="33" width="78" height="44" fill="#f1f1f1" />
<circle cx="23" cy="24" r="3" fill="#f1f1f1" />
<circle cx="34" cy="24" r="3" fill="#f1f1f1" />
<path d="M14 31h93" stroke="#f1f1f1" stroke-width="2" />
</svg><span class="ind ok" aria-hidden="true">&#10003;</span></div>
<p class="location">You</p>
<h2>Browser</h2>
<p class="state ok">Working</p>
</div>
<div class="connector" aria-hidden="true"><svg viewBox="0 0 100 30">
<path d="M8 15h84m-74-10L8 15l10 10M82 5l10 10-10 10" />
</svg></div>
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<path d="M60 9 103 33v45L60 101 17 78V33Z" fill="#aaa" />
<path d="M60 21 91 39v32L60 88 29 71V39Z" fill="#f1f1f1" /><text x="60" y="67" text-anchor="middle"
font-size="37" font-weight="700" font-family="Arial,sans-serif" fill="#888">RP</text>
</svg><span class="ind error" aria-hidden="true">&#215;</span></div>
<p class="location">Gateway</p>
<h2>RustProxy</h2>
<p class="state error">Request rejected</p>
</div>
<div class="connector" aria-hidden="true"><svg viewBox="0 0 100 30">
<path d="M8 15h84m-74-10L8 15l10 10M82 5l10 10-10 10" />
</svg></div>
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<rect x="22" y="13" width="76" height="27" rx="4" fill="#aaa" />
<rect x="22" y="46" width="76" height="27" rx="4" fill="#aaa" />
<circle cx="34" cy="27" r="4" fill="#f1f1f1" />
<circle cx="34" cy="60" r="4" fill="#f1f1f1" />
<path d="M48 27h38M48 60h38" stroke="#d9d9d9" stroke-width="4" stroke-linecap="round" />
<path d="M60 73v14m-21 0h42" stroke="#aaa" stroke-width="7" stroke-linecap="round" />
</svg><span class="ind unknown" aria-hidden="true">&#8211;</span></div>
<p class="location">Origin</p>
<h2>Host</h2>
<p class="state unknown">Not contacted</p>
</div>
</div>
</section>
<main class="container">
<section class="help" aria-label="Error information">
<div>
<h2>What happened?</h2>
<p>The request was malformed or could not be understood.</p>
</div>
<div>
<h2>What can I do?</h2>
<p>Check the request and try again.</p>
</div>
</section>
<footer class="bottom"><span class="brand">RustProxy</span><span class="signature">Performance &amp; security by
RustProxy</span></footer>
</main>
</body>
</html>
+387
View File
@@ -0,0 +1,387 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="robots" content="noindex,nofollow">
<title>Error 401: Authentication required | RustProxy</title>
<style>
:root {
color-scheme: light;
font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #333
}
* {
box-sizing: border-box
}
body {
margin: 0;
background: #fff;
min-height: 100vh;
font-size: 15px;
line-height: 1.5;
-webkit-font-smoothing: antialiased
}
.container {
max-width: 1030px;
margin: 0 auto;
padding: 0 24px
}
.intro {
padding: 54px 0 44px
}
h1 {
font-size: 49px;
line-height: 1.18;
font-weight: 300;
margin: 0 0 5px;
letter-spacing: -1.1px;
color: #313131
}
.error-code {
font-weight: 300;
color: #8d8d8d
}
.subtitle {
font-weight: 300;
font-size: 25px;
line-height: 1.4;
margin: 2px 0;
color: #777
}
.diagnostics-band {
background: #f1f1f1;
border-top: 1px solid #e9e9e9;
border-bottom: 1px solid #e5e5e5
}
.diagnostics {
display: grid;
grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr) 76px minmax(0, 1fr);
align-items: start;
padding: 39px 0 36px;
text-align: center
}
.node {
min-width: 0;
text-align: center
}
.symbol {
height: 107px;
position: relative;
margin: 0 auto 11px;
width: 142px;
max-width: 100%;
display: flex;
align-items: center;
justify-content: center
}
.symbol svg {
width: 118px;
height: 100px;
display: block;
overflow: visible
}
.symbol .ind {
position: absolute;
right: 10px;
bottom: 10px;
display: grid;
place-items: center;
border: 3px solid #f1f1f1;
border-radius: 50%;
height: 37px;
width: 37px;
font-family: Arial, sans-serif;
font-size: 24px;
font-weight: 700;
line-height: 1;
color: white;
background: #9bca3e
}
.symbol .ind.error {
background: #c93135
}
.symbol .ind.unknown {
background: #aaa;
font-weight: 500;
font-size: 26px
}
.location {
font-size: 14px;
color: #a2a2a2;
margin: 0;
overflow-wrap: anywhere
}
.node h2 {
font-size: 21px;
font-weight: 400;
margin: 1px 0 0;
color: #545454;
overflow-wrap: anywhere
}
.state {
font-size: 16px;
font-weight: 500;
margin: 2px 0 0;
color: #8cbb35;
overflow-wrap: anywhere
}
.state.error {
color: #c93135
}
.state.unknown {
color: #888
}
.connector {
padding-top: 53px;
min-width: 0;
color: #aaa
}
.connector svg {
height: 30px;
width: 100%;
display: block;
fill: none;
stroke: currentColor;
stroke-width: 4;
stroke-linecap: round;
stroke-linejoin: round
}
.help {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 58px;
padding: 41px 0 45px
}
.help h2 {
font-size: 20px;
line-height: 1.35;
font-weight: 400;
color: #333;
margin: 0 0 12px
}
.help p {
font-size: 15px;
line-height: 1.6;
margin: 0;
color: #555
}
.bottom {
border-top: 1px solid #e7e7e7;
margin-top: 7px;
padding: 22px 0 35px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 14px;
color: #999;
font-size: 12px
}
.brand {
color: #858585;
font-weight: 600;
letter-spacing: .02em
}
.bottom .signature {
font-size: 12px
}
@media(max-width:700px) {
.intro {
padding: 35px 0 30px
}
h1 {
font-size: 36px;
letter-spacing: -.7px
}
.subtitle {
font-size: 20px
}
.diagnostics {
grid-template-columns: repeat(3, minmax(0, 1fr));
padding: 25px 0;
gap: 4px
}
.connector {
display: none
}
.symbol {
height: 76px;
width: 86px;
margin-bottom: 6px
}
.symbol svg {
width: 77px;
height: 70px
}
.symbol .ind {
width: 28px;
height: 28px;
font-size: 18px;
border-width: 2px;
right: 0;
bottom: 1px
}
.symbol .ind.unknown {
font-size: 21px
}
.location {
font-size: 12px
}
.node h2 {
font-size: 15px
}
.state {
font-size: 13px
}
.help {
grid-template-columns: 1fr;
gap: 24px;
padding: 31px 0
}
.bottom {
flex-wrap: wrap
}
}
@media(max-width:360px) {
.container {
padding: 0 14px
}
.intro {
padding-top: 27px
}
h1 {
font-size: 31px
}
.symbol {
width: 70px
}
.symbol svg {
width: 69px
}
.node h2 {
font-size: 14px
}
.state {
font-size: 12px
}
}
</style>
</head>
<body>
<header class="container intro">
<h1>Authentication required <span class="error-code">Error 401</span></h1>
<p class="subtitle">Error code 401</p>
</header>
<section class="diagnostics-band" aria-label="Request status">
<div class="container diagnostics">
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<rect x="13" y="16" width="94" height="69" rx="4" fill="#aaa" />
<rect x="21" y="33" width="78" height="44" fill="#f1f1f1" />
<circle cx="23" cy="24" r="3" fill="#f1f1f1" />
<circle cx="34" cy="24" r="3" fill="#f1f1f1" />
<path d="M14 31h93" stroke="#f1f1f1" stroke-width="2" />
</svg><span class="ind ok" aria-hidden="true">&#10003;</span></div>
<p class="location">You</p>
<h2>Browser</h2>
<p class="state ok">Working</p>
</div>
<div class="connector" aria-hidden="true"><svg viewBox="0 0 100 30">
<path d="M8 15h84m-74-10L8 15l10 10M82 5l10 10-10 10" />
</svg></div>
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<path d="M60 9 103 33v45L60 101 17 78V33Z" fill="#aaa" />
<path d="M60 21 91 39v32L60 88 29 71V39Z" fill="#f1f1f1" /><text x="60" y="67" text-anchor="middle"
font-size="37" font-weight="700" font-family="Arial,sans-serif" fill="#888">RP</text>
</svg><span class="ind error" aria-hidden="true">&#215;</span></div>
<p class="location">Gateway</p>
<h2>RustProxy</h2>
<p class="state error">Authentication required</p>
</div>
<div class="connector" aria-hidden="true"><svg viewBox="0 0 100 30">
<path d="M8 15h84m-74-10L8 15l10 10M82 5l10 10-10 10" />
</svg></div>
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<rect x="22" y="13" width="76" height="27" rx="4" fill="#aaa" />
<rect x="22" y="46" width="76" height="27" rx="4" fill="#aaa" />
<circle cx="34" cy="27" r="4" fill="#f1f1f1" />
<circle cx="34" cy="60" r="4" fill="#f1f1f1" />
<path d="M48 27h38M48 60h38" stroke="#d9d9d9" stroke-width="4" stroke-linecap="round" />
<path d="M60 73v14m-21 0h42" stroke="#aaa" stroke-width="7" stroke-linecap="round" />
</svg><span class="ind unknown" aria-hidden="true">&#8211;</span></div>
<p class="location">Origin</p>
<h2>Host</h2>
<p class="state unknown">Not contacted</p>
</div>
</div>
</section>
<main class="container">
<section class="help" aria-label="Error information">
<div>
<h2>What happened?</h2>
<p>This resource requires valid credentials.</p>
</div>
<div>
<h2>What can I do?</h2>
<p>Sign in with an authorized account and retry.</p>
</div>
</section>
<footer class="bottom"><span class="brand">RustProxy</span><span class="signature">Performance &amp; security by
RustProxy</span></footer>
</main>
</body>
</html>
+387
View File
@@ -0,0 +1,387 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="robots" content="noindex,nofollow">
<title>Error 403: Access forbidden | RustProxy</title>
<style>
:root {
color-scheme: light;
font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #333
}
* {
box-sizing: border-box
}
body {
margin: 0;
background: #fff;
min-height: 100vh;
font-size: 15px;
line-height: 1.5;
-webkit-font-smoothing: antialiased
}
.container {
max-width: 1030px;
margin: 0 auto;
padding: 0 24px
}
.intro {
padding: 54px 0 44px
}
h1 {
font-size: 49px;
line-height: 1.18;
font-weight: 300;
margin: 0 0 5px;
letter-spacing: -1.1px;
color: #313131
}
.error-code {
font-weight: 300;
color: #8d8d8d
}
.subtitle {
font-weight: 300;
font-size: 25px;
line-height: 1.4;
margin: 2px 0;
color: #777
}
.diagnostics-band {
background: #f1f1f1;
border-top: 1px solid #e9e9e9;
border-bottom: 1px solid #e5e5e5
}
.diagnostics {
display: grid;
grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr) 76px minmax(0, 1fr);
align-items: start;
padding: 39px 0 36px;
text-align: center
}
.node {
min-width: 0;
text-align: center
}
.symbol {
height: 107px;
position: relative;
margin: 0 auto 11px;
width: 142px;
max-width: 100%;
display: flex;
align-items: center;
justify-content: center
}
.symbol svg {
width: 118px;
height: 100px;
display: block;
overflow: visible
}
.symbol .ind {
position: absolute;
right: 10px;
bottom: 10px;
display: grid;
place-items: center;
border: 3px solid #f1f1f1;
border-radius: 50%;
height: 37px;
width: 37px;
font-family: Arial, sans-serif;
font-size: 24px;
font-weight: 700;
line-height: 1;
color: white;
background: #9bca3e
}
.symbol .ind.error {
background: #c93135
}
.symbol .ind.unknown {
background: #aaa;
font-weight: 500;
font-size: 26px
}
.location {
font-size: 14px;
color: #a2a2a2;
margin: 0;
overflow-wrap: anywhere
}
.node h2 {
font-size: 21px;
font-weight: 400;
margin: 1px 0 0;
color: #545454;
overflow-wrap: anywhere
}
.state {
font-size: 16px;
font-weight: 500;
margin: 2px 0 0;
color: #8cbb35;
overflow-wrap: anywhere
}
.state.error {
color: #c93135
}
.state.unknown {
color: #888
}
.connector {
padding-top: 53px;
min-width: 0;
color: #aaa
}
.connector svg {
height: 30px;
width: 100%;
display: block;
fill: none;
stroke: currentColor;
stroke-width: 4;
stroke-linecap: round;
stroke-linejoin: round
}
.help {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 58px;
padding: 41px 0 45px
}
.help h2 {
font-size: 20px;
line-height: 1.35;
font-weight: 400;
color: #333;
margin: 0 0 12px
}
.help p {
font-size: 15px;
line-height: 1.6;
margin: 0;
color: #555
}
.bottom {
border-top: 1px solid #e7e7e7;
margin-top: 7px;
padding: 22px 0 35px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 14px;
color: #999;
font-size: 12px
}
.brand {
color: #858585;
font-weight: 600;
letter-spacing: .02em
}
.bottom .signature {
font-size: 12px
}
@media(max-width:700px) {
.intro {
padding: 35px 0 30px
}
h1 {
font-size: 36px;
letter-spacing: -.7px
}
.subtitle {
font-size: 20px
}
.diagnostics {
grid-template-columns: repeat(3, minmax(0, 1fr));
padding: 25px 0;
gap: 4px
}
.connector {
display: none
}
.symbol {
height: 76px;
width: 86px;
margin-bottom: 6px
}
.symbol svg {
width: 77px;
height: 70px
}
.symbol .ind {
width: 28px;
height: 28px;
font-size: 18px;
border-width: 2px;
right: 0;
bottom: 1px
}
.symbol .ind.unknown {
font-size: 21px
}
.location {
font-size: 12px
}
.node h2 {
font-size: 15px
}
.state {
font-size: 13px
}
.help {
grid-template-columns: 1fr;
gap: 24px;
padding: 31px 0
}
.bottom {
flex-wrap: wrap
}
}
@media(max-width:360px) {
.container {
padding: 0 14px
}
.intro {
padding-top: 27px
}
h1 {
font-size: 31px
}
.symbol {
width: 70px
}
.symbol svg {
width: 69px
}
.node h2 {
font-size: 14px
}
.state {
font-size: 12px
}
}
</style>
</head>
<body>
<header class="container intro">
<h1>Access forbidden <span class="error-code">Error 403</span></h1>
<p class="subtitle">Error code 403</p>
</header>
<section class="diagnostics-band" aria-label="Request status">
<div class="container diagnostics">
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<rect x="13" y="16" width="94" height="69" rx="4" fill="#aaa" />
<rect x="21" y="33" width="78" height="44" fill="#f1f1f1" />
<circle cx="23" cy="24" r="3" fill="#f1f1f1" />
<circle cx="34" cy="24" r="3" fill="#f1f1f1" />
<path d="M14 31h93" stroke="#f1f1f1" stroke-width="2" />
</svg><span class="ind ok" aria-hidden="true">&#10003;</span></div>
<p class="location">You</p>
<h2>Browser</h2>
<p class="state ok">Working</p>
</div>
<div class="connector" aria-hidden="true"><svg viewBox="0 0 100 30">
<path d="M8 15h84m-74-10L8 15l10 10M82 5l10 10-10 10" />
</svg></div>
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<path d="M60 9 103 33v45L60 101 17 78V33Z" fill="#aaa" />
<path d="M60 21 91 39v32L60 88 29 71V39Z" fill="#f1f1f1" /><text x="60" y="67" text-anchor="middle"
font-size="37" font-weight="700" font-family="Arial,sans-serif" fill="#888">RP</text>
</svg><span class="ind error" aria-hidden="true">&#215;</span></div>
<p class="location">Gateway</p>
<h2>RustProxy</h2>
<p class="state error">Access denied</p>
</div>
<div class="connector" aria-hidden="true"><svg viewBox="0 0 100 30">
<path d="M8 15h84m-74-10L8 15l10 10M82 5l10 10-10 10" />
</svg></div>
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<rect x="22" y="13" width="76" height="27" rx="4" fill="#aaa" />
<rect x="22" y="46" width="76" height="27" rx="4" fill="#aaa" />
<circle cx="34" cy="27" r="4" fill="#f1f1f1" />
<circle cx="34" cy="60" r="4" fill="#f1f1f1" />
<path d="M48 27h38M48 60h38" stroke="#d9d9d9" stroke-width="4" stroke-linecap="round" />
<path d="M60 73v14m-21 0h42" stroke="#aaa" stroke-width="7" stroke-linecap="round" />
</svg><span class="ind unknown" aria-hidden="true">&#8211;</span></div>
<p class="location">Origin</p>
<h2>Host</h2>
<p class="state unknown">Not contacted</p>
</div>
</div>
</section>
<main class="container">
<section class="help" aria-label="Error information">
<div>
<h2>What happened?</h2>
<p>Access to the requested resource is not permitted.</p>
</div>
<div>
<h2>What can I do?</h2>
<p>Contact the website administrator if you believe this is an error.</p>
</div>
</section>
<footer class="bottom"><span class="brand">RustProxy</span><span class="signature">Performance &amp; security by
RustProxy</span></footer>
</main>
</body>
</html>
+387
View File
@@ -0,0 +1,387 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="robots" content="noindex,nofollow">
<title>Error 404: Page not found | RustProxy</title>
<style>
:root {
color-scheme: light;
font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #333
}
* {
box-sizing: border-box
}
body {
margin: 0;
background: #fff;
min-height: 100vh;
font-size: 15px;
line-height: 1.5;
-webkit-font-smoothing: antialiased
}
.container {
max-width: 1030px;
margin: 0 auto;
padding: 0 24px
}
.intro {
padding: 54px 0 44px
}
h1 {
font-size: 49px;
line-height: 1.18;
font-weight: 300;
margin: 0 0 5px;
letter-spacing: -1.1px;
color: #313131
}
.error-code {
font-weight: 300;
color: #8d8d8d
}
.subtitle {
font-weight: 300;
font-size: 25px;
line-height: 1.4;
margin: 2px 0;
color: #777
}
.diagnostics-band {
background: #f1f1f1;
border-top: 1px solid #e9e9e9;
border-bottom: 1px solid #e5e5e5
}
.diagnostics {
display: grid;
grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr) 76px minmax(0, 1fr);
align-items: start;
padding: 39px 0 36px;
text-align: center
}
.node {
min-width: 0;
text-align: center
}
.symbol {
height: 107px;
position: relative;
margin: 0 auto 11px;
width: 142px;
max-width: 100%;
display: flex;
align-items: center;
justify-content: center
}
.symbol svg {
width: 118px;
height: 100px;
display: block;
overflow: visible
}
.symbol .ind {
position: absolute;
right: 10px;
bottom: 10px;
display: grid;
place-items: center;
border: 3px solid #f1f1f1;
border-radius: 50%;
height: 37px;
width: 37px;
font-family: Arial, sans-serif;
font-size: 24px;
font-weight: 700;
line-height: 1;
color: white;
background: #9bca3e
}
.symbol .ind.error {
background: #c93135
}
.symbol .ind.unknown {
background: #aaa;
font-weight: 500;
font-size: 26px
}
.location {
font-size: 14px;
color: #a2a2a2;
margin: 0;
overflow-wrap: anywhere
}
.node h2 {
font-size: 21px;
font-weight: 400;
margin: 1px 0 0;
color: #545454;
overflow-wrap: anywhere
}
.state {
font-size: 16px;
font-weight: 500;
margin: 2px 0 0;
color: #8cbb35;
overflow-wrap: anywhere
}
.state.error {
color: #c93135
}
.state.unknown {
color: #888
}
.connector {
padding-top: 53px;
min-width: 0;
color: #aaa
}
.connector svg {
height: 30px;
width: 100%;
display: block;
fill: none;
stroke: currentColor;
stroke-width: 4;
stroke-linecap: round;
stroke-linejoin: round
}
.help {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 58px;
padding: 41px 0 45px
}
.help h2 {
font-size: 20px;
line-height: 1.35;
font-weight: 400;
color: #333;
margin: 0 0 12px
}
.help p {
font-size: 15px;
line-height: 1.6;
margin: 0;
color: #555
}
.bottom {
border-top: 1px solid #e7e7e7;
margin-top: 7px;
padding: 22px 0 35px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 14px;
color: #999;
font-size: 12px
}
.brand {
color: #858585;
font-weight: 600;
letter-spacing: .02em
}
.bottom .signature {
font-size: 12px
}
@media(max-width:700px) {
.intro {
padding: 35px 0 30px
}
h1 {
font-size: 36px;
letter-spacing: -.7px
}
.subtitle {
font-size: 20px
}
.diagnostics {
grid-template-columns: repeat(3, minmax(0, 1fr));
padding: 25px 0;
gap: 4px
}
.connector {
display: none
}
.symbol {
height: 76px;
width: 86px;
margin-bottom: 6px
}
.symbol svg {
width: 77px;
height: 70px
}
.symbol .ind {
width: 28px;
height: 28px;
font-size: 18px;
border-width: 2px;
right: 0;
bottom: 1px
}
.symbol .ind.unknown {
font-size: 21px
}
.location {
font-size: 12px
}
.node h2 {
font-size: 15px
}
.state {
font-size: 13px
}
.help {
grid-template-columns: 1fr;
gap: 24px;
padding: 31px 0
}
.bottom {
flex-wrap: wrap
}
}
@media(max-width:360px) {
.container {
padding: 0 14px
}
.intro {
padding-top: 27px
}
h1 {
font-size: 31px
}
.symbol {
width: 70px
}
.symbol svg {
width: 69px
}
.node h2 {
font-size: 14px
}
.state {
font-size: 12px
}
}
</style>
</head>
<body>
<header class="container intro">
<h1>Page not found <span class="error-code">Error 404</span></h1>
<p class="subtitle">Error code 404</p>
</header>
<section class="diagnostics-band" aria-label="Request status">
<div class="container diagnostics">
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<rect x="13" y="16" width="94" height="69" rx="4" fill="#aaa" />
<rect x="21" y="33" width="78" height="44" fill="#f1f1f1" />
<circle cx="23" cy="24" r="3" fill="#f1f1f1" />
<circle cx="34" cy="24" r="3" fill="#f1f1f1" />
<path d="M14 31h93" stroke="#f1f1f1" stroke-width="2" />
</svg><span class="ind ok" aria-hidden="true">&#10003;</span></div>
<p class="location">You</p>
<h2>Browser</h2>
<p class="state ok">Working</p>
</div>
<div class="connector" aria-hidden="true"><svg viewBox="0 0 100 30">
<path d="M8 15h84m-74-10L8 15l10 10M82 5l10 10-10 10" />
</svg></div>
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<path d="M60 9 103 33v45L60 101 17 78V33Z" fill="#aaa" />
<path d="M60 21 91 39v32L60 88 29 71V39Z" fill="#f1f1f1" /><text x="60" y="67" text-anchor="middle"
font-size="37" font-weight="700" font-family="Arial,sans-serif" fill="#888">RP</text>
</svg><span class="ind error" aria-hidden="true">&#215;</span></div>
<p class="location">Gateway</p>
<h2>RustProxy</h2>
<p class="state error">Not found</p>
</div>
<div class="connector" aria-hidden="true"><svg viewBox="0 0 100 30">
<path d="M8 15h84m-74-10L8 15l10 10M82 5l10 10-10 10" />
</svg></div>
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<rect x="22" y="13" width="76" height="27" rx="4" fill="#aaa" />
<rect x="22" y="46" width="76" height="27" rx="4" fill="#aaa" />
<circle cx="34" cy="27" r="4" fill="#f1f1f1" />
<circle cx="34" cy="60" r="4" fill="#f1f1f1" />
<path d="M48 27h38M48 60h38" stroke="#d9d9d9" stroke-width="4" stroke-linecap="round" />
<path d="M60 73v14m-21 0h42" stroke="#aaa" stroke-width="7" stroke-linecap="round" />
</svg><span class="ind unknown" aria-hidden="true">&#8211;</span></div>
<p class="location">Origin</p>
<h2>Host</h2>
<p class="state unknown">Not confirmed</p>
</div>
</div>
</section>
<main class="container">
<section class="help" aria-label="Error information">
<div>
<h2>What happened?</h2>
<p>The requested resource could not be found.</p>
</div>
<div>
<h2>What can I do?</h2>
<p>Check the address or return to the website homepage.</p>
</div>
</section>
<footer class="bottom"><span class="brand">RustProxy</span><span class="signature">Performance &amp; security by
RustProxy</span></footer>
</main>
</body>
</html>
+387
View File
@@ -0,0 +1,387 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="robots" content="noindex,nofollow">
<title>Error 408: Request timeout | RustProxy</title>
<style>
:root {
color-scheme: light;
font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #333
}
* {
box-sizing: border-box
}
body {
margin: 0;
background: #fff;
min-height: 100vh;
font-size: 15px;
line-height: 1.5;
-webkit-font-smoothing: antialiased
}
.container {
max-width: 1030px;
margin: 0 auto;
padding: 0 24px
}
.intro {
padding: 54px 0 44px
}
h1 {
font-size: 49px;
line-height: 1.18;
font-weight: 300;
margin: 0 0 5px;
letter-spacing: -1.1px;
color: #313131
}
.error-code {
font-weight: 300;
color: #8d8d8d
}
.subtitle {
font-weight: 300;
font-size: 25px;
line-height: 1.4;
margin: 2px 0;
color: #777
}
.diagnostics-band {
background: #f1f1f1;
border-top: 1px solid #e9e9e9;
border-bottom: 1px solid #e5e5e5
}
.diagnostics {
display: grid;
grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr) 76px minmax(0, 1fr);
align-items: start;
padding: 39px 0 36px;
text-align: center
}
.node {
min-width: 0;
text-align: center
}
.symbol {
height: 107px;
position: relative;
margin: 0 auto 11px;
width: 142px;
max-width: 100%;
display: flex;
align-items: center;
justify-content: center
}
.symbol svg {
width: 118px;
height: 100px;
display: block;
overflow: visible
}
.symbol .ind {
position: absolute;
right: 10px;
bottom: 10px;
display: grid;
place-items: center;
border: 3px solid #f1f1f1;
border-radius: 50%;
height: 37px;
width: 37px;
font-family: Arial, sans-serif;
font-size: 24px;
font-weight: 700;
line-height: 1;
color: white;
background: #9bca3e
}
.symbol .ind.error {
background: #c93135
}
.symbol .ind.unknown {
background: #aaa;
font-weight: 500;
font-size: 26px
}
.location {
font-size: 14px;
color: #a2a2a2;
margin: 0;
overflow-wrap: anywhere
}
.node h2 {
font-size: 21px;
font-weight: 400;
margin: 1px 0 0;
color: #545454;
overflow-wrap: anywhere
}
.state {
font-size: 16px;
font-weight: 500;
margin: 2px 0 0;
color: #8cbb35;
overflow-wrap: anywhere
}
.state.error {
color: #c93135
}
.state.unknown {
color: #888
}
.connector {
padding-top: 53px;
min-width: 0;
color: #aaa
}
.connector svg {
height: 30px;
width: 100%;
display: block;
fill: none;
stroke: currentColor;
stroke-width: 4;
stroke-linecap: round;
stroke-linejoin: round
}
.help {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 58px;
padding: 41px 0 45px
}
.help h2 {
font-size: 20px;
line-height: 1.35;
font-weight: 400;
color: #333;
margin: 0 0 12px
}
.help p {
font-size: 15px;
line-height: 1.6;
margin: 0;
color: #555
}
.bottom {
border-top: 1px solid #e7e7e7;
margin-top: 7px;
padding: 22px 0 35px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 14px;
color: #999;
font-size: 12px
}
.brand {
color: #858585;
font-weight: 600;
letter-spacing: .02em
}
.bottom .signature {
font-size: 12px
}
@media(max-width:700px) {
.intro {
padding: 35px 0 30px
}
h1 {
font-size: 36px;
letter-spacing: -.7px
}
.subtitle {
font-size: 20px
}
.diagnostics {
grid-template-columns: repeat(3, minmax(0, 1fr));
padding: 25px 0;
gap: 4px
}
.connector {
display: none
}
.symbol {
height: 76px;
width: 86px;
margin-bottom: 6px
}
.symbol svg {
width: 77px;
height: 70px
}
.symbol .ind {
width: 28px;
height: 28px;
font-size: 18px;
border-width: 2px;
right: 0;
bottom: 1px
}
.symbol .ind.unknown {
font-size: 21px
}
.location {
font-size: 12px
}
.node h2 {
font-size: 15px
}
.state {
font-size: 13px
}
.help {
grid-template-columns: 1fr;
gap: 24px;
padding: 31px 0
}
.bottom {
flex-wrap: wrap
}
}
@media(max-width:360px) {
.container {
padding: 0 14px
}
.intro {
padding-top: 27px
}
h1 {
font-size: 31px
}
.symbol {
width: 70px
}
.symbol svg {
width: 69px
}
.node h2 {
font-size: 14px
}
.state {
font-size: 12px
}
}
</style>
</head>
<body>
<header class="container intro">
<h1>Request timeout <span class="error-code">Error 408</span></h1>
<p class="subtitle">Error code 408</p>
</header>
<section class="diagnostics-band" aria-label="Request status">
<div class="container diagnostics">
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<rect x="13" y="16" width="94" height="69" rx="4" fill="#aaa" />
<rect x="21" y="33" width="78" height="44" fill="#f1f1f1" />
<circle cx="23" cy="24" r="3" fill="#f1f1f1" />
<circle cx="34" cy="24" r="3" fill="#f1f1f1" />
<path d="M14 31h93" stroke="#f1f1f1" stroke-width="2" />
</svg><span class="ind ok" aria-hidden="true">&#10003;</span></div>
<p class="location">You</p>
<h2>Browser</h2>
<p class="state ok">Working</p>
</div>
<div class="connector" aria-hidden="true"><svg viewBox="0 0 100 30">
<path d="M8 15h84m-74-10L8 15l10 10M82 5l10 10-10 10" />
</svg></div>
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<path d="M60 9 103 33v45L60 101 17 78V33Z" fill="#aaa" />
<path d="M60 21 91 39v32L60 88 29 71V39Z" fill="#f1f1f1" /><text x="60" y="67" text-anchor="middle"
font-size="37" font-weight="700" font-family="Arial,sans-serif" fill="#888">RP</text>
</svg><span class="ind error" aria-hidden="true">&#215;</span></div>
<p class="location">Gateway</p>
<h2>RustProxy</h2>
<p class="state error">Timed out</p>
</div>
<div class="connector" aria-hidden="true"><svg viewBox="0 0 100 30">
<path d="M8 15h84m-74-10L8 15l10 10M82 5l10 10-10 10" />
</svg></div>
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<rect x="22" y="13" width="76" height="27" rx="4" fill="#aaa" />
<rect x="22" y="46" width="76" height="27" rx="4" fill="#aaa" />
<circle cx="34" cy="27" r="4" fill="#f1f1f1" />
<circle cx="34" cy="60" r="4" fill="#f1f1f1" />
<path d="M48 27h38M48 60h38" stroke="#d9d9d9" stroke-width="4" stroke-linecap="round" />
<path d="M60 73v14m-21 0h42" stroke="#aaa" stroke-width="7" stroke-linecap="round" />
</svg><span class="ind unknown" aria-hidden="true">&#8211;</span></div>
<p class="location">Origin</p>
<h2>Host</h2>
<p class="state unknown">Not confirmed</p>
</div>
</div>
</section>
<main class="container">
<section class="help" aria-label="Error information">
<div>
<h2>What happened?</h2>
<p>The request took too long to complete.</p>
</div>
<div>
<h2>What can I do?</h2>
<p>Try again when your connection is stable.</p>
</div>
</section>
<footer class="bottom"><span class="brand">RustProxy</span><span class="signature">Performance &amp; security by
RustProxy</span></footer>
</main>
</body>
</html>
+387
View File
@@ -0,0 +1,387 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="robots" content="noindex,nofollow">
<title>Error 410: Resource gone | RustProxy</title>
<style>
:root {
color-scheme: light;
font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #333
}
* {
box-sizing: border-box
}
body {
margin: 0;
background: #fff;
min-height: 100vh;
font-size: 15px;
line-height: 1.5;
-webkit-font-smoothing: antialiased
}
.container {
max-width: 1030px;
margin: 0 auto;
padding: 0 24px
}
.intro {
padding: 54px 0 44px
}
h1 {
font-size: 49px;
line-height: 1.18;
font-weight: 300;
margin: 0 0 5px;
letter-spacing: -1.1px;
color: #313131
}
.error-code {
font-weight: 300;
color: #8d8d8d
}
.subtitle {
font-weight: 300;
font-size: 25px;
line-height: 1.4;
margin: 2px 0;
color: #777
}
.diagnostics-band {
background: #f1f1f1;
border-top: 1px solid #e9e9e9;
border-bottom: 1px solid #e5e5e5
}
.diagnostics {
display: grid;
grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr) 76px minmax(0, 1fr);
align-items: start;
padding: 39px 0 36px;
text-align: center
}
.node {
min-width: 0;
text-align: center
}
.symbol {
height: 107px;
position: relative;
margin: 0 auto 11px;
width: 142px;
max-width: 100%;
display: flex;
align-items: center;
justify-content: center
}
.symbol svg {
width: 118px;
height: 100px;
display: block;
overflow: visible
}
.symbol .ind {
position: absolute;
right: 10px;
bottom: 10px;
display: grid;
place-items: center;
border: 3px solid #f1f1f1;
border-radius: 50%;
height: 37px;
width: 37px;
font-family: Arial, sans-serif;
font-size: 24px;
font-weight: 700;
line-height: 1;
color: white;
background: #9bca3e
}
.symbol .ind.error {
background: #c93135
}
.symbol .ind.unknown {
background: #aaa;
font-weight: 500;
font-size: 26px
}
.location {
font-size: 14px;
color: #a2a2a2;
margin: 0;
overflow-wrap: anywhere
}
.node h2 {
font-size: 21px;
font-weight: 400;
margin: 1px 0 0;
color: #545454;
overflow-wrap: anywhere
}
.state {
font-size: 16px;
font-weight: 500;
margin: 2px 0 0;
color: #8cbb35;
overflow-wrap: anywhere
}
.state.error {
color: #c93135
}
.state.unknown {
color: #888
}
.connector {
padding-top: 53px;
min-width: 0;
color: #aaa
}
.connector svg {
height: 30px;
width: 100%;
display: block;
fill: none;
stroke: currentColor;
stroke-width: 4;
stroke-linecap: round;
stroke-linejoin: round
}
.help {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 58px;
padding: 41px 0 45px
}
.help h2 {
font-size: 20px;
line-height: 1.35;
font-weight: 400;
color: #333;
margin: 0 0 12px
}
.help p {
font-size: 15px;
line-height: 1.6;
margin: 0;
color: #555
}
.bottom {
border-top: 1px solid #e7e7e7;
margin-top: 7px;
padding: 22px 0 35px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 14px;
color: #999;
font-size: 12px
}
.brand {
color: #858585;
font-weight: 600;
letter-spacing: .02em
}
.bottom .signature {
font-size: 12px
}
@media(max-width:700px) {
.intro {
padding: 35px 0 30px
}
h1 {
font-size: 36px;
letter-spacing: -.7px
}
.subtitle {
font-size: 20px
}
.diagnostics {
grid-template-columns: repeat(3, minmax(0, 1fr));
padding: 25px 0;
gap: 4px
}
.connector {
display: none
}
.symbol {
height: 76px;
width: 86px;
margin-bottom: 6px
}
.symbol svg {
width: 77px;
height: 70px
}
.symbol .ind {
width: 28px;
height: 28px;
font-size: 18px;
border-width: 2px;
right: 0;
bottom: 1px
}
.symbol .ind.unknown {
font-size: 21px
}
.location {
font-size: 12px
}
.node h2 {
font-size: 15px
}
.state {
font-size: 13px
}
.help {
grid-template-columns: 1fr;
gap: 24px;
padding: 31px 0
}
.bottom {
flex-wrap: wrap
}
}
@media(max-width:360px) {
.container {
padding: 0 14px
}
.intro {
padding-top: 27px
}
h1 {
font-size: 31px
}
.symbol {
width: 70px
}
.symbol svg {
width: 69px
}
.node h2 {
font-size: 14px
}
.state {
font-size: 12px
}
}
</style>
</head>
<body>
<header class="container intro">
<h1>Resource gone <span class="error-code">Error 410</span></h1>
<p class="subtitle">Error code 410</p>
</header>
<section class="diagnostics-band" aria-label="Request status">
<div class="container diagnostics">
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<rect x="13" y="16" width="94" height="69" rx="4" fill="#aaa" />
<rect x="21" y="33" width="78" height="44" fill="#f1f1f1" />
<circle cx="23" cy="24" r="3" fill="#f1f1f1" />
<circle cx="34" cy="24" r="3" fill="#f1f1f1" />
<path d="M14 31h93" stroke="#f1f1f1" stroke-width="2" />
</svg><span class="ind ok" aria-hidden="true">&#10003;</span></div>
<p class="location">You</p>
<h2>Browser</h2>
<p class="state ok">Working</p>
</div>
<div class="connector" aria-hidden="true"><svg viewBox="0 0 100 30">
<path d="M8 15h84m-74-10L8 15l10 10M82 5l10 10-10 10" />
</svg></div>
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<path d="M60 9 103 33v45L60 101 17 78V33Z" fill="#aaa" />
<path d="M60 21 91 39v32L60 88 29 71V39Z" fill="#f1f1f1" /><text x="60" y="67" text-anchor="middle"
font-size="37" font-weight="700" font-family="Arial,sans-serif" fill="#888">RP</text>
</svg><span class="ind error" aria-hidden="true">&#215;</span></div>
<p class="location">Gateway</p>
<h2>RustProxy</h2>
<p class="state error">No longer available</p>
</div>
<div class="connector" aria-hidden="true"><svg viewBox="0 0 100 30">
<path d="M8 15h84m-74-10L8 15l10 10M82 5l10 10-10 10" />
</svg></div>
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<rect x="22" y="13" width="76" height="27" rx="4" fill="#aaa" />
<rect x="22" y="46" width="76" height="27" rx="4" fill="#aaa" />
<circle cx="34" cy="27" r="4" fill="#f1f1f1" />
<circle cx="34" cy="60" r="4" fill="#f1f1f1" />
<path d="M48 27h38M48 60h38" stroke="#d9d9d9" stroke-width="4" stroke-linecap="round" />
<path d="M60 73v14m-21 0h42" stroke="#aaa" stroke-width="7" stroke-linecap="round" />
</svg><span class="ind unknown" aria-hidden="true">&#8211;</span></div>
<p class="location">Origin</p>
<h2>Host</h2>
<p class="state unknown">Not contacted</p>
</div>
</div>
</section>
<main class="container">
<section class="help" aria-label="Error information">
<div>
<h2>What happened?</h2>
<p>The requested resource is no longer available.</p>
</div>
<div>
<h2>What can I do?</h2>
<p>Update any saved links to this resource.</p>
</div>
</section>
<footer class="bottom"><span class="brand">RustProxy</span><span class="signature">Performance &amp; security by
RustProxy</span></footer>
</main>
</body>
</html>
+387
View File
@@ -0,0 +1,387 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="robots" content="noindex,nofollow">
<title>Error 413: Content too large | RustProxy</title>
<style>
:root {
color-scheme: light;
font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #333
}
* {
box-sizing: border-box
}
body {
margin: 0;
background: #fff;
min-height: 100vh;
font-size: 15px;
line-height: 1.5;
-webkit-font-smoothing: antialiased
}
.container {
max-width: 1030px;
margin: 0 auto;
padding: 0 24px
}
.intro {
padding: 54px 0 44px
}
h1 {
font-size: 49px;
line-height: 1.18;
font-weight: 300;
margin: 0 0 5px;
letter-spacing: -1.1px;
color: #313131
}
.error-code {
font-weight: 300;
color: #8d8d8d
}
.subtitle {
font-weight: 300;
font-size: 25px;
line-height: 1.4;
margin: 2px 0;
color: #777
}
.diagnostics-band {
background: #f1f1f1;
border-top: 1px solid #e9e9e9;
border-bottom: 1px solid #e5e5e5
}
.diagnostics {
display: grid;
grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr) 76px minmax(0, 1fr);
align-items: start;
padding: 39px 0 36px;
text-align: center
}
.node {
min-width: 0;
text-align: center
}
.symbol {
height: 107px;
position: relative;
margin: 0 auto 11px;
width: 142px;
max-width: 100%;
display: flex;
align-items: center;
justify-content: center
}
.symbol svg {
width: 118px;
height: 100px;
display: block;
overflow: visible
}
.symbol .ind {
position: absolute;
right: 10px;
bottom: 10px;
display: grid;
place-items: center;
border: 3px solid #f1f1f1;
border-radius: 50%;
height: 37px;
width: 37px;
font-family: Arial, sans-serif;
font-size: 24px;
font-weight: 700;
line-height: 1;
color: white;
background: #9bca3e
}
.symbol .ind.error {
background: #c93135
}
.symbol .ind.unknown {
background: #aaa;
font-weight: 500;
font-size: 26px
}
.location {
font-size: 14px;
color: #a2a2a2;
margin: 0;
overflow-wrap: anywhere
}
.node h2 {
font-size: 21px;
font-weight: 400;
margin: 1px 0 0;
color: #545454;
overflow-wrap: anywhere
}
.state {
font-size: 16px;
font-weight: 500;
margin: 2px 0 0;
color: #8cbb35;
overflow-wrap: anywhere
}
.state.error {
color: #c93135
}
.state.unknown {
color: #888
}
.connector {
padding-top: 53px;
min-width: 0;
color: #aaa
}
.connector svg {
height: 30px;
width: 100%;
display: block;
fill: none;
stroke: currentColor;
stroke-width: 4;
stroke-linecap: round;
stroke-linejoin: round
}
.help {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 58px;
padding: 41px 0 45px
}
.help h2 {
font-size: 20px;
line-height: 1.35;
font-weight: 400;
color: #333;
margin: 0 0 12px
}
.help p {
font-size: 15px;
line-height: 1.6;
margin: 0;
color: #555
}
.bottom {
border-top: 1px solid #e7e7e7;
margin-top: 7px;
padding: 22px 0 35px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 14px;
color: #999;
font-size: 12px
}
.brand {
color: #858585;
font-weight: 600;
letter-spacing: .02em
}
.bottom .signature {
font-size: 12px
}
@media(max-width:700px) {
.intro {
padding: 35px 0 30px
}
h1 {
font-size: 36px;
letter-spacing: -.7px
}
.subtitle {
font-size: 20px
}
.diagnostics {
grid-template-columns: repeat(3, minmax(0, 1fr));
padding: 25px 0;
gap: 4px
}
.connector {
display: none
}
.symbol {
height: 76px;
width: 86px;
margin-bottom: 6px
}
.symbol svg {
width: 77px;
height: 70px
}
.symbol .ind {
width: 28px;
height: 28px;
font-size: 18px;
border-width: 2px;
right: 0;
bottom: 1px
}
.symbol .ind.unknown {
font-size: 21px
}
.location {
font-size: 12px
}
.node h2 {
font-size: 15px
}
.state {
font-size: 13px
}
.help {
grid-template-columns: 1fr;
gap: 24px;
padding: 31px 0
}
.bottom {
flex-wrap: wrap
}
}
@media(max-width:360px) {
.container {
padding: 0 14px
}
.intro {
padding-top: 27px
}
h1 {
font-size: 31px
}
.symbol {
width: 70px
}
.symbol svg {
width: 69px
}
.node h2 {
font-size: 14px
}
.state {
font-size: 12px
}
}
</style>
</head>
<body>
<header class="container intro">
<h1>Content too large <span class="error-code">Error 413</span></h1>
<p class="subtitle">Error code 413</p>
</header>
<section class="diagnostics-band" aria-label="Request status">
<div class="container diagnostics">
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<rect x="13" y="16" width="94" height="69" rx="4" fill="#aaa" />
<rect x="21" y="33" width="78" height="44" fill="#f1f1f1" />
<circle cx="23" cy="24" r="3" fill="#f1f1f1" />
<circle cx="34" cy="24" r="3" fill="#f1f1f1" />
<path d="M14 31h93" stroke="#f1f1f1" stroke-width="2" />
</svg><span class="ind ok" aria-hidden="true">&#10003;</span></div>
<p class="location">You</p>
<h2>Browser</h2>
<p class="state ok">Working</p>
</div>
<div class="connector" aria-hidden="true"><svg viewBox="0 0 100 30">
<path d="M8 15h84m-74-10L8 15l10 10M82 5l10 10-10 10" />
</svg></div>
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<path d="M60 9 103 33v45L60 101 17 78V33Z" fill="#aaa" />
<path d="M60 21 91 39v32L60 88 29 71V39Z" fill="#f1f1f1" /><text x="60" y="67" text-anchor="middle"
font-size="37" font-weight="700" font-family="Arial,sans-serif" fill="#888">RP</text>
</svg><span class="ind error" aria-hidden="true">&#215;</span></div>
<p class="location">Gateway</p>
<h2>RustProxy</h2>
<p class="state error">Request rejected</p>
</div>
<div class="connector" aria-hidden="true"><svg viewBox="0 0 100 30">
<path d="M8 15h84m-74-10L8 15l10 10M82 5l10 10-10 10" />
</svg></div>
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<rect x="22" y="13" width="76" height="27" rx="4" fill="#aaa" />
<rect x="22" y="46" width="76" height="27" rx="4" fill="#aaa" />
<circle cx="34" cy="27" r="4" fill="#f1f1f1" />
<circle cx="34" cy="60" r="4" fill="#f1f1f1" />
<path d="M48 27h38M48 60h38" stroke="#d9d9d9" stroke-width="4" stroke-linecap="round" />
<path d="M60 73v14m-21 0h42" stroke="#aaa" stroke-width="7" stroke-linecap="round" />
</svg><span class="ind unknown" aria-hidden="true">&#8211;</span></div>
<p class="location">Origin</p>
<h2>Host</h2>
<p class="state unknown">Not contacted</p>
</div>
</div>
</section>
<main class="container">
<section class="help" aria-label="Error information">
<div>
<h2>What happened?</h2>
<p>The request body exceeds the allowed size.</p>
</div>
<div>
<h2>What can I do?</h2>
<p>Reduce the size of the request and try again.</p>
</div>
</section>
<footer class="bottom"><span class="brand">RustProxy</span><span class="signature">Performance &amp; security by
RustProxy</span></footer>
</main>
</body>
</html>
+387
View File
@@ -0,0 +1,387 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="robots" content="noindex,nofollow">
<title>Error 429: Too many requests | RustProxy</title>
<style>
:root {
color-scheme: light;
font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #333
}
* {
box-sizing: border-box
}
body {
margin: 0;
background: #fff;
min-height: 100vh;
font-size: 15px;
line-height: 1.5;
-webkit-font-smoothing: antialiased
}
.container {
max-width: 1030px;
margin: 0 auto;
padding: 0 24px
}
.intro {
padding: 54px 0 44px
}
h1 {
font-size: 49px;
line-height: 1.18;
font-weight: 300;
margin: 0 0 5px;
letter-spacing: -1.1px;
color: #313131
}
.error-code {
font-weight: 300;
color: #8d8d8d
}
.subtitle {
font-weight: 300;
font-size: 25px;
line-height: 1.4;
margin: 2px 0;
color: #777
}
.diagnostics-band {
background: #f1f1f1;
border-top: 1px solid #e9e9e9;
border-bottom: 1px solid #e5e5e5
}
.diagnostics {
display: grid;
grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr) 76px minmax(0, 1fr);
align-items: start;
padding: 39px 0 36px;
text-align: center
}
.node {
min-width: 0;
text-align: center
}
.symbol {
height: 107px;
position: relative;
margin: 0 auto 11px;
width: 142px;
max-width: 100%;
display: flex;
align-items: center;
justify-content: center
}
.symbol svg {
width: 118px;
height: 100px;
display: block;
overflow: visible
}
.symbol .ind {
position: absolute;
right: 10px;
bottom: 10px;
display: grid;
place-items: center;
border: 3px solid #f1f1f1;
border-radius: 50%;
height: 37px;
width: 37px;
font-family: Arial, sans-serif;
font-size: 24px;
font-weight: 700;
line-height: 1;
color: white;
background: #9bca3e
}
.symbol .ind.error {
background: #c93135
}
.symbol .ind.unknown {
background: #aaa;
font-weight: 500;
font-size: 26px
}
.location {
font-size: 14px;
color: #a2a2a2;
margin: 0;
overflow-wrap: anywhere
}
.node h2 {
font-size: 21px;
font-weight: 400;
margin: 1px 0 0;
color: #545454;
overflow-wrap: anywhere
}
.state {
font-size: 16px;
font-weight: 500;
margin: 2px 0 0;
color: #8cbb35;
overflow-wrap: anywhere
}
.state.error {
color: #c93135
}
.state.unknown {
color: #888
}
.connector {
padding-top: 53px;
min-width: 0;
color: #aaa
}
.connector svg {
height: 30px;
width: 100%;
display: block;
fill: none;
stroke: currentColor;
stroke-width: 4;
stroke-linecap: round;
stroke-linejoin: round
}
.help {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 58px;
padding: 41px 0 45px
}
.help h2 {
font-size: 20px;
line-height: 1.35;
font-weight: 400;
color: #333;
margin: 0 0 12px
}
.help p {
font-size: 15px;
line-height: 1.6;
margin: 0;
color: #555
}
.bottom {
border-top: 1px solid #e7e7e7;
margin-top: 7px;
padding: 22px 0 35px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 14px;
color: #999;
font-size: 12px
}
.brand {
color: #858585;
font-weight: 600;
letter-spacing: .02em
}
.bottom .signature {
font-size: 12px
}
@media(max-width:700px) {
.intro {
padding: 35px 0 30px
}
h1 {
font-size: 36px;
letter-spacing: -.7px
}
.subtitle {
font-size: 20px
}
.diagnostics {
grid-template-columns: repeat(3, minmax(0, 1fr));
padding: 25px 0;
gap: 4px
}
.connector {
display: none
}
.symbol {
height: 76px;
width: 86px;
margin-bottom: 6px
}
.symbol svg {
width: 77px;
height: 70px
}
.symbol .ind {
width: 28px;
height: 28px;
font-size: 18px;
border-width: 2px;
right: 0;
bottom: 1px
}
.symbol .ind.unknown {
font-size: 21px
}
.location {
font-size: 12px
}
.node h2 {
font-size: 15px
}
.state {
font-size: 13px
}
.help {
grid-template-columns: 1fr;
gap: 24px;
padding: 31px 0
}
.bottom {
flex-wrap: wrap
}
}
@media(max-width:360px) {
.container {
padding: 0 14px
}
.intro {
padding-top: 27px
}
h1 {
font-size: 31px
}
.symbol {
width: 70px
}
.symbol svg {
width: 69px
}
.node h2 {
font-size: 14px
}
.state {
font-size: 12px
}
}
</style>
</head>
<body>
<header class="container intro">
<h1>Too many requests <span class="error-code">Error 429</span></h1>
<p class="subtitle">Error code 429</p>
</header>
<section class="diagnostics-band" aria-label="Request status">
<div class="container diagnostics">
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<rect x="13" y="16" width="94" height="69" rx="4" fill="#aaa" />
<rect x="21" y="33" width="78" height="44" fill="#f1f1f1" />
<circle cx="23" cy="24" r="3" fill="#f1f1f1" />
<circle cx="34" cy="24" r="3" fill="#f1f1f1" />
<path d="M14 31h93" stroke="#f1f1f1" stroke-width="2" />
</svg><span class="ind ok" aria-hidden="true">&#10003;</span></div>
<p class="location">You</p>
<h2>Browser</h2>
<p class="state ok">Working</p>
</div>
<div class="connector" aria-hidden="true"><svg viewBox="0 0 100 30">
<path d="M8 15h84m-74-10L8 15l10 10M82 5l10 10-10 10" />
</svg></div>
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<path d="M60 9 103 33v45L60 101 17 78V33Z" fill="#aaa" />
<path d="M60 21 91 39v32L60 88 29 71V39Z" fill="#f1f1f1" /><text x="60" y="67" text-anchor="middle"
font-size="37" font-weight="700" font-family="Arial,sans-serif" fill="#888">RP</text>
</svg><span class="ind error" aria-hidden="true">&#215;</span></div>
<p class="location">Gateway</p>
<h2>RustProxy</h2>
<p class="state error">Rate limited</p>
</div>
<div class="connector" aria-hidden="true"><svg viewBox="0 0 100 30">
<path d="M8 15h84m-74-10L8 15l10 10M82 5l10 10-10 10" />
</svg></div>
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<rect x="22" y="13" width="76" height="27" rx="4" fill="#aaa" />
<rect x="22" y="46" width="76" height="27" rx="4" fill="#aaa" />
<circle cx="34" cy="27" r="4" fill="#f1f1f1" />
<circle cx="34" cy="60" r="4" fill="#f1f1f1" />
<path d="M48 27h38M48 60h38" stroke="#d9d9d9" stroke-width="4" stroke-linecap="round" />
<path d="M60 73v14m-21 0h42" stroke="#aaa" stroke-width="7" stroke-linecap="round" />
</svg><span class="ind unknown" aria-hidden="true">&#8211;</span></div>
<p class="location">Origin</p>
<h2>Host</h2>
<p class="state unknown">Not contacted</p>
</div>
</div>
</section>
<main class="container">
<section class="help" aria-label="Error information">
<div>
<h2>What happened?</h2>
<p>The request rate limit has been exceeded.</p>
</div>
<div>
<h2>What can I do?</h2>
<p>Wait a moment before trying again.</p>
</div>
</section>
<footer class="bottom"><span class="brand">RustProxy</span><span class="signature">Performance &amp; security by
RustProxy</span></footer>
</main>
</body>
</html>
+387
View File
@@ -0,0 +1,387 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="robots" content="noindex,nofollow">
<title>Error 500: Internal server error | RustProxy</title>
<style>
:root {
color-scheme: light;
font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #333
}
* {
box-sizing: border-box
}
body {
margin: 0;
background: #fff;
min-height: 100vh;
font-size: 15px;
line-height: 1.5;
-webkit-font-smoothing: antialiased
}
.container {
max-width: 1030px;
margin: 0 auto;
padding: 0 24px
}
.intro {
padding: 54px 0 44px
}
h1 {
font-size: 49px;
line-height: 1.18;
font-weight: 300;
margin: 0 0 5px;
letter-spacing: -1.1px;
color: #313131
}
.error-code {
font-weight: 300;
color: #8d8d8d
}
.subtitle {
font-weight: 300;
font-size: 25px;
line-height: 1.4;
margin: 2px 0;
color: #777
}
.diagnostics-band {
background: #f1f1f1;
border-top: 1px solid #e9e9e9;
border-bottom: 1px solid #e5e5e5
}
.diagnostics {
display: grid;
grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr) 76px minmax(0, 1fr);
align-items: start;
padding: 39px 0 36px;
text-align: center
}
.node {
min-width: 0;
text-align: center
}
.symbol {
height: 107px;
position: relative;
margin: 0 auto 11px;
width: 142px;
max-width: 100%;
display: flex;
align-items: center;
justify-content: center
}
.symbol svg {
width: 118px;
height: 100px;
display: block;
overflow: visible
}
.symbol .ind {
position: absolute;
right: 10px;
bottom: 10px;
display: grid;
place-items: center;
border: 3px solid #f1f1f1;
border-radius: 50%;
height: 37px;
width: 37px;
font-family: Arial, sans-serif;
font-size: 24px;
font-weight: 700;
line-height: 1;
color: white;
background: #9bca3e
}
.symbol .ind.error {
background: #c93135
}
.symbol .ind.unknown {
background: #aaa;
font-weight: 500;
font-size: 26px
}
.location {
font-size: 14px;
color: #a2a2a2;
margin: 0;
overflow-wrap: anywhere
}
.node h2 {
font-size: 21px;
font-weight: 400;
margin: 1px 0 0;
color: #545454;
overflow-wrap: anywhere
}
.state {
font-size: 16px;
font-weight: 500;
margin: 2px 0 0;
color: #8cbb35;
overflow-wrap: anywhere
}
.state.error {
color: #c93135
}
.state.unknown {
color: #888
}
.connector {
padding-top: 53px;
min-width: 0;
color: #aaa
}
.connector svg {
height: 30px;
width: 100%;
display: block;
fill: none;
stroke: currentColor;
stroke-width: 4;
stroke-linecap: round;
stroke-linejoin: round
}
.help {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 58px;
padding: 41px 0 45px
}
.help h2 {
font-size: 20px;
line-height: 1.35;
font-weight: 400;
color: #333;
margin: 0 0 12px
}
.help p {
font-size: 15px;
line-height: 1.6;
margin: 0;
color: #555
}
.bottom {
border-top: 1px solid #e7e7e7;
margin-top: 7px;
padding: 22px 0 35px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 14px;
color: #999;
font-size: 12px
}
.brand {
color: #858585;
font-weight: 600;
letter-spacing: .02em
}
.bottom .signature {
font-size: 12px
}
@media(max-width:700px) {
.intro {
padding: 35px 0 30px
}
h1 {
font-size: 36px;
letter-spacing: -.7px
}
.subtitle {
font-size: 20px
}
.diagnostics {
grid-template-columns: repeat(3, minmax(0, 1fr));
padding: 25px 0;
gap: 4px
}
.connector {
display: none
}
.symbol {
height: 76px;
width: 86px;
margin-bottom: 6px
}
.symbol svg {
width: 77px;
height: 70px
}
.symbol .ind {
width: 28px;
height: 28px;
font-size: 18px;
border-width: 2px;
right: 0;
bottom: 1px
}
.symbol .ind.unknown {
font-size: 21px
}
.location {
font-size: 12px
}
.node h2 {
font-size: 15px
}
.state {
font-size: 13px
}
.help {
grid-template-columns: 1fr;
gap: 24px;
padding: 31px 0
}
.bottom {
flex-wrap: wrap
}
}
@media(max-width:360px) {
.container {
padding: 0 14px
}
.intro {
padding-top: 27px
}
h1 {
font-size: 31px
}
.symbol {
width: 70px
}
.symbol svg {
width: 69px
}
.node h2 {
font-size: 14px
}
.state {
font-size: 12px
}
}
</style>
</head>
<body>
<header class="container intro">
<h1>Internal server error <span class="error-code">Error 500</span></h1>
<p class="subtitle">Error code 500</p>
</header>
<section class="diagnostics-band" aria-label="Request status">
<div class="container diagnostics">
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<rect x="13" y="16" width="94" height="69" rx="4" fill="#aaa" />
<rect x="21" y="33" width="78" height="44" fill="#f1f1f1" />
<circle cx="23" cy="24" r="3" fill="#f1f1f1" />
<circle cx="34" cy="24" r="3" fill="#f1f1f1" />
<path d="M14 31h93" stroke="#f1f1f1" stroke-width="2" />
</svg><span class="ind ok" aria-hidden="true">&#10003;</span></div>
<p class="location">You</p>
<h2>Browser</h2>
<p class="state ok">Working</p>
</div>
<div class="connector" aria-hidden="true"><svg viewBox="0 0 100 30">
<path d="M8 15h84m-74-10L8 15l10 10M82 5l10 10-10 10" />
</svg></div>
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<path d="M60 9 103 33v45L60 101 17 78V33Z" fill="#aaa" />
<path d="M60 21 91 39v32L60 88 29 71V39Z" fill="#f1f1f1" /><text x="60" y="67" text-anchor="middle"
font-size="37" font-weight="700" font-family="Arial,sans-serif" fill="#888">RP</text>
</svg><span class="ind error" aria-hidden="true">&#215;</span></div>
<p class="location">Gateway</p>
<h2>RustProxy</h2>
<p class="state error">Error</p>
</div>
<div class="connector" aria-hidden="true"><svg viewBox="0 0 100 30">
<path d="M8 15h84m-74-10L8 15l10 10M82 5l10 10-10 10" />
</svg></div>
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<rect x="22" y="13" width="76" height="27" rx="4" fill="#aaa" />
<rect x="22" y="46" width="76" height="27" rx="4" fill="#aaa" />
<circle cx="34" cy="27" r="4" fill="#f1f1f1" />
<circle cx="34" cy="60" r="4" fill="#f1f1f1" />
<path d="M48 27h38M48 60h38" stroke="#d9d9d9" stroke-width="4" stroke-linecap="round" />
<path d="M60 73v14m-21 0h42" stroke="#aaa" stroke-width="7" stroke-linecap="round" />
</svg><span class="ind unknown" aria-hidden="true">&#8211;</span></div>
<p class="location">Origin</p>
<h2>Host</h2>
<p class="state unknown">Not confirmed</p>
</div>
</div>
</section>
<main class="container">
<section class="help" aria-label="Error information">
<div>
<h2>What happened?</h2>
<p>An unexpected error occurred while processing this request.</p>
</div>
<div>
<h2>What can I do?</h2>
<p>Try again shortly. If the issue persists, contact the administrator.</p>
</div>
</section>
<footer class="bottom"><span class="brand">RustProxy</span><span class="signature">Performance &amp; security by
RustProxy</span></footer>
</main>
</body>
</html>
+387
View File
@@ -0,0 +1,387 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="robots" content="noindex,nofollow">
<title>Error 502: Bad gateway | RustProxy</title>
<style>
:root {
color-scheme: light;
font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #333
}
* {
box-sizing: border-box
}
body {
margin: 0;
background: #fff;
min-height: 100vh;
font-size: 15px;
line-height: 1.5;
-webkit-font-smoothing: antialiased
}
.container {
max-width: 1030px;
margin: 0 auto;
padding: 0 24px
}
.intro {
padding: 54px 0 44px
}
h1 {
font-size: 49px;
line-height: 1.18;
font-weight: 300;
margin: 0 0 5px;
letter-spacing: -1.1px;
color: #313131
}
.error-code {
font-weight: 300;
color: #8d8d8d
}
.subtitle {
font-weight: 300;
font-size: 25px;
line-height: 1.4;
margin: 2px 0;
color: #777
}
.diagnostics-band {
background: #f1f1f1;
border-top: 1px solid #e9e9e9;
border-bottom: 1px solid #e5e5e5
}
.diagnostics {
display: grid;
grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr) 76px minmax(0, 1fr);
align-items: start;
padding: 39px 0 36px;
text-align: center
}
.node {
min-width: 0;
text-align: center
}
.symbol {
height: 107px;
position: relative;
margin: 0 auto 11px;
width: 142px;
max-width: 100%;
display: flex;
align-items: center;
justify-content: center
}
.symbol svg {
width: 118px;
height: 100px;
display: block;
overflow: visible
}
.symbol .ind {
position: absolute;
right: 10px;
bottom: 10px;
display: grid;
place-items: center;
border: 3px solid #f1f1f1;
border-radius: 50%;
height: 37px;
width: 37px;
font-family: Arial, sans-serif;
font-size: 24px;
font-weight: 700;
line-height: 1;
color: white;
background: #9bca3e
}
.symbol .ind.error {
background: #c93135
}
.symbol .ind.unknown {
background: #aaa;
font-weight: 500;
font-size: 26px
}
.location {
font-size: 14px;
color: #a2a2a2;
margin: 0;
overflow-wrap: anywhere
}
.node h2 {
font-size: 21px;
font-weight: 400;
margin: 1px 0 0;
color: #545454;
overflow-wrap: anywhere
}
.state {
font-size: 16px;
font-weight: 500;
margin: 2px 0 0;
color: #8cbb35;
overflow-wrap: anywhere
}
.state.error {
color: #c93135
}
.state.unknown {
color: #888
}
.connector {
padding-top: 53px;
min-width: 0;
color: #aaa
}
.connector svg {
height: 30px;
width: 100%;
display: block;
fill: none;
stroke: currentColor;
stroke-width: 4;
stroke-linecap: round;
stroke-linejoin: round
}
.help {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 58px;
padding: 41px 0 45px
}
.help h2 {
font-size: 20px;
line-height: 1.35;
font-weight: 400;
color: #333;
margin: 0 0 12px
}
.help p {
font-size: 15px;
line-height: 1.6;
margin: 0;
color: #555
}
.bottom {
border-top: 1px solid #e7e7e7;
margin-top: 7px;
padding: 22px 0 35px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 14px;
color: #999;
font-size: 12px
}
.brand {
color: #858585;
font-weight: 600;
letter-spacing: .02em
}
.bottom .signature {
font-size: 12px
}
@media(max-width:700px) {
.intro {
padding: 35px 0 30px
}
h1 {
font-size: 36px;
letter-spacing: -.7px
}
.subtitle {
font-size: 20px
}
.diagnostics {
grid-template-columns: repeat(3, minmax(0, 1fr));
padding: 25px 0;
gap: 4px
}
.connector {
display: none
}
.symbol {
height: 76px;
width: 86px;
margin-bottom: 6px
}
.symbol svg {
width: 77px;
height: 70px
}
.symbol .ind {
width: 28px;
height: 28px;
font-size: 18px;
border-width: 2px;
right: 0;
bottom: 1px
}
.symbol .ind.unknown {
font-size: 21px
}
.location {
font-size: 12px
}
.node h2 {
font-size: 15px
}
.state {
font-size: 13px
}
.help {
grid-template-columns: 1fr;
gap: 24px;
padding: 31px 0
}
.bottom {
flex-wrap: wrap
}
}
@media(max-width:360px) {
.container {
padding: 0 14px
}
.intro {
padding-top: 27px
}
h1 {
font-size: 31px
}
.symbol {
width: 70px
}
.symbol svg {
width: 69px
}
.node h2 {
font-size: 14px
}
.state {
font-size: 12px
}
}
</style>
</head>
<body>
<header class="container intro">
<h1>Bad gateway <span class="error-code">Error 502</span></h1>
<p class="subtitle">Error code 502</p>
</header>
<section class="diagnostics-band" aria-label="Request status">
<div class="container diagnostics">
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<rect x="13" y="16" width="94" height="69" rx="4" fill="#aaa" />
<rect x="21" y="33" width="78" height="44" fill="#f1f1f1" />
<circle cx="23" cy="24" r="3" fill="#f1f1f1" />
<circle cx="34" cy="24" r="3" fill="#f1f1f1" />
<path d="M14 31h93" stroke="#f1f1f1" stroke-width="2" />
</svg><span class="ind ok" aria-hidden="true">&#10003;</span></div>
<p class="location">You</p>
<h2>Browser</h2>
<p class="state ok">Working</p>
</div>
<div class="connector" aria-hidden="true"><svg viewBox="0 0 100 30">
<path d="M8 15h84m-74-10L8 15l10 10M82 5l10 10-10 10" />
</svg></div>
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<path d="M60 9 103 33v45L60 101 17 78V33Z" fill="#aaa" />
<path d="M60 21 91 39v32L60 88 29 71V39Z" fill="#f1f1f1" /><text x="60" y="67" text-anchor="middle"
font-size="37" font-weight="700" font-family="Arial,sans-serif" fill="#888">RP</text>
</svg><span class="ind ok" aria-hidden="true">&#10003;</span></div>
<p class="location">Gateway</p>
<h2>RustProxy</h2>
<p class="state ok">Working</p>
</div>
<div class="connector" aria-hidden="true"><svg viewBox="0 0 100 30">
<path d="M8 15h84m-74-10L8 15l10 10M82 5l10 10-10 10" />
</svg></div>
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<rect x="22" y="13" width="76" height="27" rx="4" fill="#aaa" />
<rect x="22" y="46" width="76" height="27" rx="4" fill="#aaa" />
<circle cx="34" cy="27" r="4" fill="#f1f1f1" />
<circle cx="34" cy="60" r="4" fill="#f1f1f1" />
<path d="M48 27h38M48 60h38" stroke="#d9d9d9" stroke-width="4" stroke-linecap="round" />
<path d="M60 73v14m-21 0h42" stroke="#aaa" stroke-width="7" stroke-linecap="round" />
</svg><span class="ind error" aria-hidden="true">&#215;</span></div>
<p class="location">Origin</p>
<h2>Host</h2>
<p class="state error">Connection error</p>
</div>
</div>
</section>
<main class="container">
<section class="help" aria-label="Error information">
<div>
<h2>What happened?</h2>
<p>The gateway could not obtain a valid response from the upstream service.</p>
</div>
<div>
<h2>What can I do?</h2>
<p>Try again in a few minutes. If the problem continues, contact the administrator.</p>
</div>
</section>
<footer class="bottom"><span class="brand">RustProxy</span><span class="signature">Performance &amp; security by
RustProxy</span></footer>
</main>
</body>
</html>
+387
View File
@@ -0,0 +1,387 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="robots" content="noindex,nofollow">
<title>Error 503: Service unavailable | RustProxy</title>
<style>
:root {
color-scheme: light;
font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #333
}
* {
box-sizing: border-box
}
body {
margin: 0;
background: #fff;
min-height: 100vh;
font-size: 15px;
line-height: 1.5;
-webkit-font-smoothing: antialiased
}
.container {
max-width: 1030px;
margin: 0 auto;
padding: 0 24px
}
.intro {
padding: 54px 0 44px
}
h1 {
font-size: 49px;
line-height: 1.18;
font-weight: 300;
margin: 0 0 5px;
letter-spacing: -1.1px;
color: #313131
}
.error-code {
font-weight: 300;
color: #8d8d8d
}
.subtitle {
font-weight: 300;
font-size: 25px;
line-height: 1.4;
margin: 2px 0;
color: #777
}
.diagnostics-band {
background: #f1f1f1;
border-top: 1px solid #e9e9e9;
border-bottom: 1px solid #e5e5e5
}
.diagnostics {
display: grid;
grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr) 76px minmax(0, 1fr);
align-items: start;
padding: 39px 0 36px;
text-align: center
}
.node {
min-width: 0;
text-align: center
}
.symbol {
height: 107px;
position: relative;
margin: 0 auto 11px;
width: 142px;
max-width: 100%;
display: flex;
align-items: center;
justify-content: center
}
.symbol svg {
width: 118px;
height: 100px;
display: block;
overflow: visible
}
.symbol .ind {
position: absolute;
right: 10px;
bottom: 10px;
display: grid;
place-items: center;
border: 3px solid #f1f1f1;
border-radius: 50%;
height: 37px;
width: 37px;
font-family: Arial, sans-serif;
font-size: 24px;
font-weight: 700;
line-height: 1;
color: white;
background: #9bca3e
}
.symbol .ind.error {
background: #c93135
}
.symbol .ind.unknown {
background: #aaa;
font-weight: 500;
font-size: 26px
}
.location {
font-size: 14px;
color: #a2a2a2;
margin: 0;
overflow-wrap: anywhere
}
.node h2 {
font-size: 21px;
font-weight: 400;
margin: 1px 0 0;
color: #545454;
overflow-wrap: anywhere
}
.state {
font-size: 16px;
font-weight: 500;
margin: 2px 0 0;
color: #8cbb35;
overflow-wrap: anywhere
}
.state.error {
color: #c93135
}
.state.unknown {
color: #888
}
.connector {
padding-top: 53px;
min-width: 0;
color: #aaa
}
.connector svg {
height: 30px;
width: 100%;
display: block;
fill: none;
stroke: currentColor;
stroke-width: 4;
stroke-linecap: round;
stroke-linejoin: round
}
.help {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 58px;
padding: 41px 0 45px
}
.help h2 {
font-size: 20px;
line-height: 1.35;
font-weight: 400;
color: #333;
margin: 0 0 12px
}
.help p {
font-size: 15px;
line-height: 1.6;
margin: 0;
color: #555
}
.bottom {
border-top: 1px solid #e7e7e7;
margin-top: 7px;
padding: 22px 0 35px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 14px;
color: #999;
font-size: 12px
}
.brand {
color: #858585;
font-weight: 600;
letter-spacing: .02em
}
.bottom .signature {
font-size: 12px
}
@media(max-width:700px) {
.intro {
padding: 35px 0 30px
}
h1 {
font-size: 36px;
letter-spacing: -.7px
}
.subtitle {
font-size: 20px
}
.diagnostics {
grid-template-columns: repeat(3, minmax(0, 1fr));
padding: 25px 0;
gap: 4px
}
.connector {
display: none
}
.symbol {
height: 76px;
width: 86px;
margin-bottom: 6px
}
.symbol svg {
width: 77px;
height: 70px
}
.symbol .ind {
width: 28px;
height: 28px;
font-size: 18px;
border-width: 2px;
right: 0;
bottom: 1px
}
.symbol .ind.unknown {
font-size: 21px
}
.location {
font-size: 12px
}
.node h2 {
font-size: 15px
}
.state {
font-size: 13px
}
.help {
grid-template-columns: 1fr;
gap: 24px;
padding: 31px 0
}
.bottom {
flex-wrap: wrap
}
}
@media(max-width:360px) {
.container {
padding: 0 14px
}
.intro {
padding-top: 27px
}
h1 {
font-size: 31px
}
.symbol {
width: 70px
}
.symbol svg {
width: 69px
}
.node h2 {
font-size: 14px
}
.state {
font-size: 12px
}
}
</style>
</head>
<body>
<header class="container intro">
<h1>Service unavailable <span class="error-code">Error 503</span></h1>
<p class="subtitle">Error code 503</p>
</header>
<section class="diagnostics-band" aria-label="Request status">
<div class="container diagnostics">
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<rect x="13" y="16" width="94" height="69" rx="4" fill="#aaa" />
<rect x="21" y="33" width="78" height="44" fill="#f1f1f1" />
<circle cx="23" cy="24" r="3" fill="#f1f1f1" />
<circle cx="34" cy="24" r="3" fill="#f1f1f1" />
<path d="M14 31h93" stroke="#f1f1f1" stroke-width="2" />
</svg><span class="ind ok" aria-hidden="true">&#10003;</span></div>
<p class="location">You</p>
<h2>Browser</h2>
<p class="state ok">Working</p>
</div>
<div class="connector" aria-hidden="true"><svg viewBox="0 0 100 30">
<path d="M8 15h84m-74-10L8 15l10 10M82 5l10 10-10 10" />
</svg></div>
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<path d="M60 9 103 33v45L60 101 17 78V33Z" fill="#aaa" />
<path d="M60 21 91 39v32L60 88 29 71V39Z" fill="#f1f1f1" /><text x="60" y="67" text-anchor="middle"
font-size="37" font-weight="700" font-family="Arial,sans-serif" fill="#888">RP</text>
</svg><span class="ind error" aria-hidden="true">&#215;</span></div>
<p class="location">Gateway</p>
<h2>RustProxy</h2>
<p class="state error">Temporarily unavailable</p>
</div>
<div class="connector" aria-hidden="true"><svg viewBox="0 0 100 30">
<path d="M8 15h84m-74-10L8 15l10 10M82 5l10 10-10 10" />
</svg></div>
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<rect x="22" y="13" width="76" height="27" rx="4" fill="#aaa" />
<rect x="22" y="46" width="76" height="27" rx="4" fill="#aaa" />
<circle cx="34" cy="27" r="4" fill="#f1f1f1" />
<circle cx="34" cy="60" r="4" fill="#f1f1f1" />
<path d="M48 27h38M48 60h38" stroke="#d9d9d9" stroke-width="4" stroke-linecap="round" />
<path d="M60 73v14m-21 0h42" stroke="#aaa" stroke-width="7" stroke-linecap="round" />
</svg><span class="ind unknown" aria-hidden="true">&#8211;</span></div>
<p class="location">Origin</p>
<h2>Host</h2>
<p class="state unknown">Not confirmed</p>
</div>
</div>
</section>
<main class="container">
<section class="help" aria-label="Error information">
<div>
<h2>What happened?</h2>
<p>The service is temporarily unable to handle this request.</p>
</div>
<div>
<h2>What can I do?</h2>
<p>Please try again in a few minutes.</p>
</div>
</section>
<footer class="bottom"><span class="brand">RustProxy</span><span class="signature">Performance &amp; security by
RustProxy</span></footer>
</main>
</body>
</html>
+387
View File
@@ -0,0 +1,387 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="robots" content="noindex,nofollow">
<title>Error 504: Gateway timeout | RustProxy</title>
<style>
:root {
color-scheme: light;
font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #333
}
* {
box-sizing: border-box
}
body {
margin: 0;
background: #fff;
min-height: 100vh;
font-size: 15px;
line-height: 1.5;
-webkit-font-smoothing: antialiased
}
.container {
max-width: 1030px;
margin: 0 auto;
padding: 0 24px
}
.intro {
padding: 54px 0 44px
}
h1 {
font-size: 49px;
line-height: 1.18;
font-weight: 300;
margin: 0 0 5px;
letter-spacing: -1.1px;
color: #313131
}
.error-code {
font-weight: 300;
color: #8d8d8d
}
.subtitle {
font-weight: 300;
font-size: 25px;
line-height: 1.4;
margin: 2px 0;
color: #777
}
.diagnostics-band {
background: #f1f1f1;
border-top: 1px solid #e9e9e9;
border-bottom: 1px solid #e5e5e5
}
.diagnostics {
display: grid;
grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr) 76px minmax(0, 1fr);
align-items: start;
padding: 39px 0 36px;
text-align: center
}
.node {
min-width: 0;
text-align: center
}
.symbol {
height: 107px;
position: relative;
margin: 0 auto 11px;
width: 142px;
max-width: 100%;
display: flex;
align-items: center;
justify-content: center
}
.symbol svg {
width: 118px;
height: 100px;
display: block;
overflow: visible
}
.symbol .ind {
position: absolute;
right: 10px;
bottom: 10px;
display: grid;
place-items: center;
border: 3px solid #f1f1f1;
border-radius: 50%;
height: 37px;
width: 37px;
font-family: Arial, sans-serif;
font-size: 24px;
font-weight: 700;
line-height: 1;
color: white;
background: #9bca3e
}
.symbol .ind.error {
background: #c93135
}
.symbol .ind.unknown {
background: #aaa;
font-weight: 500;
font-size: 26px
}
.location {
font-size: 14px;
color: #a2a2a2;
margin: 0;
overflow-wrap: anywhere
}
.node h2 {
font-size: 21px;
font-weight: 400;
margin: 1px 0 0;
color: #545454;
overflow-wrap: anywhere
}
.state {
font-size: 16px;
font-weight: 500;
margin: 2px 0 0;
color: #8cbb35;
overflow-wrap: anywhere
}
.state.error {
color: #c93135
}
.state.unknown {
color: #888
}
.connector {
padding-top: 53px;
min-width: 0;
color: #aaa
}
.connector svg {
height: 30px;
width: 100%;
display: block;
fill: none;
stroke: currentColor;
stroke-width: 4;
stroke-linecap: round;
stroke-linejoin: round
}
.help {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 58px;
padding: 41px 0 45px
}
.help h2 {
font-size: 20px;
line-height: 1.35;
font-weight: 400;
color: #333;
margin: 0 0 12px
}
.help p {
font-size: 15px;
line-height: 1.6;
margin: 0;
color: #555
}
.bottom {
border-top: 1px solid #e7e7e7;
margin-top: 7px;
padding: 22px 0 35px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 14px;
color: #999;
font-size: 12px
}
.brand {
color: #858585;
font-weight: 600;
letter-spacing: .02em
}
.bottom .signature {
font-size: 12px
}
@media(max-width:700px) {
.intro {
padding: 35px 0 30px
}
h1 {
font-size: 36px;
letter-spacing: -.7px
}
.subtitle {
font-size: 20px
}
.diagnostics {
grid-template-columns: repeat(3, minmax(0, 1fr));
padding: 25px 0;
gap: 4px
}
.connector {
display: none
}
.symbol {
height: 76px;
width: 86px;
margin-bottom: 6px
}
.symbol svg {
width: 77px;
height: 70px
}
.symbol .ind {
width: 28px;
height: 28px;
font-size: 18px;
border-width: 2px;
right: 0;
bottom: 1px
}
.symbol .ind.unknown {
font-size: 21px
}
.location {
font-size: 12px
}
.node h2 {
font-size: 15px
}
.state {
font-size: 13px
}
.help {
grid-template-columns: 1fr;
gap: 24px;
padding: 31px 0
}
.bottom {
flex-wrap: wrap
}
}
@media(max-width:360px) {
.container {
padding: 0 14px
}
.intro {
padding-top: 27px
}
h1 {
font-size: 31px
}
.symbol {
width: 70px
}
.symbol svg {
width: 69px
}
.node h2 {
font-size: 14px
}
.state {
font-size: 12px
}
}
</style>
</head>
<body>
<header class="container intro">
<h1>Gateway timeout <span class="error-code">Error 504</span></h1>
<p class="subtitle">Error code 504</p>
</header>
<section class="diagnostics-band" aria-label="Request status">
<div class="container diagnostics">
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<rect x="13" y="16" width="94" height="69" rx="4" fill="#aaa" />
<rect x="21" y="33" width="78" height="44" fill="#f1f1f1" />
<circle cx="23" cy="24" r="3" fill="#f1f1f1" />
<circle cx="34" cy="24" r="3" fill="#f1f1f1" />
<path d="M14 31h93" stroke="#f1f1f1" stroke-width="2" />
</svg><span class="ind ok" aria-hidden="true">&#10003;</span></div>
<p class="location">You</p>
<h2>Browser</h2>
<p class="state ok">Working</p>
</div>
<div class="connector" aria-hidden="true"><svg viewBox="0 0 100 30">
<path d="M8 15h84m-74-10L8 15l10 10M82 5l10 10-10 10" />
</svg></div>
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<path d="M60 9 103 33v45L60 101 17 78V33Z" fill="#aaa" />
<path d="M60 21 91 39v32L60 88 29 71V39Z" fill="#f1f1f1" /><text x="60" y="67" text-anchor="middle"
font-size="37" font-weight="700" font-family="Arial,sans-serif" fill="#888">RP</text>
</svg><span class="ind ok" aria-hidden="true">&#10003;</span></div>
<p class="location">Gateway</p>
<h2>RustProxy</h2>
<p class="state ok">Working</p>
</div>
<div class="connector" aria-hidden="true"><svg viewBox="0 0 100 30">
<path d="M8 15h84m-74-10L8 15l10 10M82 5l10 10-10 10" />
</svg></div>
<div class="node">
<div class="symbol"><svg viewBox="0 0 120 106" aria-hidden="true" focusable="false">
<rect x="22" y="13" width="76" height="27" rx="4" fill="#aaa" />
<rect x="22" y="46" width="76" height="27" rx="4" fill="#aaa" />
<circle cx="34" cy="27" r="4" fill="#f1f1f1" />
<circle cx="34" cy="60" r="4" fill="#f1f1f1" />
<path d="M48 27h38M48 60h38" stroke="#d9d9d9" stroke-width="4" stroke-linecap="round" />
<path d="M60 73v14m-21 0h42" stroke="#aaa" stroke-width="7" stroke-linecap="round" />
</svg><span class="ind error" aria-hidden="true">&#215;</span></div>
<p class="location">Origin</p>
<h2>Host</h2>
<p class="state error">Timed out</p>
</div>
</div>
</section>
<main class="container">
<section class="help" aria-label="Error information">
<div>
<h2>What happened?</h2>
<p>The upstream service did not respond in time.</p>
</div>
<div>
<h2>What can I do?</h2>
<p>Try again shortly. If the problem continues, contact the administrator.</p>
</div>
</section>
<footer class="bottom"><span class="brand">RustProxy</span><span class="signature">Performance &amp; security by
RustProxy</span></footer>
</main>
</body>
</html>
+39 -7
View File
@@ -856,6 +856,39 @@ progress::-moz-progress-bar {
min-height: 100px;
}
.page-bulk-actions {
grid-column: 1 / -1;
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 9px 13px;
min-width: 0;
padding: 10px 12px;
margin: 8px 0 14px;
background: var(--panel2);
border: 1px solid var(--line);
border-radius: var(--rp-radius-surface, 5px);
}
.page-bulk-actions .page-bulk-switch-label {
flex: 0 1 auto;
max-width: 100%;
min-width: 0;
margin: 0 !important;
cursor: pointer;
}
.page-bulk-actions .page-bulk-switch-label span {
white-space: normal;
overflow-wrap: anywhere;
}
.page-bulk-actions .fine {
flex: 1 1 220px;
min-width: 0;
margin: 0;
}
.pages-errors {
margin: 12px 0;
}
@@ -1668,8 +1701,7 @@ html[data-interface-icons="true"] :is(button, a, summary)>svg.ui-icon {
max-width: none;
overflow: visible;
}
/* Shared FastCGI profiles: keep the help text and controls inside the dialog,
including at high UI zoom and with long translated labels. */
#php-fpm-profiles-dialog {
width: calc(min(860px, 100vw - 24px) / var(--ui-scale, 1));
}
@@ -1695,7 +1727,7 @@ html[data-interface-icons="true"] :is(button, a, summary)>svg.ui-icon {
margin: 0 0 12px;
}
#php-fpm-profiles-list > .fastcgi-profile-card {
#php-fpm-profiles-list>.fastcgi-profile-card {
min-width: 0;
margin: 0;
}
@@ -1720,7 +1752,7 @@ html[data-interface-icons="true"] :is(button, a, summary)>svg.ui-icon {
font-size: 10px;
}
#php-fpm-profiles-list details[open] > .fastcgi-profile-summary {
#php-fpm-profiles-list details[open]>.fastcgi-profile-summary {
margin-bottom: 12px;
border-bottom: 1px solid var(--line);
}
@@ -1732,14 +1764,14 @@ html[data-interface-icons="true"] :is(button, a, summary)>svg.ui-icon {
min-width: 0;
}
#php-fpm-profiles-list .fastcgi-profile-editor > label {
#php-fpm-profiles-list .fastcgi-profile-editor>label {
display: grid;
gap: 4px;
min-width: 0;
grid-row: auto;
}
#php-fpm-profiles-list .fastcgi-profile-editor > label > :is(input, select, textarea) {
#php-fpm-profiles-list .fastcgi-profile-editor>label> :is(input, select, textarea) {
width: 100%;
max-width: 100%;
min-width: 0;
@@ -1764,4 +1796,4 @@ html[data-interface-icons="true"] :is(button, a, summary)>svg.ui-icon {
#php-fpm-profiles-list .fastcgi-profile-editor {
grid-template-columns: minmax(0, 1fr);
}
}
}
+5 -3
View File
@@ -11,10 +11,12 @@
const syncEnabledControl = window.rustProxyEnableControl($("notfound-enabled"));
const ERROR_STATUSES = [400, 401, 403, 404, 408, 413, 429, 500, 502, 503, 504];
const BUILTIN_STATUSES = [401, 403, 404, 429, 503, 504];
const STATUS_NAMES = { 400: "Bad Request", 401: "Unauthorized", 403: "Forbidden", 404: "Not Found", 408: "Request Timeout", 413: "Payload Too Large", 429: "Too Many Requests", 500: "Internal Server Error", 502: "Bad Gateway", 503: "Service Unavailable", 504: "Gateway Timeout" };
const CLOUDFLARE_STATUSES = [400, 401, 403, 404, 408, 410, 413, 429, 500, 502, 503, 504];
const STATUS_NAMES = { 400: "Bad Request", 401: "Unauthorized", 403: "Forbidden", 404: "Not Found", 408: "Request Timeout", 410: "Gone", 413: "Payload Too Large", 429: "Too Many Requests", 500: "Internal Server Error", 502: "Bad Gateway", 503: "Service Unavailable", 504: "Gateway Timeout" };
function populateStatuses(selected = null) {
const select = $("notfound-status"); if (!select) return;
const codes = $("notfound-mode")?.value === "builtin" ? BUILTIN_STATUSES : ERROR_STATUSES;
const kind = $("notfound-mode")?.value;
const codes = kind === "builtin" ? BUILTIN_STATUSES : kind === "cloudflare" ? CLOUDFLARE_STATUSES : ERROR_STATUSES;
const wanted = Number(selected ?? select.value ?? 404);
select.replaceChildren(...codes.map(code => { const node = el("option", `${code} ${STATUS_NAMES[code]}`); node.value = String(code); return node; }));
select.value = codes.includes(wanted) ? String(wanted) : "404";
@@ -69,7 +71,7 @@
function collect() {
const id = value("notfound-id"), name = value("notfound-name") || id, hosts = readHosts(), listener_ids = readBindings(), kind = value("notfound-mode"), status = Number(value("notfound-status")), html = $("notfound-html").value;
if (!listener_ids.length) throw new Error(t("notfoundListenersRequired"));
const allowed = kind === "builtin" ? BUILTIN_STATUSES : ERROR_STATUSES;
const allowed = kind === "builtin" ? BUILTIN_STATUSES : kind === "cloudflare" ? CLOUDFLARE_STATUSES : ERROR_STATUSES;
if (!Number.isInteger(status) || !allowed.includes(status)) throw new Error(t("notfoundStatusInvalid"));
if (kind === "html" && !html.trim()) throw new Error(t("notfoundHtmlRequired"));
return { id, name, enabled: yes("notfound-enabled"), http2_enabled: yes("notfound-http2"), http3_enabled: yes("notfound-http3"), frontend: { hosts, listener_ids }, certificate_id: value("notfound-certificate") || null, page: { kind, status, html: kind === "html" ? html : "" } };
+46 -17
View File
@@ -1103,8 +1103,10 @@
<div class="entity-list" id="acl-profile-list"></div>
<details id="acl-dns-status" class="acl-profile-attached">
<summary data-i18n="aclDnsStatusTitle">DNS/DDNS ACL resolver status</summary>
<p class="fine" data-i18n="aclDnsStatusHelp">Shows the addresses currently permitted by DNS ACL rules, not the current visitor IP.</p>
<button type="button" class="outline" id="acl-dns-status-refresh" data-i18n="aclDnsStatusRefresh">Refresh DNS status</button>
<p class="fine" data-i18n="aclDnsStatusHelp">Shows the addresses currently permitted by
DNS ACL rules, not the current visitor IP.</p>
<button type="button" class="outline" id="acl-dns-status-refresh"
data-i18n="aclDnsStatusRefresh">Refresh DNS status</button>
<div id="acl-dns-status-list" class="entity-list" aria-live="polite"></div>
</details>
</article>
@@ -4870,7 +4872,9 @@ curl -sS -D - -o /dev/null \
checked /><span data-i18n="webServiceHtaccessRecursive">Scan subdirectories</span></label>
<label class="check"><input class="switch" id="web-service-htaccess-strict" type="checkbox" /><span
data-i18n="webServiceHtaccessStrict">Strict unsupported-directive mode</span></label>
<p class="fine vh-wide" data-i18n="webServiceHtaccessStrictHelp">When Strict is off, unsupported non-security directives are skipped and logged as warnings. Legacy Order/Allow/Deny with all, IP and CIDR are enforced; unsupported access-control rules still block Apply.</p>
<p class="fine vh-wide" data-i18n="webServiceHtaccessStrictHelp">When Strict is off, unsupported
non-security directives are skipped and logged as warnings. Legacy Order/Allow/Deny with all, IP
and CIDR are enforced; unsupported access-control rules still block Apply.</p>
<div class="vh-wide"><button class="outline" id="web-service-htaccess-help"
data-i18n="webServiceHtaccessDocs" type="button">Compatibility documentation</button></div>
<p class="fine vh-wide" data-i18n="webServiceHtaccessHelp">RustProxy compiles a bounded
@@ -5021,11 +5025,15 @@ curl -sS -D - -o /dev/null \
<option value="php_fpm">PHP-FPM</option>
<option value="fcgiwrap">fcgiwrap (CGI)</option>
<option value="fastcgi">FastCGI responder</option>
</select><small class="fine" data-i18n="webServiceFastCgiHandlerHelp">Select PHP-FPM for PHP, fcgiwrap for CGI programs or FastCGI for compatible responders.</small>
</select><small class="fine" data-i18n="webServiceFastCgiHandlerHelp">Select PHP-FPM for
PHP, fcgiwrap for CGI programs or FastCGI for compatible responders.</small>
</label>
<label class="vh-wide"><span data-i18n="webServiceFastCgiScriptPrefix">Public SCRIPT_NAME prefix</span>
<label class="vh-wide"><span data-i18n="webServiceFastCgiScriptPrefix">Public SCRIPT_NAME
prefix</span>
<input id="web-service-php-script-prefix" maxlength="256" placeholder="/app/cgi-bin" />
<small class="fine" data-i18n="webServiceFastCgiScriptPrefixHelp">Set the public URL prefix removed by the Vhost path rewrite, for example /app/cgi-bin. Leave empty without a rewrite.</small>
<small class="fine" data-i18n="webServiceFastCgiScriptPrefixHelp">Set the public URL
prefix removed by the Vhost path rewrite, for example /app/cgi-bin. Leave empty
without a rewrite.</small>
</label>
<label class="vh-wide"><span data-i18n="webServicePhpEndpoint">FastCGI endpoint</span><input
id="web-service-php-endpoint" maxlength="512"
@@ -5033,9 +5041,10 @@ curl -sS -D - -o /dev/null \
data-i18n="webServicePhpEndpointHelp">Unix: unix:/run/php/php-fpm.sock. TCP:
tcp:127.0.0.1:9000 or tcp:[::1]:9000. TCP is intentionally limited to loopback
addresses.</small></label>
<label><span data-i18n="webServicePhpExtensions">Executable extensions (PHP or CGI)</span><input
id="web-service-php-extensions" maxlength="512" placeholder="php, phtml" /><small
class="fine" data-i18n="phpHintExtensions">Comma-separated extensions without dots
<label><span data-i18n="webServicePhpExtensions">Executable extensions (PHP or
CGI)</span><input id="web-service-php-extensions" maxlength="512"
placeholder="php, phtml" /><small class="fine"
data-i18n="phpHintExtensions">Comma-separated extensions without dots
(e.g.
php, phtml). Only listed types are executed as PHP.</small></label>
</div>
@@ -5121,7 +5130,8 @@ curl -sS -D - -o /dev/null \
data-i18n="webServicePhpCustomParamsHelp">One NAME = value entry per line.
Static trusted values only; core CGI, HTTP_* and PHP_* control names are
reserved. Example: APP_ENV = production; no variable interpolation.</small></label>
<label class="vh-wide fastcgi-php-only-local"><span data-i18n="webServicePhpValues">PHP INI overrides
<label class="vh-wide fastcgi-php-only-local"><span data-i18n="webServicePhpValues">PHP INI
overrides
(PHP_VALUE)</span><textarea id="web-service-php-values" maxlength="65536" rows="6"
spellcheck="false"
placeholder="memory_limit = 256M&#10;upload_max_filesize = 64M&#10;post_max_size = 64M"></textarea><small
@@ -5130,7 +5140,8 @@ curl -sS -D - -o /dev/null \
Examples: memory_limit = 256M, upload_max_filesize = 64M, post_max_size = 64M,
max_execution_time = 30. Use PHP_ADMIN_VALUE for operator-only
settings.</small></label>
<label class="vh-wide fastcgi-php-only-local"><span data-i18n="phpProfileAdminValues">PHP administrator INI
<label class="vh-wide fastcgi-php-only-local"><span data-i18n="phpProfileAdminValues">PHP
administrator INI
overrides
(PHP_ADMIN_VALUE)</span><textarea id="web-service-php-admin-values"
maxlength="65536" rows="6" spellcheck="false"
@@ -5143,7 +5154,11 @@ curl -sS -D - -o /dev/null \
<div class="vh-wide form-actions"><button class="outline"
data-i18n="webServicePhpDocsButton" id="web-service-php-help" type="button">FastCGI
syntax and safety</button></div>
<p class="fine vh-wide" data-i18n="webServicePhpHelp">RustProxy connects to PHP-FPM, fcgiwrap or other compatible FastCGI responders. Select executable extensions, configure a Unix or loopback TCP endpoint, and optionally set the public SCRIPT_NAME prefix when Vhost locations strip a URL prefix. Script source is never served statically for protected executable extensions.</p>
<p class="fine vh-wide" data-i18n="webServicePhpHelp">RustProxy connects to PHP-FPM,
fcgiwrap or other compatible FastCGI responders. Select executable extensions, configure
a Unix or loopback TCP endpoint, and optionally set the public SCRIPT_NAME prefix when
Vhost locations strip a URL prefix. Script source is never served statically for
protected executable extensions.</p>
</div>
</section>
</div>
@@ -5179,7 +5194,8 @@ curl -sS -D - -o /dev/null \
<button type="button" class="outline" id="php-fpm-profiles-close" data-i18n="close">Close</button>
</div>
<div class="card location-help-content">
<p class="fine php-profiles-description" data-i18n="phpProfileDescription">Expand a profile to edit it. Changes are saved immediately
<p class="fine php-profiles-description" data-i18n="phpProfileDescription">Expand a profile to edit it.
Changes are saved immediately
and shared by every attached Web Service.</p>
<div id="php-fpm-profiles-list"></div>
<button type="button" class="outline" id="php-fpm-profile-add" data-i18n="phpProfileAdd">Add
@@ -5199,9 +5215,11 @@ curl -sS -D - -o /dev/null \
Apache runtime. Supported directives are compiled into RustProxy Web Server rules.</p>
<h3 data-i18n="webServiceHtaccessDocsSupportedTitle">Supported subset</h3>
<p><code>RewriteEngine</code>, <code>RewriteBase</code>, <code>RewriteCond</code>, <code>RewriteRule</code>,
<code>DirectoryIndex</code>, <code>AcceptPathInfo On/Off/Default</code>, <code>Options +/-Indexes</code>, <code>AddType</code>,
<code>DirectoryIndex</code>, <code>AcceptPathInfo On/Off/Default</code>,
<code>Options +/-Indexes</code>, <code>AddType</code>,
<code>AddHandler</code> (PHP extensions), <code>Header set/add/unset</code>, <code>ExpiresActive</code>,
<code>ExpiresDefault</code>, <code>ExpiresByType</code>, <code>Redirect/RedirectMatch</code>, <code>ErrorDocument (local URL)</code>, <code>Require all granted/denied</code>.
<code>ExpiresDefault</code>, <code>ExpiresByType</code>, <code>Redirect/RedirectMatch</code>,
<code>ErrorDocument (local URL)</code>, <code>Require all granted/denied</code>.
</p>
<h3 data-i18n="webServiceHtaccessDocsRewriteTitle">Rewrite compatibility</h3>
<p data-i18n="webServiceHtaccessDocsRewrite">Rewrite conditions support REQUEST_FILENAME file tests (-f, -d,
@@ -5213,13 +5231,22 @@ RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]</code></pre>
<h3 data-i18n="webServiceHtaccessDocsPhpTitle">PHP-FPM</h3>
<p data-i18n="webServiceHtaccessDocsPhp">.htaccess may add PHP extensions with AddHandler. AcceptPathInfo On enables PHP script/path suffix routing and Off disables it, overriding the Web Service PATH_INFO switch. The PHP-FPM endpoint, timeouts and concurrency remain controlled by the Web Service PHP-FPM tab. The unchanged default index list also tries index.php last when PHP-FPM for .php is enabled. Apache SetHandler proxy socket syntax is intentionally not accepted.</p>
<p data-i18n="webServiceHtaccessDocsPhp">.htaccess may add PHP extensions with AddHandler. AcceptPathInfo On
enables PHP script/path suffix routing and Off disables it, overriding the Web Service PATH_INFO switch.
The PHP-FPM endpoint, timeouts and concurrency remain controlled by the Web Service PHP-FPM tab. The
unchanged default index list also tries index.php last when PHP-FPM for .php is enabled. Apache
SetHandler proxy socket syntax is intentionally not accepted.</p>
<h3 data-i18n="webServiceHtaccessDocsReloadTitle">Loading and limits</h3>
<p data-i18n="webServiceHtaccessDocsReload">Files are read and compiled on Validate, save and apply.
RustProxy does not parse .htaccess per request. Re-apply after changing a file. The scan is bounded to
128 files, depth 16, 128 KiB per file and 1 MiB total.</p>
<h3 data-i18n="webServiceHtaccessDocsUnsupportedTitle">Not Apache-complete</h3>
<p data-i18n="webServiceHtaccessDocsUnsupported">Only local ErrorDocument URLs are supported (GET/HEAD); custom literal/external error documents, SetEnvIf, FallbackResource, Options FollowSymlinks and Options MultiViews are not implemented. Order/Allow/Deny with all, IP or CIDR (IPv4/IPv6) and Files/FilesMatch access rules are enforced. Unsupported authentication/authorization, host-based access and handler rules still fail closed, even with Strict off. Other unsupported non-security directives are logged and skipped with Strict off. Re-apply the Web Service after .htaccess changes.</p>
<p data-i18n="webServiceHtaccessDocsUnsupported">Only local ErrorDocument URLs are supported (GET/HEAD);
custom literal/external error documents, SetEnvIf, FallbackResource, Options FollowSymlinks and Options
MultiViews are not implemented. Order/Allow/Deny with all, IP or CIDR (IPv4/IPv6) and Files/FilesMatch
access rules are enforced. Unsupported authentication/authorization, host-based access and handler rules
still fail closed, even with Strict off. Other unsupported non-security directives are logged and
skipped with Strict off. Re-apply the Web Service after .htaccess changes.</p>
<p class="fine" data-i18n="webServiceHtaccessDocsSecurity">Vhost/location ACL, authentication, error pages
and response rules still remain authoritative. .htaccess cannot escape the document root, select an
arbitrary FastCGI socket or override protected framing headers.</p>
@@ -5432,6 +5459,8 @@ log_errors = On</code></pre>
<option data-i18n="notfoundModeWelcome" value="welcome">RustProxy placeholder</option>
<option data-i18n="notfoundModeBuiltin" value="builtin">Application-style status page
</option>
<option data-i18n="notfoundModeCloudflare" value="cloudflare">Cloudflare-style (offline,
RustProxy-branded)</option>
<option data-i18n="notfoundModeEmpty" value="empty">Status only / empty</option>
<option data-i18n="notfoundModeHtml" value="html">Custom HTML</option>
</select></label>
+77 -5
View File
@@ -9,7 +9,7 @@
const row = el("div", undefined, "page-editor"), heading = label("strong", key, "page-label"); row.append(heading);
const mode = el("select"), status = el("select"), html = el("textarea"), file = el("input");
mode.setAttribute("aria-label", t(key)); mode.className = "page-mode";
mode.append(option("", "pageInherit"), option("welcome", "pageWelcome"), option("builtin", "pageBuiltin"), option("empty", "pageEmpty"), option("html", "pageHtml"));
mode.append(option("", "pageInherit"), option("welcome", "pageWelcome"), option("builtin", "pageBuiltin"), option("cloudflare", "pageCloudflare"), option("empty", "pageEmpty"), option("html", "pageHtml"));
mode.value = value?.kind || "";
status.className = "page-status"; status.setAttribute("aria-label", t("pageStatus"));
status.append(option("", "pageOriginalStatus"));
@@ -21,14 +21,58 @@
for (const event of ["change", "input"]) { mode.addEventListener(event, sync); status.addEventListener(event, sync); }
file.addEventListener("change", async () => { try { const chosen = file.files[0]; if (!chosen) return; if (chosen.size > 32768) throw new Error(t("pageTooLarge")); html.value = await chosen.text(); html.dispatchEvent(new Event("input", { bubbles: true })); } catch (error) { toast(error.message, true); } finally { file.value = ""; } });
row.append(mode, status, source); parent.append(row); sync();
return { row, read() { if (!mode.value) return null; const markup = mode.value === "html" ? html.value : ""; if (new TextEncoder().encode(markup).length > 32768) throw new Error(t("pageTooLarge")); return { kind: mode.value, status: status.value ? Number(status.value) : null, html: markup }; } };
function setMode(kind) {
if (mode.value === kind && (kind || !status.value)) return;
mode.value = kind;
if (!kind) status.value = "";
mode.dispatchEvent(new Event("change", { bubbles: true }));
}
return {
row, setCloudflare: () => setMode("cloudflare"), reset: () => setMode(""),
isCloudflare: () => mode.value === "cloudflare",
read() { if (!mode.value) return null; const markup = mode.value === "html" ? html.value : ""; if (new TextEncoder().encode(markup).length > 32768) throw new Error(t("pageTooLarge")); return { kind: mode.value, status: status.value ? Number(status.value) : null, html: markup }; }
};
}
function errorsEditor(parent, values = {}) {
const details = el("details", undefined, "pages-errors"); details.append(label("summary", "customErrorPages")); parent.append(details);
const rows = new Map(); for (const code of codes) { const group = el("div"); details.append(group); const editor = pageEditor(group, "customErrorPages", values[code]); editor.row.querySelector("strong").removeAttribute("data-i18n"); editor.row.querySelector("strong").textContent = statusLabel(code); rows.set(code, editor); }
return { read() { return Object.fromEntries([...rows].map(([code, editor]) => [code, editor.read()]).filter(([, page]) => page)); } };
return {
setAllCloudflare() { for (const editor of rows.values()) editor.setCloudflare(); details.open = true; },
resetAll() { for (const editor of rows.values()) editor.reset(); details.open = false; },
allCloudflare: () => [...rows.values()].every(editor => editor.isCloudflare()),
read() { return Object.fromEntries([...rows].map(([code, editor]) => [code, editor.read()]).filter(([, page]) => page)); }
};
}
function bulkCloudflareSwitch(parent, apply, helpKey) {
const wrapper = el("div", undefined, "page-bulk-actions");
const control = el("label", undefined, "check page-bulk-switch-label");
const toggle = document.createElement("input");
toggle.type = "checkbox";
toggle.className = "switch";
control.append(toggle, label("span", "pageCloudflareAll"));
toggle.addEventListener("change", () => apply(toggle.checked));
wrapper.append(control, label("span", helpKey, "fine"));
parent.append(wrapper);
return toggle;
}
function vhostEditor(parent, values = {}) {
let applying = false;
const bulk = bulkCloudflareSwitch(parent, checked => {
applying = true;
try {
if (checked) {
response.setCloudflare(); fallback.setCloudflare(); errors.setAllCloudflare();
enabled.checked = true;
statuses.value = codes.join(", ");
} else {
response.reset(); fallback.reset(); errors.resetAll();
enabled.checked = false;
statuses.value = "404";
}
enabled.dispatchEvent(new Event("change", { bubbles: true }));
} finally { applying = false; }
syncBulk();
});
const response = pageEditor(parent, "pageStaticHost", values.response), fallback = pageEditor(parent, "pageMissingPath", values.fallback);
const interception = el("section", undefined, "php-origin-errors");
const toggle = el("label", undefined, "check"), enabled = document.createElement("input");
@@ -44,6 +88,15 @@
enabled.addEventListener("change", sync); sync();
interception.append(toggle, codesLabel, hint); parent.append(interception);
const errors = errorsEditor(parent, values.errors);
const syncBulk = () => {
const selected = statuses.value.split(/[\s,]+/).filter(Boolean);
bulk.checked = response.isCloudflare() && fallback.isCloudflare() && errors.allCloudflare()
&& enabled.checked && selected.length === codes.length && codes.every(code => selected.includes(String(code)));
};
const onEditorChange = event => { if (!applying && event.target !== bulk) syncBulk(); };
parent.addEventListener("change", onEditorChange);
parent.addEventListener("input", onEditorChange);
syncBulk();
parent.append(label("p", "pagesSafetyHint", "fine"));
return {
read: () => {
@@ -56,8 +109,27 @@
}
};
}
let global = null;
function render() { if (!envelope || settingsDirty.has("pages-form")) return; const values = envelope.config.pages || {}, parent = $("global-pages-fields"); parent.replaceChildren(); const ip = pageEditor(parent, "pageDirectIp", values.direct_ip), unknown = pageEditor(parent, "pageUnknownHost", values.unknown_host), errors = errorsEditor(parent, values.errors); global = { read: () => ({ direct_ip: ip.read(), unknown_host: unknown.read(), errors: errors.read() }) }; }
let global = null, globalSync = null;
function render() {
if (!envelope || settingsDirty.has("pages-form")) return; const values = envelope.config.pages || {}, parent = $("global-pages-fields");
if (globalSync) { parent.removeEventListener("change", globalSync); parent.removeEventListener("input", globalSync); }
parent.replaceChildren();
let applying = false;
const bulk = bulkCloudflareSwitch(parent, checked => {
applying = true;
try {
if (checked) { ip.setCloudflare(); unknown.setCloudflare(); errors.setAllCloudflare(); }
else { ip.reset(); unknown.reset(); errors.resetAll(); }
} finally { applying = false; }
globalSync();
});
const ip = pageEditor(parent, "pageDirectIp", values.direct_ip), unknown = pageEditor(parent, "pageUnknownHost", values.unknown_host), errors = errorsEditor(parent, values.errors);
globalSync = event => { if (!applying && event?.target !== bulk) bulk.checked = ip.isCloudflare() && unknown.isCloudflare() && errors.allCloudflare(); };
parent.addEventListener("change", globalSync);
parent.addEventListener("input", globalSync);
globalSync();
global = { read: () => ({ direct_ip: ip.read(), unknown_host: unknown.read(), errors: errors.read() }) };
}
window.rustProxyPages = { render, vhostEditor };
bindSettingsForm("pages-form", next => { next.pages = global.read(); }, "pages");
$("settings-security-open").addEventListener("click", () => setPanel("security"));
+34 -9
View File
@@ -16,6 +16,9 @@ use std::{
use tokio::sync::Semaphore;
use zeroize::Zeroizing;
const MAX_WAITING_VERIFICATIONS: usize = 64;
const WORKER_WAIT_TIMEOUT: Duration = Duration::from_secs(3);
fn realm() -> String {
"Restricted".into()
}
@@ -59,6 +62,7 @@ impl std::fmt::Debug for User {
pub struct Compiled {
settings: Settings,
challenge: HeaderValue,
waiting: Arc<Semaphore>,
}
impl Settings {
pub fn compile(&self) -> Result<Option<Compiled>> {
@@ -98,6 +102,7 @@ impl Settings {
Ok(Some(Compiled {
settings: self.clone(),
challenge: format!("Basic realm=\"{}\", charset=\"UTF-8\"", self.realm).parse()?,
waiting: Arc::new(Semaphore::new(MAX_WAITING_VERIFICATIONS)),
}))
}
}
@@ -147,18 +152,22 @@ fn denied(status: StatusCode, challenge: Option<&HeaderValue>) -> Response {
.headers_mut()
.insert("www-authenticate", challenge.clone());
}
if status == StatusCode::TOO_MANY_REQUESTS {
response
.headers_mut()
.insert("retry-after", HeaderValue::from_static("60"));
if status == StatusCode::TOO_MANY_REQUESTS || status == StatusCode::SERVICE_UNAVAILABLE {
response.headers_mut().insert(
"retry-after",
HeaderValue::from_static(if status == StatusCode::TOO_MANY_REQUESTS {
"60"
} else {
"1"
}),
);
}
response
.extensions_mut()
.insert(crate::auth_provider::AuthenticationResponse);
response
}
/// Use only with the Authorization value returned from a successful authorize().
/// This is not itself authentication; do not call on untrusted request headers.
pub(crate) fn verified_username(value: &HeaderValue) -> Option<String> {
let mut headers = HeaderMap::new();
headers.insert("authorization", value.clone());
@@ -224,9 +233,25 @@ impl Compiled {
.unwrap_or(&self.settings.users[0])
.password_hash
.clone();
let permit = workers
.try_acquire_owned()
.map_err(|_| denied(StatusCode::SERVICE_UNAVAILABLE, None))?;
let waiting = self.waiting.clone().try_acquire_owned().map_err(|_| {
tracing::warn!(client_ip = %ip, "Basic Auth verification queue is full");
denied(StatusCode::SERVICE_UNAVAILABLE, None)
})?;
let permit = match tokio::time::timeout(WORKER_WAIT_TIMEOUT, workers.acquire_owned()).await
{
Ok(Ok(permit)) => permit,
Ok(Err(_)) => {
tracing::warn!("Basic Auth password verification workers are unavailable");
return Err(denied(StatusCode::SERVICE_UNAVAILABLE, None));
}
Err(_) => {
tracing::warn!(client_ip = %ip, wait_ms = WORKER_WAIT_TIMEOUT.as_millis(),
"Basic Auth password verification timed out waiting for a worker");
return Err(denied(StatusCode::SERVICE_UNAVAILABLE, None));
}
};
drop(waiting);
let verified = tokio::task::spawn_blocking(move || {
let _permit = permit;
PasswordHash::new(&encoded).is_ok()
+57
View File
@@ -66,6 +66,63 @@ mod tests {
assert!(!h.contains_key("remote-user"));
}
}
#[tokio::test]
async fn concurrent_browser_assets_wait_instead_of_failing_with_503() {
let password = "sufficiently-long-password";
let hash = crate::auth::hash_password_offline(password.into()).await.unwrap();
let auth = Settings {
enabled: true,
users: vec![User { username: "alice".into(), password_hash: hash }],
..Default::default()
}.compile().unwrap().unwrap();
let raw = HeaderValue::from_str(&format!(
"Basic {}", STANDARD.encode(format!("alice:{password}"))
)).unwrap();
let headers = {
let mut h = HeaderMap::new();
h.insert("authorization", raw);
h
};
let (mut h1, mut h2, mut h3, mut h4) =
(headers.clone(), headers.clone(), headers.clone(), headers);
let workers = Arc::new(Semaphore::new(1));
let limits = Limits::default();
let ip = "127.0.0.1".parse().unwrap();
let (a, b, c, d) = tokio::join!(
auth.authorize(&mut h1, true, ip, workers.clone(), &limits),
auth.authorize(&mut h2, true, ip, workers.clone(), &limits),
auth.authorize(&mut h3, true, ip, workers.clone(), &limits),
auth.authorize(&mut h4, true, ip, workers.clone(), &limits),
);
assert!(a.is_ok() && b.is_ok() && c.is_ok() && d.is_ok(),
"parallel authorized asset requests must wait for verification slots");
}
#[tokio::test]
async fn basic_auth_waiting_queue_is_bounded_and_fails_closed() {
let password = "sufficiently-long-password";
let hash = crate::auth::hash_password_offline(password.into()).await.unwrap();
let auth = Settings {
enabled: true,
users: vec![User { username: "alice".into(), password_hash: hash }],
..Default::default()
}.compile().unwrap().unwrap();
let _occupied = (0..MAX_WAITING_VERIFICATIONS)
.map(|_| auth.waiting.clone().try_acquire_owned().unwrap())
.collect::<Vec<_>>();
let mut headers = HeaderMap::new();
headers.insert("authorization", HeaderValue::from_str(&format!(
"Basic {}", STANDARD.encode(format!("alice:{password}"))
)).unwrap());
let response = auth.authorize(
&mut headers, true, "127.0.0.1".parse().unwrap(),
Arc::new(Semaphore::new(2)), &Limits::default()
).await.err().expect("queue exhaustion must deny access");
assert_eq!(response.status(), StatusCode::SERVICE_UNAVAILABLE);
assert_eq!(response.headers().get("retry-after").unwrap(), "1");
assert!(!headers.contains_key("authorization"));
}
#[test]
fn bounds_ip_limiter() {
let limits = Limits::default();
+5 -2
View File
@@ -74,10 +74,13 @@ impl Host {
}
self.page.validate_local_response()?;
let status = self.page.status.unwrap_or(default_status());
if matches!(self.page.kind, crate::pages::Kind::Builtin) {
if matches!(
self.page.kind,
crate::pages::Kind::Builtin | crate::pages::Kind::Cloudflare
) {
ensure!(
crate::pages::BUILTIN_ERROR_CODES.contains(&status),
"application-style 404 host status must use a built-in error template"
"templated 404 host status must use an available error template"
);
} else {
ensure!(
+15
View File
@@ -32,6 +32,21 @@ mod tests {
assert!(host(crate::pages::Kind::Html, 418).validate().is_err());
}
#[test]
fn cloudflare_hosts_accept_all_pre_generated_error_codes() {
for code in crate::pages::BUILTIN_ERROR_CODES {
assert!(
host(crate::pages::Kind::Cloudflare, code)
.validate()
.is_ok(),
"{code}"
);
}
assert!(host(crate::pages::Kind::Cloudflare, 418)
.validate()
.is_err());
}
#[test]
fn application_style_hosts_require_a_bundled_template() {
for status in crate::pages::BUILTIN_ERROR_CODES {
+24
View File
@@ -26,6 +26,26 @@ pub fn builtin_gateway_error(status: StatusCode) -> Option<&'static str> {
_ => None,
}
}
pub fn cloudflare_style_page(status: StatusCode) -> Option<&'static str> {
match status.as_u16() {
200 => Some(include_str!("../admin/web/cf_page/error_200.html")),
400 => Some(include_str!("../admin/web/cf_page/error_400.html")),
401 => Some(include_str!("../admin/web/cf_page/error_401.html")),
403 => Some(include_str!("../admin/web/cf_page/error_403.html")),
404 => Some(include_str!("../admin/web/cf_page/error_404.html")),
408 => Some(include_str!("../admin/web/cf_page/error_408.html")),
410 => Some(include_str!("../admin/web/cf_page/error_410.html")),
413 => Some(include_str!("../admin/web/cf_page/error_413.html")),
429 => Some(include_str!("../admin/web/cf_page/error_429.html")),
500 => Some(include_str!("../admin/web/cf_page/error_500.html")),
502 => Some(include_str!("../admin/web/cf_page/error_502.html")),
503 => Some(include_str!("../admin/web/cf_page/error_503.html")),
504 => Some(include_str!("../admin/web/cf_page/error_504.html")),
_ => None,
}
}
pub(crate) fn builtin_application_page(status: StatusCode) -> String {
if status == StatusCode::OK {
return include_str!("../admin/web/status_200.html").to_owned();
@@ -67,6 +87,7 @@ pub enum Kind {
Empty,
Html,
Builtin,
Cloudflare,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(default, deny_unknown_fields)]
@@ -162,6 +183,9 @@ impl Page {
Kind::Html => self.html.clone(),
Kind::Welcome => include_str!("../admin/web/demo.html").to_owned(),
Kind::Builtin => builtin_application_page(status),
Kind::Cloudflare => cloudflare_style_page(status)
.map(str::to_owned)
.unwrap_or_else(|| builtin_application_page(status)),
}
}
pub fn render(&self, default_status: StatusCode) -> Response {
+87
View File
@@ -57,6 +57,93 @@ mod tests {
);
}
#[tokio::test]
async fn cloudflare_pages_are_pre_generated_offline_and_keep_http_status() {
for code in [
200, 400, 401, 403, 404, 408, 410, 413, 429, 500, 502, 503, 504,
] {
let status = StatusCode::from_u16(code).unwrap();
let template = cloudflare_style_page(status).expect("missing Cloudflare template");
assert!(
template.contains(&format!("<span class=\"error-code\">Error {code}</span>")),
"{code}"
);
assert!(template.contains("class=\"diagnostics-band\""), "{code}");
assert!(
template.contains("Performance &amp; security by RustProxy"),
"{code}"
);
assert!(!template.contains("Response generated by"), "{code}");
assert!(!template.contains("cloudflare.com"), "{code}");
assert!(template.contains("<style>"), "{code}");
assert!(template.contains("RustProxy"), "{code}");
assert!(!template.contains("<script"), "{code}");
assert!(!template.contains("<link "), "{code}");
assert!(!template.contains("http://"), "{code}");
assert!(!template.contains("https://"), "{code}");
let page = Page {
kind: Kind::Cloudflare,
status: Some(code),
html: String::new(),
};
page.validate_local_response().unwrap();
let response = page.render(StatusCode::INTERNAL_SERVER_ERROR);
assert_eq!(response.status(), status);
assert_eq!(
response.headers()["content-type"],
"text/html; charset=utf-8"
);
assert_eq!(response.headers()["cache-control"], "no-store");
assert_eq!(response.headers()["x-content-type-options"], "nosniff");
assert_eq!(
response.headers()["content-length"].to_str().unwrap(),
template.len().to_string()
);
assert_eq!(
response
.into_body()
.collect()
.await
.unwrap()
.to_bytes()
.as_ref(),
template.as_bytes()
);
}
assert!(cloudflare_style_page(StatusCode::IM_A_TEAPOT).is_none());
let page = Page {
kind: Kind::Cloudflare,
status: Some(418),
html: String::new(),
};
let response = page.render(StatusCode::BAD_GATEWAY);
let body = response.into_body().collect().await.unwrap().to_bytes();
assert!(std::str::from_utf8(&body).unwrap().contains("418 - "));
}
#[tokio::test]
async fn cloudflare_error_replacement_preserves_challenge_and_no_store() {
let mut response = Response::new(Body::from("old"));
*response.status_mut() = StatusCode::UNAUTHORIZED;
response.headers_mut().insert(
"www-authenticate",
HeaderValue::from_static("Basic realm=\"Test\""),
);
replace_error(
&mut response,
&Page {
kind: Kind::Cloudflare,
status: None,
html: String::new(),
},
);
assert_eq!(response.status(), StatusCode::UNAUTHORIZED);
assert!(response.headers().contains_key("www-authenticate"));
assert_eq!(response.headers()["cache-control"], "no-store");
let body = response.into_body().collect().await.unwrap().to_bytes();
assert!(std::str::from_utf8(&body).unwrap().contains("401</span>"));
}
#[test]
fn builtin_gateway_pages_cover_edge_policy_and_gateway_errors() {
assert!(builtin_gateway_error(StatusCode::UNAUTHORIZED)