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:
authorDanil S. <135337715+sh1shd@users.noreply.github.com>2026-01-27 01:06:01 +0300
committerGitHub <noreply@github.com>2026-01-27 01:06:01 +0300
commitfd5f5917378129d7a555a246d42a2a572476b948 (patch)
treef155bce5721c3d52840548192e3c683bbd193451 /sub/sub.go
parent8a4c9a98cbf8efce7c2efd1e3daa4c996830b30c (diff)
feat: more subscription information fields (#3701)
* feat: more subscription information fields * fix: incorrect translation * feat: implement field for Happ custom routing rules
Diffstat (limited to 'sub/sub.go')
-rw-r--r--sub/sub.go28
1 files changed, 27 insertions, 1 deletions
diff --git a/sub/sub.go b/sub/sub.go
index 0605c8b9..1dcd9601 100644
--- a/sub/sub.go
+++ b/sub/sub.go
@@ -153,6 +153,31 @@ func (s *Server) initRouter() (*gin.Engine, error) {
SubTitle = ""
}
+ SubSupportUrl, err := s.settingService.GetSubSupportUrl()
+ if err != nil {
+ SubSupportUrl = ""
+ }
+
+ SubProfileUrl, err := s.settingService.GetSubProfileUrl()
+ if err != nil {
+ SubProfileUrl = ""
+ }
+
+ SubAnnounce, err := s.settingService.GetSubAnnounce()
+ if err != nil {
+ SubAnnounce = ""
+ }
+
+ SubEnableRouting, err := s.settingService.GetSubEnableRouting()
+ if err != nil {
+ return nil, err
+ }
+
+ SubRoutingRules, err := s.settingService.GetSubRoutingRules()
+ if err != nil {
+ SubRoutingRules = ""
+ }
+
// set per-request localizer from headers/cookies
engine.Use(locale.LocalizerMiddleware())
@@ -231,7 +256,8 @@ func (s *Server) initRouter() (*gin.Engine, error) {
s.sub = NewSUBController(
g, LinksPath, JsonPath, subJsonEnable, Encrypt, ShowInfo, RemarkModel, SubUpdates,
- SubJsonFragment, SubJsonNoises, SubJsonMux, SubJsonRules, SubTitle)
+ SubJsonFragment, SubJsonNoises, SubJsonMux, SubJsonRules, SubTitle, SubSupportUrl,
+ SubProfileUrl, SubAnnounce, SubEnableRouting, SubRoutingRules)
return engine, nil
}