style: format struct literals and whitespace

Clean up trailing braces, commas, and unnecessary blank lines in struct initializations across sub and network packages.
This commit is contained in:
Sanaei
2026-08-24 00:06:01 +02:00
parent c26ff59b47
commit cc245a908e
2 changed files with 4 additions and 4 deletions
+2 -3
View File
@@ -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"}
+2 -1
View File
@@ -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)