mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-10 11:28:59 +08:00
fix: 处理 IPv6 地址 URI
This commit is contained in:
parent
8918479b9e
commit
69726cd5c4
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "sub-store",
|
||||
"version": "2.14.114",
|
||||
"version": "2.14.115",
|
||||
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
|
||||
"main": "src/main.js",
|
||||
"scripts": {
|
||||
|
@ -214,6 +214,12 @@ function safeMatch(parser, line) {
|
||||
}
|
||||
|
||||
function lastParse(proxy) {
|
||||
if (proxy.server) {
|
||||
proxy.server = proxy.server
|
||||
.trim()
|
||||
.replace(/^\[/, '')
|
||||
.replace(/\]$/, '');
|
||||
}
|
||||
if (proxy.type === 'trojan') {
|
||||
if (proxy.network === 'tcp') {
|
||||
delete proxy.network;
|
||||
|
@ -1,10 +1,14 @@
|
||||
/* eslint-disable no-case-declarations */
|
||||
import { Base64 } from 'js-base64';
|
||||
import { isIPv6 } from '@/utils';
|
||||
|
||||
export default function URI_Producer() {
|
||||
const type = 'SINGLE';
|
||||
const produce = (proxy) => {
|
||||
let result = '';
|
||||
if (proxy.server && isIPv6(proxy.server)) {
|
||||
proxy.server = `[${proxy.server}]`;
|
||||
}
|
||||
switch (proxy.type) {
|
||||
case 'ss':
|
||||
const userinfo = `${proxy.cipher}:${proxy.password}`;
|
||||
@ -246,7 +250,9 @@ export default function URI_Producer() {
|
||||
}
|
||||
if (proxy['tls-fingerprint']) {
|
||||
hysteria2params.push(
|
||||
`pinSHA256=${encodeURIComponent(proxy['tls-fingerprint'])}`,
|
||||
`pinSHA256=${encodeURIComponent(
|
||||
proxy['tls-fingerprint'],
|
||||
)}`,
|
||||
);
|
||||
}
|
||||
if (proxy.tfo) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user