Skip to content

Commit

Permalink
add dokodemo timeout #1200
Browse files Browse the repository at this point in the history
  • Loading branch information
alireza0 committed May 3, 2024
1 parent d8ec07d commit 5bbb15b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion web/assets/js/model/xray.js
Original file line number Diff line number Diff line change
Expand Up @@ -2013,12 +2013,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 @@ -2028,6 +2029,7 @@ Inbound.DokodemoSettings = class extends Inbound.Settings {
json.port,
json.network,
json.followRedirect,
json.timeout,
);
}

Expand All @@ -2037,6 +2039,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}}

0 comments on commit 5bbb15b

Please sign in to comment.