From b11dc56cd09c2caad95e82f6febbfacc041bf4b3 Mon Sep 17 00:00:00 2001 From: Alireza Ahmadi Date: Mon, 4 Aug 2025 16:45:21 +0200 Subject: [PATCH] add dokodemo port map --- web/assets/js/model/inbound.js | 4 ++++ web/html/xui/form/protocol/dokodemo.html | 13 +++++++++++++ web/translation/translate.en_US.toml | 1 + web/translation/translate.fa_IR.toml | 1 + web/translation/translate.ru_RU.toml | 1 + web/translation/translate.vi_VN.toml | 1 + web/translation/translate.zh_Hans.toml | 1 + 7 files changed, 22 insertions(+) diff --git a/web/assets/js/model/inbound.js b/web/assets/js/model/inbound.js index 14570eb1..f570ba49 100644 --- a/web/assets/js/model/inbound.js +++ b/web/assets/js/model/inbound.js @@ -2252,12 +2252,14 @@ Inbound.DokodemoSettings = class extends Inbound.Settings { protocol, address, port, + portMap = [], network = 'tcp,udp', followRedirect = false ) { super(protocol); this.address = address; this.port = port; + this.portMap = portMap; this.network = network; this.followRedirect = followRedirect; } @@ -2267,6 +2269,7 @@ Inbound.DokodemoSettings = class extends Inbound.Settings { Protocols.DOKODEMO, json.address, json.port, + XrayCommonClass.toHeaders(json.portMap), json.network, json.followRedirect, ); @@ -2276,6 +2279,7 @@ Inbound.DokodemoSettings = class extends Inbound.Settings { return { address: this.address, port: this.port, + portMap: XrayCommonClass.toV2Headers(this.portMap, false), network: this.network, followRedirect: this.followRedirect, }; diff --git a/web/html/xui/form/protocol/dokodemo.html b/web/html/xui/form/protocol/dokodemo.html index f8cc4049..43e6bd46 100644 --- a/web/html/xui/form/protocol/dokodemo.html +++ b/web/html/xui/form/protocol/dokodemo.html @@ -6,6 +6,19 @@ + + + + + + + + + + + - + + + TCP+UDP diff --git a/web/translation/translate.en_US.toml b/web/translation/translate.en_US.toml index 8185cd2e..bb6c91c5 100644 --- a/web/translation/translate.en_US.toml +++ b/web/translation/translate.en_US.toml @@ -123,6 +123,7 @@ "remark" = "Remark" "protocol" = "Protocol" "port" = "Port" +"portMap" = "Port Mapping" "traffic" = "Traffic" "details" = "Details" "transportConfig" = "Transport Config" diff --git a/web/translation/translate.fa_IR.toml b/web/translation/translate.fa_IR.toml index 120d8926..ece7da80 100644 --- a/web/translation/translate.fa_IR.toml +++ b/web/translation/translate.fa_IR.toml @@ -123,6 +123,7 @@ "remark" = "نام" "protocol" = "پروتکل" "port" = "پورت" +"portMap" = "پورت‌های نظیر" "traffic" = "ترافیک" "details" = "جزئیات" "transportConfig" = "نحوه اتصال" diff --git a/web/translation/translate.ru_RU.toml b/web/translation/translate.ru_RU.toml index 8bcd41df..f53d7b01 100644 --- a/web/translation/translate.ru_RU.toml +++ b/web/translation/translate.ru_RU.toml @@ -123,6 +123,7 @@ "remark" = "Примечание" "protocol" = "Протокол" "port" = "Порт" +"portMap" = "Порт-перенаправление" "traffic" = "Трафик" "details" = "Подробнее" "transportConfig" = "Перенести" diff --git a/web/translation/translate.vi_VN.toml b/web/translation/translate.vi_VN.toml index 1a6a2f7b..bf2aef51 100644 --- a/web/translation/translate.vi_VN.toml +++ b/web/translation/translate.vi_VN.toml @@ -123,6 +123,7 @@ "remark" = "Nhận xét" "protocol" = "Giao thức" "port" = "Cổng" +"portMap" = "Cổng điều chính" "traffic" = "Lưu lượng" "details" = "Chi tiết" "transportConfig" = "Cấu hình vận chuyển" diff --git a/web/translation/translate.zh_Hans.toml b/web/translation/translate.zh_Hans.toml index e1201076..d8c26538 100644 --- a/web/translation/translate.zh_Hans.toml +++ b/web/translation/translate.zh_Hans.toml @@ -123,6 +123,7 @@ "remark" = "备注" "protocol" = "协议" "port" = "端口" +"portMap" = "端口映射" "traffic" = "流量" "details" = "详细信息" "transportConfig" = "传输配置"