Created
January 25, 2025 04:04
-
-
Save asvdvl/387f59889578cfdd0cb6969191dda46a to your computer and use it in GitHub Desktop.
config for support of v4 web clients, requires dns server which gives only v6 protocol, otherwise this config turns into a regular reverse proxy which is also a valid way of use. dnsdist config which gives A record of this proxy to clients when in the higher one there is only AAAA you can find [here]()(not ready yet)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| listen 10.0.0.2:80; | |
| # server_name *.asv.l asv.l; #if you only need to allow certain server names | |
| server_name _; | |
| location / { | |
| #if you have a dns server that only gives v6 responses, which should be proxied, specify it here | |
| resolver [2001:0db8::d4e6] valid=300s; | |
| set $upstream_host $host; | |
| add_header X-Server-ID "v6proxy"; | |
| proxy_pass http://$upstream_host; | |
| proxy_set_header Host $host; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_set_header Upgrade $http_upgrade; | |
| proxy_set_header Connection "upgrade"; | |
| proxy_connect_timeout 10s; | |
| proxy_read_timeout 30s; | |
| proxy_send_timeout 30s; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment