Alireza Ahmadi 1 year ago
parent
commit
e5fc20b8ae

+ 3 - 3
web/assets/js/model/xray.js

@@ -1080,9 +1080,9 @@ class Inbound extends XrayCommonClass {
     }
 
     get serverName() {
-        if (this.stream.isTls || this.stream.isXtls || this.stream.isReality) {
-            return this.stream.tls.server;
-        }
+        if (this.stream.isTls) return this.stream.tls.server;
+        if (this.stream.isXtls) return this.stream.xtls.server;
+        if (this.stream.isReality) return this.stream.reality.serverNames;
         return "";
     }
 

+ 8 - 12
web/html/xui/inbound_info_modal.html

@@ -51,19 +51,15 @@
                 </table>
             </td></tr>
         <tr colspan="2" v-if="dbInbound.hasLink()">
-            <td v-if="inbound.tls">
-                tls: <a-tag color="green">{{ i18n "enabled" }}</a-tag><br />
-                tls {{ i18n "domainName" }}: <a-tag :color="inbound.serverName ? 'green' : 'orange'">[[ inbound.serverName ? inbound.serverName : '' ]]</a-tag>
-            </td>
-            <td v-else-if="inbound.xtls">
-                xtls: <a-tag color="green">{{ i18n "enabled" }}</a-tag><br />
-                xtls {{ i18n "domainName" }}: <a-tag :color="inbound.serverName ? 'green' : 'orange'">[[ inbound.serverName ? inbound.serverName : '' ]]</a-tag>
-            </td>
-            <td v-else-if="inbound.reality">
-                reality: <a-tag color="green">{{ i18n "enabled" }}</a-tag><br />
-                reality Destination: <a-tag :color="inbound.stream.reality.dest ? 'green' : 'orange'">[[ inbound.stream.reality.dest ]]</a-tag>
+            <td>
+                {{ i18n "security" }}
+                <a-tag :color="inbound.stream.security == 'none' ? 'red' : 'green'">[[ inbound.stream.security ]]</a-tag>
+                <br />
+                <template v-if="inbound.stream.security != 'none'">
+                {{ i18n "domainName" }}
+                <a-tag :color="inbound.serverName ? 'green' : 'orange'">[[ inbound.serverName ? inbound.serverName : '' ]]</a-tag>
+                </template>
             </td>
-            <td v-else>tls: <a-tag color="red">{{ i18n "disabled" }}</a-tag></td>
         </tr>
     </table>
     <table v-if="dbInbound.isSS" style="margin-bottom: 10px; width: 100%;">

+ 2 - 1
web/service/inbound.go

@@ -1004,7 +1004,8 @@ func (s *InboundService) GetInboundTags() (string, error) {
 	if err != nil && err != gorm.ErrRecordNotFound {
 		return "", err
 	}
-	return "[\"" + strings.Join(inboundTags, "\", \"") + "\"]", nil
+	tags, _ := json.Marshal(inboundTags)
+	return string(tags), nil
 }
 
 func (s *InboundService) MigrationRemoveOrphanedTraffics() {

+ 3 - 3
web/translation/translate.en_US.toml

@@ -287,14 +287,14 @@
 "subEncrypt" = "Encrypt configs"
 "subEncryptDesc" = "Encrypt the returned configs in subscription"
 "subShowInfo" = "Show usage info"
-"subShowInfoDesc" = "Show remianed traffic and date after config name"
+"subShowInfoDesc" = "Show remained traffic and date after config name"
 "subURI" = "Reverse Proxy URI"
 "subURIDesc" = "Change base URI of subscription URL for using on behind of proxies"
 
 [pages.xray]
 "title" = "Xray Settings"
 "save" = "Save Settings"
-"restart" = "Reastart Xray"
+"restart" = "Restart Xray"
 "basicTemplate" = "Basic Template"
 "advancedTemplate" = "Advanced Template"
 "generalConfigs" = "General Configs"
@@ -446,7 +446,7 @@
 "usage" = "❗ Please provide a text to search!"
 "getID" = "🆔 Your ID: <code>{{ .ID }}</code>"
 "helpAdminCommands" = "Search for a client email:\r\n<code>/usage [Email]</code>\r\n \r\nSearch for inbounds (with client stats):\r\n<code>/inbound [Remark]</code>"
-"helpClientCommands" = "To search for statistics, just use folowing command:\r\n \r\n<code>/usage [UUID|Password]</code>\r\n \r\nUse UUID for vmess/vless and Password for Trojan."
+"helpClientCommands" = "To search for statistics, just use the following command:\r\n \r\n<code>/usage [UUID|Password]</code>\r\n \r\nUse UUID for vmess/vless and Password for Trojan."
 
 [tgbot.messages]
 "cpuThreshold" = "🔴 The CPU usage {{ .Percent }}% is more than threshold {{ .Threshold }}%"