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
path: root/sub
diff options
context:
space:
mode:
authormhsanaei <ho3ein.sanaei@gmail.com>2024-09-17 10:33:44 +0300
committermhsanaei <ho3ein.sanaei@gmail.com>2024-09-17 10:51:57 +0300
commit6b0c9a5fad333a491ddac65126783481c638672f (patch)
tree0b1ca5f4c0114d88da0b28070f7ef28372cc222e /sub
parent77edea5419aabd319c712b78c33f613869e8bcc8 (diff)
update noise to noises
+ type
Diffstat (limited to 'sub')
-rw-r--r--sub/sub.go6
-rw-r--r--sub/subJsonService.go10
2 files changed, 8 insertions, 8 deletions
diff --git a/sub/sub.go b/sub/sub.go
index a8a20868..db582e8d 100644
--- a/sub/sub.go
+++ b/sub/sub.go
@@ -92,9 +92,9 @@ func (s *Server) initRouter() (*gin.Engine, error) {
SubJsonFragment = ""
}
- SubJsonNoise, err := s.settingService.GetSubJsonNoise()
+ SubJsonNoises, err := s.settingService.GetSubJsonNoises()
if err != nil {
- SubJsonNoise = ""
+ SubJsonNoises = ""
}
SubJsonMux, err := s.settingService.GetSubJsonMux()
@@ -111,7 +111,7 @@ func (s *Server) initRouter() (*gin.Engine, error) {
s.sub = NewSUBController(
g, LinksPath, JsonPath, Encrypt, ShowInfo, RemarkModel, SubUpdates,
- SubJsonFragment, SubJsonNoise, SubJsonMux, SubJsonRules)
+ SubJsonFragment, SubJsonNoises, SubJsonMux, SubJsonRules)
return engine, nil
}
diff --git a/sub/subJsonService.go b/sub/subJsonService.go
index cbda594a..680a078d 100644
--- a/sub/subJsonService.go
+++ b/sub/subJsonService.go
@@ -21,14 +21,14 @@ type SubJsonService struct {
configJson map[string]interface{}
defaultOutbounds []json_util.RawMessage
fragment string
- noise string
+ noises string
mux string
inboundService service.InboundService
SubService *SubService
}
-func NewSubJsonService(fragment string, noise string, mux string, rules string, subService *SubService) *SubJsonService {
+func NewSubJsonService(fragment string, noises string, mux string, rules string, subService *SubService) *SubJsonService {
var configJson map[string]interface{}
var defaultOutbounds []json_util.RawMessage
json.Unmarshal([]byte(defaultJson), &configJson)
@@ -53,15 +53,15 @@ func NewSubJsonService(fragment string, noise string, mux string, rules string,
defaultOutbounds = append(defaultOutbounds, json_util.RawMessage(fragment))
}
- if noise != "" {
- defaultOutbounds = append(defaultOutbounds, json_util.RawMessage(noise))
+ if noises != "" {
+ defaultOutbounds = append(defaultOutbounds, json_util.RawMessage(noises))
}
return &SubJsonService{
configJson: configJson,
defaultOutbounds: defaultOutbounds,
fragment: fragment,
- noise: noise,
+ noises: noises,
mux: mux,
SubService: subService,
}