Welcome! Log In Create A New Profile

Advanced

Automatically detect hostname with map als ssl preread

February 07, 2022 07:06AM
I have a IPv4 to IPv6 reverse proxy server so that IPv4 clients can access IPv6 only websites. For each website the website domain and the corresponding IPv6 address must be added manually. Is there a way to automatically detect the AAAA record from the website and use this in upstream?

stream {
map $ssl_preread_server_name $selected_upstream {
www.website1.com upstream_1;
www.website2.com upstream_2;
www.website3.com upstream_3;
}
upstream upstream_1 { server [2001:x:x:x::f:244]:443; }
upstream upstream_2 { server [2001:x:x:x::f:245]:443; }
upstream upstream_3 { server [2001:x:x:x::f:246]:443; }

server {
listen 443;
proxy_pass $selected_upstream;
ssl_preread on;
}
}
Subject Author Posted

Automatically detect hostname with map als ssl preread

openworx February 07, 2022 07:06AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 291
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready