Merge pull request #3311 from MHSanaei/dokodemo_portMap

add dokodemo port mapping
This commit is contained in:
Sanaei 2025-08-04 17:01:57 +02:00 committed by GitHub
commit 45f78d3521
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 30 additions and 0 deletions

View file

@ -2312,12 +2312,14 @@ Inbound.DokodemoSettings = class extends Inbound.Settings {
protocol, protocol,
address, address,
port, port,
portMap = [],
network = 'tcp,udp', network = 'tcp,udp',
followRedirect = false followRedirect = false
) { ) {
super(protocol); super(protocol);
this.address = address; this.address = address;
this.port = port; this.port = port;
this.portMap = portMap;
this.network = network; this.network = network;
this.followRedirect = followRedirect; this.followRedirect = followRedirect;
} }
@ -2327,6 +2329,7 @@ Inbound.DokodemoSettings = class extends Inbound.Settings {
Protocols.DOKODEMO, Protocols.DOKODEMO,
json.address, json.address,
json.port, json.port,
XrayCommonClass.toHeaders(json.portMap),
json.network, json.network,
json.followRedirect, json.followRedirect,
); );
@ -2336,6 +2339,7 @@ Inbound.DokodemoSettings = class extends Inbound.Settings {
return { return {
address: this.address, address: this.address,
port: this.port, port: this.port,
portMap: XrayCommonClass.toV2Headers(this.portMap),
network: this.network, network: this.network,
followRedirect: this.followRedirect, followRedirect: this.followRedirect,
}; };

View file

@ -6,6 +6,19 @@
<a-form-item label='{{ i18n "pages.inbounds.destinationPort"}}'> <a-form-item label='{{ i18n "pages.inbounds.destinationPort"}}'>
<a-input-number v-model.number="inbound.settings.port"></a-input-number> <a-input-number v-model.number="inbound.settings.port"></a-input-number>
</a-form-item> </a-form-item>
<a-form-item label='{{ i18n "pages.inbounds.portMap"}}'>
<a-button size="small" @click="inbound.settings.portMap.push({name: '', value: ''})">+</a-button>
</a-form-item>
<a-form-item :wrapper-col="{span:24}">
<a-input-group compact v-for="(pm, index) in inbound.settings.portMap">
<a-input style="width: 50%" v-model.trim="pm.name" placeholder='{{ i18n "pages.inbounds.port"}}'>
<template slot="addonBefore" style="margin: 0;">[[ index+1 ]]</template>
</a-input>
<a-input style="width: 50%" v-model.trim="pm.value" placeholder='{{ i18n "pages.inbounds.targetAddress" }}'>
<a-button slot="addonAfter" size="small" @click="inbound.settings.portMap.splice(index,1)">-</a-button>
</a-input>
</a-input-group>
</a-form-item>
<a-form-item label='{{ i18n "pages.inbounds.network"}}'> <a-form-item label='{{ i18n "pages.inbounds.network"}}'>
<a-select v-model="inbound.settings.network" :dropdown-class-name="themeSwitcher.currentTheme"> <a-select v-model="inbound.settings.network" :dropdown-class-name="themeSwitcher.currentTheme">
<a-select-option value="tcp,udp">TCP,UDP</a-select-option> <a-select-option value="tcp,udp">TCP,UDP</a-select-option>

View file

@ -158,6 +158,7 @@
"remark" = "ملاحظة" "remark" = "ملاحظة"
"protocol" = "بروتوكول" "protocol" = "بروتوكول"
"port" = "بورت" "port" = "بورت"
"portMap" = "خريطة البورت"
"traffic" = "الترافيك" "traffic" = "الترافيك"
"details" = "تفاصيل" "details" = "تفاصيل"
"transportConfig" = "نقل" "transportConfig" = "نقل"

View file

@ -158,6 +158,7 @@
"remark" = "Remark" "remark" = "Remark"
"protocol" = "Protocol" "protocol" = "Protocol"
"port" = "Port" "port" = "Port"
"portMap" = "Port Mapping"
"traffic" = "Traffic" "traffic" = "Traffic"
"details" = "Details" "details" = "Details"
"transportConfig" = "Transport" "transportConfig" = "Transport"

View file

@ -158,6 +158,7 @@
"remark" = "Notas" "remark" = "Notas"
"protocol" = "Protocolo" "protocol" = "Protocolo"
"port" = "Puerto" "port" = "Puerto"
"portMap" = "Puertos de Destino"
"traffic" = "Tráfico" "traffic" = "Tráfico"
"details" = "Detalles" "details" = "Detalles"
"transportConfig" = "Transporte" "transportConfig" = "Transporte"

View file

@ -158,6 +158,7 @@
"remark" = "نام" "remark" = "نام"
"protocol" = "پروتکل" "protocol" = "پروتکل"
"port" = "پورت" "port" = "پورت"
"portMap" = "پورت‌های نظیر"
"traffic" = "ترافیک" "traffic" = "ترافیک"
"details" = "توضیحات" "details" = "توضیحات"
"transportConfig" = "نحوه اتصال" "transportConfig" = "نحوه اتصال"

View file

@ -158,6 +158,7 @@
"remark" = "Catatan" "remark" = "Catatan"
"protocol" = "Protokol" "protocol" = "Protokol"
"port" = "Port" "port" = "Port"
"portMap" = "Port Mapping"
"traffic" = "Traffic" "traffic" = "Traffic"
"details" = "Rincian" "details" = "Rincian"
"transportConfig" = "Transport" "transportConfig" = "Transport"

View file

@ -158,6 +158,7 @@
"remark" = "備考" "remark" = "備考"
"protocol" = "プロトコル" "protocol" = "プロトコル"
"port" = "ポート" "port" = "ポート"
"portMap" = "ポートマッピング"
"traffic" = "トラフィック" "traffic" = "トラフィック"
"details" = "詳細情報" "details" = "詳細情報"
"transportConfig" = "トランスポート設定" "transportConfig" = "トランスポート設定"

View file

@ -158,6 +158,7 @@
"remark" = "Observação" "remark" = "Observação"
"protocol" = "Protocolo" "protocol" = "Protocolo"
"port" = "Porta" "port" = "Porta"
"portMap" = "Porta Mapeada"
"traffic" = "Tráfego" "traffic" = "Tráfego"
"details" = "Detalhes" "details" = "Detalhes"
"transportConfig" = "Transporte" "transportConfig" = "Transporte"

View file

@ -158,6 +158,7 @@
"remark" = "Примечание" "remark" = "Примечание"
"protocol" = "Протокол" "protocol" = "Протокол"
"port" = "Порт" "port" = "Порт"
"portMap" = "Порт-маппинг"
"traffic" = "Трафик" "traffic" = "Трафик"
"details" = "Подробнее" "details" = "Подробнее"
"transportConfig" = "Транспорт" "transportConfig" = "Транспорт"

View file

@ -158,6 +158,7 @@
"remark" = "Açıklama" "remark" = "Açıklama"
"protocol" = "Protokol" "protocol" = "Protokol"
"port" = "Port" "port" = "Port"
"portMap" = "Port Atama"
"traffic" = "Trafik" "traffic" = "Trafik"
"details" = "Detaylar" "details" = "Detaylar"
"transportConfig" = "Taşıma" "transportConfig" = "Taşıma"

View file

@ -158,6 +158,7 @@
"remark" = "Примітка" "remark" = "Примітка"
"protocol" = "Протокол" "protocol" = "Протокол"
"port" = "Порт" "port" = "Порт"
"portMap" = "Порт-перехід"
"traffic" = "Трафік" "traffic" = "Трафік"
"details" = "Деталі" "details" = "Деталі"
"transportConfig" = "Транспорт" "transportConfig" = "Транспорт"

View file

@ -158,6 +158,7 @@
"remark" = "Chú thích" "remark" = "Chú thích"
"protocol" = "Giao thức" "protocol" = "Giao thức"
"port" = "Cổng" "port" = "Cổng"
"portMap" = "Cổng tạo"
"traffic" = "Lưu lượng" "traffic" = "Lưu lượng"
"details" = "Chi tiết" "details" = "Chi tiết"
"transportConfig" = "Giao vận" "transportConfig" = "Giao vận"

View file

@ -158,6 +158,7 @@
"remark" = "备注" "remark" = "备注"
"protocol" = "协议" "protocol" = "协议"
"port" = "端口" "port" = "端口"
"portMap" = "端口映射"
"traffic" = "流量" "traffic" = "流量"
"details" = "详细信息" "details" = "详细信息"
"transportConfig" = "传输配置" "transportConfig" = "传输配置"

View file

@ -158,6 +158,7 @@
"remark" = "備註" "remark" = "備註"
"protocol" = "協議" "protocol" = "協議"
"port" = "埠" "port" = "埠"
"portMap" = "埠映射"
"traffic" = "流量" "traffic" = "流量"
"details" = "詳細資訊" "details" = "詳細資訊"
"transportConfig" = "傳輸配置" "transportConfig" = "傳輸配置"