Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSanaei <ho3ein.sanaei@gmail.com>2025-09-07 23:35:38 +0300
committerGitHub <noreply@github.com>2025-09-07 23:35:38 +0300
commitb008ff4ad236f20f0937dd02e747ca6581e776f3 (patch)
treeefcb43872da9f46f3e6a307424fb5e309e0e7737 /sub/subJsonService.go
parentda6b89fdcd2270aa116297d9ff620b6331f39df9 (diff)
Vlessenc (#3426)
* mlkem768 * VlessEnc
Diffstat (limited to 'sub/subJsonService.go')
-rw-r--r--sub/subJsonService.go14
1 files changed, 10 insertions, 4 deletions
diff --git a/sub/subJsonService.go b/sub/subJsonService.go
index 680a01c0..def8b855 100644
--- a/sub/subJsonService.go
+++ b/sub/subJsonService.go
@@ -184,8 +184,14 @@ func (s *SubJsonService) getConfig(inbound *model.Inbound, client model.Client,
var newOutbounds []json_util.RawMessage
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 vlessSettings model.VLESSSettings
+ _ = json.Unmarshal([]byte(inbound.Settings), &vlessSettings)
+
+ newOutbounds = append(newOutbounds,
+ s.genVnext(inbound, streamSettings, client, vlessSettings.Encryption))
case "trojan", "shadowsocks":
newOutbounds = append(newOutbounds, s.genServer(inbound, streamSettings, client))
}
@@ -284,7 +290,7 @@ func (s *SubJsonService) realityData(rData map[string]any) map[string]any {
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{}
usersData := make([]UserVnext, 1)
@@ -295,7 +301,7 @@ func (s *SubJsonService) genVnext(inbound *model.Inbound, streamSettings json_ut
}
if inbound.Protocol == model.VLESS {
usersData[0].Flow = client.Flow
- usersData[0].Encryption = "none"
+ usersData[0].Encryption = encryption
}
vnextData := make([]VnextSetting, 1)