› NGINX
› NGINX Trac
› 3rd Party Modules
› Security Advisories
› CHANGES
› OpenResty
› ngx_lua
› Tengine
在线学习资源
› NGINX 开发从入门到精通
NGINX Modules
› ngx_echo
Achilless
V2EX  ›  NGINX

nginx 如何正向代理 tcp/udp 流量

  •  
  •   Achilless · Sep 27, 2023 · 1666 views
    This topic created in 1147 days ago, the information mentioned may be changed or developed.

    七层流量可以这样实现正常请求 proxy_pass $scheme://$http_host$request_uri;

    四层流量貌似没有类似变量 proxy_pass $origin_dst

    具体需求是,通过 nginx 对通过的 tcp/udp 流量加 proxy_protocol ,但是不要修改目标 ip 和端口,查了下 lua 貌似也取不到这个信息,挺意外的。有其他办法吗

    yinmin
    yinmin
    Oct 10, 2023 via iPhone
    1
    stream {
    server {
    listen 12345;
    proxy_pass 127.0.0.1:54321;
    }
    }
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1064 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 18:54 · PVG 02:54 · LAX 10:54 · JFK 13:54
    ♥ Do have faith in what you're doing.