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:
authormhsanaei <ho3ein.sanaei@gmail.com>2024-08-29 12:27:43 +0300
committermhsanaei <ho3ein.sanaei@gmail.com>2024-08-29 12:27:43 +0300
commitfa43248e3043932a31bc93ff86a2d4a3f1314491 (patch)
treeed9e83e4f352de96e50ebb1f98ec4b525d787307 /sub/subJsonService.go
parentcb3da25bc82b818018476d53fe534aba3a55e1aa (diff)
New - Noise
freedom
Diffstat (limited to 'sub/subJsonService.go')
-rw-r--r--sub/subJsonService.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/sub/subJsonService.go b/sub/subJsonService.go
index 8d90876f..cbda594a 100644
--- a/sub/subJsonService.go
+++ b/sub/subJsonService.go
@@ -21,13 +21,14 @@ type SubJsonService struct {
configJson map[string]interface{}
defaultOutbounds []json_util.RawMessage
fragment string
+ noise string
mux string
inboundService service.InboundService
SubService *SubService
}
-func NewSubJsonService(fragment string, mux string, rules string, subService *SubService) *SubJsonService {
+func NewSubJsonService(fragment string, noise string, mux string, rules string, subService *SubService) *SubJsonService {
var configJson map[string]interface{}
var defaultOutbounds []json_util.RawMessage
json.Unmarshal([]byte(defaultJson), &configJson)
@@ -52,10 +53,15 @@ func NewSubJsonService(fragment string, mux string, rules string, subService *Su
defaultOutbounds = append(defaultOutbounds, json_util.RawMessage(fragment))
}
+ if noise != "" {
+ defaultOutbounds = append(defaultOutbounds, json_util.RawMessage(noise))
+ }
+
return &SubJsonService{
configJson: configJson,
defaultOutbounds: defaultOutbounds,
fragment: fragment,
+ noise: noise,
mux: mux,
SubService: subService,
}