feat: Added support for SNI & allowInsecure of Trojan URI

This commit is contained in:
xream
2023-08-15 17:25:25 +08:00
parent 0d84a7bd6b
commit 1502c40b3d
2 changed files with 3 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "sub-store",
"version": "2.14.10",
"version": "2.14.11",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
"main": "src/main.js",
"scripts": {

View File

@@ -75,6 +75,8 @@ export default function URI_Producer() {
case 'trojan':
result = `trojan://${proxy.password}@${proxy.server}:${
proxy.port
}?sni=${encodeURIComponent(proxy.sni || proxy.server)}${
proxy['skip-cert-verify'] ? '&allowInsecure=1' : ''
}#${encodeURIComponent(proxy.name)}`;
break;
}