xray setting enhancements #1286

This commit is contained in:
Alireza Ahmadi
2023-12-05 18:13:36 +01:00
parent 4d3bea48e1
commit c419eadf15
36 changed files with 46901 additions and 189 deletions
+10
View File
@@ -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(`