mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2024-11-16 11:42:21 +08:00
Revert "refactor: use axios tauri adapter"
This reverts commit 7e361cb3f1
.
This commit is contained in:
parent
4108451ebe
commit
8bc7607783
|
@ -32,7 +32,6 @@
|
||||||
"@types/json-schema": "^7.0.15",
|
"@types/json-schema": "^7.0.15",
|
||||||
"ahooks": "^3.7.11",
|
"ahooks": "^3.7.11",
|
||||||
"axios": "^1.6.8",
|
"axios": "^1.6.8",
|
||||||
"axios-tauri-api-adapter": "^0.2.1",
|
|
||||||
"dayjs": "1.11.5",
|
"dayjs": "1.11.5",
|
||||||
"i18next": "^23.11.3",
|
"i18next": "^23.11.3",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
|
|
|
@ -49,9 +49,6 @@ importers:
|
||||||
axios:
|
axios:
|
||||||
specifier: ^1.6.8
|
specifier: ^1.6.8
|
||||||
version: 1.6.8
|
version: 1.6.8
|
||||||
axios-tauri-api-adapter:
|
|
||||||
specifier: ^0.2.1
|
|
||||||
version: 0.2.1
|
|
||||||
dayjs:
|
dayjs:
|
||||||
specifier: 1.11.5
|
specifier: 1.11.5
|
||||||
version: 1.11.5
|
version: 1.11.5
|
||||||
|
@ -1605,13 +1602,6 @@ packages:
|
||||||
integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==,
|
integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==,
|
||||||
}
|
}
|
||||||
|
|
||||||
axios-tauri-api-adapter@0.2.1:
|
|
||||||
resolution:
|
|
||||||
{
|
|
||||||
integrity: sha512-XuC6rDl8yOUrctN1nUe5fngPhmq+zhkUvKZVRCUOrlSn5UdLYH0OjrLJl7h8DQdxcAzZw0Oiw+PQFNOBuL42hg==,
|
|
||||||
}
|
|
||||||
engines: { node: ">=16", pnpm: ">=7" }
|
|
||||||
|
|
||||||
axios@1.6.8:
|
axios@1.6.8:
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
|
@ -1659,12 +1649,6 @@ packages:
|
||||||
engines: { node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7 }
|
engines: { node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7 }
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
build-url-ts@6.1.7:
|
|
||||||
resolution:
|
|
||||||
{
|
|
||||||
integrity: sha512-KU8hfHxEpBTvoJA4XLiL88JiJN6U0SIVtnXKMSKgxf2T+bP3tDlzd/WIl/dthi+01YXeS49yUxkL3JXyqPdIAw==,
|
|
||||||
}
|
|
||||||
|
|
||||||
callsites@3.1.0:
|
callsites@3.1.0:
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
|
@ -2133,12 +2117,6 @@ packages:
|
||||||
integrity: sha512-/sXbVCWayk6GDVg3ctOX6nxaVj7So40FcFAnWlWGNAB1LpYKcV5Cd10APjPjW80O7zYW2MsjBV4zZ7IZO5fVow==,
|
integrity: sha512-/sXbVCWayk6GDVg3ctOX6nxaVj7So40FcFAnWlWGNAB1LpYKcV5Cd10APjPjW80O7zYW2MsjBV4zZ7IZO5fVow==,
|
||||||
}
|
}
|
||||||
|
|
||||||
http-status-codes@2.3.0:
|
|
||||||
resolution:
|
|
||||||
{
|
|
||||||
integrity: sha512-RJ8XvFvpPM/Dmc5SV+dC4y5PCeOhT3x1Hq0NU3rjGeg5a/CqlhZ7uudknPwZFz4aeAXDcbAyaeP7GAo9lvngtA==,
|
|
||||||
}
|
|
||||||
|
|
||||||
https-proxy-agent@5.0.1:
|
https-proxy-agent@5.0.1:
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
|
@ -2913,12 +2891,6 @@ packages:
|
||||||
integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==,
|
integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==,
|
||||||
}
|
}
|
||||||
|
|
||||||
querystringify@2.2.0:
|
|
||||||
resolution:
|
|
||||||
{
|
|
||||||
integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==,
|
|
||||||
}
|
|
||||||
|
|
||||||
react-dom@18.3.1:
|
react-dom@18.3.1:
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
|
@ -3080,12 +3052,6 @@ packages:
|
||||||
integrity: sha512-z3tJrAs2kIs1AqIIy6pzHmAHlF1hWQ+OdY4/hv+Wxe35EhyLKcajL33iUEn3ScxtFox9nUvRufR/Zre8Q08H/g==,
|
integrity: sha512-z3tJrAs2kIs1AqIIy6pzHmAHlF1hWQ+OdY4/hv+Wxe35EhyLKcajL33iUEn3ScxtFox9nUvRufR/Zre8Q08H/g==,
|
||||||
}
|
}
|
||||||
|
|
||||||
requires-port@1.0.0:
|
|
||||||
resolution:
|
|
||||||
{
|
|
||||||
integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==,
|
|
||||||
}
|
|
||||||
|
|
||||||
reselect@4.1.8:
|
reselect@4.1.8:
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
|
@ -3390,12 +3356,6 @@ packages:
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
browserslist: ">= 4.21.0"
|
browserslist: ">= 4.21.0"
|
||||||
|
|
||||||
url-parse@1.5.10:
|
|
||||||
resolution:
|
|
||||||
{
|
|
||||||
integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==,
|
|
||||||
}
|
|
||||||
|
|
||||||
vfile-message@4.0.2:
|
vfile-message@4.0.2:
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
|
@ -4455,16 +4415,6 @@ snapshots:
|
||||||
|
|
||||||
asynckit@0.4.0: {}
|
asynckit@0.4.0: {}
|
||||||
|
|
||||||
axios-tauri-api-adapter@0.2.1:
|
|
||||||
dependencies:
|
|
||||||
"@tauri-apps/api": 1.5.4
|
|
||||||
axios: 1.6.8
|
|
||||||
build-url-ts: 6.1.7
|
|
||||||
http-status-codes: 2.3.0
|
|
||||||
url-parse: 1.5.10
|
|
||||||
transitivePeerDependencies:
|
|
||||||
- debug
|
|
||||||
|
|
||||||
axios@1.6.8:
|
axios@1.6.8:
|
||||||
dependencies:
|
dependencies:
|
||||||
follow-redirects: 1.15.6
|
follow-redirects: 1.15.6
|
||||||
|
@ -4496,8 +4446,6 @@ snapshots:
|
||||||
node-releases: 2.0.14
|
node-releases: 2.0.14
|
||||||
update-browserslist-db: 1.0.15(browserslist@4.23.0)
|
update-browserslist-db: 1.0.15(browserslist@4.23.0)
|
||||||
|
|
||||||
build-url-ts@6.1.7: {}
|
|
||||||
|
|
||||||
callsites@3.1.0: {}
|
callsites@3.1.0: {}
|
||||||
|
|
||||||
camelcase@6.3.0: {}
|
camelcase@6.3.0: {}
|
||||||
|
@ -4774,8 +4722,6 @@ snapshots:
|
||||||
|
|
||||||
html-url-attributes@3.0.0: {}
|
html-url-attributes@3.0.0: {}
|
||||||
|
|
||||||
http-status-codes@2.3.0: {}
|
|
||||||
|
|
||||||
https-proxy-agent@5.0.1:
|
https-proxy-agent@5.0.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
agent-base: 6.0.2
|
agent-base: 6.0.2
|
||||||
|
@ -5293,8 +5239,6 @@ snapshots:
|
||||||
end-of-stream: 1.4.4
|
end-of-stream: 1.4.4
|
||||||
once: 1.4.0
|
once: 1.4.0
|
||||||
|
|
||||||
querystringify@2.2.0: {}
|
|
||||||
|
|
||||||
react-dom@18.3.1(react@18.3.1):
|
react-dom@18.3.1(react@18.3.1):
|
||||||
dependencies:
|
dependencies:
|
||||||
loose-envify: 1.4.0
|
loose-envify: 1.4.0
|
||||||
|
@ -5404,8 +5348,6 @@ snapshots:
|
||||||
unified: 11.0.4
|
unified: 11.0.4
|
||||||
vfile: 6.0.1
|
vfile: 6.0.1
|
||||||
|
|
||||||
requires-port@1.0.0: {}
|
|
||||||
|
|
||||||
reselect@4.1.8: {}
|
reselect@4.1.8: {}
|
||||||
|
|
||||||
resize-observer-polyfill@1.5.1: {}
|
resize-observer-polyfill@1.5.1: {}
|
||||||
|
@ -5581,11 +5523,6 @@ snapshots:
|
||||||
escalade: 3.1.2
|
escalade: 3.1.2
|
||||||
picocolors: 1.0.0
|
picocolors: 1.0.0
|
||||||
|
|
||||||
url-parse@1.5.10:
|
|
||||||
dependencies:
|
|
||||||
querystringify: 2.2.0
|
|
||||||
requires-port: 1.0.0
|
|
||||||
|
|
||||||
vfile-message@4.0.2:
|
vfile-message@4.0.2:
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/unist": 3.0.2
|
"@types/unist": 3.0.2
|
||||||
|
|
|
@ -38,10 +38,6 @@
|
||||||
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEQyOEMyRjBCQkVGOUJEREYKUldUZnZmbStDeStNMHU5Mmo1N24xQXZwSVRYbXA2NUpzZE5oVzlqeS9Bc0t6RVV4MmtwVjBZaHgK"
|
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEQyOEMyRjBCQkVGOUJEREYKUldUZnZmbStDeStNMHU5Mmo1N24xQXZwSVRYbXA2NUpzZE5oVzlqeS9Bc0t6RVV4MmtwVjBZaHgK"
|
||||||
},
|
},
|
||||||
"allowlist": {
|
"allowlist": {
|
||||||
"http": {
|
|
||||||
"all": true,
|
|
||||||
"scope": ["http://**", "http://**"]
|
|
||||||
},
|
|
||||||
"shell": {
|
"shell": {
|
||||||
"all": true
|
"all": true
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import axiosTauriApiAdapter from "axios-tauri-api-adapter";
|
|
||||||
import axios, { AxiosInstance } from "axios";
|
import axios, { AxiosInstance } from "axios";
|
||||||
import { getClashInfo } from "./cmds";
|
import { getClashInfo } from "./cmds";
|
||||||
|
|
||||||
|
@ -26,7 +25,6 @@ export const getAxios = async (force: boolean = false) => {
|
||||||
} catch {}
|
} catch {}
|
||||||
|
|
||||||
axiosIns = axios.create({
|
axiosIns = axios.create({
|
||||||
adapter: axiosTauriApiAdapter,
|
|
||||||
baseURL: `http://${server}`,
|
baseURL: `http://${server}`,
|
||||||
headers: secret ? { Authorization: `Bearer ${secret}` } : {},
|
headers: secret ? { Authorization: `Bearer ${secret}` } : {},
|
||||||
timeout: 15000,
|
timeout: 15000,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user