Sing-Box v1.13.0

This commit is contained in:
Alireza Ahmadi
2026-02-28 22:46:51 +01:00
parent 86379818a2
commit c70f0f97b3
15 changed files with 612 additions and 349 deletions
+17 -1
View File
@@ -42,6 +42,8 @@ func FillOutJson(i *model.Inbound, hostname string) error {
switch i.Type {
case "http", "socks", "mixed", "anytls":
case "naive":
naiveOut(&outJson, *inbound)
case "shadowsocks":
shadowsocksOut(&outJson, *inbound)
case "shadowtls":
@@ -124,7 +126,21 @@ func addTls(out *map[string]interface{}, tls *model.Tls) {
(*out)["tls"] = tlsConfig
}
// Protocol-specific functions
func naiveOut(out *map[string]interface{}, inbound map[string]interface{}) {
if quic_congestion_control, ok := inbound["quic_congestion_control"].(string); ok {
(*out)["quic"] = true
switch quic_congestion_control {
case "bbr_standard":
(*out)["quic_congestion_control"] = "bbr"
case "bbr2_variant":
(*out)["quic_congestion_control"] = "bbr2"
default:
(*out)["quic_congestion_control"] = quic_congestion_control
}
}
}
func shadowsocksOut(out *map[string]interface{}, inbound map[string]interface{}) {
if method, ok := inbound["method"].(string); ok {
(*out)["method"] = method