外网机器 nginx 上配置:
stream { map $ssl_preread_server_name $name99 { southcentral.codeium.com southcentral99; default southcentral99; } upstream southcentral99{ server southcentral.codeium.com:30099; } server { listen 30099; listen [::]:30099; proxy_pass $name99; ssl_preread on; } }
需要安装 libnginx-mod-stream 。
本机 hosts 绑定外网 nginx 的 ip (假设是 3.3.3.3 ):
3.3.3.3 southcentral.codeium.com