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:
Diffstat (limited to 'web/controller')
-rw-r--r--web/controller/xray_setting.go (renamed from web/controller/xraySetting.go)6
1 files changed, 6 insertions, 0 deletions
diff --git a/web/controller/xraySetting.go b/web/controller/xray_setting.go
index a4c8b600..d4deacd9 100644
--- a/web/controller/xraySetting.go
+++ b/web/controller/xray_setting.go
@@ -10,6 +10,7 @@ type XraySettingController struct {
XraySettingService service.XraySettingService
SettingService service.SettingService
InboundService service.InboundService
+ XrayService service.XrayService
}
func NewXraySettingController(g *gin.RouterGroup) *XraySettingController {
@@ -23,6 +24,7 @@ func (a *XraySettingController) initRouter(g *gin.RouterGroup) {
g.POST("/", a.getXraySetting)
g.POST("/update", a.updateSetting)
+ g.GET("/getXrayResult", a.getXrayResult)
g.GET("/getDefaultJsonConfig", a.getDefaultXrayConfig)
}
@@ -55,3 +57,7 @@ func (a *XraySettingController) getDefaultXrayConfig(c *gin.Context) {
}
jsonObj(c, defaultJsonConfig, nil)
}
+
+func (a *XraySettingController) getXrayResult(c *gin.Context) {
+ jsonObj(c, a.XrayService.GetXrayResult(), nil)
+}