[xray] show xray errors #1300

This commit is contained in:
Alireza Ahmadi
2023-12-10 12:57:39 +01:00
parent 655e17e162
commit 4cb67fd1c3
3 changed files with 26 additions and 1 deletions

View File

@@ -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)
}