feat: add remote configuration update API documentation and event forwarding details#889
Conversation
…warding details Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
✅ E2E Test Results: PASSEDTest Run: #19999753815 Tests Executed:
✅ All e2e tests passed successfully! The TLS capture functionality is working correctly. Automated e2e test results for commit caeb9cd |
There was a problem hiding this comment.
Pull request overview
This pull request adds comprehensive API documentation for eCapture's remote configuration update and event forwarding capabilities in both English and Chinese. The PR also enhances code maintainability by adding descriptive comments to HTTP response status codes.
- Added detailed documentation for the remote configuration update HTTP API, including request/response formats, supported endpoints, error handling, and code examples
- Added documentation explaining event forwarding mechanisms (
--logaddr,--eventaddr,--ecaptureq) with protocol details and usage examples - Updated both English and Chinese README files to reference the new documentation under a reorganized "二次开发" (Secondary Development) section
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/remote-config-update-api_CN.md | Comprehensive Chinese documentation for remote configuration update API with curl and Go examples |
| docs/remote-config-update-api.md | English version of remote configuration update API documentation |
| docs/event-forward-api_CN.md | Chinese documentation explaining event forwarding options and WebSocket/Protobuf protocol usage |
| docs/event-forward-api.md | English version of event forwarding API documentation |
| cli/http/resp.go | Added Chinese comments to HTTP response status constants for better code clarity |
| README_CN.md | Reorganized development section and added references to new API documentation |
| README.md | Added references to remote configuration and event forwarding documentation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ./ecaptureq_client -server ws://127.0.0.1:28257/ | ||
| # or | ||
| ./ecaptureq_client -server ws://192.168.1.100:28257/ -verbose |
There was a problem hiding this comment.
The eCaptureQ WebSocket server created by --ecaptureq uses pkg/util/ws.Server with http.ListenAndServe and no authentication, so any client that can reach this ws:// address can connect and receive all streamed logs/events. When you follow this example and bind to a non-loopback address such as ws://192.168.1.100:28257/, sensitive captured data (including decrypted TLS payloads) is sent in cleartext and is readable by any party on the path or any unauthenticated client on that network. To harden this, either add TLS (wss://) and client authentication to the server itself or clearly require that this endpoint only be bound to localhost and exposed remotely only through a secured, authenticated reverse proxy.
|
🔧 Debug Build Complete (PR 889, RunID 19999753803) 📦 Download Links: ⏰ Files will be retained for 7 days, please download and test promptly. |
This pull request adds comprehensive documentation for eCapture's event forwarding capabilities and updates both the English and Chinese README files to reference these new docs. It also improves code clarity in the HTTP response status definitions. The changes are grouped into documentation enhancements and code improvements.
Documentation Enhancements:
docs/event-forward-api.mdanddocs/event-forward-api_CN.mdto explain how clients can receive eCapture events and runtime logs, including usage of output parameters (--logaddr,--eventaddr,--ecaptureq), protocol details, and demo client references. [1] [2]README.mdandREADME_CN.mdto reference the new event forwarding and remote config update documentation, and clarified compilation instructions. [1] [2] [3]Code Improvements:
Statusenum incli/http/resp.goby adding descriptive comments for each HTTP response status, clarifying their meanings for future development and maintenance.