mirror of
https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-10 00:52:40 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ecb2302978 |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "sub-store",
|
||||
"version": "2.18.2",
|
||||
"version": "2.18.1",
|
||||
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
|
||||
"main": "src/main.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -23,11 +23,7 @@ export default function URI_Producer() {
|
||||
) {
|
||||
delete proxy.tls;
|
||||
}
|
||||
if (
|
||||
!['vmess'].includes(proxy.type) &&
|
||||
proxy.server &&
|
||||
isIPv6(proxy.server)
|
||||
) {
|
||||
if (proxy.server && isIPv6(proxy.server)) {
|
||||
proxy.server = `[${proxy.server}]`;
|
||||
}
|
||||
switch (proxy.type) {
|
||||
|
||||
16
backend/src/vendor/open-api.js
vendored
16
backend/src/vendor/open-api.js
vendored
@@ -374,14 +374,18 @@ export function HTTP(defaultOptions = { baseURL: '' }) {
|
||||
};
|
||||
try {
|
||||
const url = new URL(opts.url);
|
||||
if (url.username || url.password) {
|
||||
const auth =
|
||||
url.username || url.password
|
||||
? Buffer.from(
|
||||
`${url.username || ''}:${
|
||||
url.password || ''
|
||||
}`,
|
||||
).toString('base64')
|
||||
: undefined;
|
||||
if (auth) {
|
||||
opts.headers = {
|
||||
...(opts.headers || {}),
|
||||
Authorization: `Basic ${Buffer.from(
|
||||
`${url.username || ''}:${
|
||||
url.password || ''
|
||||
}`,
|
||||
).toString('base64')}`,
|
||||
Authorization: `Basic ${auth}`,
|
||||
};
|
||||
}
|
||||
const response = await request(opts.url, {
|
||||
|
||||
Reference in New Issue
Block a user