From bfd0425f044ca9671c9ac287f2f4dff6ad4b693f Mon Sep 17 00:00:00 2001 From: amass <168062547@qq.com> Date: Fri, 31 May 2024 22:47:31 +0800 Subject: [PATCH] add chatgpt proxy. --- Server/conf/nginx.conf | 59 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/Server/conf/nginx.conf b/Server/conf/nginx.conf index 8f5617e..1a42eea 100644 --- a/Server/conf/nginx.conf +++ b/Server/conf/nginx.conf @@ -54,6 +54,10 @@ http { server 127.0.0.1:8087; } + upstream frp_pve { + server 127.0.0.1:8088; + } + upstream typesense { server 127.0.0.1:8108; } @@ -88,6 +92,34 @@ http { } } + server { + listen 443 ssl; + server_name pve.amass.fun; + + client_header_timeout 120s; + client_body_timeout 120s; + client_max_body_size 512m; #上传文件最大支持512m + + ssl_certificate cert/pve.amass.fun.pem; + ssl_certificate_key cert/pve.amass.fun.key; + ssl_session_timeout 5m; #缓存有效期 + ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4; #加密算法 + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #安全链接可选的加密协议 + ssl_prefer_server_ciphers on; #使用服务器端的首选算法 + + location / { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header x-wiz-real-ip $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $http_host; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_pass https://frp_pve; + } + } + server { listen 443 ssl; server_name iot.amass.fun; @@ -131,6 +163,33 @@ http { } } + server { + listen 443 ssl; + server_name next.amass.fun; + + client_header_timeout 120s; + client_body_timeout 120s; + + ssl_certificate cert/next.amass.fun.pem; + ssl_certificate_key cert/next.amass.fun.key; + ssl_session_timeout 5m; #缓存有效期 + ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4; #加密算法 + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #安全链接可选的加密协议 + ssl_prefer_server_ciphers on; #使用服务器端的首选算法 + + location / { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header x-wiz-real-ip $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $http_host; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_pass http://frp_http_proxy; + } + } + server { listen 443 ssl; server_name gitea.amass.fun;