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:
authorMHSanaei <ho3ein.sanaei@gmail.com>2024-02-19 20:35:24 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2024-02-19 20:35:24 +0300
commit70b3db074aa6c82182219aa13f048d41632d8ed0 (patch)
tree90a92fd039a4e52c98ebfa8d7e7a06968202281a
parentd560cd9cc81bc2fdb006c8836f9f4901265434a4 (diff)
open sniffing for all protocols
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
-rw-r--r--web/assets/js/model/xray.js4
-rw-r--r--web/html/xui/form/inbound.html2
-rw-r--r--web/html/xui/form/sniffing.html2
-rw-r--r--web/html/xui/inbounds.html6
4 files changed, 5 insertions, 9 deletions
diff --git a/web/assets/js/model/xray.js b/web/assets/js/model/xray.js
index d7d1fa0d..80c81da2 100644
--- a/web/assets/js/model/xray.js
+++ b/web/assets/js/model/xray.js
@@ -1146,10 +1146,6 @@ class Inbound extends XrayCommonClass {
return [Protocols.VMESS, Protocols.VLESS, Protocols.TROJAN, Protocols.SHADOWSOCKS].includes(this.protocol);
}
- canSniffing() {
- return [Protocols.VMESS, Protocols.VLESS, Protocols.TROJAN, Protocols.SHADOWSOCKS].includes(this.protocol);
- }
-
reset() {
this.port = RandomUtil.randomIntRange(10000, 60000);
this.listen = '';
diff --git a/web/html/xui/form/inbound.html b/web/html/xui/form/inbound.html
index 6f3705ff..9453f0d7 100644
--- a/web/html/xui/form/inbound.html
+++ b/web/html/xui/form/inbound.html
@@ -114,7 +114,7 @@
</template>
<!-- sniffing -->
-<template v-if="inbound.canSniffing()">
+<template>
{{template "form/sniffing"}}
</template>
{{end}}
diff --git a/web/html/xui/form/sniffing.html b/web/html/xui/form/sniffing.html
index a088dee7..d4f55394 100644
--- a/web/html/xui/form/sniffing.html
+++ b/web/html/xui/form/sniffing.html
@@ -1,6 +1,6 @@
{{define "form/sniffing"}}
<a-divider style="margin:5px 0 0;"></a-divider>
-<a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
+<a-form :colon="false" :label-col="{ md: {span:6} }" :wrapper-col="{ md: {span:14} }">
<a-form-item>
<span slot="label">
Sniffing
diff --git a/web/html/xui/inbounds.html b/web/html/xui/inbounds.html
index 95c05998..b0426e4f 100644
--- a/web/html/xui/inbounds.html
+++ b/web/html/xui/inbounds.html
@@ -831,7 +831,7 @@
protocol: baseInbound.protocol,
settings: Inbound.Settings.getSettings(baseInbound.protocol).toString(),
streamSettings: baseInbound.stream.toString(),
- sniffing: baseInbound.canSniffing() ? baseInbound.sniffing.toString() : '{}',
+ sniffing: baseInbound.sniffing.toString(),
};
await this.submit('/panel/inbound/add', data, inModal);
},
@@ -880,7 +880,7 @@
settings: inbound.settings.toString(),
};
if (inbound.canEnableStream()) data.streamSettings = inbound.stream.toString();
- if (inbound.canSniffing()) data.sniffing = inbound.sniffing.toString();
+ data.sniffing = inbound.sniffing.toString();
await this.submit('/panel/inbound/add', data, inModal);
},
@@ -899,7 +899,7 @@
settings: inbound.settings.toString(),
};
if (inbound.canEnableStream()) data.streamSettings = inbound.stream.toString();
- if (inbound.canSniffing()) data.sniffing = inbound.sniffing.toString();
+ data.sniffing = inbound.sniffing.toString();
await this.submit(`/panel/inbound/update/${dbInbound.id}`, data, inModal);
},