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:
authorfgsfds <4870330+fgsfds@users.noreply.github.com>2025-08-04 19:47:48 +0300
committerGitHub <noreply@github.com>2025-08-04 19:47:48 +0300
commit957f3dbb5449475f330d863171134b56e37da4ad (patch)
tree9dce77a898311da6ee98be18e7d7c12d383703c5 /web/controller/server.go
parent05e60af283e4cb0e7c290b1fafd8f3d54028bda8 (diff)
Added xray access log viewer (#3309)
* added xray access log viewer * made modal window width adaptive * hide logs button if xray logs are disabled
Diffstat (limited to 'web/controller/server.go')
-rw-r--r--web/controller/server.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/web/controller/server.go b/web/controller/server.go
index 8a7a2198..dd001f5e 100644
--- a/web/controller/server.go
+++ b/web/controller/server.go
@@ -46,6 +46,7 @@ func (a *ServerController) initRouter(g *gin.RouterGroup) {
g.POST("/installXray/:version", a.installXray)
g.POST("/updateGeofile/:fileName", a.updateGeofile)
g.POST("/logs/:count", a.getLogs)
+ g.POST("/xraylogs/:count", a.getXrayLogs)
g.POST("/getConfigJson", a.getConfigJson)
g.GET("/getDb", a.getDb)
g.POST("/importDB", a.importDB)
@@ -134,6 +135,12 @@ func (a *ServerController) getLogs(c *gin.Context) {
jsonObj(c, logs, nil)
}
+func (a *ServerController) getXrayLogs(c *gin.Context) {
+ count := c.Param("count")
+ logs := a.serverService.GetXrayLogs(count)
+ jsonObj(c, logs, nil)
+}
+
func (a *ServerController) getConfigJson(c *gin.Context) {
configJson, err := a.serverService.GetConfigJson()
if err != nil {