Skip to content

Commit

Permalink
Update doh.ffmuc.net.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
awlx authored Mar 14, 2024
1 parent 7c7bdbf commit 195f6e8
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions nginx/domains/doh.ffmuc.net.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,16 @@ geo $doh_backend {
default doh-backend-v6;
}

# geo $doh_blocked {
# default 0;
# #95.85.96.0/19 1;
# }

upstream doh-backend-v4 {
keepalive 16;
keepalive 32;
server 127.0.0.1:445;
}
upstream doh-backend-v6 {
keepalive 16;
keepalive 32;
server [::1]:445;
}

limit_req_zone $binary_remote_addr zone=doh_requests:10m rate=5000r/s;
limit_req_zone $binary_remote_addr zone=doh_requests:10m rate=20000r/s;
server {
listen [::]:80;
listen 80;
Expand Down Expand Up @@ -56,10 +51,6 @@ server {
}

location /dns-query {
# if ( $doh_blocked = 0 ) {
# return 403;
# access_log off;
# }
limit_req zone=doh_requests burst=10000;
proxy_set_header Host $http_host;
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
Expand All @@ -73,7 +64,6 @@ server {
add_header 'Access-Control-Allow-Methods' 'GET, POST' always;
add_header 'Access-Control-Allow-Headers' '*' always;

# proxy_set_header Connection "";
}
location / {
if ( $request_method = GET ) {
Expand All @@ -85,9 +75,8 @@ server {
if ( $rew = "11" ) {
return 301 $wiki_page;
}
limit_req zone=doh_requests burst=6000;
limit_req zone=doh_requests burst=10000;
proxy_set_header Host $http_host;
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect off;
proxy_buffering off;
#proxy_pass https://doh.ffmuc.net:445/dns-query;
Expand Down

0 comments on commit 195f6e8

Please sign in to comment.