-
Notifications
You must be signed in to change notification settings - Fork 870
WebSocket Support (SS over WSS) and OutlineCaddy Integration #1685
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…ersion number extraction.
…apply formatting.
…d apply minor formatting.
…file template changes
…y include them in the API response based on listener types.
…nt and remove dedicated dynamic config endpoint.
fortuna
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's simplify how we build outilnecaddy so it's easier to reason about and there's less to maintain. I recommend putting it in a standalone PR so it's not blocked on the rest of the PR
fortuna
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we are ready to accept this PR. We need to understand how this will play with dynamic access keys. With dynamic keys we don't need to set things for "new keys". We can do it for all keys, simplifying the mental model.
We may want a separate API for dynamic keys, so this needs more discussion.
I encourage you to send the build & CI changes as a PR though.
…ddyWebServerConfig` to `WebServerConfig`
I believe I've fixed all the prior issues now, besides the dynamic access key concerns. I hear your feedback though, and I'm thinking more about it. I'll come up with something for your review. |
…g endpoint
API Changes:
- Rename PUT /server/listeners-for-new-access-keys → PUT /server/listeners
- Add `applyToExisting` parameter to optionally update all existing keys
- Add PUT /access-keys/{id}/listeners for per-key listener updates
- Add GET /access-keys/{id}/dynamic-config for YAML transport config
- Make GET /access-keys/{id} always return JSON (use dynamic-config for YAML)
Type Renames:
- ListenersForNewAccessKeys → ListenersConfig
- listenersForNewAccessKeys config field → listeners
This simplifies the mental model by:
1. Allowing listener updates on any key, not just at creation
2. Providing a clear global vs per-key control pattern
3. Separating JSON metadata from YAML transport config
…cal API communication.
This PR adds WebSocket transport support for Shadowsocks connections, enabling SS over WSS to bypass restrictive network filters. It fixes #1676 where much of the work was discussed.
Features
WebSocket Transport Support
GET /access-keys/{id}returns YAML configuration for WebSocket-enabled keys (Outline Client v1.15.0+)websocket-stream) and UDP over WebSocket (websocket-packet)Embedded OutlineCaddy Server
API Changes
New Endpoints
PUT /server/listeners-for-new-access-keys- Configure listener types for new keysPUT /server/web-server- Configure embedded Caddy web serverModified Endpoints
GET /access-keys/{id}- Returns JSON for traditional keys, YAML for WebSocket keysPOST /access-keys- Now acceptslistenersarray parameterAccessKey Schema
listenersfield (tcp,udp,websocket-stream,websocket-packet)dynamicConfigfield for WebSocket transport configurationpassword,port,method,accessUrlare now optional (omitted for WSS-only keys)Build & CI Changes
Docker Build Workflow
amd64andarm64images sequentiallyGitHub Actions Concurrency
build-and-test-*for build workflowlicense-*for license checksTaskfile Changes
download_xcaddytask for cross-platform xcaddy downloadsoutlinecaddy@v0.0.1caddy_yaml_adaptercaddy-l4@v0.0.0-20251201210923-0c96591f5650Dependencies
Go Dependencies (
go.mod,go.sum)prometheus/client_golangto v1.20.5prometheus/commonto v0.62.0oschwald/geoip2-golangto v1.11.0golang.org/x/cryptoto v0.32.0golang.org/x/syncto v0.11.0google.golang.org/protobufto v1.36.4Documentation
README.md
api.yml
GET /access-keys/{id}Usage Examples