diff --git a/config/version b/config/version
index f83e2d4..30d3ee9 100644
--- a/config/version
+++ b/config/version
@@ -1 +1 @@
-v0.3.3.7
\ No newline at end of file
+v0.3.3.8
\ No newline at end of file
diff --git a/go.mod b/go.mod
index 89f8ebb..1bcaf90 100644
--- a/go.mod
+++ b/go.mod
@@ -17,7 +17,7 @@ require (
golang.org/x/text v0.9.0
google.golang.org/grpc v1.55.0
gorm.io/driver/sqlite v1.5.0
- gorm.io/gorm v1.25.0
+ gorm.io/gorm v1.25.1
)
require (
diff --git a/go.sum b/go.sum
index 7b8f533..6f8fc67 100644
--- a/go.sum
+++ b/go.sum
@@ -250,8 +250,8 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gorm.io/driver/sqlite v1.5.0 h1:zKYbzRCpBrT1bNijRnxLDJWPjVfImGEn0lSnUY5gZ+c=
gorm.io/driver/sqlite v1.5.0/go.mod h1:kDMDfntV9u/vuMmz8APHtHF0b4nyBB7sfCieC6G8k8I=
gorm.io/gorm v1.24.7-0.20230306060331-85eaf9eeda11/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k=
-gorm.io/gorm v1.25.0 h1:+KtYtb2roDz14EQe4bla8CbQlmb9dN3VejSai3lprfU=
-gorm.io/gorm v1.25.0/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k=
+gorm.io/gorm v1.25.1 h1:nsSALe5Pr+cM3V1qwwQ7rOkw+6UeLrX5O4v3llhHa64=
+gorm.io/gorm v1.25.1/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k=
gvisor.dev/gvisor v0.0.0-20220901235040-6ca97ef2ce1c h1:m5lcgWnL3OElQNVyp3qcncItJ2c0sQlSGjYK2+nJTA4=
lukechampine.com/blake3 v1.1.7 h1:GgRMhmdsuK8+ii6UZFDL8Nb+VyMwadAgcJyfYHxG6n0=
-rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
\ No newline at end of file
+rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
diff --git a/web/assets/js/model/xray.js b/web/assets/js/model/xray.js
index 1536681..c21aa56 100644
--- a/web/assets/js/model/xray.js
+++ b/web/assets/js/model/xray.js
@@ -496,7 +496,7 @@ class TlsStreamSettings extends XrayCommonClass {
maxVersion = TLS_VERSION_OPTION.TLS13,
cipherSuites = '',
allowInsecure = false,
- fingerprint = UTLS_FINGERPRINT.UTLS_CHROME,
+ fingerprint = UTLS_FINGERPRINT.UTLS_RANDOM,
certificates = [new TlsStreamSettings.Cert()], alpn = ['']) {
super();
this.server = serverName;
diff --git a/web/controller/server.go b/web/controller/server.go
index febe16c..3cfccdf 100644
--- a/web/controller/server.go
+++ b/web/controller/server.go
@@ -50,6 +50,7 @@ func (a *ServerController) initRouter(g *gin.RouterGroup) {
g.POST("/stopXrayService", a.stopXrayService)
g.POST("/restartXrayService", a.restartXrayService)
g.POST("/installXray/:version", a.installXray)
+ g.POST("/logs/:count", a.getLogs)
g.POST("/getGeoipVersion", a.getGeoipVersion)
g.POST("/installGeoip/:version", a.installGeoip)
g.POST("/getGeositeVersion", a.getGeositeVersion)
@@ -124,6 +125,16 @@ func (a *ServerController) installXray(c *gin.Context) {
jsonMsg(c, "安装 xray", err)
}
+func (a *ServerController) getLogs(c *gin.Context) {
+ count := c.Param("count")
+ logs, err := a.serverService.GetLogs(count)
+ if err != nil {
+ jsonMsg(c, "getLogs", err)
+ return
+ }
+ jsonObj(c, logs, nil)
+}
+
func (a *ServerController) getGeoipVersion(c *gin.Context) {
now := time.Now()
if now.Sub(a.lastGeoipGetVersionsTime) <= time.Minute {
diff --git a/web/html/xui/form/protocol/vless.html b/web/html/xui/form/protocol/vless.html
index 8eab2ce..17122cb 100644
--- a/web/html/xui/form/protocol/vless.html
+++ b/web/html/xui/form/protocol/vless.html
@@ -20,8 +20,8 @@
-
-
+
+
无
[[ key ]]
diff --git a/web/html/xui/index.html b/web/html/xui/index.html
index ccb55ca..f377ee6 100644
--- a/web/html/xui/index.html
+++ b/web/html/xui/index.html
@@ -84,6 +84,7 @@
停止
重启
版本切换
+ 查看日志
@@ -169,6 +170,25 @@
+
+
+ x-ui 版本:
+ {{ .cur_ver }}
+ GitHub 项目:
+ sing-web/x-ui
+
+
+
+
+ Telegram 频道:
+ @sing_web
+ Telegram 群组:
+ @sing_web_group
+
+
@@ -183,6 +203,7 @@ 点击你想切换的版本
+
versionModal.geoip = false" ok-text="确定" cancel-text="取消">
点击你想更新的版本
@@ -194,6 +215,7 @@ 点击你想更新的版本
+
versionModal.geosite = false" ok-text="确定" cancel-text="取消">
点击你想更新的版本
@@ -205,6 +227,33 @@ 点击你想更新的版本
+
+ logModal.visible = false" @cancel="() => logModal.visible = false" width="800px" footer="">
+
+
+
+ 10
+ 20
+ 50
+ 100
+
+
+
+
+
+
+
+ 下载 x-ui.log
+
+
+
+
+
{{template "js" .}}