feat: Added support for SNI & allowInsecure of Trojan URI

This commit is contained in:
xream 2023-08-15 17:25:25 +08:00
parent 048344268c
commit bc9fae6062
No known key found for this signature in database
GPG Key ID: 1D2C5225471789F9
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;
}