mirror of
https://github.com/Gouryella/drip.git
synced 2026-02-23 21:00:44 +00:00
Translate comments in nginx configuration file
This commit is contained in:
@@ -1,60 +1,60 @@
|
||||
# Drip Tunnel Server - Nginx 配置
|
||||
# Drip Tunnel Server - Nginx Configuration
|
||||
#
|
||||
# 架构:外部用户 -> Nginx (443) -> Drip Server (8443) -> 客户端
|
||||
# Architecture:
|
||||
# External User -> Nginx (443) -> Drip Server (8443) -> Client
|
||||
#
|
||||
# 前置条件:
|
||||
# 1. 获取通配符 SSL 证书:
|
||||
# Prerequisites:
|
||||
# 1. Obtain a wildcard SSL certificate:
|
||||
# certbot certonly --manual --preferred-challenges dns \
|
||||
# -d "*.tunnel.example.com" -d "tunnel.example.com"
|
||||
#
|
||||
# 2. DNS 配置:
|
||||
# 2. DNS Records:
|
||||
# A tunnel.example.com -> YOUR_SERVER_IP
|
||||
# A *.tunnel.example.com -> YOUR_SERVER_IP
|
||||
#
|
||||
# 3. 启动 Drip Server:
|
||||
# 3. Start the Drip Server:
|
||||
# ./bin/drip-server --port 8443 --domain tunnel.example.com \
|
||||
# --tls-cert /etc/letsencrypt/live/tunnel.example.com/fullchain.pem \
|
||||
# --tls-key /etc/letsencrypt/live/tunnel.example.com/privkey.pem
|
||||
|
||||
# HTTP 重定向到 HTTPS
|
||||
|
||||
# Redirect all HTTP traffic to HTTPS
|
||||
server {
|
||||
listen 80;
|
||||
server_name tunnel.example.com *.tunnel.example.com;
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
# HTTPS 代理到 Drip Server
|
||||
# HTTPS reverse proxy → Drip Server
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
server_name tunnel.example.com *.tunnel.example.com;
|
||||
|
||||
# SSL 证书
|
||||
# SSL certificate
|
||||
ssl_certificate /etc/letsencrypt/live/tunnel.example.com/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/tunnel.example.com/privkey.pem;
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
|
||||
# 代理到 Drip Server
|
||||
# Proxy to Drip Server
|
||||
location / {
|
||||
proxy_pass https://127.0.0.1:8443;
|
||||
proxy_ssl_protocols TLSv1.3;
|
||||
proxy_ssl_verify off;
|
||||
proxy_http_version 1.1;
|
||||
|
||||
# 转发请求头
|
||||
# Forward request headers
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
# 超时配置
|
||||
# Timeout settings
|
||||
proxy_connect_timeout 60s;
|
||||
proxy_send_timeout 300s;
|
||||
proxy_read_timeout 300s;
|
||||
|
||||
# 禁用缓冲
|
||||
# Disable buffering
|
||||
proxy_buffering off;
|
||||
proxy_request_buffering off;
|
||||
|
||||
# 大文件支持
|
||||
client_max_body_size 100m;
|
||||
# Large file upload support
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user