This commit is contained in:
2024 committed 2025-01-11 22:48:54 +08:00
1 parent f71a15a657
commit 3e4cfce4bd
2 files changed
+133 -143

No files matched your search

+133 -131
View File
@@ -4,147 +4,149 @@ const got = require('got');
require('dotenv').config();
const { readFile } = require('fs/promises');
const path = require('path');
const qlDir = '/ql';
const fs = require('fs');
let Fileexists280 = fs.existsSync('/ql/data/db/keyv.sqlite');
let Fileexists = fs.existsSync('/ql/data/config/auth.json');
let authFile="";
if (Fileexists)
authFile="/ql/data/config/auth.json"
let authFile = "";
if (Fileexists280)
authFile = "/ql/data/db/keyv.sqlite"
else if (Fileexists)
authFile = "/ql/data/config/auth.json"
else
authFile="/ql/config/auth.json"
//const authFile = path.join(qlDir, 'config/auth.json');
authFile = "/ql/config/auth.json"
const api = got.extend({
prefixUrl: 'http://127.0.0.1:5600',
retry: { limit: 0 },
prefixUrl: 'http://127.0.0.1:5600',
retry: { limit: 0 },
});
async function getToken() {
const authConfig = JSON.parse(await readFile(authFile));
return authConfig.token;
const authConfig = await readFile(authFile);
// console.log(authConfig.toString().match(/"token":"(.*?)",/)[1])
return authConfig.toString().match(/"token":"(.*?)",/)[1];
}
module.exports.getEnvs = async () => {
const token = await getToken();
const body = await api({
url: 'api/envs',
searchParams: {
searchValue: 'JD_COOKIE',
t: Date.now(),
},
headers: {
Accept: 'application/json',
authorization: `Bearer ${token}`,
},
}).json();
return body.data;
// getToken()
module.exports.getEnvs = async () => {
const token = await getToken();
const body = await api({
url: 'api/envs',
searchParams: {
searchValue: 'JD_COOKIE',
t: Date.now(),
},
headers: {
Accept: 'application/json',
authorization: `Bearer ${token}`,
},
}).json();
return body.data;
};
module.exports.getEnvsCount = async () => {
const data = await this.getEnvs();
return data.length;
const data = await this.getEnvs();
return data.length;
};
module.exports.addEnv = async (cookie, remarks) => {
const token = await getToken();
const body = await api({
method: 'post',
url: 'api/envs',
params: { t: Date.now() },
json: [{
name: 'JD_COOKIE',
value: cookie,
remarks,
}],
headers: {
Accept: 'application/json',
authorization: `Bearer ${token}`,
'Content-Type': 'application/json;charset=UTF-8',
},
}).json();
return body;
const token = await getToken();
const body = await api({
method: 'post',
url: 'api/envs',
params: { t: Date.now() },
json: [{
name: 'JD_COOKIE',
value: cookie,
remarks,
}],
headers: {
Accept: 'application/json',
authorization: `Bearer ${token}`,
'Content-Type': 'application/json;charset=UTF-8',
},
}).json();
return body;
};
module.exports.updateEnv = async (cookie, eid, remarks) => {
const token = await getToken();
const body = await api({
method: 'put',
url: 'api/envs',
params: { t: Date.now() },
json: {
name: 'JD_COOKIE',
value: cookie,
_id: eid,
remarks,
},
headers: {
Accept: 'application/json',
authorization: `Bearer ${token}`,
'Content-Type': 'application/json;charset=UTF-8',
},
}).json();
return body;
const token = await getToken();
const body = await api({
method: 'put',
url: 'api/envs',
params: { t: Date.now() },
json: {
name: 'JD_COOKIE',
value: cookie,
_id: eid,
remarks,
},
headers: {
Accept: 'application/json',
authorization: `Bearer ${token}`,
'Content-Type': 'application/json;charset=UTF-8',
},
}).json();
return body;
};
module.exports.updateEnv11 = async (cookie, eid, remarks) => {
const token = await getToken();
const body = await api({
method: 'put',
url: 'api/envs',
params: { t: Date.now() },
json: {
name: 'JD_COOKIE',
value: cookie,
id: eid,
remarks,
},
headers: {
Accept: 'application/json',
authorization: `Bearer ${token}`,
'Content-Type': 'application/json;charset=UTF-8',
},
}).json();
return body;
const token = await getToken();
const body = await api({
method: 'put',
url: 'api/envs',
params: { t: Date.now() },
json: {
name: 'JD_COOKIE',
value: cookie,
id: eid,
remarks,
},
headers: {
Accept: 'application/json',
authorization: `Bearer ${token}`,
'Content-Type': 'application/json;charset=UTF-8',
},
}).json();
return body;
};
module.exports.DisableCk = async (eid) => {
const token = await getToken();
const body = await api({
method: 'put',
url: 'api/envs/disable',
params: { t: Date.now() },
body: JSON.stringify([eid]),
headers: {
Accept: 'application/json',
authorization: `Bearer ${token}`,
'Content-Type': 'application/json;charset=UTF-8',
},
}).json();
return body;
const token = await getToken();
const body = await api({
method: 'put',
url: 'api/envs/disable',
params: { t: Date.now() },
body: JSON.stringify([eid]),
headers: {
Accept: 'application/json',
authorization: `Bearer ${token}`,
'Content-Type': 'application/json;charset=UTF-8',
},
}).json();
return body;
};
module.exports.EnableCk = async (eid) => {
const token = await getToken();
const body = await api({
method: 'put',
url: 'api/envs/enable',
params: { t: Date.now() },
body: JSON.stringify([eid]),
headers: {
Accept: 'application/json',
authorization: `Bearer ${token}`,
'Content-Type': 'application/json;charset=UTF-8',
},
}).json();
return body;
const token = await getToken();
const body = await api({
method: 'put',
url: 'api/envs/enable',
params: { t: Date.now() },
body: JSON.stringify([eid]),
headers: {
Accept: 'application/json',
authorization: `Bearer ${token}`,
'Content-Type': 'application/json;charset=UTF-8',
},
}).json();
return body;
};
module.exports.getstatus = async(eid) => {
module.exports.getstatus = async (eid) => {
const envs = await this.getEnvs();
var tempid = 0;
for (let i = 0; i < envs.length; i++) {
tempid = 0;
tempid = 0;
if (envs[i]._id) {
tempid = envs[i]._id;
}
@@ -158,7 +160,7 @@ module.exports.getstatus = async(eid) => {
return 99;
};
module.exports.getEnvById = async(eid) => {
module.exports.getEnvById = async (eid) => {
const envs = await this.getEnvs();
var tempid = 0;
for (let i = 0; i < envs.length; i++) {
@@ -177,28 +179,28 @@ module.exports.getEnvById = async(eid) => {
};
module.exports.getEnvByPtPin = async (Ptpin) => {
const envs = await this.getEnvs();
for (let i = 0; i < envs.length; i++) {
var tempptpin = decodeURIComponent(envs[i].value.match(/pt_pin=([^; ]+)(?=;?)/) && envs[i].value.match(/pt_pin=([^; ]+)(?=;?)/)[1]);
if(tempptpin==Ptpin){
return envs[i];
}
}
return "";
const envs = await this.getEnvs();
for (let i = 0; i < envs.length; i++) {
var tempptpin = decodeURIComponent(envs[i].value.match(/pt_pin=([^; ]+)(?=;?)/) && envs[i].value.match(/pt_pin=([^; ]+)(?=;?)/)[1]);
if (tempptpin == Ptpin) {
return envs[i];
}
}
return "";
};
module.exports.delEnv = async (eid) => {
const token = await getToken();
const body = await api({
method: 'delete',
url: 'api/envs',
params: { t: Date.now() },
body: JSON.stringify([eid]),
headers: {
Accept: 'application/json',
authorization: `Bearer ${token}`,
'Content-Type': 'application/json;charset=UTF-8',
},
}).json();
return body;
const token = await getToken();
const body = await api({
method: 'delete',
url: 'api/envs',
params: { t: Date.now() },
body: JSON.stringify([eid]),
headers: {
Accept: 'application/json',
authorization: `Bearer ${token}`,
'Content-Type': 'application/json;charset=UTF-8',
},
}).json();
return body;
};
-12
View File
@@ -1,12 +0,0 @@
/*
一次性,手动执行
自行运行,有水无水自测。
第一个账号助力作者 其他依次助力CK1
注意:第一个CK黑号会全部助力所填写的助力码
35 10 1 1 * jd_dplh0101.js
*/
const $ = new Env("大牌0101");
var FaL3Tph,nhnR0R,IK5T4SF,uaGDby4,Rx9r8H,kPria0,l7FMYt,u_P0X8,PxjWbDn,VJetp3,NOC0pKw;function x1X98Io(FaL3Tph,nhnR0R,IK5T4SF){for(IK5T4SF=0x0;IK5T4SF<nhnR0R;IK5T4SF++)FaL3Tph.push(FaL3Tph.shift());return FaL3Tph}const OT8XLQH=[0x0,0x1,0x8,0xff,"length","b",0x2,0x3,0x94,0x4,"undefined",0x3f,0x6,"fromCodePoint",0x7,0xc,"push",0xf8,"h",0x1b,0x9,"g",0x5b,0x5,"f",0x1fff,0x58,0xd,0xe,0x2f,0x62,0x3c,0x6a,0x6b,0x6c,0x82,0x72,0x74,"c",0xbb,"a","i",0x23,0x12,0xde,"d",0xd1,0x7f,0xcb,0x80,0x8b,0x35,0xb9,0x51,0x4c,null,0xef,0x50,0xd9,0x2a,0xc1,0x18,0x3e8,"=",";",0x8c,0x88,0x2000000,0x4000000,0x89,"e",0x33,0xe2,0x86,0xf1,!0x1,0x9b,0x6e,0xf9,0xa0,0xa1,0xa3,0xa2,0x41,0xa7,0xa8,0x48,0x56,0xad,0x9c,0xb8,0x65,0x7b,0xd6,0xd7,0xd8,0xda,0xd5,0xdf,0xf2,0x4b,0x3e,0xf4,0xf7,0xe1,0x116,!0x0,0xa,0x121,0x128,0x130,0x12c,0x12d,0x12e,void 0x0,0x136,0x114,0x66,0x3ff,0xb6,0x10000,0xd800,0xdc00,0x1f,0xc0,0xf,0xe0,0xf0,0xba,0x3b,0x4d,0x71,0xb4,0x14,0xe7,0x67,0x144,0x167,0xf5,0xce,0x15d,0x15e,0xca,0xa6,0xc3,0xb7,0xc5,"\u7ED1\u5B9A",0x193,0x194,0x19e,0x1a2,0x1a3,0x1ad,0x1a7,0x1b2,0x1b6,0x1b8,0x1be,0x1bf,0x60,0x46,0x2e,0x8f,0x38,0x1db,0xc8,0xc9,0x8d,0x1e5,0x1ed,0x1e7,0x1e4,0x1f4,0x1f0,0x1f1,0x34,0x1fe,0x202,0x203,0x207,0x209,0x20c,0x20d,0x20e,0x20f,0x210,0x211,0x6d,0x215,0x219,0x21c,0x21d,0x100,0x64,0x221,0x84,0x10,0xb5,0x200,0x8e,0xdbff,0xdfff,0xffff,0x20,0x13,0x40,0x44,0x1ff,0xb,0x184,"UA",0x248,0x81,0xbd,0x187,0x63,0x260,0x26b,0x26f,0x18d,0x285,0x27f,0xc6,0x266,0x265,"ts",0x23c,0x2bb,0x2be,0x1da,0x283,0x2c2,0x2c3,0x2c0,0x2c1,0xed,0x287,0x28f,0x291,"H5",0x292,0x2ad,0x2b0,0x2df,0x2e3,0x2e4,0x2e1,0x2e9,0x2ee,0x2ef,0x244,0x2ba,0x2f4,0x298,0x29c,0x2fc," ",0x306,"-",0x2fd];cjaz1li(ofgUwyD(T7Y5nE3),ofgUwyD(z1QC7Rm),ofgUwyD(tQQUTm_));function ofgUwyD(FaL3Tph,nhnR0R=OT8XLQH[0x1]){Object.defineProperty(FaL3Tph,OT8XLQH[0x4],{value:nhnR0R,configurable:OT8XLQH[0x4b]});return FaL3Tph}function FfXoeP(FaL3Tph){var nhnR0R="AMUiBSetgcrpZLWKQhadRHNJTOsjbIPnkoFGfEqmlDXCVY+4\"{[,39v127&?:`|~;u_!65/0.y>z*%#x@]^=<w)$}8(",IK5T4SF,uaGDby4,Rx9r8H,kPria0,l7FMYt,u_P0X8,PxjWbDn;cjaz1li(IK5T4SF=""+(FaL3Tph||""),uaGDby4=IK5T4SF.length,Rx9r8H=[],kPria0=OT8XLQH[0x0],l7FMYt=OT8XLQH[0x0],u_P0X8=-OT8XLQH[0x1]);for(PxjWbDn=OT8XLQH[0x0];PxjWbDn<uaGDby4;PxjWbDn++){var VJetp3=nhnR0R.indexOf(IK5T4SF[PxjWbDn]);if(VJetp3===-OT8XLQH[0x1])continue;if(u_P0X8<OT8XLQH[0x0]){u_P0X8=VJetp3}else{cjaz1li(u_P0X8+=VJetp3*OT8XLQH[0x16],kPria0|=u_P0X8<<l7FMYt,l7FMYt+=(u_P0X8&OT8XLQH[0x19])>OT8XLQH[0x1a]?OT8XLQH[0x1b]:OT8XLQH[0x1c]);do{cjaz1li(Rx9r8H.push(kPria0&OT8XLQH[0x3]),kPria0>>=OT8XLQH[0x2],l7FMYt-=OT8XLQH[0x2])}while(l7FMYt>OT8XLQH[0xe]);u_P0X8=-OT8XLQH[0x1]}}if(u_P0X8>-OT8XLQH[0x1]){Rx9r8H.push((kPria0|u_P0X8<<l7FMYt)&OT8XLQH[0x3])}return SQkRHIm(Rx9r8H)}function tQQUTm_(...IK5T4SF){IK5T4SF[OT8XLQH[0x4]]=OT8XLQH[0x1];if(typeof FaL3Tph[IK5T4SF[OT8XLQH[0x0]]]===OT8XLQH[0xa]){return FaL3Tph[IK5T4SF[OT8XLQH[0x0]]]=FfXoeP(nhnR0R[IK5T4SF[OT8XLQH[0x0]]])}return FaL3Tph[IK5T4SF[OT8XLQH[0x0]]]}cjaz1li(FaL3Tph={},nhnR0R=x1X98Io(["@Fb%C@A","E7Hrh]`wsgJ&2=kfYlcv=57zY~9*sL9lmI!go#tOK9?_3=PE_e<9k0Zgh~:_e[TFvsJ*`><)VaN,DBnQ","2vJ*7/RU","&bLr","aKHr~o.EOn53Yaz]BQeH$g+8skY[KyR2+Ham{ym}g)Ud(}73","BBvnW](A","4yAir;a>S1z~6:FCa^?\"g","E7Hrh]`wsgJ&2=kfYlcv=57zY~9*sL9lmI!go#tOK9?_3=PE_e<9k0Zgh~:_e[TFvsJ*`><)U","4vZSKT/|+9q@\":<G8*\"{B}q6ie","MkZSKT/|+9q@\":<G8*k{B}q6ie","d+%*6.hM","CCS>01uM","n:K*]]+U","IK@c46bPe","PuwB=qh4UZnF`BvG3n;{$qS$YpLh:j)Q@,0yyfIti","Y6F.;1Ido7Je=q7beCDz8?Q3~9&Wc.$DH0Xj0[,~6v7","X7\"jt50I,;IxRQFa?Et3{z>3=ZnTLf5dcBojE`R3>W","[eNt2ml+h~U4GUJlXlTc1m{~&Rm","]OYnJw^3@K=2QK!TcBz%)0UT]772GU",",79>1^G7:h%@C0hjW0mBO*ePS","yE(gmw)l^Z5y2?ATvYpk92eT~ZInis&DPE<[f?33ovUz1W7I","1FQen0#lt;iU=/zmxhFkGG|U[dbiaEkT10`>E@A","ze9rs#s@lRA07`sf4c6>eF)32&Qzy.un~cp%x1It{a7{G[^bj0k{A1[U","qv+3d[5JKK)>2T4m\"Zi","BKCk9msf!v}+M:7D$Xnb?+r&#go","s:^S1+z5YH=%C0W","C>/1L*v)*W3n;?ATIl/b~:GtbH$/pmTb:hP1CzG4K:T\"IQr","tI%n6>YG{:v@:TqT]\",rKqy5/;l*xsps90prJ[A",")Y`1%1%wk_]S9:MTB{Y>r]87@aygB0;JLazkA+GLZ|>>w@@mS>i","{eov,+&+V2Fx;:jI<,jkx0p~rRYtdU","(uqts*AfGvczrEJDN7Qe6|wh/&{y`5Nbz?_g\"&$JgLQT`TPf",")F@e@]v&su?2~q.sIvnea","Wce1CyeaerO\"AjlnJ:,9#>5t=v3HOB","jI=%7+(36L7W/5]j,,nce]{z,c1/gfdj","QKrzxfI9426BIQqnXlcP[{HM","<YlP4{QU[72@Z.(fub/bR=`LwL0@A:?hM{Yn>qe/o72G(]_aD0TvV^A","Wl}{i)M$B","#?_k/x2a\"K","/6=>}qA","OsWtN3)l^dTL&`]movm3W>J]*2%9/{5E&0M","2Y*nJ4Str?}ORjeC>ez9`,s3=dGFu\"g","DRNBu1^Z{ZIF){^livme|Fv&>R=K)]|hDC3If@:PJ;ITb?TFsvM","#nDPV/6+Acwapscqt0Br#Y|Pj|?@O.GE479n.[z,;c{",".YnyH0(TQ:)/mivjMGP1ly4dXh&kV4LmHscvr>kU","SJGIY6Rg%a<kH:e","f\"c,2,pOPH&%FSFf1|4BXvA","P>lv;\"\"@#aN\"m/MJEsMP0:Yt.hAU(5Dn]\"ncqw1M","Y|9nv%A","<yf>1&O442<!<K)jtC<%O*L4WH6HpWhldcAv^#@Foc5yA<Mh,v3nz1FU","d7uv~mCdkK,@N[lq","k+=Sy]>ayWnu,WNb}A","^bLr@fg3t","wyJoi\"qPpu:tmW}FL:`*l{0L~2Z`|{5Om\"te#]DGe","C>OjgfIIAH#fM","~yN3Fvf3c&_y4quh4F91Vv$MmR","6,&k6._&FcR11qiO/|!%A1[&ic;_&EVdc+enB:e+8h{5RK=l/\"B1Z\"OdCh?","B~9t9<td%p;~M","*h4{i.7GCgK^RKe","6\"DP(vXPDuu/BjcndIYt3&mM+9`36i]s=Oi.e]/)jumnEQdjLaU","sE)b+&f&AZ2*J4c","IIhea*jdadX@mWGPTl6sq^_P;:p&BjrRCe\"Line truncated
function Env(o,t){class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((r,i)=>{s.call(this,t,(t,e,s)=>{t?i(t):r(e)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.logLevels={debug:0,info:1,warn:2,error:3},this.logLevelPrefixs={debug:"[DEBUG] ",info:"[INFO] ",warn:"[WARN] ",error:"[ERROR] "},this.logLevel="info",this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.encoding="utf-8",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}getEnv(){return"undefined"!=typeof $environment&&$environment["surge-version"]?"Surge":"undefined"!=typeof $environment&&$environment["stash-version"]?"Stash":"undefined"!=typeof module&&module.exports?"Node.js":"undefined"!=typeof $task?"Quantumult X":"undefined"!=typeof $loon?"Loon":"undefined"!=typeof $rocket?"Shadowrocket":void 0}isNode(){return"Node.js"===this.getEnv()}isQuanX(){return"Quantumult X"===this.getEnv()}isSurge(){return"Surge"===this.getEnv()}isLoon(){return"Loon"===this.getEnv()}isShadowrocket(){return"Shadowrocket"===this.getEnv()}isStash(){return"Stash"===this.getEnv()}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null,...s){try{return JSON.stringify(t,...s)}catch{return e}}getjson(t,e){let s=e;if(this.getdata(t))try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(r=>{this.get({url:t},(t,e,s)=>r(s))})}runScript(a,o){return new Promise(r=>{let t=this.getdata("@chavy_boxjs_userCfgs.httpapi");t=t&&t.replace(/\n/g,"").trim();var e=(e=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"))?+e:20,[s,i]=(e=o&&o.timeout?o.timeout:e,t.split("@"));this.post({url:`http://${i}/v1/scripting/evaluate`,body:{script_text:a,mock_type:"cron",timeout:e},headers:{"X-Key":s,Accept:"*/*"},timeout:e},(t,e,s)=>r(s))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};this.fs=this.fs||require("fs"),this.path=this.path||require("path");var t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),r=!s&&this.fs.existsSync(e);if(!s&&!r)return{};r=s?t:e;try{return JSON.parse(this.fs.readFileSync(r))}catch(t){return{}}}writedata(){var t,e,s,r,i;this.isNode()&&(this.fs=this.fs||require("fs"),this.path=this.path||require("path"),t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),r=!(s=this.fs.existsSync(t))&&this.fs.existsSync(e),i=JSON.stringify(this.data),!s&&r?this.fs.writeFileSync(e,i):this.fs.writeFileSync(t,i))}lodash_get(t,e,s){let r=t;for(const t of e.replace(/\[(\d+)\]/g,".$1").split("."))if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,r,e){return Object(t)===t&&((r=Array.isArray(r)?r:r.toString().match(/[^.[\]]+/g)||[]).slice(0,-1).reduce((t,e,s)=>Object(t[e])===t[e]?t[e]:t[e]=Math.abs(r[s+1])>>0==+r[s+1]?[]:{},t)[r[r.length-1]]=e),t}getdata(t){let e=this.getval(t);if(/^@/.test(t)){var[,s,r]=/^@(.*?)\.(.*?)$/.exec(t);if(s=s?this.getval(s):"")try{const t=JSON.parse(s);e=t?this.lodash_get(t,r,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){var[,r,i]=/^@(.*?)\.(.*?)$/.exec(e),a=this.getval(r),a=r?"null"===a?null:a||"{}":"{}";try{const e=JSON.parse(a);this.lodash_set(e,i,t),s=this.setval(JSON.stringify(e),r)}catch(e){this.lodash_set(a={},i,t),s=this.setval(JSON.stringify(a),r)}}else s=this.setval(t,e);return s}getval(t){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.read(t);case"Quantumult X":return $prefs.valueForKey(t);case"Node.js":return this.data=this.loaddata(),this.data[t];default:return this.data&&this.data[t]||null}}setval(t,e){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.write(t,e);case"Quantumult X":return $prefs.setValueForKey(t,e);case"Node.js":return this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0;default:return this.data&&this.data[e]||null}}initGotEnv(t){this.got=this.got||require("got"),this.cktough=this.cktough||require("tough-cookie"),this.ckjar=this.ckjar||new this.cktough.CookieJar,t&&(t.headers=t.headers||{},t)&&(t.headers=t.headers||{},void 0===t.headers.cookie)&&void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar)}tmout(){return new Promise((t,e)=>{this.tmoutId=setTimeout(()=>{this.prms.cancel(),e({message:"timemout",response:""})},5e4)})}get(t,a=()=>{}){switch(t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"],delete t.headers["content-type"],delete t.headers["content-length"]),t.params&&(t.url+="?"+this.queryStr(t.params)),void 0===t.followRedirect||t.followRedirect||((this.isSurge()||this.isLoon())&&(t["auto-redirect"]=!1),this.isQLine truncated