This project builds a custom Caddy image with the Outline (Shadowsocks) module and YAML adapter, enabling Caddy to serve as a frontend for Outline servers with automatic HTTPS.
- Docker and Docker Compose
- A domain name pointing to your server's IP address (A record for IPv4, AAAA for IPv6)
-
Configure
config.yaml:- Replace
example.comwith your actual domain name. - Replace
/secret-tcp-pathand/secret-udp-pathwith long, random strings (e.g., generated viaopenssl rand -hex 16). - Replace
REPLACE_WITH_SECRETwith a Shadowsocks secret. You can generate one using:openssl rand -base64 16
- Replace
-
Build and Run:
docker-compose up -d --build
-
Verify: Check the logs to ensure Caddy obtained a certificate:
docker-compose logs -f
To connect using the Outline client or other Shadowsocks clients, you will need to construct a dynamic access key (YAML) or use the specific client configuration for Shadowsocks over Websockets.
Example dynamic-key.yaml for Outline:
transport:
$type: tcpudp
tcp:
$type: shadowsocks
endpoint:
$type: websocket
url: wss://example.com/secret-tcp-path
cipher: chacha20-ietf-poly1305
secret: YOUR_SECRET
udp:
$type: shadowsocks
endpoint:
$type: websocket
url: wss://example.com/secret-udp-path
cipher: chacha20-ietf-poly1305
secret: YOUR_SECRET