mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-06-04 11:13:59 +08:00
feat: 支持 VLESS mKcp
This commit is contained in:
parent
8fe818f826
commit
baec193e5c
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "sub-store",
|
||||
"version": "2.14.402",
|
||||
"version": "2.14.403",
|
||||
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
|
||||
"main": "src/main.js",
|
||||
"scripts": {
|
||||
|
@ -531,6 +531,14 @@ function URI_VLESS() {
|
||||
if (Object.keys(opts).length > 0) {
|
||||
proxy[`${proxy.network}-opts`] = opts;
|
||||
}
|
||||
if (proxy.network === 'kcp') {
|
||||
// mKCP 种子。省略时不使用种子,但不可以为空字符串。建议 mKCP 用户使用 seed。
|
||||
if (params.seed) {
|
||||
proxy.seed = params.seed;
|
||||
}
|
||||
// mKCP 的伪装头部类型。当前可选值有 none / srtp / utp / wechat-video / dtls / wireguard。省略时默认值为 none,即不使用伪装头部,但不可以为空字符串。
|
||||
proxy.headerType = params.headerType || 'none';
|
||||
}
|
||||
}
|
||||
|
||||
return proxy;
|
||||
|
@ -224,6 +224,18 @@ export default function URI_Producer() {
|
||||
vlessTransportServiceName,
|
||||
)}`;
|
||||
}
|
||||
if (proxy.network === 'kcp') {
|
||||
if (proxy.seed) {
|
||||
vlessTransport += `&seed=${encodeURIComponent(
|
||||
proxy.seed,
|
||||
)}`;
|
||||
}
|
||||
if (proxy.headerType) {
|
||||
vlessTransport += `&headerType=${encodeURIComponent(
|
||||
proxy.headerType,
|
||||
)}`;
|
||||
}
|
||||
}
|
||||
|
||||
result = `vless://${proxy.uuid}@${proxy.server}:${
|
||||
proxy.port
|
||||
|
Loading…
x
Reference in New Issue
Block a user