feat: Shadowsocks URI 支持 Shadow TLS plugin

This commit is contained in:
xream
2025-02-10 06:32:17 +08:00
parent 07d5a913f0
commit 4a2a2297f6
5 changed files with 22 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
import { isPresent } from '@/core/proxy-utils/producers/utils';
export default function ShadowRocket_Producer() {
export default function Shadowrocket_Producer() {
const type = 'ALL';
const produce = (proxies, type, opts = {}) => {
const list = proxies

View File

@@ -54,6 +54,11 @@ export default function URI_Producer() {
}${opts.tls ? ';tls' : ''}`,
);
break;
case 'shadow-tls':
result += encodeURIComponent(
`shadow-tls;host=${opts.host};password=${opts.password};version=${opts.version}`,
);
break;
default:
throw new Error(
`Unsupported plugin option: ${proxy.plugin}`,