From c7926d0bc06f2ee712f6850ac58e0e37abc3b898 Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Sat, 24 Feb 2024 03:02:05 +0330 Subject: [PATCH 01/14] [log] fix download format Co-Authored-By: Alireza Ahmadi --- web/html/xui/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/html/xui/index.html b/web/html/xui/index.html index 1c3132d6..90c45b85 100644 --- a/web/html/xui/index.html +++ b/web/html/xui/index.html @@ -325,7 +325,7 @@ + :href="'data:application/text;charset=utf-8,' + encodeURIComponent(logModal.logs.join('\n'))" download="x-ui.log"> @@ -457,7 +457,7 @@ const logModal = { visible: false, - logs: '', + logs: [], rows: 20, level: 'info', syslog: false, From e705ae8e48805ff51593f294c8bed3f491a1cf59 Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Sat, 24 Feb 2024 03:19:28 +0330 Subject: [PATCH 02/14] minor changes --- sub/subJsonService.go | 4 +- web/assets/codemirror/codemirror.js | 2 +- web/html/login.html | 174 ++++++++++++++-------------- web/html/xui/settings.html | 3 +- web/html/xui/xray.html | 4 +- 5 files changed, 95 insertions(+), 92 deletions(-) diff --git a/sub/subJsonService.go b/sub/subJsonService.go index 92519f3e..8bc98dea 100644 --- a/sub/subJsonService.go +++ b/sub/subJsonService.go @@ -189,7 +189,7 @@ func (s *SubJsonService) streamData(stream string) map[string]interface{} { delete(streamSettings, "sockopt") if s.fragmanet != "" { - streamSettings["sockopt"] = json_util.RawMessage(`{"dialerProxy": "fragment", "tcpKeepAliveIdle": 100, "TcpNoDelay": true}`) + streamSettings["sockopt"] = json_util.RawMessage(`{"dialerProxy": "fragment", "tcpKeepAliveIdle": 100, "tcpNoDelay": true}`) } // remove proxy protocol @@ -218,7 +218,7 @@ func (s *SubJsonService) tlsData(tData map[string]interface{}) map[string]interf tlsData["serverName"] = tData["serverName"] tlsData["alpn"] = tData["alpn"] - if allowInsecure, ok := tlsClientSettings["allowInsecure"].(string); ok { + if allowInsecure, ok := tlsClientSettings["allowInsecure"].(bool); ok { tlsData["allowInsecure"] = allowInsecure } if fingerprint, ok := tlsClientSettings["fingerprint"].(string); ok { diff --git a/web/assets/codemirror/codemirror.js b/web/assets/codemirror/codemirror.js index 034ea2f8..a3cd26c1 100644 --- a/web/assets/codemirror/codemirror.js +++ b/web/assets/codemirror/codemirror.js @@ -538,7 +538,7 @@ var on = function(emitter, type, f) { if (emitter.addEventListener) { - emitter.addEventListener(type, f, { passive: true }); + emitter.addEventListener(type, f, { passive: false }); } else if (emitter.attachEvent) { emitter.attachEvent("on" + type, f); } else { diff --git a/web/html/login.html b/web/html/login.html index 4605a4fd..e9e4e219 100644 --- a/web/html/login.html +++ b/web/html/login.html @@ -374,92 +374,96 @@ - - -
-
- - - - - - - - - - - -
- - - - -

- - {{ i18n "pages.login.title" }} - 3X-UI - -

-
-
- - - - - - - - - - - - - - - - - - - -
- -
-
-
- - - - - - -    - - - - - - - - -   - - - - - - -
-
-
+ + +
+
+ + + + + + + + + + + +
+ + + + +

+ + {{ i18n "pages.login.title" }} + 3X-UI + +

-
-
-
+
+ + + + + + + + + + + + + + + + + + + +
+ +
+
+
+ + + + + + +    + + + + + + + + +   + + + + + + +
+
+
+ + +
+
{{template "js" .}} {{template "component/themeSwitcher" .}} diff --git a/web/html/xui/settings.html b/web/html/xui/settings.html index adc199a9..fdb523c3 100644 --- a/web/html/xui/settings.html +++ b/web/html/xui/settings.html @@ -263,7 +263,6 @@ - - + [[ method_name ]] diff --git a/web/html/xui/form/protocol/socks.html b/web/html/xui/form/protocol/socks.html index e9a937e2..ccaec0d7 100644 --- a/web/html/xui/form/protocol/socks.html +++ b/web/html/xui/form/protocol/socks.html @@ -1,5 +1,5 @@ {{define "form/socks"}} - + diff --git a/web/html/xui/form/protocol/trojan.html b/web/html/xui/form/protocol/trojan.html index 3f1d830b..fe1db139 100644 --- a/web/html/xui/form/protocol/trojan.html +++ b/web/html/xui/form/protocol/trojan.html @@ -19,27 +19,23 @@ {{end}} diff --git a/web/html/xui/form/protocol/vless.html b/web/html/xui/form/protocol/vless.html index 73859ad5..5ccec3fe 100644 --- a/web/html/xui/form/protocol/vless.html +++ b/web/html/xui/form/protocol/vless.html @@ -21,27 +21,23 @@