简单记录

暂时不成熟,看看就行

http {同一级别增加

1
2
3
4
stream {
    include stream.d/*.conf;
}

stream.d/放入一个 conf 文件,内容如下

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
upstream tcp_proxy {
    hash $remote_addr consistent;
    server 10.205.203.204:443;
}

server {
    listen 5876;
    # ssl_preread on;
    ssl_certificate      /Users/pengxiaochao/Downloads/server.crt;
    ssl_certificate_key   /Users/pengxiaochao/Downloads/server.key;
    proxy_connect_timeout 1s;
    proxy_timeout 60s;
    proxy_pass tcp_proxy;
}

一些特殊用途