mirror of
https://github.com/Gouryella/drip.git
synced 2026-02-23 21:00:44 +00:00
Added predefined tunnel functionality, allowing users to define multiple tunnels in the configuration file and start them by name, including the following improvements: - Added --all flag to start all configured tunnels - Added parameterless start command to list available tunnels - Support configuration of multiple tunnel types (http, https, tcp) - Support advanced configurations such as subdomains, transport protocols, and IP allowlists refactor(deployments): Refactor Docker deployment configuration Removed old Dockerfile and Compose configurations, added new deployment files: - Removed .env.example and old Docker build files - Added Caddy reverse proxy configuration file - Added two deployment modes: standard and Caddy reverse proxy - Added detailed server configuration example files docs: Update documentation to include tunnel configuration and deployment guide Updated Chinese and English README documents: - Added usage instructions and configuration examples for predefined tunnels - Expanded server deployment section to include direct TLS and reverse proxy modes - Added server configuration reference table with detailed configuration item descriptions - Added specific configuration methods for Caddy and Nginx reverse proxies
63 lines
1.9 KiB
Plaintext
63 lines
1.9 KiB
Plaintext
# Drip Tunnel Server - Nginx Configuration
|
|
#
|
|
# Architecture:
|
|
# External User -> Nginx (443) -> Drip Server (8443) -> Client
|
|
#
|
|
# Prerequisites:
|
|
# 1. Obtain a wildcard SSL certificate:
|
|
# certbot certonly --manual --preferred-challenges dns \
|
|
# -d "*.tunnel.example.com" -d "tunnel.example.com"
|
|
#
|
|
# 2. DNS Records:
|
|
# A tunnel.example.com -> YOUR_SERVER_IP
|
|
# A *.tunnel.example.com -> YOUR_SERVER_IP
|
|
#
|
|
# 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
|
|
|
|
|
|
# Redirect all HTTP traffic to HTTPS
|
|
server {
|
|
listen 80;
|
|
server_name tunnel.example.com *.tunnel.example.com;
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
|
|
# HTTPS reverse proxy → Drip Server
|
|
server {
|
|
listen 443 ssl http2;
|
|
server_name tunnel.example.com *.tunnel.example.com;
|
|
|
|
# SSL certificate
|
|
ssl_certificate /etc/letsencrypt/live/tunnel.example.com/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/tunnel.example.com/privkey.pem;
|
|
# 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;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
# Timeout settings
|
|
proxy_connect_timeout 60s;
|
|
proxy_send_timeout 300s;
|
|
proxy_read_timeout 300s;
|
|
|
|
# Disable buffering
|
|
proxy_buffering off;
|
|
proxy_request_buffering off;
|
|
|
|
# Large file upload support
|
|
}
|
|
}
|