Sing-Box v1.13.0
This commit is contained in:
+17
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user