mirror of
https://github.com/nginx/nginx.git
synced 2026-05-13 09:36:42 +00: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
|
||
|---|---|---|
| .. | ||
| cc | ||
| lib | ||
| os | ||
| types | ||
| configure | ||
| define | ||
| endianness | ||
| feature | ||
| have | ||
| have_headers | ||
| headers | ||
| include | ||
| init | ||
| install | ||
| make | ||
| module | ||
| modules | ||
| nohave | ||
| options | ||
| sources | ||
| stubs | ||
| summary | ||
| threads | ||
| unix | ||