Skip to content

finalmask via the host mapper

If the inbound of an Xray server has a finalmask block, the client needs the matching masks. Prizrak-Core supports finalmask 👻 for vless and trojan proxies.

Remnawave keeps the client mask of a host in its Final Mask field (streamOverrides.finalMask). The same mask goes to Happ and other Xray clients. Prizrak-Core reads it as it is, in Xray’s spelling (nested settings, camelCase keys such as randRange), so the mapper only copies it:

{
"xrayJson": [],
"mihomo": [
{ "op": "copy", "from": "$host.streamOverrides.finalMask", "to": "finalmask" }
],
"base64": []
}

If the host has no Final Mask, the operation is skipped and the node stays without masks.

A fixed mask can be written in the mapper itself, in mihomo’s spelling. The TLS ClientHello fragmentation example:

{
"xrayJson": [],
"mihomo": [
{
"op": "set",
"to": "finalmask",
"value": {
"tcp": [
{ "type": "fragment", "packets": "tlshello", "lengths": ["1-1"], "delays": ["0"] }
]
}
}
],
"base64": []
}

The same mask in Xray’s form, as it appears in the inbound:

{
"tcp": [
{ "type": "fragment", "settings": { "packets": "tlshello", "lengths": ["1-1"], "delays": ["0"] } }
]
}

In the Mihomo subscription the proxy gets:

proxies:
- name: 🇩🇪 Germany
type: vless
# ...
finalmask:
tcp:
- type: fragment
packets: tlshello
lengths: ["1-1"]
delays: ["0"]