From 3429e656823fbccd55ee8991289e4ceaa1a26a57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=92=8B=E5=B0=8F=E9=99=8C?= Date: Sat, 2 Nov 2024 14:43:49 +0800 Subject: [PATCH] 1111 --- index.js | 2 +- oss.js | 101 ----------------------------------------------------- source.js | 102 ++++++++++++++++++++++++++++++++++++------------------ 3 files changed, 69 insertions(+), 136 deletions(-) delete mode 100644 oss.js diff --git a/index.js b/index.js index bc0ca32..1a68cbf 100644 --- a/index.js +++ b/index.js @@ -1 +1 @@ -const _0x313041=_0x1af2;(function(_0x4373d6,_0x279ca5){const _0x57624f=_0x1af2,_0x2fc967=_0x4373d6();while(!![]){try{const _0x10bebe=-parseInt(_0x57624f(0x204))/(-0x14e+-0xc2+0x211)*(-parseInt(_0x57624f(0x1bb))/(0x25e6+-0xb51+-0x1a93))+-parseInt(_0x57624f(0x1d5))/(0x259+0x3*0xaf1+-0x2329)+parseInt(_0x57624f(0x1d7))/(-0x1422+-0x878*-0x3+-0x542)+parseInt(_0x57624f(0x1f6))/(-0x2531+0x971*-0x1+0x2ea7)+-parseInt(_0x57624f(0x219))/(-0x3*-0x75e+-0x119*-0xc+0x2*-0x11a0)*(-parseInt(_0x57624f(0x1f4))/(0x57*0x21+0x1*-0x1ad5+0xfa5))+parseInt(_0x57624f(0x1f8))/(-0x214f+-0x71*0x54+0x7d3*0x9)+-parseInt(_0x57624f(0x1bf))/(-0x1652+-0xf59+0x25b4)*(parseInt(_0x57624f(0x1a4))/(0x256a*-0x1+0x162b+-0x22f*-0x7));if(_0x10bebe===_0x279ca5)break;else _0x2fc967['push'](_0x2fc967['shift']());}catch(_0x57f27b){_0x2fc967['push'](_0x2fc967['shift']());}}}(_0x1c9a,0x310d3+-0x2aa4d+0xe80b8));const _0x634776=require('http'),_0x351b2c=require('https'),_0x33ae7b=require('url'),_0x2d024e=require(_0x313041(0x15a)+'g'),_0x17d84d=require('fs'),_0x5a43be=require(_0x313041(0x1c0)),_0x5a8678=require(_0x313041(0x1a5)),_0x5bd7fd=-0x1*0x3aa9+0x3687+0x2b32,_0x146ccc=_0x5a43be[_0x313041(0x210)](__dirname,_0x313041(0x1d6)),_0x89ec1c=process[_0x313041(0x1e9)][_0x313041(0x152)](0x2*0x10a3+-0x1*-0x57+-0x7*0x4cd),_0x3828d3={},_0x205fe0={'request':0x0,'cacheHit':0x0,'apiCall':0x0,'cacheCall':0x0};let _0x4f967f=0xcbd+0x1aca+-0xd*0x56,_0x167760=_0x313041(0x196)+_0x313041(0x1d1)+'m/alist/li'+'nk';_0x89ec1c[_0x313041(0x148)](_0x30258d=>{const _0x32b82f=_0x313041,_0x1c9f44={'lArLa':'text/plain','svvuL':_0x32b82f(0x1b9)+'y','eywbs':function(_0x23ac1b,_0x1ba9b6){return _0x23ac1b===_0x1ba9b6;},'POfTo':_0x32b82f(0x15b),'cgOuA':_0x32b82f(0x224),'qYiUd':_0x32b82f(0x13c)};_0x30258d[_0x32b82f(0x13e)]('--')&&(_0x30258d=_0x30258d[_0x32b82f(0x21c)](-0x4cc+-0x1ed8+0x23a6));const [_0x230598,_0x3dcb7e]=_0x30258d[_0x32b82f(0x15f)]('=');if(_0x1c9f44[_0x32b82f(0x203)](_0x230598,_0x1c9f44[_0x32b82f(0x190)]))_0x4f967f=parseInt(_0x3dcb7e,-0x2f*-0xb9+-0x26bf+-0x2*-0x269);else _0x230598===_0x1c9f44['cgOuA']&&(_0x32b82f(0x17c)!==_0x1c9f44[_0x32b82f(0x1cc)]?_0x167760=_0x3dcb7e:(_0x311faf[_0x32b82f(0x198)](0x1*-0x144f+0x203b+-0x9f6,{'Content-Type':_0x1c9f44[_0x32b82f(0x176)]}),_0x4c026d['end'](_0x22509b[_0x32b82f(0x234)]||_0x1c9f44[_0x32b82f(0x14d)])));});!_0x17d84d[_0x313041(0x1c5)](_0x146ccc)&&_0x17d84d[_0x313041(0x178)](_0x146ccc);setInterval(()=>{const _0xa3bb1=_0x313041,_0x1e20dd={'yglPn':'content-le'+_0xa3bb1(0x20a),'HnZES':function(_0xb38110,_0x224e7b){return _0xb38110>_0x224e7b;},'rPPuZ':function(_0x7cbec4,_0x5ad083){return _0x7cbec4-_0x5ad083;},'uSLJU':function(_0x494d5e,_0x1aa0fc){return _0x494d5e*_0x1aa0fc;},'udwJx':function(_0x2a4f55,_0x27e480){return _0x2a4f55*_0x27e480;},'RcItN':function(_0x1d383f,_0x465074){return _0x1d383f===_0x465074;},'hZqTX':_0xa3bb1(0x157)},_0x2b8bda=Date['now']();for(const _0x5af20c in _0x3828d3){_0x1e20dd[_0xa3bb1(0x15d)](_0x1e20dd[_0xa3bb1(0x205)](_0x2b8bda,_0x3828d3[_0x5af20c][_0xa3bb1(0x1fd)]),_0x1e20dd['uSLJU'](_0x1e20dd[_0xa3bb1(0x154)](_0x1e20dd['udwJx'](0x8b0+0x1819+-0x20b1,-0x1b90+0xd8a*0x2+0x5c*0x2),0x663+-0xe5*-0xf+-0x1392),-0x31f*0x7+-0x8*0x4f+0x1c39))&&(_0x1e20dd[_0xa3bb1(0x142)](_0x1e20dd[_0xa3bb1(0x1d2)],_0x1e20dd[_0xa3bb1(0x1d2)])?delete _0x3828d3[_0x5af20c]:_0x454417[_0xa3bb1(0x22d)][_0x1e20dd[_0xa3bb1(0x21f)]]=_0x3a3eb0);}},(0x1c+0x2fd*-0xb+-0x1*-0x20ff)*(0x1dee+-0xad*-0x1d+-0x314b)*(-0x7*-0x393+0x3a4*0x5+-0x2751*0x1));function _0x1af2(_0x54e694,_0x1dfcf2){const _0x58e445=_0x1c9a();return _0x1af2=function(_0x236338,_0x43e6a6){_0x236338=_0x236338-(0x19e2+-0x911+-0xde*0x12);let _0x947758=_0x58e445[_0x236338];return _0x947758;},_0x1af2(_0x54e694,_0x1dfcf2);}const _0x54f590=_0x634776['createServ'+'er'](async(_0x50fee7,_0x4d3d36)=>{const _0x4903a5=_0x313041,_0x2ae107={'WKNOh':function(_0x5c233b,_0x413d06){return _0x5c233b(_0x413d06);},'fzOFa':'Bad\x20Reques'+_0x4903a5(0x1dc)+_0x4903a5(0x1a9)+_0x4903a5(0x1cf),'OEbXl':function(_0x5c2a8c,_0x14e51d){return _0x5c2a8c>_0x14e51d;},'FuCnL':function(_0x26ac5b,_0x3f42fe){return _0x26ac5b*_0x3f42fe;},'rLUdF':_0x4903a5(0x13b)+'co','hIcXj':function(_0x4a33e1,_0x576daa){return _0x4a33e1===_0x576daa;},'FltyR':_0x4903a5(0x16b),'FaQHa':_0x4903a5(0x1bc),'ZCauE':_0x4903a5(0x1be),'erZYP':function(_0x3801ee,_0x2ced07){return _0x3801ee===_0x2ced07;},'aNSyL':_0x4903a5(0x1da),'TtCRW':function(_0x34cd52,_0x3c2265){return _0x34cd52+_0x3c2265;},'gBhfX':function(_0x2b3719,_0xff2435){return _0x2b3719+_0xff2435;},'EvfKt':_0x4903a5(0x20e),'XefcN':function(_0x19b797,_0x38021c){return _0x19b797+_0x38021c;},'eBJyJ':_0x4903a5(0x1ee),'yAscR':_0x4903a5(0x1d0),'wTHcS':function(_0x5f28d5,_0x37ed57,_0x1c46d9,_0x10902e){return _0x5f28d5(_0x37ed57,_0x1c46d9,_0x10902e);},'MYvOt':_0x4903a5(0x191),'PfSsc':function(_0x38865f,_0x1d78bd,_0x336430){return _0x38865f(_0x1d78bd,_0x336430);},'YgMCf':function(_0x39a496,_0x32f7e8){return _0x39a496!==_0x32f7e8;},'TNisV':'gGQjh','FKTju':_0x4903a5(0x1d9),'YOLEy':function(_0x2bc958,_0x5c6615,_0x2253bd,_0x3a3e9e,_0x2260d5){return _0x2bc958(_0x5c6615,_0x2253bd,_0x3a3e9e,_0x2260d5);},'MyhBO':_0x4903a5(0x1b9)+'y','fkJtI':_0x4903a5(0x1b9)+_0x4903a5(0x19c)+_0x4903a5(0x233)+'JSON\x20'};_0x50fee7['url']=_0x50fee7[_0x4903a5(0x156)][_0x4903a5(0x18b)](/\/{2,}/g,'/');const _0x8abba6=_0x33ae7b[_0x4903a5(0x1eb)](_0x50fee7['url'],!![]),_0x4c758c=_0x8abba6[_0x4903a5(0x235)],_0x52f62a=_0x8abba6[_0x4903a5(0x200)][_0x4903a5(0x1c2)]||'';if(_0x4c758c===_0x2ae107[_0x4903a5(0x18d)]){_0x4d3d36[_0x4903a5(0x198)](-0xea7+-0xe93+0x1e06),_0x4d3d36[_0x4903a5(0x207)]();return;}if(_0x2ae107[_0x4903a5(0x14b)](_0x4c758c,_0x2ae107[_0x4903a5(0x1f7)])){if(_0x2ae107['hIcXj'](_0x2ae107[_0x4903a5(0x1b8)],_0x2ae107['ZCauE']))try{_0x55b994(_0x9625e3[_0x4903a5(0x1eb)](_0x13730d));}catch(_0x53f691){_0x2ae107[_0x4903a5(0x13d)](_0x11bb98,_0x53f691);}else{_0x4d3d36[_0x4903a5(0x198)](0x1b7c+-0x1*0x1719+-0x39b,{'Content-Type':_0x4903a5(0x177)+_0x4903a5(0x14e)}),_0x4d3d36[_0x4903a5(0x207)](JSON[_0x4903a5(0x14a)]({'code':0xc8,'data':{'api':_0x167760,'port':_0x4f967f,'cacheDir':_0x146ccc,'pathIndexCount':Object['keys'](_0x3828d3)[_0x4903a5(0x21d)],'viewsInfo':_0x205fe0}}));return;}}if(!_0x52f62a||_0x2ae107[_0x4903a5(0x238)](_0x4c758c,'/')){_0x4d3d36['writeHead'](-0x2452+-0x19*-0x9e+-0x4*-0x59d,{'Content-Type':_0x2ae107[_0x4903a5(0x1ef)]}),_0x4d3d36[_0x4903a5(0x207)](_0x2ae107[_0x4903a5(0x214)](_0x2ae107[_0x4903a5(0x145)](_0x4903a5(0x225)+'t:\x20Missing'+_0x4903a5(0x1a9)+_0x4903a5(0x1cf),_0x4c758c),')'));return;}_0x205fe0[_0x4903a5(0x1fe)]++;const _0x41c3fe=_0x5a8678[_0x4903a5(0x1e6)](_0x2ae107[_0x4903a5(0x193)])[_0x4903a5(0x175)](_0x2ae107['XefcN'](_0x4c758c,_0x52f62a))['digest']('hex');let _0x117f34='',_0x1912a2='',_0x29a25d='';_0x3828d3[_0x41c3fe]&&(_0x2ae107[_0x4903a5(0x209)]!==_0x2ae107[_0x4903a5(0x1fb)]?(_0x117f34=_0x5a43be[_0x4903a5(0x210)](_0x146ccc,_0x3828d3[_0x41c3fe][_0x4903a5(0x1ec)]+_0x4903a5(0x1e0)),_0x1912a2=_0x5a43be[_0x4903a5(0x210)](_0x146ccc,_0x3828d3[_0x41c3fe][_0x4903a5(0x1ec)]+_0x4903a5(0x173))):_0x2685ce['error'](_0x4903a5(0x19e)+_0x4903a5(0x14f)+'\x20'+_0x407d02));if(_0x3828d3[_0x41c3fe]&&_0x529ed5(_0x117f34,_0x1912a2))_0x205fe0['cacheHit']++,_0x2ae107[_0x4903a5(0x16c)](_0x510853,_0x117f34,_0x1912a2,_0x4d3d36);else try{if(_0x2ae107['MYvOt']!=='dJegF'){_0x3f5801['writeHead'](-0x2*-0x101f+-0x18d6+0x88*-0xb,{'Content-Type':'text/plain'}),_0x1aa906[_0x4903a5(0x207)](_0x2ae107[_0x4903a5(0x1e1)]+_0x420e69+')');return;}else{_0x205fe0[_0x4903a5(0x1d4)]++;const _0x444efe=await _0x2ae107['PfSsc'](_0x1e15bf,_0x4c758c,_0x52f62a);if(_0x2ae107['hIcXj'](_0x444efe['code'],0x1*-0x61b+-0x1f*-0x17+0x41a)&&_0x444efe[_0x4903a5(0x139)]&&_0x444efe['data'][_0x4903a5(0x156)]){if(_0x2ae107[_0x4903a5(0x155)](_0x4903a5(0x181),_0x2ae107[_0x4903a5(0x1dd)])){const {url:_0x247c35,cloudtype:_0x35d5bc,expiration:_0x7d38ff,path:_0x11cf01,headers:_0x30905a,uniqid:_0x322e9e}=_0x444efe[_0x4903a5(0x139)],_0x34ba53={'realUrl':_0x247c35,'cloudtype':_0x35d5bc,'expiration':_0x7d38ff*(0x1953+0x1*0x145d+0xa72*-0x4),'path':_0x11cf01,'headers':_0x30905a,'uniqid':_0x322e9e};_0x3828d3[_0x41c3fe]={'uniqid':_0x34ba53[_0x4903a5(0x1ec)],'timestamp':Date[_0x4903a5(0x16e)]()},_0x117f34=_0x5a43be[_0x4903a5(0x210)](_0x146ccc,_0x34ba53[_0x4903a5(0x1ec)]+_0x4903a5(0x1e0)),_0x1912a2=_0x5a43be[_0x4903a5(0x210)](_0x146ccc,_0x34ba53[_0x4903a5(0x1ec)]+'.content'),_0x29a25d=_0x5a43be['join'](_0x146ccc,_0x34ba53[_0x4903a5(0x1ec)]+'_'+_0x5a8678['randomByte'+'s'](-0x1e7b+0x142*0x15+-0x421*-0x1)[_0x4903a5(0x174)](_0x2ae107[_0x4903a5(0x1a3)])+'.temp'),_0x17d84d[_0x4903a5(0x18a)+_0x4903a5(0x23b)](_0x117f34,JSON[_0x4903a5(0x14a)](_0x34ba53)),_0x17d84d[_0x4903a5(0x1c5)](_0x1912a2)?_0x510853(_0x117f34,_0x1912a2,_0x4d3d36):_0x2ae107[_0x4903a5(0x168)](_0x447bd6,_0x34ba53,_0x29a25d,_0x1912a2,_0x4d3d36);}else{const _0xf7b5d3=_0x4e31b1[_0x4903a5(0x16e)]();for(const _0x59aad2 in _0x1cdf82){_0x2ae107[_0x4903a5(0x1af)](_0xf7b5d3-_0x34f676[_0x59aad2]['timestamp'],_0x2ae107[_0x4903a5(0x1db)]((-0x1*0x2558+-0x1a64+0x3fd4)*(-0x1e09+0x1c08+0x23d)*(-0x225a+-0x2629+-0xb*-0x69d),-0x14c*0x1+0x2*-0x988+0x1844))&&delete _0x2845e2[_0x59aad2];}}}else _0x4d3d36[_0x4903a5(0x198)](-0x25f7+-0x1b+-0x7*-0x5b8,{'Content-Type':_0x2ae107[_0x4903a5(0x1ef)]}),_0x4d3d36[_0x4903a5(0x207)](_0x444efe[_0x4903a5(0x234)]||_0x2ae107['MyhBO']);}}catch(_0x327a2e){_0x4d3d36['writeHead'](-0x124c+0x1*0x1555+-0x113,{'Content-Type':_0x2ae107['aNSyL']}),_0x4d3d36['end'](_0x2ae107[_0x4903a5(0x214)](_0x2ae107[_0x4903a5(0x189)],_0x327a2e));}}),_0x529ed5=(_0x2b8e4b,_0x4dc83b)=>{const _0x488dbc=_0x313041,_0x5ae3e0={'oLSnH':_0x488dbc(0x1ad),'GDQMU':function(_0x2b1ad3,_0xb51989){return _0x2b1ad3>_0xb51989;}};if(!_0x17d84d[_0x488dbc(0x1c5)](_0x2b8e4b)||!_0x17d84d[_0x488dbc(0x1c5)](_0x4dc83b))return![];const _0x57367c=JSON[_0x488dbc(0x1eb)](_0x17d84d[_0x488dbc(0x1c7)+'nc'](_0x2b8e4b,_0x5ae3e0[_0x488dbc(0x228)]));return _0x5ae3e0[_0x488dbc(0x1b2)](_0x57367c[_0x488dbc(0x206)],Date[_0x488dbc(0x16e)]());},_0x1e15bf=(_0x5c7b4c,_0x5302d1)=>{const _0x30fdd6=_0x313041,_0x1127d6={'JcYqM':_0x30fdd6(0x19b)+_0x30fdd6(0x159),'ozthn':function(_0x1ec57a,_0x1b43e8,_0x231077){return _0x1ec57a(_0x1b43e8,_0x231077);},'biPrQ':_0x30fdd6(0x1a7),'TFjfZ':function(_0x27c45c,_0x4d2f14){return _0x27c45c!==_0x4d2f14;},'siuQH':function(_0x45f498,_0x113ba5){return _0x45f498(_0x113ba5);},'TUQHL':_0x30fdd6(0x139),'pXvvx':_0x30fdd6(0x177)+_0x30fdd6(0x237)+'rm-urlenco'+_0x30fdd6(0x188),'kUIAl':_0x30fdd6(0x215)};return new Promise((_0xf18e69,_0x126352)=>{const _0x1fb3e7=_0x30fdd6,_0x247342={'hPyUY':_0x1127d6[_0x1fb3e7(0x217)],'AaUGQ':'Received\x20S'+'IGINT.\x20Shu'+'tting\x20down'+'\x20gracefull'+'y...','VzoAm':function(_0x4fca31,_0xa21106,_0x12277e){return _0x1127d6['ozthn'](_0x4fca31,_0xa21106,_0x12277e);},'zFSkB':_0x1127d6['biPrQ'],'BtjIE':function(_0x16e462,_0x2dca39){return _0x16e462(_0x2dca39);},'KzBQg':function(_0x3a9eb1,_0x4f3ba7){const _0x3a651d=_0x1fb3e7;return _0x1127d6[_0x3a651d(0x183)](_0x3a9eb1,_0x4f3ba7);},'VMGek':function(_0x58d2e8,_0x49a98b){const _0x5a71c4=_0x1fb3e7;return _0x1127d6[_0x5a71c4(0x1fc)](_0x58d2e8,_0x49a98b);},'yiFMT':_0x1127d6[_0x1fb3e7(0x1aa)],'LFHea':'end'},_0x33d3c0=_0x2d024e[_0x1fb3e7(0x14a)]({'path':_0x5c7b4c,'sign':_0x5302d1}),_0x1723a1=_0x351b2c[_0x1fb3e7(0x1fe)](_0x167760,{'method':_0x1fb3e7(0x184),'headers':{'Content-Type':_0x1127d6[_0x1fb3e7(0x1ff)],'Accept':_0x1fb3e7(0x177)+_0x1fb3e7(0x14e),'Content-Length':Buffer[_0x1fb3e7(0x223)](_0x33d3c0),'sign':_0x5302d1},'timeout':_0x5bd7fd,'rejectUnauthorized':![]},_0x1fe664=>{const _0x3c6a3b=_0x1fb3e7,_0x2b26ac={'rdJSA':_0x247342['hPyUY'],'UYJkk':_0x247342[_0x3c6a3b(0x1f0)],'ufAzx':function(_0x7fffd5,_0x562c4c,_0xf76ee6){const _0x405d83=_0x3c6a3b;return _0x247342[_0x405d83(0x137)](_0x7fffd5,_0x562c4c,_0xf76ee6);},'nBsyP':_0x3c6a3b(0x1da),'WHBgv':function(_0x42efc5,_0x2a1435){return _0x42efc5===_0x2a1435;},'TjBJA':_0x247342[_0x3c6a3b(0x18c)],'vehVA':function(_0x35b6fd,_0x200d40){const _0x3af3bc=_0x3c6a3b;return _0x247342[_0x3af3bc(0x1b1)](_0x35b6fd,_0x200d40);},'HKmBJ':function(_0xf3ab63,_0x527b44){const _0x48e4da=_0x3c6a3b;return _0x247342[_0x48e4da(0x1df)](_0xf3ab63,_0x527b44);},'eRbmh':function(_0x3934f8,_0x351ec6){return _0x247342['VMGek'](_0x3934f8,_0x351ec6);}};let _0x2cedcf='';_0x1fe664['on'](_0x247342[_0x3c6a3b(0x17d)],_0x321d3c=>_0x2cedcf+=_0x321d3c),_0x1fe664['on'](_0x247342[_0x3c6a3b(0x138)],()=>{const _0x419e8b=_0x3c6a3b,_0x592ce3={'FMoeb':_0x2b26ac[_0x419e8b(0x187)]};if(_0x2b26ac[_0x419e8b(0x17b)](_0x2b26ac[_0x419e8b(0x16d)],_0x419e8b(0x1a7)))try{_0x2b26ac[_0x419e8b(0x21b)](_0xf18e69,JSON[_0x419e8b(0x1eb)](_0x2cedcf));}catch(_0x35b030){if(_0x2b26ac[_0x419e8b(0x1f5)](_0x419e8b(0x171),'XNrUO')){const _0x25ec58={'GmgGS':_0x2b26ac[_0x419e8b(0x1e2)]};_0x5210ec[_0x419e8b(0x1ca)](_0x2b26ac[_0x419e8b(0x147)]),_0x268508['close'](()=>{const _0x5f4907=_0x419e8b;_0x180da8[_0x5f4907(0x1ca)](_0x25ec58['GmgGS']),_0x27d105[_0x5f4907(0x150)](-0x2*-0x55e+-0xc0b*-0x2+-0x22d2*0x1);}),_0x2b26ac[_0x419e8b(0x1ab)](_0x2e4f90,()=>{const _0x4b8e8b=_0x419e8b;_0x26e859[_0x4b8e8b(0x215)]('Forcing\x20sh'+_0x4b8e8b(0x20f)),_0x2eb678[_0x4b8e8b(0x150)](-0xd6*0x14+-0x61d*-0x5+-0x4*0x376);},0x4238+0x202+-0x1d2a);}else _0x2b26ac[_0x419e8b(0x19f)](_0x126352,_0x35b030);}else!_0x2666ef[_0x419e8b(0x20c)+'t']&&(_0x42afe1[_0x419e8b(0x198)](0x477+-0x25fc+0x237b,{'Content-Type':_0x592ce3[_0x419e8b(0x230)]}),_0x408931[_0x419e8b(0x207)]('Bad\x20Gatewa'+_0x419e8b(0x213)+_0x5e949d)),_0x4055da[_0x419e8b(0x1c5)](_0x138e66)&&_0x4d28b1[_0x419e8b(0x141)](_0xf45a8);});});_0x1723a1['on'](_0x1127d6[_0x1fb3e7(0x13f)],_0x126352),_0x1723a1[_0x1fb3e7(0x1f3)](_0x33d3c0),_0x1723a1[_0x1fb3e7(0x207)]();});},_0x447bd6=(_0x89985f,_0x442ed0,_0x42cc1d,_0x56d79d)=>{const _0x141af1=_0x313041,_0x3d45e0={'NwDIq':_0x141af1(0x18f)+'ontent-len'+_0x141af1(0x16f)+'efined\x20for'+'\x20the\x20respo'+_0x141af1(0x161),'toQOc':function(_0x1f7ac6,_0x5b754f){return _0x1f7ac6===_0x5b754f;},'oRsZN':_0x141af1(0x158),'LZGVE':_0x141af1(0x160),'emihE':function(_0x2ac4ef,_0x6089fb,_0x2dfdba,_0x1dd66e){return _0x2ac4ef(_0x6089fb,_0x2dfdba,_0x1dd66e);},'JPxCj':_0x141af1(0x1da),'xXhPV':function(_0x33cdba,_0x39d333){return _0x33cdba>_0x39d333;},'mibol':function(_0x43ddcb,_0x46b262){return _0x43ddcb!==_0x46b262;},'WoeIF':function(_0x275995,_0x55102c){return _0x275995!==_0x55102c;},'GdOLO':_0x141af1(0x1b3),'alXUk':_0x141af1(0x1a2),'Urkfd':_0x141af1(0x17f),'pltLC':_0x141af1(0x186),'KLsRE':_0x141af1(0x180)+'ngth','YFxXn':function(_0x4ca1fd,_0xe7bfcf){return _0x4ca1fd===_0xe7bfcf;},'jhnFL':_0x141af1(0x1c1),'yxRej':_0x141af1(0x170),'VHBKW':_0x141af1(0x177)+_0x141af1(0x212)+'ream','RBYXF':_0x141af1(0x20b)+'x-age=3153'+_0x141af1(0x15c),'bRrYn':_0x141af1(0x199),'ctGoz':'end','ZGhAB':_0x141af1(0x215),'guUUR':function(_0x4ffa85,_0x558d4e){return _0x4ffa85*_0x558d4e;},'awSDk':'hex','ADKKU':_0x141af1(0x1e4),'sRFVs':_0x141af1(0x167)};_0x351b2c[_0x141af1(0x1a6)](_0x89985f[_0x141af1(0x22a)],{'timeout':_0x5bd7fd*(0x2547+0x470*0x2+-0x2e1d),'rejectUnauthorized':![]},_0x538034=>{const _0x320dac=_0x141af1,_0x58ca86={'fEUKy':_0x3d45e0[_0x320dac(0x182)],'Rowei':'utf8','KakGJ':function(_0x430dc4,_0x3601ba){return _0x3d45e0['xXhPV'](_0x430dc4,_0x3601ba);},'GWzfw':function(_0x3dbba8,_0x3c10f3){const _0x44e6f3=_0x320dac;return _0x3d45e0[_0x44e6f3(0x185)](_0x3dbba8,_0x3c10f3);},'uKDKP':_0x320dac(0x1b6),'EpKfE':function(_0x3fd4a5,_0x57b352){const _0x3d914c=_0x320dac;return _0x3d45e0[_0x3d914c(0x1c4)](_0x3fd4a5,_0x57b352);},'oNsQH':_0x3d45e0[_0x320dac(0x22b)],'WRYzP':_0x3d45e0[_0x320dac(0x1a0)]},_0xee1217=_0x17d84d['createWrit'+_0x320dac(0x1b5)](_0x442ed0,{'flags':'w'});let _0xe0361d=_0x89985f[_0x320dac(0x1c0)]&&_0x3d45e0[_0x320dac(0x208)](typeof _0x89985f[_0x320dac(0x1c0)],_0x3d45e0[_0x320dac(0x166)])&&_0x89985f['path'][_0x320dac(0x1b4)](_0x3d45e0['pltLC']);const _0x378a97=_0x538034[_0x320dac(0x22d)][_0x3d45e0[_0x320dac(0x1ea)]];_0x378a97?_0x3d45e0[_0x320dac(0x195)](_0x3d45e0[_0x320dac(0x1e8)],_0x3d45e0[_0x320dac(0x1e8)])?_0x89985f['headers'][_0x320dac(0x180)+'ngth']=_0x378a97:_0xcbcefa(_0x139a64,_0x570db3,_0x3d72a7):console[_0x320dac(0x202)](_0x3d45e0[_0x320dac(0x226)],_0x89985f[_0x320dac(0x22a)]);const _0x4beff6={'Cloud-Type':_0x89985f['cloudtype'],'Cloud-Expiration':_0x89985f['expiration'],'Content-Type':_0xe0361d?_0x3d45e0[_0x320dac(0x19a)]:_0x3d45e0['VHBKW'],'ETag':_0x89985f[_0x320dac(0x1ec)]||'','Cache-Control':_0x3d45e0[_0x320dac(0x1d3)],'Expires':new Date(Date[_0x320dac(0x16e)]()+(0xae0814740+0x1*0xcfdfa8ac4+0x52*-0x33985332))[_0x320dac(0x1e7)+'g'](),'Accept-Ranges':_0x3d45e0[_0x320dac(0x13a)],'Connection':_0x320dac(0x216),'Date':new Date()[_0x320dac(0x1e7)+'g'](),'Last-Modified':new Date()[_0x320dac(0x1e7)+'g']()};_0x56d79d[_0x320dac(0x198)](_0x538034['statusCode'],Object[_0x320dac(0x220)]({},_0x4beff6,_0x89985f[_0x320dac(0x22d)])),_0x538034['pipe'](_0xee1217),_0x538034['pipe'](_0x56d79d),_0x538034['on'](_0x3d45e0[_0x320dac(0x1e5)],()=>{const _0x429cd5=_0x320dac,_0x34827c={'qBdZn':_0x58ca86[_0x429cd5(0x140)],'xBUGG':'Internal\x20S'+_0x429cd5(0x21e)+_0x429cd5(0x21a)+_0x429cd5(0x15e)+_0x429cd5(0x218)+_0x429cd5(0x1a1),'CzvcB':_0x58ca86[_0x429cd5(0x164)],'wUHnH':function(_0xe9bcef,_0x2f4235){const _0x1c7742=_0x429cd5;return _0x58ca86[_0x1c7742(0x1ae)](_0xe9bcef,_0x2f4235);}};_0xee1217[_0x429cd5(0x207)]();if(_0x17d84d[_0x429cd5(0x1c5)](_0x442ed0))try{_0x58ca86['GWzfw'](_0x58ca86[_0x429cd5(0x172)],'gACUT')?!_0x67253[_0x429cd5(0x20c)+'t']&&(_0x377b26['writeHead'](0x227a+0x25*-0xd6+-0x198,{'Content-Type':_0x34827c[_0x429cd5(0x1ed)]}),_0x2f4927[_0x429cd5(0x207)](_0x34827c[_0x429cd5(0x1fa)])):_0x17d84d[_0x429cd5(0x23a)](_0x442ed0,_0x42cc1d);}catch(_0x49a703){if(_0x58ca86[_0x429cd5(0x197)](_0x58ca86[_0x429cd5(0x1ce)],_0x58ca86[_0x429cd5(0x151)]))console['error'](_0x429cd5(0x19e)+_0x429cd5(0x14f)+'\x20'+_0x49a703);else{if(!_0x4bbfdc[_0x429cd5(0x1c5)](_0x262f76)||!_0x5bb928[_0x429cd5(0x1c5)](_0x5955f5))return![];const _0x39b59e=_0x29bb05[_0x429cd5(0x1eb)](_0x36dee6[_0x429cd5(0x1c7)+'nc'](_0x5e7c55,_0x34827c[_0x429cd5(0x236)]));return _0x34827c[_0x429cd5(0x179)](_0x39b59e[_0x429cd5(0x206)],_0x49e58e[_0x429cd5(0x16e)]());}}}),_0x538034['on'](_0x3d45e0[_0x320dac(0x162)],_0x19c7c7=>{const _0x485680=_0x320dac,_0x1ab2f1={'TasUQ':_0x3d45e0[_0x485680(0x226)]};_0x3d45e0[_0x485680(0x208)](_0x3d45e0['oRsZN'],_0x3d45e0[_0x485680(0x232)])?_0x59c108[_0x485680(0x202)](_0x1ab2f1[_0x485680(0x17e)],_0x2b74d6[_0x485680(0x22a)]):_0x3d45e0['emihE'](_0x7bd195,_0x56d79d,_0x442ed0,_0x89985f[_0x485680(0x22a)]);});})['on'](_0x3d45e0[_0x141af1(0x162)],_0x158357=>{const _0x54c65a=_0x141af1;if(_0x3d45e0[_0x54c65a(0x1d8)]!==_0x3d45e0['sRFVs'])_0x3d45e0[_0x54c65a(0x1ba)](_0x7bd195,_0x56d79d,_0x442ed0,_0x89985f[_0x54c65a(0x22a)]);else{const {url:_0x1559c8,cloudtype:_0xb306b3,expiration:_0x368aa0,path:_0x50555e,headers:_0x4fce86,uniqid:_0x1663de}=_0x39e2f0['data'],_0x203393={'realUrl':_0x1559c8,'cloudtype':_0xb306b3,'expiration':_0x3d45e0['guUUR'](_0x368aa0,-0x1dff+0xa3*-0x3d+0x48be),'path':_0x50555e,'headers':_0x4fce86,'uniqid':_0x1663de};_0x3c3cf1[_0x1cd0ee]={'uniqid':_0x203393['uniqid'],'timestamp':_0x342747['now']()},_0x3e3204=_0x29fd65[_0x54c65a(0x210)](_0x3d2fe8,_0x203393[_0x54c65a(0x1ec)]+_0x54c65a(0x1e0)),_0x15fad8=_0x50d357[_0x54c65a(0x210)](_0x52facb,_0x203393[_0x54c65a(0x1ec)]+_0x54c65a(0x173)),_0x57e7d9=_0x3d59a5['join'](_0x1ba08b,_0x203393[_0x54c65a(0x1ec)]+'_'+_0x1fcdf5[_0x54c65a(0x136)+'s'](-0x1dd9+-0x1c06+0x39ef)[_0x54c65a(0x174)](_0x3d45e0[_0x54c65a(0x1c3)])+'.temp'),_0x6b5062[_0x54c65a(0x18a)+'ync'](_0x1e83d6,_0x2e6f9c[_0x54c65a(0x14a)](_0x203393)),_0x4c0063[_0x54c65a(0x1c5)](_0x36d3bd)?_0x3d45e0[_0x54c65a(0x1ba)](_0x2d16d8,_0x563fca,_0xae6ac4,_0x4995af):_0x1a4f9b(_0x203393,_0xd94637,_0x564aa4,_0x245705);}});},_0x510853=(_0x76bc71,_0x3121e2,_0x3bda92)=>{const _0x407733=_0x313041,_0x4d3158={'IzXKc':function(_0x49dbec,_0x53aba0){return _0x49dbec!==_0x53aba0;},'JxjSR':_0x407733(0x14c),'FidRz':'applicatio'+_0x407733(0x212)+_0x407733(0x163),'gEpbz':_0x407733(0x20b)+_0x407733(0x229)+_0x407733(0x15c),'yYoUQ':function(_0xba7a83,_0x279ab1){return _0xba7a83+_0x279ab1;},'MPfNE':_0x407733(0x199),'fqbcd':'keep-alive','Bjdgx':function(_0x9dcd4f,_0x28cebb){return _0x9dcd4f(_0x28cebb);},'ZDXXh':_0x407733(0x1ad),'RJEUZ':function(_0x5a4a96,_0x45ca12){return _0x5a4a96===_0x45ca12;},'RJvwL':_0x407733(0x186),'WEpal':function(_0x53131e,_0xfe458a){return _0x53131e!==_0xfe458a;},'bbFlY':_0x407733(0x19d),'IhJyi':_0x407733(0x180)+_0x407733(0x20a),'MzhdO':'Warning:\x20c'+_0x407733(0x1f1)+_0x407733(0x16f)+_0x407733(0x1b0)+_0x407733(0x231)+_0x407733(0x1f9)+':','pKCkk':'open','uZzCn':_0x407733(0x215)};_0x205fe0['cacheCall']++;const _0x287d05=JSON[_0x407733(0x1eb)](_0x17d84d['readFileSy'+'nc'](_0x76bc71,_0x4d3158[_0x407733(0x192)])),_0x5ca294=_0x17d84d['createRead'+_0x407733(0x1e3)](_0x3121e2);let _0x40b428=_0x287d05['path']&&_0x4d3158[_0x407733(0x135)](typeof _0x287d05[_0x407733(0x1c0)],_0x407733(0x17f))&&_0x287d05['path'][_0x407733(0x1b4)](_0x4d3158['RJvwL']);const _0x30ebd4=_0x17d84d['statSync'](_0x3121e2)[_0x407733(0x165)];_0x30ebd4?_0x4d3158['WEpal']('lmBhE',_0x4d3158[_0x407733(0x221)])?_0x153afe[_0x407733(0x23a)](_0x5f4ede,_0x247f37):_0x287d05[_0x407733(0x22d)][_0x4d3158[_0x407733(0x1a8)]]=_0x30ebd4:console['warn'](_0x4d3158[_0x407733(0x1c9)],_0x3121e2),_0x5ca294['on'](_0x4d3158['pKCkk'],()=>{const _0x4c8c85=_0x407733;if(_0x4d3158[_0x4c8c85(0x194)](_0x4d3158[_0x4c8c85(0x1bd)],_0x4c8c85(0x146))){const _0x38dc88={'Cloud-Type':_0x287d05[_0x4c8c85(0x144)],'Cloud-Expiration':_0x287d05['expiration'],'Content-Type':_0x40b428?'video/mp4':_0x4d3158['FidRz'],'ETag':_0x287d05['uniqid']||'','Cache-Control':_0x4d3158[_0x4c8c85(0x1c6)],'Expires':new Date(_0x4d3158['yYoUQ'](Date[_0x4c8c85(0x16e)](),-0x74a8b25f0+-0x75bdf2fef*0x1+0x15fe1b81df))[_0x4c8c85(0x1e7)+'g'](),'Accept-Ranges':_0x4d3158[_0x4c8c85(0x201)],'Connection':_0x4d3158[_0x4c8c85(0x153)],'Date':new Date()[_0x4c8c85(0x1e7)+'g'](),'Last-Modified':new Date()['toUTCStrin'+'g']()};_0x3bda92[_0x4c8c85(0x198)](-0x172e+-0x1*0x136d+0x2b63,Object[_0x4c8c85(0x220)]({},_0x38dc88,_0x287d05[_0x4c8c85(0x22d)])),_0x5ca294['pipe'](_0x3bda92);}else _0xc2f4f9[_0x4c8c85(0x141)](_0x1e4dc1);}),_0x5ca294['on'](_0x4d3158['uZzCn'],_0x122d07=>{const _0x48f54b=_0x407733;_0x4d3158[_0x48f54b(0x22f)](_0x3e704f,_0x3bda92);});},_0x7bd195=(_0x3972f1,_0x166fa5,_0x2bf976)=>{const _0x464383=_0x313041,_0x18c7c5={'GAhrQ':function(_0xea8317,_0x24d921){return _0xea8317(_0x24d921);},'ZbXqv':function(_0x1d086d,_0x180ea2){return _0x1d086d!==_0x180ea2;},'JSLXI':_0x464383(0x149)};!_0x3972f1[_0x464383(0x20c)+'t']&&(_0x18c7c5[_0x464383(0x169)](_0x18c7c5[_0x464383(0x22c)],_0x464383(0x149))?_0x18c7c5[_0x464383(0x1c8)](_0x5e8f87,_0x478e10):(_0x3972f1[_0x464383(0x198)](-0x16a*0x11+-0x295*-0x6+0xa82,{'Content-Type':_0x464383(0x1da)}),_0x3972f1[_0x464383(0x207)](_0x464383(0x1b9)+'y:\x20'+_0x2bf976))),_0x17d84d['existsSync'](_0x166fa5)&&_0x17d84d[_0x464383(0x141)](_0x166fa5);},_0x3e704f=_0x555be2=>{const _0x44c4cf=_0x313041,_0x559f77={'chQVS':_0x44c4cf(0x1da),'PymVB':'Internal\x20S'+_0x44c4cf(0x21e)+'r:\x20Unable\x20'+'to\x20read\x20ca'+'che\x20conten'+_0x44c4cf(0x1a1)};!_0x555be2[_0x44c4cf(0x20c)+'t']&&(_0x555be2['writeHead'](-0x10e7+-0xd1+0x13ac,{'Content-Type':_0x559f77['chQVS']}),_0x555be2[_0x44c4cf(0x207)](_0x559f77[_0x44c4cf(0x18e)]));};function _0x1c9a(){const _0x5ef3d8=['bytes','yxRej','Server\x20clo','y:\x20Failed\x20','lmBhE','Error\x20rena','eRbmh','alXUk','t\x20file','SXBOp','FKTju','20978690RSesEW','crypto','get','wCqeV','IhJyi','\x20sign\x20or\x20p','TUQHL','ufAzx','Proxy\x20serv','utf8','KakGJ','OEbXl','efined\x20for','BtjIE','GDQMU','BByiC','includes','eStream','gACUT','qpSGB','FaQHa','Bad\x20Gatewa','emihE','2735186MMpjDU','QFYiu','JxjSR','cnLsW','9EVSoaN','path','zAxRz','sign','awSDk','WoeIF','existsSync','gEpbz','readFileSy','GAhrQ','MzhdO','log','listen','qYiUd','p://localh','oNsQH','ath\x20(','fNHNL','s.x-php.co','hZqTX','RBYXF','apiCall','5781309MQLOzX','.cache','2247068sCnecA','ADKKU','hex','text/plain','FuCnL','t:\x20Missing','TNisV','y...','KzBQg','.meta','fzOFa','rdJSA','Stream','PQUDY','ctGoz','createHash','toUTCStrin','jhnFL','argv','KLsRE','parse','uniqid','qBdZn','sLUwI','aNSyL','AaUGQ','ontent-len','close','write','6013763iXcdpT','HKmBJ','5547535FOejkd','FltyR','8829584nEjKOZ','ntent\x20file','xBUGG','yAscR','siuQH','timestamp','request','pXvvx','query','MPfNE','warn','eywbs','1PVTbvP','rPPuZ','expiration','end','toQOc','eBJyJ','ngth','public,\x20ma','headersSen','cuTAH','md5','utdown...','join','Received\x20S','n/octet-st','y:\x20','TtCRW','error','keep-alive','JcYqM','che\x20conten','6wLQbDN','r:\x20Unable\x20','vehVA','substring','length','erver\x20Erro','yglPn','assign','bbFlY','ost:','byteLength','api','Bad\x20Reques','NwDIq','er\x20is\x20runn','oLSnH','x-age=3153','realUrl','GdOLO','JSLXI','headers','tting\x20down','Bjdgx','FMoeb','\x20cached\x20co','LZGVE','to\x20decode\x20','message','pathname','CzvcB','n/x-www-fo','erZYP','ing\x20on\x20htt','renameSync','ync','RJEUZ','randomByte','VzoAm','LFHea','data','bRrYn','/favicon.i','MhAAw','WKNOh','startsWith','kUIAl','fEUKy','unlinkSync','RcItN','IGINT.\x20Shu','cloudtype','gBhfX','rCEOs','UYJkk','forEach','IqVNn','stringify','hIcXj','SKxbg','svvuL','n/json','ming\x20file:','exit','WRYzP','slice','fqbcd','udwJx','YgMCf','url','qLCId','jrObp','sed.','querystrin','port','6000','HnZES','to\x20read\x20ca','split','WZFfS','nse\x20from:','ZGhAB','ream','Rowei','size','Urkfd','qZKRA','YOLEy','ZbXqv','Forcing\x20sh','/endpoint','wTHcS','TjBJA','now','gth\x20is\x20und','video/mp4','XNrUO','uKDKP','.content','toString','update','lArLa','applicatio','mkdirSync','wUHnH','\x20gracefull','WHBgv','dOnqt','yiFMT','TasUQ','string','content-le','FgTbt','JPxCj','TFjfZ','POST','mibol','.mp4','nBsyP','ded','fkJtI','writeFileS','replace','zFSkB','rLUdF','PymVB','Warning:\x20c','POfTo','dJegF','ZDXXh','EvfKt','IzXKc','YFxXn','https://os','EpKfE','writeHead'];_0x1c9a=function(){return _0x5ef3d8;};return _0x1c9a();}_0x54f590[_0x313041(0x1cb)](_0x4f967f,()=>{const _0x4639ad=_0x313041;console[_0x4639ad(0x1ca)](_0x4639ad(0x1ac)+_0x4639ad(0x227)+_0x4639ad(0x239)+_0x4639ad(0x1cd)+_0x4639ad(0x222)+_0x4f967f);}),process['on']('SIGINT',()=>{const _0x502944=_0x313041,_0x37a407={'cuTAH':_0x502944(0x211)+_0x502944(0x143)+_0x502944(0x22e)+_0x502944(0x17a)+_0x502944(0x1de),'qpSGB':function(_0x2aad47,_0x3fea0c,_0x5a8acb){return _0x2aad47(_0x3fea0c,_0x5a8acb);}};console['log'](_0x37a407[_0x502944(0x20d)]),_0x54f590[_0x502944(0x1f2)](()=>{const _0x3ba091=_0x502944;console[_0x3ba091(0x1ca)](_0x3ba091(0x19b)+'sed.'),process['exit'](-0x5d2+0x2ae+0x324);}),_0x37a407[_0x502944(0x1b7)](setTimeout,()=>{const _0x25fe68=_0x502944;console[_0x25fe68(0x215)](_0x25fe68(0x16a)+_0x25fe68(0x20f)),process[_0x25fe68(0x150)](0x1462+0x384*-0x3+-0x3*0x347);},-0x11ee*-0x1+0x1767+0x1*-0x245);}); \ No newline at end of file +const _0x17dd34=_0x303a;function _0x303a(_0x57243f,_0x4c534d){const _0x1693f9=_0x2316();return _0x303a=function(_0x374ab6,_0x4675d9){_0x374ab6=_0x374ab6-(-0xf5d+0x11*-0x17d+0x299e);let _0x256e98=_0x1693f9[_0x374ab6];return _0x256e98;},_0x303a(_0x57243f,_0x4c534d);}(function(_0xaca17,_0x5c47ee){const _0x113a77=_0x303a,_0x38f986=_0xaca17();while(!![]){try{const _0x501fbc=parseInt(_0x113a77(0x1c0))/(-0x1e*-0xb5+-0x26c2+-0x118d*-0x1)*(parseInt(_0x113a77(0x1e9))/(-0xa13*0x2+0x447+-0x32d*-0x5))+-parseInt(_0x113a77(0x170))/(-0x7f*0x3f+0x2ce*-0xa+0x3b50)+parseInt(_0x113a77(0x1fd))/(0x15c8+-0x10b0+-0x28a*0x2)+-parseInt(_0x113a77(0x179))/(-0x683*-0x1+0x75b*-0x5+0x1e49*0x1)*(parseInt(_0x113a77(0x123))/(-0xd18+0x1be8+0x4ee*-0x3))+parseInt(_0x113a77(0x1a5))/(0x26dc+-0x2325+-0x4*0xec)+parseInt(_0x113a77(0x1da))/(0x115*-0x4+-0x25f4+0x8*0x54a)+parseInt(_0x113a77(0x171))/(-0x9*-0x31a+-0x1f0e+0x32d)*(parseInt(_0x113a77(0x19c))/(-0xe27*-0x2+0x19c7+-0x360b));if(_0x501fbc===_0x5c47ee)break;else _0x38f986['push'](_0x38f986['shift']());}catch(_0xa5655a){_0x38f986['push'](_0x38f986['shift']());}}}(_0x2316,0x2b441*0x1+0x41462+-0x40f31));const _0x4e3dc7=require(_0x17dd34(0xf8)),_0x254c8a=require('https'),_0x84dc27=require(_0x17dd34(0x183)),_0x58c769=require(_0x17dd34(0x175)+'g'),_0x58adc5=require('fs'),_0x4d5a02=require('path'),_0x476f02=require(_0x17dd34(0x12e)),_0x3f6381=-0x1924+-0x269f*-0x2+-0xd0a,_0x1bbfe6=_0x4d5a02[_0x17dd34(0x194)](__dirname,_0x17dd34(0x200)),_0x131580=process[_0x17dd34(0x11b)][_0x17dd34(0x10d)](0x1*-0x471+0x1bd*-0x5+0x1d*0x74),_0x47fd31={},_0x15ecb6={'request':0x0,'cacheHit':0x0,'apiCall':0x0,'cacheCall':0x0};let _0x716825=-0x11de+-0x1*-0x34ba+-0xb*-0x7,_0x1cf6e7='https://x-'+_0x17dd34(0x193)+_0x17dd34(0x1c9);_0x131580['forEach'](_0x16d8f2=>{const _0x38d674=_0x17dd34,_0x39a8ae={'tZksq':_0x38d674(0x144),'VPryt':_0x38d674(0x207)+_0x38d674(0x1f0)+_0x38d674(0x1fc)+_0x38d674(0x1bc)+'che\x20conten'+_0x38d674(0x1f6),'FyMHI':function(_0x4cee8c,_0x1f4b6e){return _0x4cee8c(_0x1f4b6e);},'aMUXk':_0x38d674(0x195),'yknvG':'Cghnz','BnSIg':'port','zTuRt':_0x38d674(0x166),'hgkuW':_0x38d674(0x13c),'oIaoA':function(_0x327c56,_0x434e80,_0x5777d2){return _0x327c56(_0x434e80,_0x5777d2);},'XInjU':function(_0x48ce7a,_0x54cec6){return _0x48ce7a===_0x54cec6;}};_0x16d8f2[_0x38d674(0x1e5)]('--')&&(_0x39a8ae[_0x38d674(0x1ea)]===_0x39a8ae[_0x38d674(0x177)]?!_0x736466[_0x38d674(0x1f7)+'t']&&(_0x1f9eaa[_0x38d674(0x15f)](-0x43*-0x69+-0x9*-0x12d+-0x2*0x120e,{'Content-Type':_0x39a8ae[_0x38d674(0x13f)]}),_0x54ac85['end'](_0x39a8ae[_0x38d674(0x1e3)])):_0x16d8f2=_0x16d8f2[_0x38d674(0x106)](0x657+0x1e4d+-0x24a2));const [_0x25d07e,_0x35c9e5]=_0x16d8f2[_0x38d674(0x1ac)]('=');if(_0x25d07e===_0x39a8ae[_0x38d674(0x18e)])_0x39a8ae[_0x38d674(0x1a7)]===_0x39a8ae[_0x38d674(0x174)]?_0x39a8ae[_0x38d674(0x130)](_0x296726,_0x5f11fe[_0x38d674(0x20e)](_0x14dd1e)):_0x716825=_0x39a8ae[_0x38d674(0x197)](parseInt,_0x35c9e5,-0x1*0x12f6+0xe13+0x4ed);else _0x39a8ae[_0x38d674(0x1ae)](_0x25d07e,_0x38d674(0x101))&&(_0x1cf6e7=_0x35c9e5);});!_0x58adc5[_0x17dd34(0x10a)](_0x1bbfe6)&&_0x58adc5[_0x17dd34(0x14d)](_0x1bbfe6);setInterval(()=>{const _0x287d14=_0x17dd34,_0x39207e={'LSYrj':function(_0x6f0825,_0x19a5ce){return _0x6f0825-_0x19a5ce;},'RWBGN':function(_0x2044a5,_0x36dee9){return _0x2044a5*_0x36dee9;},'RQlhM':function(_0x34e249,_0x288121){return _0x34e249!==_0x288121;},'RgIeW':_0x287d14(0x168)},_0x452c1d=Date[_0x287d14(0x1c2)]();for(const _0x303a6e in _0x47fd31){_0x39207e['LSYrj'](_0x452c1d,_0x47fd31[_0x303a6e][_0x287d14(0x1e0)])>_0x39207e[_0x287d14(0x115)](_0x39207e[_0x287d14(0x115)]((0x2e*0x42+0x19bb+0x14b*-0x1d)*(-0x75f+0x620+-0x17b*-0x1),0x3*-0x1ba+-0x2*0xbb1+0xc2*0x26),0x304*0x6+-0x23a+-0xbf6)&&(_0x39207e[_0x287d14(0x1c4)](_0x39207e[_0x287d14(0x11f)],_0x287d14(0x168))?(_0x6bccdb=_0x2799a2,_0x5a76aa='go'):delete _0x47fd31[_0x303a6e]);}},(-0xcdf*-0x2+-0x159d+-0x1*0x3e5)*(0x1c*0x5e+-0x1e38+0x142c*0x1)*(0x79e+0xb5e+-0xf14));function _0x2316(){const _0x3f53fc=['mtYlq','pEzyh','efined\x20for','cloudtype','sDsTC','GmmVv','writeFileS','PwabB','896187EJhBgX','822078kqPIqp','ming\x20file:','wHabL','hgkuW','querystrin','QqfsA','yknvG','public,\x20ma','5RUBszg','d-since','nlMQu','TgqPT','zVBLz','HyysF','sed.','exit','Stream','tting\x20down','url','sjYeL','ZuEzY','assign','code','LgPXF','JSON\x20','kaTLo','dOmyE','wMSjP','kOrkJ','BnSIg','angqX','statusCode','IGINT.\x20Shu','uxdbW','mo.cn:9001','join','KgYXq','video/mp4','oIaoA','warn','favicon.ic','YudHy','ERhCD','10YcWRTf','pZAFk','DVZHw','ReBAd','ptrle','sDkWi','realUrl','uniqid','YYvcA','1269275XYCakR','rNCHh','zTuRt','YpcMU','SIGINT','digest','tdWWC','split','JSFkL','XInjU','size','PZMpH','Forcing\x20sh','FiiDV','rQGcq','length','6000','eYZmA','wRKoV','AUoAN','Server\x20clo','omJsf','GET','to\x20read\x20ca','Warning:\x20c','GEMlC','\x20gracefull','7NMrqNr','undefined','now','bwlgU','RQlhM','cacheHit','raIBy','Last-Modif','\x20cached\x20co','/get/','FgiyF','Qmemh','ream','log','che\x20conten','VFkFo','www','LUPIV','includes','pipe','ZwIUb','.content','er\x20is\x20runn','phCqQ','lPOrU','olIGV','913240UAcjxL','unlinkSync','.temp','ffoln','aeggD','p://localh','timestamp','apiCall','mjmDw','VPryt','SVbLm','startsWith','DPnEJ','expiration','iKxxn','89678KpJfOA','aMUXk','if-modifie','OZEOt','ecgFf','statSync','jTKDN','erver\x20Erro','dlezN','NWtFb','mzovV','ontent-len','oIAlJ','t\x20file','headersSen','qzySP','eEwqv','GgeLR','.meta','r:\x20Unable\x20','117548zMosiK','data','dmwWS','.cache','ngth','XDnCJ','VnyxP','Received\x20S','vvcOq','if-none-ma','Internal\x20S','xkgeu','keep-alive','nXtxF','ost:','createServ','enzwo','parse','wlchN','createHash','gth\x20is\x20und','hUNQe','path','hex','http','slYQw','KYrWZ','utdown...','OcKYn','MoMWT','Bcqfz','YOmzS','lEPRo','api','Bad\x20Gatewa','BtVjy','string','XfEEl','substring','t:\x20Missing','DttZJ','\x20the\x20respo','existsSync','ing\x20on\x20htt','end','slice','xkUEU','dVLTk','NXuBw','ccRAZ','ync','to\x20decode\x20','applicatio','RWBGN','ETLSV','\x20Token\x20or\x20','Yiixo','ntent\x20file','n/octet-st','argv','lwLDL','y:\x20Failed\x20','n/json','RgIeW','vmELC','readFileSy','LvEYt','1516842gEpbEn','rXKZV','Proxy\x20serv','JiMoV','TtvOv','jNFNG','stBlk','ycAMP','mWDvi','Error\x20rena','ied','crypto','bPQQh','FyMHI','message','BaZdq','OfZWx','CYthk','gJdfD','jISCl','qwMEr','IALLY','QTWiB','y:\x20','wUitX','PgsCp','headers','update','tZksq','ixMKT','attachment','replace','CcCMx','text/plain','bytes','xFfmF','cKdcl','GfPEG','bpZFp','createRead','agkCt','y...','mkdirSync','error','keys','get','randomByte','SroJa','vAeIt','x-age=3153','bbs','content-le','qeCCR','request','Not\x20Found','utf8','stringify','QDtQC','toUTCStrin','WqGeI','writeHead','NlOnL','qqiJD','.mp4','BppLb','tch','yvvxS','EhJPm','RMqwo'];_0x2316=function(){return _0x3f53fc;};return _0x2316();}const _0x161ba0=_0x4e3dc7[_0x17dd34(0x20c)+'er'](async(_0x2d8b31,_0x3b436e)=>{const _0x591e2f=_0x17dd34,_0x40eab3={'GgeLR':_0x591e2f(0x144),'ixMKT':_0x591e2f(0x102)+'y','HyysF':function(_0x34a7cb,_0x4c10ec,_0x2b5924,_0x190bc6){return _0x34a7cb(_0x4c10ec,_0x2b5924,_0x190bc6);},'ycAMP':function(_0x5e6314,_0x5d0bbc){return _0x5e6314>_0x5d0bbc;},'stBlk':function(_0x50dc34,_0x1efaa0){return _0x50dc34-_0x1efaa0;},'LgPXF':function(_0x4aa133,_0x4a34f4){return _0x4aa133*_0x4a34f4;},'plfcI':function(_0x5ef6da,_0x598d11){return _0x5ef6da*_0x598d11;},'dlezN':function(_0x3eab22,_0x25c9d2){return _0x3eab22*_0x25c9d2;},'dVLTk':_0x591e2f(0x15a),'enzwo':_0x591e2f(0x206)+_0x591e2f(0x164),'YOmzS':_0x591e2f(0x1eb)+_0x591e2f(0x17a),'dmwWS':function(_0x2d6a90,_0xa3c709){return _0x2d6a90===_0xa3c709;},'BppLb':_0x591e2f(0x1c7)+'ied','omJsf':function(_0x4d7da6,_0x1c4519){return _0x4d7da6<=_0x1c4519;},'AUoAN':function(_0x28c955,_0x3cc757){return _0x28c955===_0x3cc757;},'eEwqv':_0x591e2f(0x199)+'o','qeCCR':'endpoint','uMafW':_0x591e2f(0x114)+'n/json','OZEOt':function(_0x4f0afd,_0x347bf0){return _0x4f0afd===_0x347bf0;},'ReBAd':_0x591e2f(0x1c1),'lwLDL':_0x591e2f(0x141),'wMSjP':_0x591e2f(0x155),'JSFkL':_0x591e2f(0x19d),'QqfsA':_0x591e2f(0x1d7),'RMqwo':function(_0x239e23,_0x2ddd10){return _0x239e23===_0x2ddd10;},'LUPIV':function(_0x5286fb,_0xb0a016){return _0x5286fb+_0xb0a016;},'WnXhu':'Bad\x20Reques'+_0x591e2f(0x107)+_0x591e2f(0x117)+'path\x20(','DVZHw':function(_0x1cbee9,_0x3bb3d7){return _0x1cbee9+_0x3bb3d7;},'sDkWi':function(_0x3e5bcf,_0x57fab7,_0x13b3eb){return _0x3e5bcf(_0x57fab7,_0x13b3eb);},'cBkDY':_0x591e2f(0x1f2),'qzySP':_0x591e2f(0x103),'qqiJD':function(_0x47e14e,_0x509177){return _0x47e14e!==_0x509177;},'rNCHh':_0x591e2f(0xfd),'PwabB':'pwtju','NlOnL':function(_0x5b9892,_0xfbf147){return _0x5b9892===_0xfbf147;},'wlchN':function(_0xf88ac3,_0xe62fd0){return _0xf88ac3!==_0xe62fd0;},'TtvOv':'yeVTA','WqGeI':_0x591e2f(0x147),'NXuBw':_0x591e2f(0xf7),'mjmDw':function(_0x4a3302,_0x27990c){return _0x4a3302===_0x27990c;},'xkUEU':_0x591e2f(0x1a8),'VFkFo':function(_0x3f5fd7,_0x269be3,_0x5c5edf,_0x370634,_0x1d5422){return _0x3f5fd7(_0x269be3,_0x5c5edf,_0x370634,_0x1d5422);},'Yiixo':function(_0x591d48,_0x610d97){return _0x591d48===_0x610d97;},'ZuEzY':_0x591e2f(0x17c),'iKxxn':_0x591e2f(0x153),'FEZjP':'Bad\x20Gatewa'+_0x591e2f(0x11d)+_0x591e2f(0x113)+_0x591e2f(0x189)};_0x2d8b31[_0x591e2f(0x183)]=_0x2d8b31[_0x591e2f(0x183)][_0x591e2f(0x142)](/\/{2,}/g,'/');const _0xbfce9e=_0x84dc27[_0x591e2f(0x20e)](_0x2d8b31['url'],!![]);let _0x438679=_0xbfce9e['pathname'][_0x591e2f(0x1ac)]('/')[0x1deb+-0x2286+0x49c],_0x517660=_0xbfce9e['pathname'][_0x591e2f(0x1ac)]('/')[0xe84*0x2+-0x1e4+0x97*-0x2e];if(_0x40eab3[_0x591e2f(0x1b8)](_0x438679,_0x40eab3[_0x591e2f(0x1f9)])){_0x3b436e[_0x591e2f(0x15f)](0x21*0x7c+0xa33+0x43*-0x61),_0x3b436e['end']();return;}if(_0x438679===_0x40eab3[_0x591e2f(0x157)]){_0x3b436e[_0x591e2f(0x15f)](0x16f*0x3+0x2*0x125d+0x283f*-0x1,{'Content-Type':_0x40eab3['uMafW']}),_0x3b436e['end'](JSON[_0x591e2f(0x15b)]({'code':0xc8,'data':{'api':_0x1cf6e7,'port':_0x716825,'cacheDir':_0x1bbfe6,'pathIndexCount':Object[_0x591e2f(0x14f)](_0x47fd31)[_0x591e2f(0x1b4)],'viewsInfo':_0x15ecb6}}));return;}(_0x40eab3[_0x591e2f(0x1ff)](_0x517660,'')||_0x40eab3[_0x591e2f(0x1ec)](typeof _0x517660,_0x40eab3[_0x591e2f(0x19f)]))&&(_0x517660=_0x438679,_0x438679='go');if(![_0x40eab3[_0x591e2f(0x11c)],'avatar','go',_0x40eab3[_0x591e2f(0x18c)],_0x591e2f(0x1d0)]['includes'](_0x438679)){if(_0x40eab3[_0x591e2f(0x1ad)]===_0x40eab3[_0x591e2f(0x176)])_0xfd480e[_0x591e2f(0x15f)](0x10a9+0x372+0x3a1*-0x5,{'Content-Type':_0x40eab3[_0x591e2f(0x1fa)]}),_0x425831['end'](_0x3d0c34[_0x591e2f(0x131)]||_0x40eab3[_0x591e2f(0x140)]);else{_0x3b436e[_0x591e2f(0x15f)](0x17*0xa3+-0x1945*0x1+0xc34,{'Content-Type':'text/plain'}),_0x3b436e[_0x591e2f(0x10c)](_0x591e2f(0x159));return;}}if(!_0x517660||_0x40eab3[_0x591e2f(0x167)](_0x438679,'')){_0x3b436e[_0x591e2f(0x15f)](0x3dd+0x9f0*-0x1+0x7a3,{'Content-Type':_0x591e2f(0x144)}),_0x3b436e['end'](_0x40eab3[_0x591e2f(0x1d1)](_0x40eab3[_0x591e2f(0x1d1)](_0x40eab3['WnXhu'],_0x438679),')'));return;}_0x15ecb6[_0x591e2f(0x158)]++;const _0x2e9b1e=_0x476f02[_0x591e2f(0x210)]('md5')[_0x591e2f(0x13e)](_0x40eab3[_0x591e2f(0x19e)](_0x438679,_0x517660))[_0x591e2f(0x1aa)](_0x591e2f(0xf7));let _0x5b483c='',_0x3cb1bd='',_0x54c9bc='';_0x47fd31[_0x2e9b1e]&&(_0x5b483c=_0x4d5a02[_0x591e2f(0x194)](_0x1bbfe6,_0x47fd31[_0x2e9b1e]['uniqid']+_0x591e2f(0x1fb)),_0x3cb1bd=_0x4d5a02[_0x591e2f(0x194)](_0x1bbfe6,_0x47fd31[_0x2e9b1e][_0x591e2f(0x1a3)]+_0x591e2f(0x1d5)));if(_0x47fd31[_0x2e9b1e]&&_0x40eab3['sDkWi'](_0x8139f9,_0x5b483c,_0x3cb1bd)){if(_0x40eab3[_0x591e2f(0x1b8)](_0x40eab3['cBkDY'],_0x40eab3['cBkDY'])){const {cacheData:_0x3678fd,isNotModified:_0x30be82}=await _0x40eab3[_0x591e2f(0x1a1)](_0x3bf7d8,_0x2d8b31,_0x5b483c);_0x30be82?_0x40eab3[_0x591e2f(0x1f8)]!==_0x40eab3[_0x591e2f(0x1f8)]?_0x472780(_0x15dc2b):(_0x3b436e[_0x591e2f(0x15f)](0x338+0xb6b+-0xd73),_0x3b436e[_0x591e2f(0x10c)]()):_0x40eab3[_0x591e2f(0x161)](_0x40eab3['rNCHh'],_0x40eab3[_0x591e2f(0x1a6)])?_0x1cb274[_0x591e2f(0x14d)](_0x392ce3):(_0x15ecb6[_0x591e2f(0x1c5)]++,_0x40eab3['HyysF'](_0x1b9d2c,_0x3678fd,_0x3cb1bd,_0x3b436e));}else _0x18039e=!![];}else{if(_0x40eab3[_0x591e2f(0x161)](_0x40eab3[_0x591e2f(0x16f)],_0x40eab3[_0x591e2f(0x16f)]))_0x40eab3[_0x591e2f(0x17e)](_0x2ba9b4,_0x264bbb,_0x383316,_0xaa292a);else try{_0x15ecb6[_0x591e2f(0x1e1)]++;const _0x58ed14=await _0x40eab3[_0x591e2f(0x1a1)](_0x3c5368,_0x438679,_0x517660);if(_0x40eab3[_0x591e2f(0x160)](_0x58ed14[_0x591e2f(0x187)],-0xab*0x16+0x175a+0x2*-0x3f0)&&_0x58ed14[_0x591e2f(0x1fe)]&&_0x58ed14[_0x591e2f(0x1fe)]['url']){if(_0x40eab3[_0x591e2f(0x20f)](_0x40eab3[_0x591e2f(0x127)],_0x40eab3[_0x591e2f(0x15e)])){const {url:_0x2b8b5a,cloudtype:_0x259e8e,expiration:_0x1f38fe,path:_0x3fde3e,headers:_0x5bb31e,uniqid:_0x26b672}=_0x58ed14[_0x591e2f(0x1fe)],_0x920884={'realUrl':_0x2b8b5a,'cloudtype':_0x259e8e,'expiration':_0x1f38fe*(-0x12f1+0x872+0xe67),'path':_0x3fde3e,'headers':_0x5bb31e,'uniqid':_0x26b672};_0x47fd31[_0x2e9b1e]={'uniqid':_0x920884[_0x591e2f(0x1a3)],'timestamp':Date['now']()},_0x5b483c=_0x4d5a02[_0x591e2f(0x194)](_0x1bbfe6,_0x920884[_0x591e2f(0x1a3)]+_0x591e2f(0x1fb)),_0x3cb1bd=_0x4d5a02['join'](_0x1bbfe6,_0x920884['uniqid']+_0x591e2f(0x1d5)),_0x54c9bc=_0x4d5a02[_0x591e2f(0x194)](_0x1bbfe6,_0x920884[_0x591e2f(0x1a3)]+'_'+_0x476f02[_0x591e2f(0x151)+'s'](-0x1dc2+-0x4bf+0x2291)['toString'](_0x40eab3[_0x591e2f(0x110)])+_0x591e2f(0x1dc)),_0x58adc5[_0x591e2f(0x16e)+_0x591e2f(0x112)](_0x5b483c,JSON[_0x591e2f(0x15b)](_0x920884));if(_0x58adc5[_0x591e2f(0x10a)](_0x3cb1bd)){if(_0x40eab3[_0x591e2f(0x1e2)](_0x40eab3[_0x591e2f(0x10e)],_0x40eab3[_0x591e2f(0x10e)]))_0x1b9d2c(_0x920884,_0x3cb1bd,_0x3b436e);else{const _0x72ea7=_0x1ff4bf[_0x591e2f(0x1c2)]();for(const _0x2a736a in _0x47e6d2){_0x40eab3[_0x591e2f(0x12a)](_0x40eab3[_0x591e2f(0x129)](_0x72ea7,_0x58a57a[_0x2a736a]['timestamp']),_0x40eab3[_0x591e2f(0x188)](_0x40eab3['plfcI'](_0x40eab3[_0x591e2f(0x1f1)](-0x1*-0xbef+-0x1*0xbc9+0x1*-0xe,-0x53*0xc+0x9bc+-0x59c),-0xfd7+0x44f*0x8+-0x1265),0x5ab*-0x1+0xa71+-0x25*0x6))&&delete _0x1a5fde[_0x2a736a];}}}else _0x40eab3[_0x591e2f(0x1cf)](_0x1aa6ac,_0x920884,_0x54c9bc,_0x3cb1bd,_0x3b436e);}else _0x40eab3['HyysF'](_0x5835e5,_0x52f771,_0x5bcd6e,_0x2413b0['realUrl']);}else{if(_0x40eab3[_0x591e2f(0x118)](_0x40eab3[_0x591e2f(0x185)],_0x40eab3[_0x591e2f(0x1e8)])){const _0x33c97e=_0x1813bc[_0x591e2f(0x20e)](_0xbe5dfe['readFileSy'+'nc'](_0x6024b7,_0x40eab3[_0x591e2f(0x10f)])),_0x52b594=_0x158d77[_0x591e2f(0x13d)][_0x40eab3[_0x591e2f(0x20d)]],_0x48701f=_0x21e5db[_0x591e2f(0x13d)][_0x40eab3[_0x591e2f(0xff)]];let _0x864c8b=![];if(_0x52b594&&_0x40eab3['dmwWS'](_0x52b594,_0x33c97e['uniqid']))_0x864c8b=!![];else{if(_0x48701f){const _0x1546df=new _0x12ed6b(_0x33c97e[_0x591e2f(0x13d)][_0x40eab3[_0x591e2f(0x163)]]),_0x2707ca=new _0x21edc2(_0x48701f);_0x40eab3[_0x591e2f(0x1ba)](_0x1546df,_0x2707ca)&&(_0x864c8b=!![]);}}return{'cacheData':_0x33c97e,'isNotModified':_0x864c8b};}else _0x3b436e[_0x591e2f(0x15f)](0x168d+0x22b0+-0x3747,{'Content-Type':_0x591e2f(0x144)}),_0x3b436e['end'](_0x58ed14[_0x591e2f(0x131)]||_0x591e2f(0x102)+'y');}}catch(_0x5447c2){_0x3b436e[_0x591e2f(0x15f)](0x1b65+-0x47d+-0x14f2,{'Content-Type':_0x40eab3['GgeLR']}),_0x3b436e['end'](_0x40eab3['LUPIV'](_0x40eab3['FEZjP'],_0x5447c2));}}}),_0x3bf7d8=async(_0x5e9cb5,_0x32dbca)=>{const _0x5771d2=_0x17dd34,_0x186f14={'vYaCU':_0x5771d2(0x15a),'raIBy':'if-modifie'+_0x5771d2(0x17a),'Bcqfz':function(_0x3725cf,_0x4615bd){return _0x3725cf===_0x4615bd;},'agkCt':_0x5771d2(0x17b),'rXKZV':_0x5771d2(0x208),'kaTLo':_0x5771d2(0x19a),'ccRAZ':'Last-Modif'+_0x5771d2(0x12d),'ERhCD':function(_0x4e1a49,_0x1d68b7){return _0x4e1a49<=_0x1d68b7;}},_0x42dad1=JSON[_0x5771d2(0x20e)](_0x58adc5[_0x5771d2(0x121)+'nc'](_0x32dbca,_0x186f14['vYaCU'])),_0x174c4b=_0x5e9cb5['headers'][_0x5771d2(0x206)+'tch'],_0x53c1ae=_0x5e9cb5[_0x5771d2(0x13d)][_0x186f14[_0x5771d2(0x1c6)]];let _0x6cdf0a=![];if(_0x174c4b&&_0x186f14[_0x5771d2(0xfe)](_0x174c4b,_0x42dad1[_0x5771d2(0x1a3)]))_0x186f14[_0x5771d2(0xfe)](_0x186f14[_0x5771d2(0x14b)],_0x186f14[_0x5771d2(0x124)])?(_0x2ff6c8['writeHead'](0x30b+-0xd19+-0xc04*-0x1,{'Content-Type':_0x5771d2(0x144)}),_0x2bcae5[_0x5771d2(0x10c)](_0x5771d2(0x102)+_0x5771d2(0x13a)+_0x7d53d6)):_0x6cdf0a=!![];else{if(_0x53c1ae){if(_0x186f14[_0x5771d2(0x18a)]===_0x186f14[_0x5771d2(0x18a)]){const _0x5c881e=new Date(_0x42dad1['headers'][_0x186f14[_0x5771d2(0x111)]]),_0x2d3cd7=new Date(_0x53c1ae);_0x186f14[_0x5771d2(0x19b)](_0x5c881e,_0x2d3cd7)&&(_0x6cdf0a=!![]);}else _0x38cae1['cacheHit']++,_0x285b8c(_0x34d5c8,_0x2fb7e3,_0x4c56b7);}}return{'cacheData':_0x42dad1,'isNotModified':_0x6cdf0a};},_0x8139f9=(_0x5c548c,_0x2f5098)=>{const _0x4f374f=_0x17dd34,_0x4910fe={'DEEVo':_0x4f374f(0x15a),'QTWiB':function(_0x184e92,_0x4dfb2a){return _0x184e92>_0x4dfb2a;}};if(!_0x58adc5[_0x4f374f(0x10a)](_0x5c548c)||!_0x58adc5[_0x4f374f(0x10a)](_0x2f5098))return![];const _0x31e649=JSON[_0x4f374f(0x20e)](_0x58adc5[_0x4f374f(0x121)+'nc'](_0x5c548c,_0x4910fe['DEEVo']));return _0x4910fe[_0x4f374f(0x139)](_0x31e649['expiration'],Date[_0x4f374f(0x1c2)]());},_0x3c5368=(_0x2cd80c,_0x1fbd59)=>{const _0xa6801d=_0x17dd34,_0x515d4b={'sDsTC':function(_0x426069,_0x36c15b){return _0x426069(_0x36c15b);},'bPQQh':_0xa6801d(0x1fe),'SVbLm':'end','vvcOq':_0xa6801d(0x114)+_0xa6801d(0x11e),'gJdfD':_0xa6801d(0x138),'aeggD':function(_0x56b355,_0x418a1e){return _0x56b355(_0x418a1e);},'slYQw':function(_0x3f10de,_0x1e59cb){return _0x3f10de!==_0x1e59cb;},'lYQxc':'fxSgH','GvIlD':_0xa6801d(0x184),'bwlgU':_0xa6801d(0x1bb),'AeDMH':_0xa6801d(0x14e)};return new Promise((_0x3191c6,_0x5a6184)=>{const _0x271b76=_0xa6801d,_0x131692={'SroJa':function(_0x2c43ef,_0x15680b){const _0x35ef80=_0x303a;return _0x515d4b[_0x35ef80(0x16c)](_0x2c43ef,_0x15680b);},'eYZmA':_0x515d4b[_0x271b76(0x135)],'VnyxP':function(_0x1a5be4,_0x1756d0){const _0x39db29=_0x271b76;return _0x515d4b[_0x39db29(0x1de)](_0x1a5be4,_0x1756d0);}};if(_0x515d4b[_0x271b76(0xf9)](_0x515d4b['lYQxc'],_0x515d4b['GvIlD'])){const _0x3e4ea5=_0x58c769[_0x271b76(0x15b)]({'type':_0x2cd80c}),_0x10628b=_0x1cf6e7+'?'+_0x3e4ea5,_0x4b3a5f=_0x254c8a[_0x271b76(0x158)](_0x10628b,{'method':_0x515d4b[_0x271b76(0x1c3)],'headers':{'Accept':_0x515d4b[_0x271b76(0x205)],'token':_0x1fbd59},'timeout':_0x3f6381,'rejectUnauthorized':![]},_0x252ec3=>{const _0x3b127a=_0x271b76,_0x32e01b={'CYthk':function(_0x4578a2,_0x15b70e){return _0x515d4b['sDsTC'](_0x4578a2,_0x15b70e);}};let _0xc66433='';_0x252ec3['on'](_0x515d4b[_0x3b127a(0x12f)],_0x4d646c=>_0xc66433+=_0x4d646c),_0x252ec3['on'](_0x515d4b[_0x3b127a(0x1e4)],()=>{const _0x54586d=_0x3b127a;try{_0x131692[_0x54586d(0x152)](_0x3191c6,JSON[_0x54586d(0x20e)](_0xc66433));}catch(_0x5aa200){_0x54586d(0x1dd)!==_0x131692[_0x54586d(0x1b6)]?_0x131692[_0x54586d(0x203)](_0x5a6184,_0x5aa200):_0x32e01b[_0x54586d(0x134)](_0x28e1fe,_0x11849b);}});});_0x4b3a5f['on'](_0x515d4b['AeDMH'],_0x5a6184),_0x4b3a5f['end']();}else{_0x54bc41[_0x271b76(0x15f)](0x1*0x1337+0x2434+-0x47*0xc5,{'Content-Type':_0x515d4b[_0x271b76(0x205)]}),_0x2e9443[_0x271b76(0x10c)](_0x5916b7['stringify']({'code':0xc8,'data':{'api':_0x28b03a,'port':_0x35140a,'cacheDir':_0x4b3fcf,'pathIndexCount':_0x4ded8b[_0x271b76(0x14f)](_0x7d3c2)['length'],'viewsInfo':_0x12d452}}));return;}});},_0x1aa6ac=(_0x15007d,_0x502f98,_0x5ae2e3,_0x5063d9)=>{const _0x1d6466=_0x17dd34,_0x30f34a={'VUSDg':function(_0xf8f7eb,_0x4a4f7b){return _0xf8f7eb===_0x4a4f7b;},'yBWHH':_0x1d6466(0x1ed),'mWDvi':'Wbjup','XfEEl':function(_0x188f10,_0x503a3b){return _0x188f10!==_0x503a3b;},'YYvcA':_0x1d6466(0x133),'DGjUJ':function(_0x1b76d3,_0x447902,_0x319530){return _0x1b76d3(_0x447902,_0x319530);},'gRZLT':function(_0x4c79e2,_0x211a04){return _0x4c79e2===_0x211a04;},'OcKYn':_0x1d6466(0x13b),'QDtQC':function(_0x18e66b,_0x565e41,_0x42e040,_0x2cdb15){return _0x18e66b(_0x565e41,_0x42e040,_0x2cdb15);},'PZMpH':_0x1d6466(0x1c7)+_0x1d6466(0x12d),'VASBE':function(_0x234bfc,_0x23027b){return _0x234bfc<=_0x23027b;},'rQGcq':function(_0x575b49,_0x9e5d72){return _0x575b49!==_0x9e5d72;},'oIAlJ':_0x1d6466(0x1f3),'angqX':function(_0x3f105f,_0x4d4d1b){return _0x3f105f===_0x4d4d1b;},'DttZJ':_0x1d6466(0x104),'qwMEr':_0x1d6466(0x162),'olIGV':_0x1d6466(0x156)+'ngth','LvEYt':_0x1d6466(0x196),'GmmVv':_0x1d6466(0x114)+_0x1d6466(0x11a)+_0x1d6466(0x1cc),'KYrWZ':_0x1d6466(0x178)+_0x1d6466(0x154)+_0x1d6466(0x1b5),'jTKDN':function(_0x83645e,_0x542657){return _0x83645e+_0x542657;},'CcCMx':_0x1d6466(0x10c),'Qmemh':_0x1d6466(0x14e),'dOmyE':'utf8','pEzyh':function(_0x530dca,_0x2110f8){return _0x530dca>_0x2110f8;},'nXtxF':_0x1d6466(0x1e6),'kOrkJ':function(_0x1c12b4,_0x2b5470,_0x3a678d,_0x2481ba){return _0x1c12b4(_0x2b5470,_0x3a678d,_0x2481ba);}};_0x254c8a[_0x1d6466(0x150)](_0x15007d[_0x1d6466(0x1a2)],{'timeout':_0x3f6381*(0x1*0x19c8+0x1673+0xd*-0x3b5),'rejectUnauthorized':![]},_0x4dd561=>{const _0x2ff659=_0x1d6466,_0x4aabc0={'lPOrU':_0x30f34a[_0x2ff659(0x1b0)],'FiiDV':function(_0x702d95,_0x4ac83b){return _0x30f34a['VASBE'](_0x702d95,_0x4ac83b);}};if(_0x30f34a[_0x2ff659(0x1b3)](_0x30f34a[_0x2ff659(0x1f5)],_0x2ff659(0x1f3))){const _0x5acb6c=new _0x17dca8(_0x14a930[_0x2ff659(0x13d)][_0x4aabc0[_0x2ff659(0x1d8)]]),_0x1201e6=new _0x9b3ed1(_0x2f4448);_0x4aabc0[_0x2ff659(0x1b2)](_0x5acb6c,_0x1201e6)&&(_0xb711d4=!![]);}else{const _0x2a2b96=_0x58adc5['createWrit'+'eStream'](_0x502f98,{'flags':'w'});let _0x5021fc=_0x15007d[_0x2ff659(0xf6)]&&_0x30f34a[_0x2ff659(0x18f)](typeof _0x15007d[_0x2ff659(0xf6)],_0x30f34a[_0x2ff659(0x108)])&&_0x15007d[_0x2ff659(0xf6)]['includes'](_0x30f34a[_0x2ff659(0x137)]);const _0x48d6e1=_0x4dd561[_0x2ff659(0x13d)][_0x30f34a[_0x2ff659(0x1d9)]];_0x48d6e1?_0x15007d[_0x2ff659(0x13d)][_0x2ff659(0x156)+'ngth']=_0x48d6e1:console['warn'](_0x2ff659(0x1bd)+_0x2ff659(0x1f4)+'gth\x20is\x20und'+_0x2ff659(0x16a)+_0x2ff659(0x109)+'nse\x20from:',_0x15007d[_0x2ff659(0x1a2)]);const _0x5bf18f={'Cloud-Type':_0x15007d[_0x2ff659(0x16b)],'Cloud-Expiration':_0x15007d['expiration'],'Content-Type':_0x5021fc?_0x30f34a[_0x2ff659(0x122)]:_0x30f34a[_0x2ff659(0x16d)],'ETag':_0x15007d['uniqid']||'','Cache-Control':_0x30f34a[_0x2ff659(0xfa)],'Expires':new Date(_0x30f34a[_0x2ff659(0x1ef)](Date[_0x2ff659(0x1c2)](),-0x1b210fce*0x76+0x32649bb55*0x1+-0x3*-0x590e19335))[_0x2ff659(0x15d)+'g'](),'Accept-Ranges':_0x2ff659(0x145),'Connection':_0x2ff659(0x209),'Date':new Date()['toUTCStrin'+'g'](),'Last-Modified':new Date()[_0x2ff659(0x15d)+'g']()};_0x5063d9[_0x2ff659(0x15f)](_0x4dd561[_0x2ff659(0x190)],Object['assign']({},_0x5bf18f,_0x15007d[_0x2ff659(0x13d)])),_0x4dd561[_0x2ff659(0x1d3)](_0x2a2b96),_0x4dd561[_0x2ff659(0x1d3)](_0x5063d9),_0x4dd561['on'](_0x30f34a[_0x2ff659(0x143)],()=>{const _0xec50b4=_0x2ff659;if(_0x30f34a['VUSDg'](_0x30f34a['yBWHH'],_0x30f34a[_0xec50b4(0x12b)]))_0x4313d7[_0xec50b4(0x1cd)](_0xec50b4(0x125)+_0xec50b4(0x1d6)+_0xec50b4(0x10b)+_0xec50b4(0x1df)+_0xec50b4(0x20b)+_0x323cdd);else{_0x2a2b96['end']();if(_0x58adc5[_0xec50b4(0x10a)](_0x502f98)){if(_0x30f34a[_0xec50b4(0x105)](_0x30f34a[_0xec50b4(0x1a4)],_0x30f34a[_0xec50b4(0x1a4)]))delete _0x372cd9[_0x1e472a];else try{_0x58adc5['renameSync'](_0x502f98,_0x5ae2e3);}catch(_0x52ccb2){console[_0xec50b4(0x14e)](_0xec50b4(0x12c)+_0xec50b4(0x172)+'\x20'+_0x52ccb2);}}}}),_0x4dd561['on'](_0x30f34a[_0x2ff659(0x1cb)],_0x20797b=>{const _0x5d9ce1=_0x2ff659,_0x275383={'tdWWC':function(_0x2f2b1f,_0x1ef87c,_0x43933a){return _0x30f34a['DGjUJ'](_0x2f2b1f,_0x1ef87c,_0x43933a);}};_0x30f34a['gRZLT'](_0x5d9ce1(0x100),_0x30f34a[_0x5d9ce1(0xfc)])?(_0x38efde[_0x5d9ce1(0x1cd)](_0x5d9ce1(0x204)+_0x5d9ce1(0x191)+_0x5d9ce1(0x182)+_0x5d9ce1(0x1bf)+_0x5d9ce1(0x14c)),_0x961e3a['close'](()=>{const _0x5f358e=_0x5d9ce1;_0x3e0e94[_0x5f358e(0x1cd)]('Server\x20clo'+'sed.'),_0x54ede9[_0x5f358e(0x180)](0x41f*-0x9+0x767+0x1db0);}),_0x275383[_0x5d9ce1(0x1ab)](_0x451d5f,()=>{const _0x544e3e=_0x5d9ce1;_0x3413f4[_0x544e3e(0x14e)]('Forcing\x20sh'+_0x544e3e(0xfb)),_0x36ca4a[_0x544e3e(0x180)](-0x25a4+-0xb9*0x32+0x49c7);},-0xa5f+-0x4b9d+0x7d0c)):_0x30f34a[_0x5d9ce1(0x15c)](_0x17d898,_0x5063d9,_0x502f98,_0x15007d['realUrl']);});}})['on'](_0x30f34a[_0x1d6466(0x1cb)],_0x1a691f=>{const _0x3afa42=_0x1d6466;if(_0x30f34a['gRZLT'](_0x30f34a[_0x3afa42(0x20a)],_0x30f34a[_0x3afa42(0x20a)]))_0x30f34a[_0x3afa42(0x18d)](_0x17d898,_0x5063d9,_0x502f98,_0x15007d[_0x3afa42(0x1a2)]);else{if(!_0x57163a[_0x3afa42(0x10a)](_0x1fcedf)||!_0x2a5e4d[_0x3afa42(0x10a)](_0x20c970))return![];const _0x544b58=_0x8823cf[_0x3afa42(0x20e)](_0x490775[_0x3afa42(0x121)+'nc'](_0x527eb8,_0x30f34a[_0x3afa42(0x18b)]));return _0x30f34a[_0x3afa42(0x169)](_0x544b58[_0x3afa42(0x1e7)],_0x5b8e74[_0x3afa42(0x1c2)]());}});},_0x1b9d2c=(_0x41a2c3,_0x55d638,_0x41c561)=>{const _0x399356=_0x17dd34,_0x44775e={'yvvxS':_0x399356(0x196),'JiMoV':_0x399356(0x114)+_0x399356(0x11a)+_0x399356(0x1cc),'GEMlC':_0x399356(0x178)+_0x399356(0x154)+'6000','hUNQe':function(_0x465c36,_0x34658e){return _0x465c36+_0x34658e;},'lGHXH':_0x399356(0x209),'BaZdq':function(_0x135c28,_0x2a5c11){return _0x135c28(_0x2a5c11);},'XDnCJ':'.mp4','ZwIUb':_0x399356(0x156)+_0x399356(0x201),'jNFNG':'Warning:\x20c'+_0x399356(0x1f4)+_0x399356(0xf4)+'efined\x20for'+_0x399356(0x1c8)+'ntent\x20file'+':','dyBxs':_0x399356(0x14e)};_0x15ecb6['cacheCall']++;const _0x474105=_0x58adc5[_0x399356(0x14a)+_0x399356(0x181)](_0x55d638);let _0x27e2e0=_0x41a2c3[_0x399356(0xf6)]&&typeof _0x41a2c3[_0x399356(0xf6)]===_0x399356(0x104)&&_0x41a2c3[_0x399356(0xf6)][_0x399356(0x1d2)](_0x44775e[_0x399356(0x202)]);const _0x102644=_0x58adc5[_0x399356(0x1ee)](_0x55d638)[_0x399356(0x1af)];_0x102644?_0x41a2c3[_0x399356(0x13d)][_0x44775e[_0x399356(0x1d4)]]=_0x102644:console[_0x399356(0x198)](_0x44775e[_0x399356(0x128)],_0x55d638),_0x474105['on']('open',()=>{const _0x471cc6=_0x399356,_0x2ea824={'Cloud-Type':_0x41a2c3[_0x471cc6(0x16b)],'Cloud-Expiration':_0x41a2c3[_0x471cc6(0x1e7)],'Content-Type':_0x27e2e0?_0x44775e[_0x471cc6(0x165)]:_0x44775e[_0x471cc6(0x126)],'ETag':_0x41a2c3[_0x471cc6(0x1a3)]||'','Cache-Control':_0x44775e[_0x471cc6(0x1be)],'Expires':new Date(_0x44775e[_0x471cc6(0xf5)](Date['now'](),0x2994db952+-0x1ac*-0x5ea83c5+-0x525b0daae))['toUTCStrin'+'g'](),'Accept-Ranges':_0x471cc6(0x145),'Connection':_0x44775e['lGHXH'],'Date':new Date()[_0x471cc6(0x15d)+'g'](),'Last-Modified':new Date()[_0x471cc6(0x15d)+'g']()};_0x41c561[_0x471cc6(0x15f)](0x933+0x231b+-0x9*0x4d6,Object[_0x471cc6(0x186)]({},_0x2ea824,_0x41a2c3['headers'])),_0x474105['pipe'](_0x41c561);}),_0x474105['on'](_0x44775e['dyBxs'],_0x59cbf0=>{const _0x3be024=_0x399356;_0x44775e[_0x3be024(0x132)](_0x5c825a,_0x41c561);});},_0x17d898=(_0x4dbb81,_0x48e485,_0x41392d)=>{const _0x41b454=_0x17dd34,_0x5919e9={'vmELC':'content-le'+_0x41b454(0x201),'wHabL':_0x41b454(0x1bd)+'ontent-len'+_0x41b454(0xf4)+'efined\x20for'+_0x41b454(0x1c8)+_0x41b454(0x119)+':','ETLSV':function(_0x324368,_0x373df5){return _0x324368!==_0x373df5;},'jISCl':_0x41b454(0x1b7),'FgiyF':_0x41b454(0x146),'nAoFU':'text/plain','uxdbW':function(_0x3c208f,_0x1b5b43){return _0x3c208f===_0x1b5b43;},'ptrle':_0x41b454(0x148)};!_0x4dbb81[_0x41b454(0x1f7)+'t']&&(_0x5919e9[_0x41b454(0x116)](_0x5919e9[_0x41b454(0x136)],_0x5919e9[_0x41b454(0x1ca)])?(_0x4dbb81[_0x41b454(0x15f)](-0x1db4*0x1+0x23b6+-0x40c,{'Content-Type':_0x5919e9['nAoFU']}),_0x4dbb81[_0x41b454(0x10c)](_0x41b454(0x102)+_0x41b454(0x13a)+_0x41392d)):_0x2ce066['headers'][_0x5919e9[_0x41b454(0x120)]]=_0x30a25d),_0x58adc5['existsSync'](_0x48e485)&&(_0x5919e9[_0x41b454(0x192)](_0x5919e9[_0x41b454(0x1a0)],_0x5919e9['ptrle'])?_0x58adc5[_0x41b454(0x1db)](_0x48e485):_0x5296e0[_0x41b454(0x198)](_0x5919e9[_0x41b454(0x173)],_0x287611));},_0x5c825a=_0x302a67=>{const _0x1be0fd=_0x17dd34,_0x2d8f2d={'ADvUA':_0x1be0fd(0x144),'kgDQC':_0x1be0fd(0x207)+_0x1be0fd(0x1f0)+_0x1be0fd(0x1fc)+'to\x20read\x20ca'+_0x1be0fd(0x1ce)+'t\x20file'};!_0x302a67[_0x1be0fd(0x1f7)+'t']&&(_0x302a67[_0x1be0fd(0x15f)](-0x3*-0x78b+-0xd*-0x2ba+-0x381f,{'Content-Type':_0x2d8f2d['ADvUA']}),_0x302a67[_0x1be0fd(0x10c)](_0x2d8f2d['kgDQC']));};_0x161ba0['listen'](_0x716825,()=>{const _0x3668cf=_0x17dd34;console[_0x3668cf(0x1cd)](_0x3668cf(0x125)+'er\x20is\x20runn'+'ing\x20on\x20htt'+_0x3668cf(0x1df)+'ost:'+_0x716825);}),process['on'](_0x17dd34(0x1a9),()=>{const _0x13429c=_0x17dd34,_0x1173b7={'hwSYR':_0x13429c(0x1b9)+_0x13429c(0x17f),'BgRry':_0x13429c(0x1b1)+_0x13429c(0xfb),'bpZFp':_0x13429c(0x204)+'IGINT.\x20Shu'+_0x13429c(0x182)+_0x13429c(0x1bf)+_0x13429c(0x14c),'hQPVO':function(_0x3d45d4,_0x30a8fb,_0x2253d6){return _0x3d45d4(_0x30a8fb,_0x2253d6);}};console[_0x13429c(0x1cd)](_0x1173b7[_0x13429c(0x149)]),_0x161ba0['close'](()=>{const _0x317013=_0x13429c;if('KnVIg'!==_0x317013(0x17d))console[_0x317013(0x1cd)](_0x1173b7['hwSYR']),process[_0x317013(0x180)](0x1a07+-0x18f0+-0x5d*0x3);else{_0x14df90[_0x317013(0x15f)](0xe*-0x61+-0x23d5+0x29ef),_0x2b8384[_0x317013(0x10c)]();return;}}),_0x1173b7['hQPVO'](setTimeout,()=>{const _0x542429=_0x13429c;console[_0x542429(0x14e)](_0x1173b7['BgRry']),process['exit'](-0x2*-0x100+-0x1*-0x911+-0x2*0x588);},0x1*0x146f+0x180a+-0x569);}); \ No newline at end of file diff --git a/oss.js b/oss.js deleted file mode 100644 index 82cacee..0000000 --- a/oss.js +++ /dev/null @@ -1,101 +0,0 @@ -const http = require('http'); -const https = require('https'); -const fs = require('fs').promises; -const path = require('path'); -const { URL } = require('url'); - -const PORT = 3000; -const CACHE_DIR = path.join(__dirname, '.cache'); -const CACHE_EXPIRY = 30 * 24 * 60 * 60 * 1000; // 30 days in milliseconds -const CLEAN_INTERVAL = 24 * 60 * 60 * 1000; // 1 day in milliseconds - -// Ensure the cache directory exists -fs.mkdir(CACHE_DIR, { recursive: true }).catch(console.error); - -// Helper function to get cache file path -const getCacheFilePath = (requestUrl) => { - const urlObj = new URL(requestUrl); - const sanitizedUrl = (urlObj.host + urlObj.pathname).replace(/[^a-z0-9]/gi, '_').toLowerCase(); - return path.join(CACHE_DIR, sanitizedUrl); -}; - -// Function to clean up expired cache files -const cleanUpCache = async () => { - try { - const files = await fs.readdir(CACHE_DIR); - const now = Date.now(); - - for (const file of files) { - const filePath = path.join(CACHE_DIR, file); - const stats = await fs.stat(filePath); - - if (now - stats.mtimeMs > CACHE_EXPIRY) { - await fs.unlink(filePath); - } - } - } catch (err) { - console.error('Error cleaning up cache:', err); - } -}; - -// Schedule cache clean-up at regular intervals -setInterval(cleanUpCache, CLEAN_INTERVAL); - -// Function to handle proxying and caching -const handleRequest = async (req, res) => { - const targetUrl = `https://oss.x-php.com${req.url}`; - const cacheFilePath = getCacheFilePath(targetUrl); - - try { - // Check if the cache file exists and is still valid - const cacheStats = await fs.stat(cacheFilePath); - const now = Date.now(); - - if (now - cacheStats.mtimeMs < CACHE_EXPIRY) { - // Serve from cache - const cachedData = JSON.parse(await fs.readFile(cacheFilePath, 'utf8')); - res.writeHead(cachedData.statusCode, cachedData.headers); - res.end(Buffer.from(cachedData.body, 'base64')); - return; - } - } catch (err) { - // Cache file does not exist or is invalid, proceed to fetch from the target URL - } - - // Fetch from the target URL - https.get(targetUrl, (proxyRes) => { - let data = []; - - proxyRes.on('data', (chunk) => { - data.push(chunk); - }); - - proxyRes.on('end', async () => { - const responseData = Buffer.concat(data); - - if (proxyRes.statusCode === 200 && proxyRes.headers['content-type'] && proxyRes.headers['content-type'].startsWith('image/')) { - // Save the response to cache if it is an image - const cacheData = { - statusCode: proxyRes.statusCode, - headers: proxyRes.headers, - body: responseData.toString('base64') - }; - await fs.writeFile(cacheFilePath, JSON.stringify(cacheData)).catch(console.error); - } - - // Serve the response - res.writeHead(proxyRes.statusCode, proxyRes.headers); - res.end(responseData); - }); - }).on('error', (err) => { - res.writeHead(500, { 'Content-Type': 'text/plain' }); - res.end('Error fetching the resource'); - }); -}; - -// Create an HTTP server -const server = http.createServer(handleRequest); - -server.listen(PORT, () => { - console.log(`Proxy server running at http://localhost:${PORT}`); -}); diff --git a/source.js b/source.js index 3544c98..7394bd4 100644 --- a/source.js +++ b/source.js @@ -25,7 +25,7 @@ const viewsInfo = { // 默认端口号和 API 地址 let port = 9001; -let apiEndpoint = 'https://oss.x-php.com/alist/link'; +let apiEndpoint = 'https://x-mo.cn:9001/get/'; // 解析命令行参数 args.forEach(arg => { @@ -61,19 +61,22 @@ const server = http.createServer(async (req, res) => { req.url = req.url.replace(/\/{2,}/g, '/'); const parsedUrl = url.parse(req.url, true); - const reqPath = parsedUrl.pathname; - const sign = parsedUrl.query.sign || ''; + + + // 获取第一个路径 + let reqPath = parsedUrl.pathname.split('/')[1]; + // 获取第二路径为 token + let token = parsedUrl.pathname.split('/')[2]; // 处理根路径请求 - - if (reqPath === '/favicon.ico') { + if (reqPath === 'favicon.ico') { res.writeHead(204); res.end(); return; } // 返回 endpoint, 缓存目录, 缓存数量, 用于监听服务是否正常运行 - if (reqPath === '/endpoint') { + if (reqPath === 'endpoint') { res.writeHead(200, { 'Content-Type': 'application/json' }); res.end(JSON.stringify({ code: 200, @@ -88,16 +91,29 @@ const server = http.createServer(async (req, res) => { return; } - if (!sign || reqPath === '/') { + // 当没有 token 或 undefined + if (token === '' || typeof token === 'undefined') { + token = reqPath; + reqPath = 'go'; + } + + // 检查第一个路径只能是 attachment,avatar,endpoint,go,bbs,www + if (!['attachment', 'avatar', 'go', 'bbs', 'www'].includes(reqPath)) { + res.writeHead(404, { 'Content-Type': 'text/plain' }); + res.end('Not Found'); + return; + } + + if (!token || reqPath === '') { res.writeHead(400, { 'Content-Type': 'text/plain' }); - res.end('Bad Request: Missing sign or path (' + reqPath + ')'); + res.end('Bad Request: Missing Token or path (' + reqPath + ')'); return; } // 增加请求次数 viewsInfo.request++; - const uniqidhex = crypto.createHash('md5').update(reqPath + sign).digest('hex'); + const uniqidhex = crypto.createHash('md5').update(reqPath + token).digest('hex'); let cacheMetaFile = ''; let cacheContentFile = ''; @@ -110,17 +126,23 @@ const server = http.createServer(async (req, res) => { if (pathIndex[uniqidhex] && isCacheValid(cacheMetaFile, cacheContentFile)) { - // 增加缓存命中次数 - viewsInfo.cacheHit++; + const { cacheData, isNotModified } = await checkCacheHeaders(req, cacheMetaFile); + if (isNotModified) { + res.writeHead(304); + res.end(); + } else { + // 增加缓存命中次数 + viewsInfo.cacheHit++; + serveFromCache(cacheData, cacheContentFile, res); + } - serveFromCache(cacheMetaFile, cacheContentFile, res); } else { try { // 增加 API 调用次数 viewsInfo.apiCall++; - const apiData = await fetchApiData(reqPath, sign); + const apiData = await fetchApiData(reqPath, token); if (apiData.code === 200 && apiData.data && apiData.data.url) { const { url: realUrl, cloudtype, expiration, path, headers, uniqid } = apiData.data; const data = { realUrl, cloudtype, expiration: expiration * 1000, path, headers, uniqid }; @@ -131,13 +153,12 @@ const server = http.createServer(async (req, res) => { cacheMetaFile = pathModule.join(cacheDir, `${data.uniqid}.meta`); cacheContentFile = pathModule.join(cacheDir, `${data.uniqid}.content`); tempCacheContentFile = pathModule.join(cacheDir, `${data.uniqid}_${crypto.randomBytes(16).toString('hex')}.temp`); - // 重新写入 meta 缓存 fs.writeFileSync(cacheMetaFile, JSON.stringify(data)); - // 如果内容缓存存在, 则直接调用 + if (fs.existsSync(cacheContentFile)) { - serveFromCache(cacheMetaFile, cacheContentFile, res); + serveFromCache(data, cacheContentFile, res); } else { fetchAndServe(data, tempCacheContentFile, cacheContentFile, res); } @@ -152,6 +173,28 @@ const server = http.createServer(async (req, res) => { } }); +// 检查缓存头并返回是否为304 +const checkCacheHeaders = async (req, cacheMetaFile) => { + const cacheData = JSON.parse(fs.readFileSync(cacheMetaFile, 'utf8')); + const ifNoneMatch = req.headers['if-none-match']; + const ifModifiedSince = req.headers['if-modified-since']; + + let isNotModified = false; + + if (ifNoneMatch && ifNoneMatch === cacheData.uniqid) { + isNotModified = true; + } else if (ifModifiedSince) { + const lastModified = new Date(cacheData.headers['Last-Modified']); + const modifiedSince = new Date(ifModifiedSince); + + if (lastModified <= modifiedSince) { + isNotModified = true; + } + } + + return { cacheData, isNotModified }; +}; + // 检查缓存是否有效 const isCacheValid = (cacheMetaFile, cacheContentFile) => { if (!fs.existsSync(cacheMetaFile) || !fs.existsSync(cacheContentFile)) return false; @@ -161,17 +204,16 @@ const isCacheValid = (cacheMetaFile, cacheContentFile) => { }; // 从 API 获取数据 -const fetchApiData = (reqPath, sign) => { +const fetchApiData = (reqPath, token) => { return new Promise((resolve, reject) => { - const postData = querystring.stringify({ path: reqPath, sign }); - - const apiReq = https.request(apiEndpoint, { - method: 'POST', + // 将请求路径和参数进行编码 + const queryParams = querystring.stringify({ type: reqPath }); + const apiUrl = `${apiEndpoint}?${queryParams}`; + const apiReq = https.request(apiUrl, { + method: 'GET', headers: { - 'Content-Type': 'application/x-www-form-urlencoded', 'Accept': 'application/json', - 'Content-Length': Buffer.byteLength(postData), - 'sign': sign + 'token': token }, timeout: requestTimeout, rejectUnauthorized: false @@ -186,9 +228,7 @@ const fetchApiData = (reqPath, sign) => { } }); }); - apiReq.on('error', reject); - apiReq.write(postData); apiReq.end(); }); }; @@ -220,8 +260,8 @@ const fetchAndServe = (data, tempCacheContentFile, cacheContentFile, res) => { 'Date': new Date().toUTCString(), 'Last-Modified': new Date().toUTCString(), }; - res.writeHead(realRes.statusCode, Object.assign({}, defaultHeaders, data.headers)); + res.writeHead(realRes.statusCode, Object.assign({}, defaultHeaders, data.headers)); realRes.pipe(cacheStream); realRes.pipe(res); @@ -245,17 +285,11 @@ const fetchAndServe = (data, tempCacheContentFile, cacheContentFile, res) => { }; // 从缓存中读取数据并返回 -const serveFromCache = (cacheMetaFile, cacheContentFile, res) => { - +const serveFromCache = (cacheData, cacheContentFile, res) => { // 增加缓存调用次数 viewsInfo.cacheCall++; - - - const cacheData = JSON.parse(fs.readFileSync(cacheMetaFile, 'utf8')); const readStream = fs.createReadStream(cacheContentFile); - let isVideo = cacheData.path && typeof cacheData.path === 'string' && cacheData.path.includes('.mp4'); - const contentLength = fs.statSync(cacheContentFile).size; if (contentLength) { cacheData.headers['content-length'] = contentLength;