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:
authorAlireza Ahmadi <alireza7@gmail.com>2023-12-05 20:13:36 +0300
committerAlireza Ahmadi <alireza7@gmail.com>2023-12-05 20:20:44 +0300
commitc419eadf15630518606ab434387079172070d340 (patch)
tree1933bd5868840cbc85c2b289523f57c22491b7b9 /web/service
parent4d3bea48e11883f0fb99f2e4bb8d943fe162c687 (diff)
xray setting enhancements #1286
Diffstat (limited to 'web/service')
-rw-r--r--web/service/inbound.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/web/service/inbound.go b/web/service/inbound.go
index 4ce93f31..5ff88d38 100644
--- a/web/service/inbound.go
+++ b/web/service/inbound.go
@@ -997,6 +997,16 @@ func (s *InboundService) disableInvalidClients(tx *gorm.DB) (bool, int64, error)
return needRestart, count, err
}
+func (s *InboundService) GetInboundTags() (string, error) {
+ db := database.GetDB()
+ var inboundTags []string
+ err := db.Model(model.Inbound{}).Select("tag").Find(&inboundTags).Error
+ if err != nil && err != gorm.ErrRecordNotFound {
+ return "", err
+ }
+ return "[\"" + strings.Join(inboundTags, "\", \"") + "\"]", nil
+}
+
func (s *InboundService) MigrationRemoveOrphanedTraffics() {
db := database.GetDB()
db.Exec(`