mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-07-24 21:46:07 +00:00
feat(sub): add Incy client integration and routing tab
Add an Incy quick-import button (incy://add) to the Android and iOS app menus on the subscription page, and a new Incy settings tab with routing enable + rules. Incy routing is delivered by injecting an incy://routing/onadd line into the raw subscription body, avoiding a collision with Happ's Routing header. Includes backend settings, regenerated OpenAPI/zod schemas, and translations for all locales.
This commit is contained in:
+12
-1
@@ -175,6 +175,16 @@ func (s *Server) initRouter() (*gin.Engine, error) {
|
||||
SubHideSettings = false
|
||||
}
|
||||
|
||||
SubIncyEnableRouting, err := s.settingService.GetSubIncyEnableRouting()
|
||||
if err != nil {
|
||||
SubIncyEnableRouting = false
|
||||
}
|
||||
|
||||
SubIncyRoutingRules, err := s.settingService.GetSubIncyRoutingRules()
|
||||
if err != nil {
|
||||
SubIncyRoutingRules = ""
|
||||
}
|
||||
|
||||
// set per-request localizer from headers/cookies
|
||||
engine.Use(locale.LocalizerMiddleware())
|
||||
|
||||
@@ -232,7 +242,8 @@ func (s *Server) initRouter() (*gin.Engine, error) {
|
||||
s.sub = NewSUBController(
|
||||
g, LinksPath, JsonPath, ClashPath, subJsonEnable, subClashEnable, Encrypt, RemarkTemplate, SubUpdates,
|
||||
SubJsonMux, SubJsonRules, SubJsonFinalMask, SubClashEnableRouting, SubClashRules, SubTitle, SubSupportUrl,
|
||||
SubProfileUrl, SubAnnounce, SubEnableRouting, SubRoutingRules, SubHideSettings)
|
||||
SubProfileUrl, SubAnnounce, SubEnableRouting, SubRoutingRules, SubHideSettings,
|
||||
SubIncyEnableRouting, SubIncyRoutingRules)
|
||||
|
||||
return engine, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user