0
0

Caddy: disabled rate limiting

This commit is contained in:
Opnxng 2024-05-03 03:25:11 +08:00
parent 8086059dfd
commit 2476dd1ef0
3 changed files with 11 additions and 16 deletions

View File

@ -2,7 +2,7 @@
{ {
admin off admin off
acme_dns cloudflare {$CLOUDFLARE_API_TOKEN} acme_dns cloudflare {$CLOUDFLARE_API_TOKEN}
order rate_limit before basicauth # order rate_limit before basicauth
} }
# ---------------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------------
@ -494,8 +494,6 @@
@q host q.{$HOSTNAME} @q host q.{$HOSTNAME}
handle @q { handle @q {
encode zstd gzip encode zstd gzip
rate_limit {remote.ip} 2r/s 60000 429
rate_limit {remote.ip} 45r/m 300000 429
reverse_proxy { reverse_proxy {
to {{ oracle1_private_ip }}:8904 to {{ oracle1_private_ip }}:8904
to {{ oracle2_private_ip }}:8904 to {{ oracle2_private_ip }}:8904
@ -506,7 +504,6 @@
lb_try_interval 1s lb_try_interval 1s
fail_duration 30s fail_duration 30s
max_fails 3 max_fails 3
header_up X-Real-IP {remote_host}
} }
header { header {
X-Robots-Tag "noindex, noimageindex, nosnippet, notranslate, noarchive, nofollow" X-Robots-Tag "noindex, noimageindex, nosnippet, notranslate, noarchive, nofollow"
@ -588,8 +585,6 @@
@ig host ig.{$HOSTNAME} @ig host ig.{$HOSTNAME}
handle @ig { handle @ig {
encode zstd gzip encode zstd gzip
rate_limit {remote.ip} 2r/s 60000 429
rate_limit {remote.ip} 45r/m 300000 429
reverse_proxy { reverse_proxy {
to {{ oracle1_private_ip }}:8908 to {{ oracle1_private_ip }}:8908
to {{ oracle2_private_ip }}:8908 to {{ oracle2_private_ip }}:8908

View File

@ -232,8 +232,8 @@ hostname_replace:
'dic\.academic\.ru$': 'akademik.bloat.cat' 'dic\.academic\.ru$': 'akademik.bloat.cat'
'(.*\.)?tumblr\.com$': 'tb.opnxng.com' '(.*\.)?tumblr\.com$': 'tb.opnxng.com'
'(.*\.)?imgur\.com$': 'r.opnxng.com' '(.*\.)?imgur\.com$': 'r.opnxng.com'
# '(.*\.)?mobile.twitter\.com$': 'nitter.poast.org' '(.*\.)?mobile.twitter\.com$': 'nitter.poast.org'
# '(about\www\.)?twitter\.com$': 'nitter.poast.org' '(about\www\.)?twitter\.com$': 'nitter.poast.org'
'(.*\.)?quora\.com$': 'q.opnxng.com' '(.*\.)?quora\.com$': 'q.opnxng.com'
'(.*\.)?imdb\.com$': 'd.opnxng.com' '(.*\.)?imdb\.com$': 'd.opnxng.com'
# '(.*\.)?instagram\.com$': 'ig.opnxng.com' # '(.*\.)?instagram\.com$': 'ig.opnxng.com'

View File

@ -1,12 +1,12 @@
compose: config:
oracle1:
- redlib
oracle2:
- redlib
oracle3:
- redlib
oracle4: oracle4:
- redlib - caddy
- paulgo
compose:
oracle4:
- caddy
- paulgo
# ---------------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------------