enhance client vless share url

This commit is contained in:
zizifn
2023-05-19 22:29:54 +08:00
committed by zizifn
parent 4fde353447
commit a1c928692d

View File

@@ -326,11 +326,13 @@ function ShareActions({
} }
let tls = ''; let tls = '';
if (isHttps) { if (isHttps) {
tls = `&security=tls`; tls = `&security=tls&fp=randomized&sni=${url.hostname}`;
} }
return `vless://${uuid}@${ return `vless://${uuid}@${
url.hostname url.hostname
}:${port}?encryption=none${tls}&type=ws${pathParam || ''}#${url.hostname}`; }:${port}?encryption=none${tls}&type=ws&host=${url.hostname}${
pathParam || ''
}#${url.hostname}`;
} }
return ( return (
<span className="inline-flex self-center mt-4 rounded-md shadow-sm isolate"> <span className="inline-flex self-center mt-4 rounded-md shadow-sm isolate">
@@ -344,7 +346,7 @@ function ShareActions({
<button <button
onClick={() => handleShare(getVlessURL())} onClick={() => handleShare(getVlessURL())}
type="button" type="button"
className="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-700 bg-white border border-gray-300 hover:bg-gray-50 focus:z-10 focus:border-indigo-500 focus:outline-none focus:ring-1 focus:ring-indigo-500" className="rounded-md bg-indigo-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
> >
V2ray V2ray
</button> </button>