use frp http proxy.

This commit is contained in:
amass 2024-01-28 14:06:56 +08:00
parent 8863d86983
commit 379f54a797

View File

@ -42,11 +42,11 @@ http {
server 127.0.0.1:8083; server 127.0.0.1:8083;
} }
upstream frp_board { upstream frp_http_proxy {
server 127.0.0.1:8084; server 127.0.0.1:8084;
} }
upstream frp_http_proxy { upstream frp_board {
server 127.0.0.1:8085; server 127.0.0.1:8085;
} }
@ -58,26 +58,15 @@ http {
server 127.0.0.1:8087; server 127.0.0.1:8087;
} }
upstream frp_pve {
server 127.0.0.1:8088;
}
upstream frp_webdav {
server 127.0.0.1:8089;
}
upstream frp_jellyfin {
server 127.0.0.1:8096;
}
init_by_lua_file lua/settings.lua; init_by_lua_file lua/settings.lua;
server { server {
listen 443 ssl; listen 443 ssl;
server_name wiznote.amass.fun; server_name wiz.amass.fun;
ssl_certificate cert/9890678_wiznote.amass.fun.pem; ssl_certificate cert/wiz.amass.fun.pem;
ssl_certificate_key cert/9890678_wiznote.amass.fun.key; ssl_certificate_key cert/wiz.amass.fun.key;
ssl_session_timeout 5m; #缓存有效期 ssl_session_timeout 5m; #缓存有效期
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4; #加密算法 ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4; #加密算法
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #安全链接可选的加密协议 ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #安全链接可选的加密协议
@ -123,6 +112,33 @@ http {
} }
} }
server {
listen 443 ssl;
server_name unraid.amass.fun;
client_header_timeout 120s;
client_body_timeout 120s;
ssl_certificate cert/unraid.amass.fun.pem;
ssl_certificate_key cert/unraid.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 { server {
listen 443 ssl; listen 443 ssl;
server_name chatgpt.amass.fun; server_name chatgpt.amass.fun;
@ -146,7 +162,7 @@ http {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host; proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://frp_chatgpt; proxy_pass http://frp_http_proxy;
} }
} }
@ -174,7 +190,7 @@ http {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host; proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass https://frp_pve; proxy_pass http://frp_http_proxy;
} }
} }
@ -202,7 +218,7 @@ http {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host; proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass https://frp_webdav; proxy_pass http://frp_http_proxy;
} }
} }
@ -230,7 +246,7 @@ http {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host; proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://frp_jellyfin; proxy_pass http://frp_http_proxy;
} }
} }
@ -372,8 +388,8 @@ http {
server { server {
listen 80; listen 80;
server_name wiznote.amass.fun; server_name wiz.amass.fun;
rewrite ^(.*)$ https://wiznote.amass.fun$1 permanent; rewrite ^(.*)$ https://wiz.amass.fun$1 permanent;
} }
server { server {