Files
drip/deployments/Caddyfile
Gouryella 37d1bfc089 feat(client): Support predefined tunnel configuration and management commands
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
2026-01-15 17:18:27 +08:00

35 lines
856 B
Caddyfile

# Caddyfile for drip-server reverse proxy
#
# This configuration:
# - Obtains wildcard certificate via DNS challenge (Cloudflare)
# - Reverse proxies HTTPS/WSS traffic to drip-server
# - Handles all subdomains for tunnel routing
# - Supports WebSocket connections for WSS transport
# Global options
{
email {$ACME_EMAIL}
}
# Main domain and all subdomains
{$DOMAIN}, *.{$DOMAIN} {
# Use DNS challenge for wildcard certificate
# Force TLS 1.3 only
tls {
dns cloudflare {$CF_API_TOKEN}
protocols tls1.3 tls1.3
}
# Reverse proxy to drip-server (plain TCP mode)
reverse_proxy drip-server:8443 {
# Pass original host header
header_up Host {host}
header_up X-Real-IP {remote_host}
header_up X-Forwarded-For {remote_host}
header_up X-Forwarded-Proto {scheme}
# Flush immediately for streaming/WebSocket
flush_interval -1
}
}