Browse Source

update sub remark for shadowsocks

Hamidreza Ghavami 1 year ago
parent
commit
ac9408c37f
1 changed files with 2 additions and 1 deletions
  1. 2 1
      web/service/sub.go

+ 2 - 1
web/service/sub.go

@@ -603,7 +603,8 @@ func (s *SubService) genShadowsocksLink(inbound *model.Inbound, email string) st
 		}
 	}
 	encPart := fmt.Sprintf("%s:%s:%s", method, inboundPassword, clients[clientIndex].Password)
-	return fmt.Sprintf("ss://%s@%s:%d#%s", base64.StdEncoding.EncodeToString([]byte(encPart)), address, inbound.Port, clients[clientIndex].Email)
+	remark := fmt.Sprintf("%s-%s", inbound.Remark, clients[clientIndex].Email)
+	return fmt.Sprintf("ss://%s@%s:%d#%s", base64.StdEncoding.EncodeToString([]byte(encPart)), address, inbound.Port, remark)
 }
 
 func searchKey(data interface{}, key string) (interface{}, bool) {