|
@@ -184,8 +184,16 @@ func (s *SubJsonService) getConfig(inbound *model.Inbound, client model.Client,
|
|
var newOutbounds []json_util.RawMessage
|
|
var newOutbounds []json_util.RawMessage
|
|
|
|
|
|
switch inbound.Protocol {
|
|
switch inbound.Protocol {
|
|
- case "vmess", "vless":
|
|
|
|
- newOutbounds = append(newOutbounds, s.genVnext(inbound, streamSettings, client))
|
|
|
|
|
|
+ case "vmess":
|
|
|
|
+ newOutbounds = append(newOutbounds, s.genVnext(inbound, streamSettings, client, ""))
|
|
|
|
+ case "vless":
|
|
|
|
+ var inboundSettings struct {
|
|
|
|
+ Encryption string `json:"encryption,omitempty"`
|
|
|
|
+ }
|
|
|
|
+ _ = json.Unmarshal([]byte(inbound.Settings), &inboundSettings)
|
|
|
|
+
|
|
|
|
+ newOutbounds = append(newOutbounds,
|
|
|
|
+ s.genVnext(inbound, streamSettings, client, inboundSettings.Encryption))
|
|
case "trojan", "shadowsocks":
|
|
case "trojan", "shadowsocks":
|
|
newOutbounds = append(newOutbounds, s.genServer(inbound, streamSettings, client))
|
|
newOutbounds = append(newOutbounds, s.genServer(inbound, streamSettings, client))
|
|
}
|
|
}
|
|
@@ -284,7 +292,7 @@ func (s *SubJsonService) realityData(rData map[string]any) map[string]any {
|
|
return rltyData
|
|
return rltyData
|
|
}
|
|
}
|
|
|
|
|
|
-func (s *SubJsonService) genVnext(inbound *model.Inbound, streamSettings json_util.RawMessage, client model.Client) json_util.RawMessage {
|
|
|
|
|
|
+func (s *SubJsonService) genVnext(inbound *model.Inbound, streamSettings json_util.RawMessage, client model.Client, encryption string) json_util.RawMessage {
|
|
outbound := Outbound{}
|
|
outbound := Outbound{}
|
|
usersData := make([]UserVnext, 1)
|
|
usersData := make([]UserVnext, 1)
|
|
|
|
|
|
@@ -295,7 +303,7 @@ func (s *SubJsonService) genVnext(inbound *model.Inbound, streamSettings json_ut
|
|
}
|
|
}
|
|
if inbound.Protocol == model.VLESS {
|
|
if inbound.Protocol == model.VLESS {
|
|
usersData[0].Flow = client.Flow
|
|
usersData[0].Flow = client.Flow
|
|
- usersData[0].Encryption = "none"
|
|
|
|
|
|
+ usersData[0].Encryption = encryption
|
|
}
|
|
}
|
|
|
|
|
|
vnextData := make([]VnextSetting, 1)
|
|
vnextData := make([]VnextSetting, 1)
|