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

View File

@@ -9,6 +9,7 @@ import (
type XraySettingController struct {
XraySettingService service.XraySettingService
SettingService service.SettingService
InboundService service.InboundService
}
func NewXraySettingController(g *gin.RouterGroup) *XraySettingController {
@@ -31,7 +32,13 @@ func (a *XraySettingController) getXraySetting(c *gin.Context) {
jsonMsg(c, I18nWeb(c, "pages.settings.toasts.getSettings"), err)
return
}
jsonObj(c, xraySetting, nil)
inboundTags, err := a.InboundService.GetInboundTags()
if err != nil {
jsonMsg(c, I18nWeb(c, "pages.settings.toasts.getSettings"), err)
return
}
xrayResponse := "{ \"xraySetting\": " + xraySetting + ", \"inboundTags\": " + inboundTags + " }"
jsonObj(c, xrayResponse, nil)
}
func (a *XraySettingController) updateSetting(c *gin.Context) {