Conversation
…anagement - Add TLS_HOST_AUTO_DETECT option to automatically detect TLS host from external URL - Improve server startup/shutdown handling for both HTTP and HTTPS modes - Update README with clearer TLS setup instructions and simplified examples - Add command logging for stdio transport debugging
4a28d1d to
4822e35
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR implements automatic TLS host detection and adds support for MCP (Model Context Protocol) backends beyond HTTP reverse proxies. The change allows the application to automatically configure TLS certificates for domains specified in the external URL, and introduces the ability to proxy to command-line MCP servers via stdio transport in addition to existing HTTP/SSE transport support.
Key changes:
- Added automatic TLS host detection from external URL when
tlsHostAutoDetectis enabled - Introduced
ProxyBackendfor handling MCP server commands via stdio transport - Refactored proxy configuration to accept either HTTP URLs or command arguments as proxy targets
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/proxy/main.go | Updated proxy router to accept generic http.Handler instead of specific reverse proxy |
| pkg/mcp-proxy/main.go | Added TLS auto-detection logic and support for MCP backend commands |
| pkg/backend/main.go | New MCP backend implementation for stdio transport with command execution |
| main.go | Added TLS auto-detect flag and removed specific proxy URL parameter |
| go.mod | Added MCP-go library dependency and updated package versions |
| README.md | Updated documentation to reflect new command-line usage patterns |
| Dockerfile | Added runtime dependencies for Node.js, npm, Python, and uv |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| if tlsHost != "" { | ||
| if !tlsAcceptTOS { | ||
| if tlsHostDetected { | ||
| return errors.New("TLS host is auto-detected, but tlsAcceptTOS is not set to true. Please agree to the TOS or set tlsHostAutoDetect to false") |
There was a problem hiding this comment.
The error message should use consistent parameter naming. It mentions tlsHostAutoDetect but the actual parameter is tlsHostAutoDetect (with different casing). Consider using the exact parameter name for clarity.
Summary
(Brief description of what this PR accomplishes)
Type of Change
Related Issues