Skip to content

Commit

Permalink
add dokodemo timeout
Browse files Browse the repository at this point in the history
Co-Authored-By: Alireza Ahmadi <[email protected]>
  • Loading branch information
MHSanaei and alireza0 committed May 8, 2024
1 parent d1f67f7 commit 94eb27d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion web/assets/js/model/xray.js
Original file line number Diff line number Diff line change
Expand Up @@ -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={}) {
Expand All @@ -2296,6 +2297,7 @@ Inbound.DokodemoSettings = class extends Inbound.Settings {
json.port,
json.network,
json.followRedirect,
json.timeout,
);
}

Expand All @@ -2305,6 +2307,7 @@ Inbound.DokodemoSettings = class extends Inbound.Settings {
port: this.port,
network: this.network,
followRedirect: this.followRedirect,
timeout: this.timeout,
};
}
};
Expand Down
3 changes: 3 additions & 0 deletions web/html/xui/form/protocol/dokodemo.html
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
2 changes: 1 addition & 1 deletion web/translation/translate.fa_IR.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 94eb27d

Please sign in to comment.