diff options
| author | Alireza Ahmadi <alireza7@gmail.com> | 2023-12-10 14:57:39 +0300 |
|---|---|---|
| committer | Alireza Ahmadi <alireza7@gmail.com> | 2023-12-10 14:57:39 +0300 |
| commit | 4cb67fd1c3129b83f3750f863caba081453f42b1 (patch) | |
| tree | 85c7e5c47f4415f775729aff26b60796590ef34a /web/controller | |
| parent | 655e17e162129087263e85dfe9d5ba49c0a7044f (diff) | |
[xray] show xray errors #1300
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) +} |
