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:
Diffstat (limited to 'sub/sub.go')
-rw-r--r--sub/sub.go13
1 files changed, 11 insertions, 2 deletions
diff --git a/sub/sub.go b/sub/sub.go
index 1dcd9601..b940cc95 100644
--- a/sub/sub.go
+++ b/sub/sub.go
@@ -91,12 +91,21 @@ func (s *Server) initRouter() (*gin.Engine, error) {
return nil, err
}
- // Determine if JSON subscription endpoint is enabled
+ ClashPath, err := s.settingService.GetSubClashPath()
+ if err != nil {
+ return nil, err
+ }
+
subJsonEnable, err := s.settingService.GetSubJsonEnable()
if err != nil {
return nil, err
}
+ subClashEnable, err := s.settingService.GetSubClashEnable()
+ if err != nil {
+ return nil, err
+ }
+
// Set base_path based on LinksPath for template rendering
// Ensure LinksPath ends with "/" for proper asset URL generation
basePath := LinksPath
@@ -255,7 +264,7 @@ func (s *Server) initRouter() (*gin.Engine, error) {
g := engine.Group("/")
s.sub = NewSUBController(
- g, LinksPath, JsonPath, subJsonEnable, Encrypt, ShowInfo, RemarkModel, SubUpdates,
+ g, LinksPath, JsonPath, ClashPath, subJsonEnable, subClashEnable, Encrypt, ShowInfo, RemarkModel, SubUpdates,
SubJsonFragment, SubJsonNoises, SubJsonMux, SubJsonRules, SubTitle, SubSupportUrl,
SubProfileUrl, SubAnnounce, SubEnableRouting, SubRoutingRules)