Просмотр исходного кода

add dokodemo timeout

Co-Authored-By: Alireza Ahmadi <[email protected]>
mhsanaei 10 месяцев назад
Родитель
Сommit
94eb27d2c4

+ 4 - 1
web/assets/js/model/xray.js

@@ -2281,12 +2281,13 @@ Inbound.ShadowsocksSettings.Shadowsocks = class extends XrayCommonClass {
 };
 
 Inbound.DokodemoSettings = class extends Inbound.Settings {
-    constructor(protocol, address, port, network='tcp,udp', followRedirect=false) {
+    constructor(protocol, address, port, network='tcp,udp', followRedirect=false, timeout=0) {
         super(protocol);
         this.address = address;
         this.port = port;
         this.network = network;
         this.followRedirect = followRedirect;
+        this.timeout = timeout;
     }
 
     static fromJson(json={}) {
@@ -2296,6 +2297,7 @@ Inbound.DokodemoSettings = class extends Inbound.Settings {
             json.port,
             json.network,
             json.followRedirect,
+            json.timeout,
         );
     }
 
@@ -2305,6 +2307,7 @@ Inbound.DokodemoSettings = class extends Inbound.Settings {
             port: this.port,
             network: this.network,
             followRedirect: this.followRedirect,
+            timeout: this.timeout,
         };
     }
 };

+ 3 - 0
web/html/xui/form/protocol/dokodemo.html

@@ -16,5 +16,8 @@
     <a-form-item label='Follow Redirect'>
         <a-switch v-model="inbound.settings.followRedirect"></a-switch>
     </a-form-item>
+    <a-form-item label='Timeout'>
+        <a-input-number v-model.number="inbound.settings.timeout" :min="0"></a-input-number>
+    </a-form-item>
 </a-form>
 {{end}}

+ 1 - 1
web/translation/translate.fa_IR.toml

@@ -549,7 +549,7 @@
 "datetime" = "⏰ تاریخ‌وزمان: {{ .DateTime }}\r\n"
 "hostname" = "💻 نام‌میزبان: {{ .Hostname }}\r\n"
 "version" = "🚀 نسخه‌پنل: {{ .Version }}\r\n"
-"xrayVersion" = "📡 نسخو ڪور: {{ .XrayVersion }}\r\n"
+"xrayVersion" = "📡 نسخه‌هسته: {{ .XrayVersion }}\r\n"
 "ipv6" = "🌐 IPv6: {{ .IPv6 }}\r\n"
 "ipv4" = "🌐 IPv4: {{ .IPv4 }}\r\n"
 "ip" = "🌐 آدرس‌آی‌پی: {{ .IP }}\r\n"