Replace remote with local repo
This commit is contained in:
12
nginx/cyberlux-ddos-zones.conf
Normal file
12
nginx/cyberlux-ddos-zones.conf
Normal file
@@ -0,0 +1,12 @@
|
||||
#
|
||||
# CyberLux onion ingress budgets.
|
||||
# Installed into /etc/nginx/conf.d/ so these zones exist in nginx `http { }`.
|
||||
#
|
||||
# Tor hidden services connect to nginx over 127.0.0.1, so per-IP limits are not
|
||||
# useful here. `$server_port` keys the CyberLux onion ingress bucket.
|
||||
#
|
||||
# Keyed by server_port — not remote_addr, because all Tor clients arrive from loopback.
|
||||
# rate=60r/s is generous for onion traffic; static assets are excluded from this zone
|
||||
# (see nginx.example.conf /_next/static/ location block).
|
||||
limit_req_zone $server_port zone=cyberlux_onion_req:10m rate=60r/s;
|
||||
limit_conn_zone $server_port zone=cyberlux_onion_conn:10m;
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,12 +1,26 @@
|
||||
# Included inside each `server { }` for CyberLux onion vhosts.
|
||||
# Installed to /etc/nginx/cyberlux-server-common.inc by install-tor-onion.sh
|
||||
# Requires /etc/nginx/conf.d/cyberlux-ddos-zones.conf in nginx `http { }`.
|
||||
|
||||
server_tokens off;
|
||||
client_body_timeout 15s;
|
||||
client_header_timeout 15s;
|
||||
send_timeout 60s;
|
||||
|
||||
client_body_timeout 12s;
|
||||
client_header_timeout 12s;
|
||||
keepalive_timeout 65s;
|
||||
send_timeout 30s;
|
||||
reset_timedout_connection on;
|
||||
|
||||
error_page 429 = @cyberlux_rate_limited;
|
||||
|
||||
location @cyberlux_rate_limited {
|
||||
default_type text/plain;
|
||||
add_header Retry-After "10" always;
|
||||
add_header X-Cyberlux-Shield "rate-limited" always;
|
||||
return 429 "CyberLux onion shield: request rate limited. Retry shortly.\n";
|
||||
}
|
||||
|
||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
add_header Referrer-Policy "no-referrer" always;
|
||||
add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always;
|
||||
add_header X-Cyberlux-Shield "onion-edge" always;
|
||||
|
||||
Reference in New Issue
Block a user