From cc245a908eb997e4c860ff01e940dd7317c57fee Mon Sep 17 00:00:00 2001 From: Sanaei Date: Mon, 24 Aug 2026 00:06:01 +0200 Subject: [PATCH] style: format struct literals and whitespace Clean up trailing braces, commas, and unnecessary blank lines in struct initializations across sub and network packages. --- internal/sub/json_service.go | 5 ++--- internal/web/network/auto_https_conn.go | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/sub/json_service.go b/internal/sub/json_service.go index d34fbd156..043324434 100644 --- a/internal/sub/json_service.go +++ b/internal/sub/json_service.go @@ -690,7 +690,6 @@ func jsonMux(global, override string) string { func (s *SubJsonService) genVnext(inbound *model.Inbound, streamSettings json_util.RawMessage, client model.Client, mux string) json_util.RawMessage { outbound := Outbound{ - Protocol: string(inbound.Protocol), Tag: "proxy"} if mux != "" { @@ -714,7 +713,8 @@ func (s *SubJsonService) genVnext(inbound *model.Inbound, streamSettings json_ut func (s *SubJsonService) genVless(subReq *SubService, inbound *model.Inbound, streamSettings json_util.RawMessage, client model.Client, mux string) json_util.RawMessage { outbound := Outbound{ Protocol: string(inbound.Protocol), - Tag: "proxy"} + Tag: "proxy", + } if mux != "" { outbound.Mux = json_util.RawMessage(mux) } @@ -793,7 +793,6 @@ func (s *SubJsonService) genServer(subReq *SubService, inbound *model.Inbound, s func (s *SubJsonService) genHy(inbound *model.Inbound, newStream map[string]any, client model.Client, mux string) json_util.RawMessage { outbound := Outbound{ - Protocol: string(inbound.Protocol), Tag: "proxy"} diff --git a/internal/web/network/auto_https_conn.go b/internal/web/network/auto_https_conn.go index 8e59d875d..b1497553e 100644 --- a/internal/web/network/auto_https_conn.go +++ b/internal/web/network/auto_https_conn.go @@ -47,7 +47,8 @@ func (c *AutoHttpsConn) readRequest() bool { resp := http.Response{ Header: http.Header{}, - StatusCode: http.StatusTemporaryRedirect} + StatusCode: http.StatusTemporaryRedirect, + } location := fmt.Sprintf("https://%v%v", request.Host, request.RequestURI) resp.Header.Set("Location", location) _ = resp.Write(c.Conn)