Enhance Mihomo WebSocket functionality and testing
Publish telemt-api gateway Docker image / test (push) Successful in 24s
Publish telemt-api gateway Docker image / build-and-push (push) Successful in 1m59s

- Added support for the Gorilla WebSocket library to improve WebSocket handling in Mihomo.
- Refactored the WebSocket upgrade detection logic to utilize `websocket.IsWebSocketUpgrade`, enhancing reliability.
- Updated the `NewMihomoForward` function to streamline request handling and improve path normalization.
- Introduced new test cases for WebSocket tunnel scenarios, ensuring comprehensive coverage for traffic and memory endpoints.
- Improved error handling and connection management for WebSocket upgrades, ensuring robust communication.
This commit is contained in:
Denozordec
2026-03-31 11:41:56 +07:00
parent 7e88cfcb3e
commit 49f36d2b8b
3 changed files with 142 additions and 185 deletions
+1
View File
@@ -3,6 +3,7 @@ module github.com/telemt/telemt-api
go 1.22
require (
github.com/gorilla/websocket v1.5.3
github.com/oschwald/geoip2-golang v1.11.0
github.com/prometheus/client_golang v1.20.5
gopkg.in/yaml.v3 v3.0.1