mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-11 11:28:59 +08:00
feat: Stash/clash.meta(mihomo) 支持 interface-name
字段
This commit is contained in:
parent
a4384f4f13
commit
739100c873
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sub-store",
|
"name": "sub-store",
|
||||||
"version": "2.14.235",
|
"version": "2.14.236",
|
||||||
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
|
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
|
||||||
"main": "src/main.js",
|
"main": "src/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -263,6 +263,10 @@ function safeMatch(parser, line) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function lastParse(proxy) {
|
function lastParse(proxy) {
|
||||||
|
if (proxy.interface) {
|
||||||
|
proxy['interface-name'] = proxy.interface;
|
||||||
|
delete proxy.interface;
|
||||||
|
}
|
||||||
if (isValidPortNumber(proxy.port)) {
|
if (isValidPortNumber(proxy.port)) {
|
||||||
proxy.port = parseInt(proxy.port, 10);
|
proxy.port = parseInt(proxy.port, 10);
|
||||||
}
|
}
|
||||||
|
@ -132,7 +132,10 @@ function shadowsocks(proxy) {
|
|||||||
`,allow-other-interface=${proxy['allow-other-interface']}`,
|
`,allow-other-interface=${proxy['allow-other-interface']}`,
|
||||||
'allow-other-interface',
|
'allow-other-interface',
|
||||||
);
|
);
|
||||||
result.appendIfPresent(`,interface=${proxy['interface']}`, 'interface');
|
result.appendIfPresent(
|
||||||
|
`,interface=${proxy['interface-name']}`,
|
||||||
|
'interface-name',
|
||||||
|
);
|
||||||
|
|
||||||
// shadow-tls
|
// shadow-tls
|
||||||
if (isPresent(proxy, 'shadow-tls-password')) {
|
if (isPresent(proxy, 'shadow-tls-password')) {
|
||||||
@ -229,7 +232,10 @@ function trojan(proxy) {
|
|||||||
`,allow-other-interface=${proxy['allow-other-interface']}`,
|
`,allow-other-interface=${proxy['allow-other-interface']}`,
|
||||||
'allow-other-interface',
|
'allow-other-interface',
|
||||||
);
|
);
|
||||||
result.appendIfPresent(`,interface=${proxy['interface']}`, 'interface');
|
result.appendIfPresent(
|
||||||
|
`,interface=${proxy['interface-name']}`,
|
||||||
|
'interface-name',
|
||||||
|
);
|
||||||
|
|
||||||
// shadow-tls
|
// shadow-tls
|
||||||
if (isPresent(proxy, 'shadow-tls-password')) {
|
if (isPresent(proxy, 'shadow-tls-password')) {
|
||||||
@ -315,7 +321,10 @@ function vmess(proxy) {
|
|||||||
`,allow-other-interface=${proxy['allow-other-interface']}`,
|
`,allow-other-interface=${proxy['allow-other-interface']}`,
|
||||||
'allow-other-interface',
|
'allow-other-interface',
|
||||||
);
|
);
|
||||||
result.appendIfPresent(`,interface=${proxy['interface']}`, 'interface');
|
result.appendIfPresent(
|
||||||
|
`,interface=${proxy['interface-name']}`,
|
||||||
|
'interface-name',
|
||||||
|
);
|
||||||
|
|
||||||
// shadow-tls
|
// shadow-tls
|
||||||
if (isPresent(proxy, 'shadow-tls-password')) {
|
if (isPresent(proxy, 'shadow-tls-password')) {
|
||||||
@ -385,7 +394,10 @@ function ssh(proxy) {
|
|||||||
`,allow-other-interface=${proxy['allow-other-interface']}`,
|
`,allow-other-interface=${proxy['allow-other-interface']}`,
|
||||||
'allow-other-interface',
|
'allow-other-interface',
|
||||||
);
|
);
|
||||||
result.appendIfPresent(`,interface=${proxy['interface']}`, 'interface');
|
result.appendIfPresent(
|
||||||
|
`,interface=${proxy['interface-name']}`,
|
||||||
|
'interface-name',
|
||||||
|
);
|
||||||
|
|
||||||
// block-quic
|
// block-quic
|
||||||
result.appendIfPresent(`,block-quic=${proxy['block-quic']}`, 'block-quic');
|
result.appendIfPresent(`,block-quic=${proxy['block-quic']}`, 'block-quic');
|
||||||
@ -445,7 +457,10 @@ function http(proxy) {
|
|||||||
`,allow-other-interface=${proxy['allow-other-interface']}`,
|
`,allow-other-interface=${proxy['allow-other-interface']}`,
|
||||||
'allow-other-interface',
|
'allow-other-interface',
|
||||||
);
|
);
|
||||||
result.appendIfPresent(`,interface=${proxy['interface']}`, 'interface');
|
result.appendIfPresent(
|
||||||
|
`,interface=${proxy['interface-name']}`,
|
||||||
|
'interface-name',
|
||||||
|
);
|
||||||
|
|
||||||
// shadow-tls
|
// shadow-tls
|
||||||
if (isPresent(proxy, 'shadow-tls-password')) {
|
if (isPresent(proxy, 'shadow-tls-password')) {
|
||||||
@ -522,7 +537,10 @@ function socks5(proxy) {
|
|||||||
`,allow-other-interface=${proxy['allow-other-interface']}`,
|
`,allow-other-interface=${proxy['allow-other-interface']}`,
|
||||||
'allow-other-interface',
|
'allow-other-interface',
|
||||||
);
|
);
|
||||||
result.appendIfPresent(`,interface=${proxy['interface']}`, 'interface');
|
result.appendIfPresent(
|
||||||
|
`,interface=${proxy['interface-name']}`,
|
||||||
|
'interface-name',
|
||||||
|
);
|
||||||
|
|
||||||
// shadow-tls
|
// shadow-tls
|
||||||
if (isPresent(proxy, 'shadow-tls-password')) {
|
if (isPresent(proxy, 'shadow-tls-password')) {
|
||||||
@ -597,7 +615,10 @@ function snell(proxy) {
|
|||||||
`,allow-other-interface=${proxy['allow-other-interface']}`,
|
`,allow-other-interface=${proxy['allow-other-interface']}`,
|
||||||
'allow-other-interface',
|
'allow-other-interface',
|
||||||
);
|
);
|
||||||
result.appendIfPresent(`,interface=${proxy['interface']}`, 'interface');
|
result.appendIfPresent(
|
||||||
|
`,interface=${proxy['interface-name']}`,
|
||||||
|
'interface-name',
|
||||||
|
);
|
||||||
|
|
||||||
// shadow-tls
|
// shadow-tls
|
||||||
if (isPresent(proxy, 'shadow-tls-password')) {
|
if (isPresent(proxy, 'shadow-tls-password')) {
|
||||||
@ -687,7 +708,10 @@ function tuic(proxy) {
|
|||||||
`,allow-other-interface=${proxy['allow-other-interface']}`,
|
`,allow-other-interface=${proxy['allow-other-interface']}`,
|
||||||
'allow-other-interface',
|
'allow-other-interface',
|
||||||
);
|
);
|
||||||
result.appendIfPresent(`,interface=${proxy['interface']}`, 'interface');
|
result.appendIfPresent(
|
||||||
|
`,interface=${proxy['interface-name']}`,
|
||||||
|
'interface-name',
|
||||||
|
);
|
||||||
|
|
||||||
// shadow-tls
|
// shadow-tls
|
||||||
if (isPresent(proxy, 'shadow-tls-password')) {
|
if (isPresent(proxy, 'shadow-tls-password')) {
|
||||||
@ -761,7 +785,10 @@ ${proxy.name}=wireguard`);
|
|||||||
`,allow-other-interface=${proxy['allow-other-interface']}`,
|
`,allow-other-interface=${proxy['allow-other-interface']}`,
|
||||||
'allow-other-interface',
|
'allow-other-interface',
|
||||||
);
|
);
|
||||||
result.appendIfPresent(`,interface=${proxy['interface']}`, 'interface');
|
result.appendIfPresent(
|
||||||
|
`,interface=${proxy['interface-name']}`,
|
||||||
|
'interface-name',
|
||||||
|
);
|
||||||
|
|
||||||
// shadow-tls
|
// shadow-tls
|
||||||
if (isPresent(proxy, 'shadow-tls-password')) {
|
if (isPresent(proxy, 'shadow-tls-password')) {
|
||||||
@ -860,7 +887,10 @@ function wireguard_surge(proxy) {
|
|||||||
`,allow-other-interface=${proxy['allow-other-interface']}`,
|
`,allow-other-interface=${proxy['allow-other-interface']}`,
|
||||||
'allow-other-interface',
|
'allow-other-interface',
|
||||||
);
|
);
|
||||||
result.appendIfPresent(`,interface=${proxy['interface']}`, 'interface');
|
result.appendIfPresent(
|
||||||
|
`,interface=${proxy['interface-name']}`,
|
||||||
|
'interface-name',
|
||||||
|
);
|
||||||
|
|
||||||
// shadow-tls
|
// shadow-tls
|
||||||
if (isPresent(proxy, 'shadow-tls-password')) {
|
if (isPresent(proxy, 'shadow-tls-password')) {
|
||||||
@ -936,7 +966,10 @@ function hysteria2(proxy) {
|
|||||||
`,allow-other-interface=${proxy['allow-other-interface']}`,
|
`,allow-other-interface=${proxy['allow-other-interface']}`,
|
||||||
'allow-other-interface',
|
'allow-other-interface',
|
||||||
);
|
);
|
||||||
result.appendIfPresent(`,interface=${proxy['interface']}`, 'interface');
|
result.appendIfPresent(
|
||||||
|
`,interface=${proxy['interface-name']}`,
|
||||||
|
'interface-name',
|
||||||
|
);
|
||||||
|
|
||||||
// shadow-tls
|
// shadow-tls
|
||||||
if (isPresent(proxy, 'shadow-tls-password')) {
|
if (isPresent(proxy, 'shadow-tls-password')) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user