mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-16 04:35:42 +00:00
临时回滚enka的proxy能力,后续改为按需引入依赖
This commit is contained in:
parent
96044e5da0
commit
f1c46510bd
@ -1,6 +1,6 @@
|
|||||||
import fetch from 'node-fetch'
|
import fetch from 'node-fetch'
|
||||||
import EnkaData from './enka-data.js'
|
import EnkaData from './enka-data.js'
|
||||||
import HttpsProxyAgent from "https-proxy-agent";
|
//import HttpsProxyAgent from "https-proxy-agent";
|
||||||
let Enka = {
|
let Enka = {
|
||||||
key: 'enka',
|
key: 'enka',
|
||||||
cd: 5,
|
cd: 5,
|
||||||
@ -13,7 +13,7 @@ let Enka = {
|
|||||||
}
|
}
|
||||||
let config = { headers: { 'User-Agent': diyCfg?.enkaApi?.userAgent || sysCfg.enkaApi.userAgent } }
|
let config = { headers: { 'User-Agent': diyCfg?.enkaApi?.userAgent || sysCfg.enkaApi.userAgent } }
|
||||||
if (diyCfg?.enkaApi?.proxyAgent){
|
if (diyCfg?.enkaApi?.proxyAgent){
|
||||||
config.agent=new HttpsProxyAgent(diyCfg.enkaApi.proxyAgent)
|
// config.agent=new HttpsProxyAgent(diyCfg.enkaApi.proxyAgent)
|
||||||
}
|
}
|
||||||
let req = await fetch(api, config)
|
let req = await fetch(api, config)
|
||||||
let data = await req.json()
|
let data = await req.json()
|
||||||
|
Loading…
Reference in New Issue
Block a user