默认传输通道改为 WSS,http 作为可回退通道

This commit is contained in:
yml2213
2026-10-14 21:33:23 +08:00
parent 8c4b15066f
commit cff831ae47
5 changed files with 22 additions and 19 deletions
+2 -2
View File
@@ -283,7 +283,7 @@ func (a *App) Shutdown(ctx context.Context) {
func (a *App) DefaultConfig() Config {
return Config{
Transport: "http",
Transport: "wss",
WSSHost: "",
SID: 2203,
Loops: 20,
@@ -606,7 +606,7 @@ func (a *App) emit(event string, data any) {
func normalizeConfig(cfg Config) Config {
if strings.TrimSpace(cfg.Transport) == "" {
cfg.Transport = "http"
cfg.Transport = "wss"
}
// WSSHost 留空表示走 launch.queryHttpDns 自动解析,不在这里补默认值。
if cfg.Loops <= 0 {