diff --git a/README.md b/README.md index 20e02c41..6e34ac79 100644 --- a/README.md +++ b/README.md @@ -43,10 +43,8 @@ Core functionalities: > [NaiveProxy](https://t.me/zhetengsha/4308) - [x] QX (SS, SSR, VMess, Trojan, HTTP, SOCKS5, VLESS) - [x] Loon (SS, SSR, VMess, Trojan, HTTP, SOCKS5, SOCKS5-TLS, WireGuard, VLESS, Hysteria 2) -- [x] Surge (Direct, SS, VMess, Trojan, HTTP, SOCKS5, SOCKS5-TLS, TUIC, Snell, Hysteria 2, SSH(Password authentication only), External Proxy Program(only for macOS), WireGuard(Surge to Surge)) -- [x] Surfboard (SS, VMess, Trojan, HTTP, SOCKS5, SOCKS5-TLS, WireGuard(Surfboard to Surfboard)) -- [x] Clash.Meta (Direct, SS, SSR, VMess, Trojan, HTTP, SOCKS5, Snell, VLESS, WireGuard, Hysteria, Hysteria 2, TUIC, SSH, mieru, sudoku, AnyTLS) -- [x] Stash (SS, SSR, VMess, Trojan, HTTP, SOCKS5, Snell, VLESS, WireGuard, Hysteria, TUIC, Juicity, SSH) +- [x] Surge (Direct, SS, VMess, Trojan, HTTP, SOCKS5, SOCKS5-TLS, AnyTLS, TrustTunnel, TUIC, Snell, Hysteria 2, SSH(Password authentication only), External Proxy Program(only for macOS), WireGuard(Surge to Surge)) +- [x] mihomo(Clash.Meta) Compatible (Direct, SS, SSR, VMess, Trojan, HTTP, SOCKS5, Snell, VLESS, WireGuard, Hysteria, Hysteria 2, TUIC, SSH, mieru, sudoku, AnyTLS, MASQUE) Deprecated(The frontend doesn't show it, but the backend still supports it, with the query parameter `target=Clash`): diff --git a/backend/package.json b/backend/package.json index 62d63069..547e58b6 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.21.21", + "version": "2.21.22", "description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.", "main": "src/main.js", "scripts": { diff --git a/backend/src/core/proxy-utils/index.js b/backend/src/core/proxy-utils/index.js index 49d85323..a23eeaf9 100644 --- a/backend/src/core/proxy-utils/index.js +++ b/backend/src/core/proxy-utils/index.js @@ -136,6 +136,7 @@ async function processFn( } } } + console.log(rawArgs); url = `${url.split('#')[0]}${ rawArgs[2] ? `#${rawArgs[2]}` diff --git a/backend/src/core/proxy-utils/producers/surfboard.js b/backend/src/core/proxy-utils/producers/surfboard.js index 1328a3df..72a8e663 100644 --- a/backend/src/core/proxy-utils/producers/surfboard.js +++ b/backend/src/core/proxy-utils/producers/surfboard.js @@ -26,6 +26,8 @@ export default function Surfboard_Producer() { return http(proxy); case 'socks5': return socks5(proxy); + case 'anytls': + return anytls(proxy); case 'wireguard-surge': return wireguard(proxy); } @@ -35,7 +37,29 @@ export default function Surfboard_Producer() { }; return { produce }; } +function anytls(proxy) { + const result = new Result(proxy); + result.append(`${proxy.name}=${proxy.type},${proxy.server},${proxy.port}`); + result.appendIfPresent(`,password="${proxy.password}"`, 'password'); + // tls verification + result.appendIfPresent(`,sni=${proxy.sni}`, 'sni'); + result.appendIfPresent( + `,skip-cert-verify=${proxy['skip-cert-verify']}`, + 'skip-cert-verify', + ); + + // tfo + result.appendIfPresent(`,tfo=${proxy.tfo}`, 'tfo'); + + // udp + result.appendIfPresent(`,udp-relay=${proxy.udp}`, 'udp'); + + // reuse + result.appendIfPresent(`,reuse=${proxy['reuse']}`, 'reuse'); + + return result.toString(); +} function shadowsocks(proxy) { const result = new Result(proxy); result.append(`${proxy.name}=${proxy.type},${proxy.server},${proxy.port}`);