clash - stash subscription #373

This commit is contained in:
Alireza Ahmadi
2025-06-01 23:50:45 +02:00
parent 3f7657c080
commit d186875ab7
7 changed files with 382 additions and 21 deletions
+1
View File
@@ -209,6 +209,7 @@ func trojanOut(out *map[string]interface{}, inbound map[string]interface{}) {
}
func vmessOut(out *map[string]interface{}, inbound map[string]interface{}) {
(*out)["alter_id"] = 0
delete(*out, "transport")
if transport, ok := inbound["transport"]; ok {
(*out)["transport"] = transport
+14
View File
@@ -0,0 +1,14 @@
package util
import (
"fmt"
"s-ui/database/model"
)
func GetHeaders(client *model.Client, updateInterval int) []string {
var headers []string
headers = append(headers, fmt.Sprintf("upload=%d; download=%d; total=%d; expire=%d", client.Up, client.Down, client.Volume, client.Expiry))
headers = append(headers, fmt.Sprintf("%d", updateInterval))
headers = append(headers, client.Name)
return headers
}