Repository navigation
MASQUE client: Support WARP - #6878
Conversation
|
另外这个是需要客户端发送证书吗 |
i don't think the warp name will be a problem. if you want i can change it, or we can merge it as is for now and change it later, it's up to you
yes, it needs one. the endpoint authenticates the device by mtls: the client cert is self-signed and made on the fly from |
|
认证信息填传输层,好吧看了下 Hy2 客户端实现也是这样,而入站的认证填在代理层方便 API,然而支持 WARP 显然仅客户端
关于客户端发送证书,感觉 WARP 这特征有点扎眼了,而且你这代码咋像是 uTLS 会有独特的逻辑? 特地看了下验证服务端证书的代码,你这 pin 完公钥不验证 signature 什么的吗?自定义的 VerifyPeerCertificate 又不是一定有 况且这个相当于强制 pin 公钥了,已证实服务端身份,似乎没必要再去叠上 pcs/vcn 了吧, |
|
yeah with it's not really stacked on pcs/vcn — it only chains to an existing verify if the user set one, so warp itself adds nothing on top. can make the pin the sole server check if you'd rather. the client cert is just how warp authenticates (self-signed from keeping the |
|
you sound like you prompted an ai to act like a gen z person |
|
@therealtunge if you genuinely think an ai wrote this then my suggestion is to try it yourself. ask claude for a masque warp transport and see if anthropic's safeguards even let you finish. i went that route first to save the work and it didn't happen. my goal here was only to help and contribute to xray-core. i had already implemented it earlier in my own core aether. so go ahead and try it yourself first then come back and tell me it was ai :)) |
|
@CluvexStudio 确实我想多了 “客户端发送证书”使 WARP 即使是换成了 CF 通用 IP、隐藏了 SNI 后仍有独特特征,话说这个能不能 ECH / domain fronting? 这个 PR 即将合并,请发出 ETH 地址以便转你一个 Project X NFT,另外希望你能写一篇 MASQUE、WG 结合 Finalmask 的教程 |
warp wg/masque 是划分出来的专用IP段 跑CDN前端不同的stack 黑洞掉一了百了 不然我之前为什么我之前一直反对加这个 还能用只是监管钝性罢了 |
|
|
@CluvexStudio 有兴趣的话可以补上h3l4模式,这个模式出口IP是另一个IP池 |
|
the two certs for consumer-masque.cloudflareclient.com, both from 162.159.198.0/24, same sni: 198.1 is a normal Let's Encrypt cert, CN=cloudflareclient.com, full chain to isrg. both P-256, i hit each 3 times and the key never moved. the self-signed leaf's spki is exactly the publicKey from the example: MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIaU7MToJm9NKp8YfGxR6r+/h4mcG7SxI8tsW8OR1A5tv/zCzVbCRRh2t87/kxnP6lAy0lkr7qYwu+ox+k3dr6w== -----BEGIN CERTIFICATE----- so same sni, one edge gives a ca chain and the other a self-signed leaf with no chain to check, which is why the server side is just a key pin and the 1.3 CertificateVerify is what proves possession. on ech i tested it on both carriers. it works for the warp api fine (the general edge publishes cloudflare-ech.com and the api enable goes over ech), but the masque edge itself rejects it: h2 comes back ECH_REJECTED and then the cert check fails, h3 the quic conn closes with crypto_error 0x179 (ech_required). so the masque stack just doesn't do ech for cloudflare-ech.com. the sni doesn't need hiding that way though, the edge picks the backend by ip not by sni, 162.159.198.2 gives the same pinned cert for any sni. so there are two ways to set serverName: keep consumer-masque.cloudflareclient.com like the warp client sends and put finalmask fragment/noise on it, or use any other name like www.cloudflare.com and the masque name never shows up. either way the real tell is the dedicated ip range like Fangliding said. eth for the nft: 0x20c980AEF36Aa71D0A0e7bE382AeD20b73bC6D27 tutorial i'll put up as a docs pr on Xray-docs-next, masque and wg both with finalmask. |
|
@RPRX here's the docs pr :)) XTLS/Xray-docs-next#908 |
0x48d8660fa3eaddc53343624162b3ed8dbdc8081f70e61db6fb2f1a4331874ab3
|
|
#6710 这个说的是不是需要改 WG 代码本身? |
|
thank you, really appreciate the nft. got the tx hash, it'll show up in the wallet and yeah that's exactly what i want the tutorial to get across. a lot of people asking for awg don't realize finalmask already does the same kind of obfuscation with fragment and noise and can go further than that. so rather than a separate awg i'll show how finalmask covers it for masque and wg both. glad to be the one writing it <: |
作为 end-user pro 我基本只碰自用的地方,否则高低得补一下 xhttp 文档
RPRX wants a complete FinalMask example under |
yeah it needs the wg outbound itself, not finalmask. finalmask only sends separate junk packets and never touches the handshake packet. i tested it against warp, appending random bytes to the init still completes the handshake and data-plane fine, so warp ignores the trailer and the one-way trick does work. it just has to sit in the outbound, gated to the handshake packets so data isn't corrupted, the same bind.Send spot that already writes the reserved bytes. following awg 3.1 there makes sense. |
|
@CluvexStudio 还需要把 XMUX 移植进 MASQUE client、禁掉 mux.cool,另外默认 TLS 指纹、HTTP UA 等也需要 reconsider |
|
…hrome's User-Agent by default (#7121) #6810 (comment) #6878 (comment) #7121 (comment) --------- Co-authored-by: SVLAVR <[email protected]>
#6844 (comment)
#6862 (comment)
masque can now connect to cloudflare warp.
masqueSettingsgets awarpobject, filled from the warp registration of the device, like the keys of wireguard--
privateKeythe p-256 key of the device, pem or base64, a client cert is made from it--
publicKeythe endpoint key from the registration, the server cert is checked against it so the sni can be anything--
addressthe addresses of the device, warp doesnt assign them inside the tunnel-- http/3 uses
cf-connect-ipand the older datagram setting, http/2 a plain connect with bare ip packets, like the warp client."alpn": ["h2"]picks http/2-- the device needs
warp_enabledon, otherwise the endpoint answers with access denied-- nothing is requested from cloudflare, the keys come from the registration like with wireguard
-- utls fingerprints send the client cert now too, http/2 needs it
tested in iran on the real network with finalmask noise and fragment: http/3 and http/2 both connect and hold up (warp on, ipv6, udp, parallel downloads, idle). plus tests against a local server that acts like the warp endpoint