Finalmask: Add XICMP

Co-authored-by: MHSanaei <ho3ein.sanaei@gmail.com>
This commit is contained in:
Alireza Ahmadi
2026-02-03 20:48:08 +01:00
parent b8f2195a3a
commit c39ad9cac1
4 changed files with 9 additions and 23 deletions

View File

@@ -980,6 +980,8 @@ class UdpMask extends XrayCommonClass {
case 'header-dns': case 'header-dns':
case 'xdns': case 'xdns':
return { domain: settings.domain || '' }; return { domain: settings.domain || '' };
case 'xicmp':
return { ip: settings.ip || '', id: settings.id ?? 0 };
case 'mkcp-original': case 'mkcp-original':
case 'header-dtls': case 'header-dtls':
case 'header-srtp': case 'header-srtp':
@@ -1305,14 +1307,6 @@ class Inbound extends XrayCommonClass {
return null; return null;
} }
get kcpType() {
return this.stream.kcp.type;
}
get kcpSeed() {
return this.stream.kcp.seed;
}
get serviceName() { get serviceName() {
return this.stream.grpc.serviceName; return this.stream.grpc.serviceName;
} }
@@ -1388,8 +1382,6 @@ class Inbound extends XrayCommonClass {
} }
} else if (network === 'kcp') { } else if (network === 'kcp') {
const kcp = this.stream.kcp; const kcp = this.stream.kcp;
obj.type = kcp.type;
obj.path = kcp.seed;
} else if (network === 'ws') { } else if (network === 'ws') {
const ws = this.stream.ws; const ws = this.stream.ws;
obj.path = ws.path; obj.path = ws.path;
@@ -1452,8 +1444,6 @@ class Inbound extends XrayCommonClass {
break; break;
case "kcp": case "kcp":
const kcp = this.stream.kcp; const kcp = this.stream.kcp;
params.set("headerType", kcp.type);
params.set("seed", kcp.seed);
break; break;
case "ws": case "ws":
const ws = this.stream.ws; const ws = this.stream.ws;
@@ -1557,8 +1547,6 @@ class Inbound extends XrayCommonClass {
break; break;
case "kcp": case "kcp":
const kcp = this.stream.kcp; const kcp = this.stream.kcp;
params.set("headerType", kcp.type);
params.set("seed", kcp.seed);
break; break;
case "ws": case "ws":
const ws = this.stream.ws; const ws = this.stream.ws;
@@ -1638,8 +1626,6 @@ class Inbound extends XrayCommonClass {
break; break;
case "kcp": case "kcp":
const kcp = this.stream.kcp; const kcp = this.stream.kcp;
params.set("headerType", kcp.type);
params.set("seed", kcp.seed);
break; break;
case "ws": case "ws":
const ws = this.stream.ws; const ws = this.stream.ws;

View File

@@ -581,6 +581,8 @@ class UdpMask extends CommonClass {
case 'header-dns': case 'header-dns':
case 'xdns': case 'xdns':
return { domain: settings.domain || '' }; return { domain: settings.domain || '' };
case 'xicmp':
return { ip: settings.ip || '', id: settings.id ?? 0 };
case 'mkcp-original': case 'mkcp-original':
case 'header-dtls': case 'header-dtls':
case 'header-srtp': case 'header-srtp':

View File

@@ -48,6 +48,9 @@
v-if="['tcp', 'ws', 'httpupgrade', 'xhttp'].includes(inbound.stream.network)" v-if="['tcp', 'ws', 'httpupgrade', 'xhttp'].includes(inbound.stream.network)"
value="xdns"> value="xdns">
xDNS (Experimental)</a-select-option> xDNS (Experimental)</a-select-option>
<a-select-option v-if="inbound.stream.network === 'kcp'"
value="xicmp">
xICMP (Experimental)</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item label='Password' <a-form-item label='Password'

View File

@@ -52,11 +52,6 @@
</td> </td>
</tr> </tr>
</template> </template>
<template v-if="inbound.isKcp">
<tr><td>kcp {{ i18n "encryption" }}</td><td><a-tag>[[ inbound.kcpType ]]</a-tag></td></tr>
<tr><td>kcp {{ i18n "password" }}</td><td><a-tag>[[ inbound.kcpSeed ]]</a-tag></td></tr>
</template>
<template v-if="inbound.isGrpc"> <template v-if="inbound.isGrpc">
<tr><td>grpc serviceName</td><td> <tr><td>grpc serviceName</td><td>
<a-tooltip :title="[[ inbound.serviceName ]]"> <a-tooltip :title="[[ inbound.serviceName ]]">