mirror of
https://github.com/nginx/nginx.git
synced 2026-10-24 22:57:43 -05:00
The module handles CONNECT requests and establishes a tunnel to a
backend.
Example config:
http {
map $request_port $allow_port {
80 1;
443 1;
}
map $host $allow_host {
hostnames;
example.com 1;
*.example.org 1;
}
server {
listen 8000;
resolver dns.example.com;
if ($allow_port != 1) {
return 403;
}
if ($allow_host != 1) {
return 403;
}
tunnel_pass;
}
}
Request:
$ curl -x 127.0.0.1:8000 https://example.com