nucleus-core-ts 0.8.1 → 0.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.js +1 -1
- package/dist/fe/index.js +1 -1
- package/dist/index-0yyw12k6.js +1 -1
- package/dist/index-tv67j5qd.js +1 -1
- package/dist/index.js +1 -1
- package/dist/src/Client/Proxy/index.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x23c30b=_0x1da4;(function(_0x2a8019,_0x33a048){const _0x4aa1a4=_0x1da4,_0x51e5c2=_0x2a8019();while(!![]){try{const _0x3add97=-parseInt(_0x4aa1a4(0xc5))/0x1*(parseInt(_0x4aa1a4(0xa2))/0x2)+-parseInt(_0x4aa1a4(0xdb))/0x3*(parseInt(_0x4aa1a4(0xc1))/0x4)+parseInt(_0x4aa1a4(0xcc))/0x5+-parseInt(_0x4aa1a4(0xec))/0x6*(parseInt(_0x4aa1a4(0xd2))/0x7)+parseInt(_0x4aa1a4(0xe7))/0x8*(parseInt(_0x4aa1a4(0xda))/0x9)+parseInt(_0x4aa1a4(0x10a))/0xa*(parseInt(_0x4aa1a4(0xca))/0xb)+parseInt(_0x4aa1a4(0xaf))/0xc;if(_0x3add97===_0x33a048)break;else _0x51e5c2['push'](_0x51e5c2['shift']());}catch(_0x495059){_0x51e5c2['push'](_0x51e5c2['shift']());}}}(_0x3496,0xc62db));import'../../../index-0yyw12k6.js';function h(_0x2204e4){const _0x48a756=_0x1da4,_0x4e0b38={'ARVmC':function(_0x3278ce,_0x28d4cc){return _0x3278ce(_0x28d4cc);}};let _0x10b857={};if(!_0x2204e4)return _0x10b857;for(let _0x35f266 of _0x2204e4['split'](';')){let [_0x4e9d07,..._0x4eaa98]=_0x35f266[_0x48a756(0xa1)]()[_0x48a756(0xd5)]('=');if(_0x4e9d07&&_0x4eaa98[_0x48a756(0xf2)]>0x0)_0x10b857[_0x4e9d07]=_0x4e0b38['ARVmC'](decodeURIComponent,_0x4eaa98[_0x48a756(0xf7)]('='));}return _0x10b857;}function b(_0x89844a){const _0xee2cf0=_0x1da4;let _0x4a0e79=_0x89844a['replace'](/:[\w]+\*/g,'*');return _0x4a0e79=_0x4a0e79[_0xee2cf0(0xe1)](/[.+?^${}()|[\]\\]/g,_0xee2cf0(0xb4)),_0x4a0e79=_0x4a0e79[_0xee2cf0(0xe1)](/\*/g,'.*'),new RegExp('^'+_0x4a0e79+'$');}function x(_0x4253c6,_0xf87f2d){const _0x27a8c5=_0x1da4;for(let _0xa26a2f of _0xf87f2d)if(b(_0xa26a2f)[_0x27a8c5(0xa0)](_0x4253c6))return!0x0;return!0x1;}function _0x1da4(_0xfd23bd,_0x9b3669){_0xfd23bd=_0xfd23bd-0x97;const _0x3496bf=_0x3496();let _0x1da44d=_0x3496bf[_0xfd23bd];if(_0x1da4['zpkakf']===undefined){var _0x240c4e=function(_0x41c6ab){const _0x5b0816='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3298d6='',_0x44e10d='';for(let _0x1d08f1=0x0,_0xdceba5,_0x1db2ff,_0x22ada1=0x0;_0x1db2ff=_0x41c6ab['charAt'](_0x22ada1++);~_0x1db2ff&&(_0xdceba5=_0x1d08f1%0x4?_0xdceba5*0x40+_0x1db2ff:_0x1db2ff,_0x1d08f1++%0x4)?_0x3298d6+=String['fromCharCode'](0xff&_0xdceba5>>(-0x2*_0x1d08f1&0x6)):0x0){_0x1db2ff=_0x5b0816['indexOf'](_0x1db2ff);}for(let _0xe22029=0x0,_0x3b9514=_0x3298d6['length'];_0xe22029<_0x3b9514;_0xe22029++){_0x44e10d+='%'+('00'+_0x3298d6['charCodeAt'](_0xe22029)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x44e10d);};_0x1da4['KRZhZx']=_0x240c4e,_0x1da4['Pzcfpc']={},_0x1da4['zpkakf']=!![];}const _0x3537ec=_0x3496bf[0x0],_0x5a05d0=_0xfd23bd+_0x3537ec,_0x16cd1b=_0x1da4['Pzcfpc'][_0x5a05d0];return!_0x16cd1b?(_0x1da44d=_0x1da4['KRZhZx'](_0x1da44d),_0x1da4['Pzcfpc'][_0x5a05d0]=_0x1da44d):_0x1da44d=_0x16cd1b,_0x1da44d;}function P(_0x393ea2,_0x5a6258){const _0x472911=_0x1da4;for(let [_0x57a9ff,_0x3f3031]of Object[_0x472911(0xf9)](_0x5a6258))if(b(_0x57a9ff)['test'](_0x393ea2)){let _0x53005b=_0x57a9ff['replace'](/\*.*$/,''),_0x19e06e=_0x3f3031[_0x472911(0xe1)](/\*.*$/,'');return _0x393ea2[_0x472911(0xe1)](_0x53005b,_0x19e06e);}return _0x393ea2;}function $(_0x1072c9,_0x1bfd7a,_0x2c2e6c){const _0xbd06b2=_0x1da4;let _0x271623=_0x1072c9[_0xbd06b2(0xac)]('?')?'&':'?';return''+_0x1072c9+_0x271623+encodeURIComponent(_0x1bfd7a)+'='+encodeURIComponent(_0x2c2e6c);}function S(_0x4f3ad0){const _0x2e6662=_0x1da4;return _0x4f3ad0[_0x2e6662(0xe1)](/^http/,'ws');}function C(_0xcdeb0e){const _0xfc956e=_0x1da4;return _0xcdeb0e[_0xfc956e(0xe1)](/^ws/,'http');}function y(_0x15523e,_0x6b4436){return{'info':(..._0x5df100)=>{const _0x127383=_0x1da4;if(_0x6b4436)console[_0x127383(0xe4)]('['+_0x15523e+']',..._0x5df100);},'warn':(..._0x15d73b)=>{const _0x5499ff=_0x1da4;console[_0x5499ff(0x97)]('['+_0x15523e+']',..._0x15d73b);},'error':(..._0x1b8b13)=>{const _0x2c3122=_0x1da4;console[_0x2c3122(0xd6)]('['+_0x15523e+']',..._0x1b8b13);}};}async function W(_0x139753){const _0x18a55d=_0x1da4;try{let _0x3232e6=Bun['file'](_0x139753);if(!await _0x3232e6['exists']())return;let _0x565bdb=await _0x3232e6[_0x18a55d(0xb7)]();for(let _0x34eb3c of _0x565bdb['split']('\x0a')){let _0x53b669=_0x34eb3c['trim']();if(_0x53b669&&!_0x53b669[_0x18a55d(0xef)]('#')){let [_0x4e63dc,..._0x51b521]=_0x53b669[_0x18a55d(0xd5)]('='),_0x48f9be=_0x51b521['join']('=')['replace'](/^["']|["']$/g,'');if(_0x4e63dc&&!process['env'][_0x4e63dc])process[_0x18a55d(0xea)][_0x4e63dc]=_0x48f9be;}}}catch{}}function v(_0x3cf21f,_0x59aca5=0x32){const _0x552796=_0x1da4,_0x3f786c={};_0x3f786c[_0x552796(0x108)]=function(_0x399dbd,_0x3820c6){return _0x399dbd<=_0x3820c6;};const _0x37e217=_0x3f786c;if(_0x37e217['hBqRF'](_0x3cf21f[_0x552796(0xf2)],_0x59aca5))return _0x3cf21f;return _0x3cf21f['slice'](0x0,_0x59aca5)+'...';}function T(_0x401b4c){const _0xba45b8=_0x1da4,_0x2c324d={'rmHjd':function(_0x4c757,_0x1c8629,_0x57e977){return _0x4c757(_0x1c8629,_0x57e977);},'gDvwV':function(_0x3b88ea,_0x5961f7){return _0x3b88ea!==_0x5961f7;},'MuiRi':'origin','PluoQ':function(_0x45a582,_0x3c0069){return _0x45a582(_0x3c0069);},'QNbdN':'cookie','DKKdJ':'host','CkdCx':function(_0xd63ec8,_0x18e7fb){return _0xd63ec8===_0x18e7fb;},'ZVCrf':function(_0x46b833,_0x55729c){return _0x46b833-_0x55729c;},'bYKCm':function(_0x45ba21,_0x435096){return _0x45ba21 instanceof _0x435096;},'pdKOl':'AbortError','XKLah':_0xba45b8(0xa8)};let _0x5b9987=y('HTTP\x20Proxy',_0x401b4c[_0xba45b8(0x9b)]??!0x1);function _0x245cec(_0x4363ca){const _0x183934=_0xba45b8;for(let _0x469549 of _0x401b4c[_0x183934(0x115)])if(x(_0x4363ca,_0x469549['paths']))return _0x469549;return null;}function _0x27eb9f(_0x42bc11,_0x2dfd00){const _0x345f97=_0xba45b8;let _0x474723=_0x2dfd00['url'][_0x345f97(0xe1)](/\/$/,''),_0xcd57c2=_0x42bc11;if(_0x2dfd00['pathRewrite'])_0xcd57c2=_0x2c324d['rmHjd'](P,_0x42bc11,_0x2dfd00[_0x345f97(0xab)]);return''+_0x474723+_0xcd57c2;}return{async 'handle'(_0xc54a79){const _0x3fede8=_0xba45b8;let _0x12ab07=new URL(_0xc54a79[_0x3fede8(0xbe)]),_0x2454e4=_0x12ab07['pathname'],_0x1de8f5=_0x245cec(_0x2454e4);if(!_0x1de8f5)return null;let _0x3de3d0=performance[_0x3fede8(0xb2)](),_0x5ace1f=_0x27eb9f(_0x2454e4,_0x1de8f5),_0x5a17a1=_0x12ab07[_0x3fede8(0x105)]?''+_0x5ace1f+_0x12ab07[_0x3fede8(0x105)]:_0x5ace1f;_0x5b9987[_0x3fede8(0xce)](_0x3fede8(0xed)+_0xc54a79['method']+'\x20'+_0x2454e4+_0x3fede8(0xd0)+_0x5a17a1),_0x401b4c[_0x3fede8(0xaa)]?.(_0x2454e4,_0x5a17a1);let _0x5762e9=new Headers(_0xc54a79[_0x3fede8(0xe6)]);if(_0x2c324d[_0x3fede8(0x9c)](_0x1de8f5[_0x3fede8(0x109)],!0x1)){let _0x289b5d=new URL(_0x1de8f5['url']);_0x5762e9[_0x3fede8(0xcb)]('host',_0x289b5d[_0x3fede8(0x113)]),_0x5762e9[_0x3fede8(0xcb)](_0x2c324d[_0x3fede8(0x9d)],_0x289b5d[_0x3fede8(0xd8)]);}if(_0x1de8f5['injectTokenFromCookie']){let _0x36a181=_0x2c324d['PluoQ'](h,_0xc54a79[_0x3fede8(0xe6)][_0x3fede8(0xdc)](_0x2c324d['QNbdN']))[_0x1de8f5[_0x3fede8(0xde)][_0x3fede8(0xc9)]];if(_0x36a181){let _0x59a2e7=_0x1de8f5['injectTokenFromCookie']['headerName']??_0x3fede8(0x10f);_0x5762e9[_0x3fede8(0xcb)](_0x59a2e7,'Bearer\x20'+_0x36a181),_0x5b9987['info']('Token\x20injected\x20from\x20cookie\x20to\x20'+_0x59a2e7);}}if(_0x1de8f5['headers']){for(let [_0x17aa23,_0x2d6170]of Object[_0x3fede8(0xf9)](_0x1de8f5['headers']))_0x5762e9[_0x3fede8(0xcb)](_0x17aa23,_0x2d6170);}_0x5762e9['delete'](_0x2c324d['DKKdJ']);try{let _0x477597=new AbortController(),_0x4ccd39=_0x1de8f5[_0x3fede8(0xc3)]??0x7530,_0xcac5e2=setTimeout(()=>{_0x477597['abort']();},_0x4ccd39),_0x446772=await _0x2c324d['rmHjd'](fetch,_0x5a17a1,{'method':_0xc54a79[_0x3fede8(0x107)],'headers':_0x5762e9,'body':_0xc54a79['body'],'signal':_0x477597[_0x3fede8(0xd1)],'redirect':_0x2c324d['CkdCx'](_0x1de8f5['followRedirects'],!0x1)?'manual':'follow'});_0x2c324d['PluoQ'](clearTimeout,_0xcac5e2);let _0x2ff9ab=performance['now']()-_0x3de3d0;_0x5b9987['info'](_0x3fede8(0xf4)+_0x446772['status']+'\x20('+_0x2ff9ab[_0x3fede8(0x114)](0x0)+'ms)'),_0x401b4c[_0x3fede8(0xd4)]?.(_0x2454e4,_0x446772[_0x3fede8(0xa9)],_0x2ff9ab);let _0x28735b=new Headers(_0x446772[_0x3fede8(0xe6)]);return _0x28735b['delete'](_0x3fede8(0xbc)),_0x28735b['delete']('transfer-encoding'),new Response(_0x446772[_0x3fede8(0xba)],{'status':_0x446772['status'],'statusText':_0x446772[_0x3fede8(0xa4)],'headers':_0x28735b});}catch(_0xfbc128){let _0x17d621=_0x2c324d['ZVCrf'](performance['now'](),_0x3de3d0),_0x15352e=_0x2c324d[_0x3fede8(0xf1)](_0xfbc128,Error)?_0xfbc128:_0x2c324d['PluoQ'](Error,_0x2c324d['PluoQ'](String,_0xfbc128));const _0x1343fe={};_0x1343fe[_0x3fede8(0x10b)]=_0x3fede8(0xad);const _0x1acb4f={};_0x1acb4f['status']=0x1f8,_0x1acb4f[_0x3fede8(0xe6)]=_0x1343fe;if(_0x2c324d[_0x3fede8(0xf0)](_0x15352e[_0x3fede8(0x110)],_0x2c324d['pdKOl']))return _0x5b9987[_0x3fede8(0xd6)](_0x3fede8(0xe3)+_0x17d621['toFixed'](0x0)+'ms:\x20'+_0x2454e4),_0x401b4c['onError']?.(_0x2c324d[_0x3fede8(0xae)](Error,'Request\x20timeout'),_0x2454e4,0x1f8),new Response(JSON[_0x3fede8(0x102)]({'error':_0x2c324d[_0x3fede8(0xff)],'message':_0x3fede8(0xb9)}),_0x1acb4f);const _0x470666={};_0x470666['Content-Type']=_0x3fede8(0xad);const _0x30535d={};return _0x30535d['status']=0x1f6,_0x30535d['headers']=_0x470666,(_0x5b9987['error'](_0x3fede8(0xc4)+_0x2454e4,_0x15352e[_0x3fede8(0xa5)]),_0x401b4c['onError']?.(_0x15352e,_0x2454e4,0x1f6),new Response(JSON[_0x3fede8(0x102)]({'error':'Bad\x20Gateway','message':_0x15352e['message']}),_0x30535d));}}};}function k(_0x586352){const _0x2e861d=_0x1da4,_0x2ad7b0={'PGmRy':function(_0x26a4f3,_0x309f50,_0x893e75){return _0x26a4f3(_0x309f50,_0x893e75);},'uKYtp':_0x2e861d(0xf6),'qrzYq':function(_0x1d2d8e,_0x3ad6ab){return _0x1d2d8e!==_0x3ad6ab;},'glSKt':function(_0x17255b,_0x45b4d6){return _0x17255b(_0x45b4d6);},'JOHXE':'WebSocket\x20path\x20not\x20found','CFbhz':_0x2e861d(0xe2),'FDqjZ':function(_0x3a0bb1,_0x38202a,_0x450f41,_0x258323,_0x32aaed){return _0x3a0bb1(_0x38202a,_0x450f41,_0x258323,_0x32aaed);},'hPyNt':function(_0x5ced2c,_0x331dbc){return _0x5ced2c===_0x331dbc;},'LmHiz':'string','HTadD':function(_0x2ae038,_0x13c4cd){return _0x2ae038 instanceof _0x13c4cd;},'rRyzr':function(_0x1e31cb,_0x1248f1){return _0x1e31cb(_0x1248f1);},'OIKmo':function(_0x5d982c,_0x111d53){return _0x5d982c===_0x111d53;},'nkbIA':_0x2e861d(0x111)};let _0x3ddf74=y(_0x2ad7b0[_0x2e861d(0xb1)],_0x586352['debug']??!0x1);function _0x302cb2(_0x302b4e){const _0x327967=_0x2e861d;for(let _0x18a56a of _0x586352[_0x327967(0x115)])if(_0x2ad7b0[_0x327967(0xfe)](x,_0x302b4e,_0x18a56a[_0x327967(0xb3)]))return _0x18a56a;return null;}function _0x14cb96(_0x327f47,_0x44e9ab,_0x541b6d,_0x325a4f){const _0x477f3a=_0x2e861d;let _0x48fc48=_0x44e9ab[_0x477f3a(0xbe)]['replace'](/\/$/,'');if(_0x48fc48['startsWith']('http'))_0x48fc48=S(_0x48fc48);let _0x12e9d5=_0x327f47;if(_0x44e9ab['pathRewrite'])_0x12e9d5=P(_0x327f47,_0x44e9ab[_0x477f3a(0xab)]);let _0x24c7ed=''+_0x48fc48+_0x12e9d5,_0x3013cb=_0x325a4f[_0x477f3a(0xb6)]();if(_0x3013cb)_0x24c7ed=_0x24c7ed+'?'+_0x3013cb;if(_0x44e9ab['injectTokenFromCookie']){let _0x149abb=_0x541b6d[_0x44e9ab[_0x477f3a(0xde)][_0x477f3a(0xc9)]];if(_0x149abb){let _0x53bc7d=_0x44e9ab[_0x477f3a(0xde)][_0x477f3a(0xfd)]??_0x477f3a(0xf5);_0x24c7ed=$(_0x24c7ed,_0x53bc7d,_0x149abb),_0x3ddf74['info'](_0x2ad7b0['uKYtp']);}}return _0x24c7ed;}return{'upgrade'(_0x42a021,_0x41dfd4){const _0x3f3a53=_0x2e861d;let _0x560d67=new URL(_0x42a021['url']),_0x4d97c8=_0x560d67['pathname'];if(_0x2ad7b0[_0x3f3a53(0xf3)](_0x586352['allowHmr'],!0x1)&&_0x4d97c8[_0x3f3a53(0xef)]('/_next/webpack-hmr'))return _0x3ddf74['info'](_0x3f3a53(0xc8)+_0x4d97c8),!0x1;let _0x2116e3=_0x2ad7b0['glSKt'](_0x302cb2,_0x4d97c8);if(!_0x2116e3){const _0x303840={};_0x303840['status']=0x194;if(_0x586352[_0x3f3a53(0xeb)]!==!0x1)return _0x3ddf74[_0x3f3a53(0x97)](_0x3f3a53(0xb8)+_0x4d97c8),new Response(_0x2ad7b0['JOHXE'],_0x303840);return!0x1;}let _0x365048=h(_0x42a021['headers']['get'](_0x2ad7b0['CFbhz'])),_0x28c26e=_0x2ad7b0['FDqjZ'](_0x14cb96,_0x4d97c8,_0x2116e3,_0x365048,_0x560d67['searchParams']);return _0x3ddf74['info'](_0x3f3a53(0xb0)+_0x4d97c8+'\x20->\x20'+_0x28c26e),_0x41dfd4['upgrade'](_0x42a021,{'data':{'backendWs':null,'path':_0x4d97c8,'target':_0x28c26e,'buffer':[]}});},'websocket':{'open'(_0x5af034){const _0x186000=_0x2e861d,_0x2e807d={'mhyIC':function(_0x5e7746,_0x5f4f9f){const _0x4ad577=_0x1da4;return _0x2ad7b0[_0x4ad577(0x103)](_0x5e7746,_0x5f4f9f);},'WTESU':'Backend\x20WebSocket\x20error'};let _0x291a2a=_0x5af034['data'],_0x4b6c2b=new WebSocket(_0x291a2a[_0x186000(0xdd)]);_0x4b6c2b[_0x186000(0x98)]=()=>{const _0x25f164=_0x186000;_0x3ddf74['info']('Backend\x20connected:\x20'+_0x291a2a['path']),_0x586352[_0x25f164(0x10c)]?.(_0x291a2a[_0x25f164(0xd3)],_0x291a2a['target']);for(let _0x3b1630 of _0x291a2a['buffer'])_0x4b6c2b['send'](_0x3b1630);_0x291a2a['buffer']=[];},_0x4b6c2b['onmessage']=_0x32ee5a=>{const _0x1ef850=_0x186000;if(_0x2ad7b0[_0x1ef850(0x10d)](typeof _0x32ee5a['data'],_0x2ad7b0[_0x1ef850(0xee)]))_0x5af034['send'](_0x32ee5a['data']);else{if(_0x32ee5a['data']instanceof ArrayBuffer)_0x5af034['send'](new Uint8Array(_0x32ee5a['data']));else{if(_0x2ad7b0['HTadD'](_0x32ee5a[_0x1ef850(0x9e)],Blob))_0x32ee5a['data'][_0x1ef850(0xfb)]()['then'](_0x408b93=>{_0x5af034['send'](new Uint8Array(_0x408b93));});}}},_0x4b6c2b['onerror']=_0x39c976=>{const _0x1e6638=_0x186000;let _0x5ea172=_0x2e807d[_0x1e6638(0xc7)](Error,_0x2e807d['WTESU']);_0x3ddf74['error'](_0x1e6638(0xcf)+_0x291a2a['path'],_0x39c976),_0x586352[_0x1e6638(0xdf)]?.(_0x5ea172,_0x291a2a[_0x1e6638(0xd3)]);},_0x4b6c2b['onclose']=()=>{const _0x24d8c6=_0x186000;_0x3ddf74['info'](_0x24d8c6(0x106)+_0x291a2a['path']),_0x586352['onClose']?.(_0x291a2a[_0x24d8c6(0xd3)]),_0x5af034['close']();},_0x291a2a['backendWs']=_0x4b6c2b;},'message'(_0x181075,_0x530452){const _0x416e19=_0x2e861d;let _0x98e25c=_0x181075[_0x416e19(0x9e)];if(_0x2ad7b0[_0x416e19(0xa3)](_0x98e25c['backendWs']?.[_0x416e19(0xb5)],WebSocket[_0x416e19(0xbf)]))_0x98e25c[_0x416e19(0xe9)]['send'](_0x530452);else{if(typeof _0x530452===_0x416e19(0xc6))_0x98e25c[_0x416e19(0xbd)][_0x416e19(0x10e)](_0x530452);else{let _0x31a7d0=new ArrayBuffer(_0x530452['byteLength']);new Uint8Array(_0x31a7d0)[_0x416e19(0xcb)](new Uint8Array(_0x530452)),_0x98e25c['buffer'][_0x416e19(0x10e)](_0x31a7d0);}}},'close'(_0x549a59){const _0x54cd3e=_0x2e861d;let _0x2057cc=_0x549a59['data'];if(_0x3ddf74['info']('Client\x20closed:\x20'+_0x2057cc[_0x54cd3e(0xd3)]),_0x2057cc['backendWs'])_0x2057cc['backendWs']['close']();},'drain'(_0xef630a){}}};}function _0x3496(){const _0x7ef450=['y29UDgvUDc1LBMnVzgLUzW','yNvMzMvY','DxjS','t1bftG','mc4WlJaUma','mZGWnte5nKzbB3rqzW','Ag9ZDg5HBwu','DgLTzw91Da','rxjYB3i6ia','mZm2nta4yvvYueLX','C3rYAw5N','BwH5sum','se1sigj5CgfZCZOG','y29VA2LLtMfTzq','odiYotf6CgfSCMC','C2v0','odKXmta1sejguLnK','icaTihbVCNq6ia','Aw5MBW','qMfJA2vUzcbLCNjVCJOG','ic0+ia','C2LNBMfS','mZyWmtu3uvbsrenN','Cgf0Aa','B25szxnWB25Zzq','C3bSAxq','zxjYB3i','icaGic0G','B3jPz2LU','tM8GBwf0y2HPBMCGChjVEhKGDgfYz2v0igzVCIb0AgLZihjLCxvLC3q','mZz2ufLNC1u','m1L6vw9lrW','z2v0','DgfYz2v0','Aw5Qzwn0vg9Rzw5gCM9Tq29VA2LL','B25fCNjVCG','zw52ugf0Aa','CMvWBgfJzq','y29VA2LL','vgLTzw91DcbHzNrLCIa','Bg9N','yMDPEwW','AgvHzgvYCW','otuWmtKYzgTsA25k','wMfXz1C','yMfJA2vUzfDZ','zw52','CMvQzwn0vw5RBM93BG','mtm4Dg1wv0vA','uhjVEhLPBMC6ia','tg1iAxO','C3rHCNrZv2L0Aa','q2TKq3G','yLLlq20','BgvUz3rO','Cxj6wxe','uMvZCg9UC2u6ia','Dg9Rzw4','vg9Rzw4GAw5Qzwn0zwqGzNjVBsbJB29RAwu','AM9PBG','u0Phv2q','zw50CMLLCW','uhjVEhKGu2vYDMvY','yxjYyxLcDwzMzxi','Ahr0Ca','CxvLCNLqyxjHBq','ueDTuNK','weTmywG','D2vIC29JA2v0','vw9pExu','C3rYAw5NAwz5','CLj5ENi','B25szwfKEq','C2vHCMnO','qMfJA2vUzcbJBg9Zzwq6ia','Bwv0Ag9K','AejXuKy','y2HHBMDLt3jPz2LU','mty3meXjBLHAyq','q29UDgvUDc1uExbL','B25pCgvU','Afb5tNq','ChvZAa','yxv0Ag9YAxPHDgLVBG','BMfTzq','v1mGuhjVEhK','Cg9YDa','Ag9ZDa','Dg9gAxHLza','DgfYz2v0CW','D2fYBG','B25VCgvU','icaTigrLDJOG','icaTigHVC3rUyw1LoIa','zgvIDwC','z0r2D1y','txvPuMK','zgf0yq','Dg9mB3DLCKnHC2u','DgvZDa','DhjPBq','nhjcBeL3BG','t0LlBw8','C3rHDhvZvgv4Da','BwvZC2fNzq','zgv2','EMXTsha','r2f0zxDHEsbuAw1LB3v0','C3rHDhvZ','B25szxf1zxn0','Cgf0AfjLD3jPDgu','Aw5JBhvKzxm','yxbWBgLJyxrPB24VANnVBG','ugX1B1e','mJa2mdeZotzYy05Rwfy','vxbNCMfKAw5NoIa','BMTIsue','BM93','Cgf0Ahm','xcqM','CMvHzhLtDgf0zq','Dg9tDhjPBMC','Dgv4Da','tM8GDgfYz2v0igzVDw5KigzVCJOG','qMfJA2vUzcbYzxf1zxn0ihrPBwvKig91Da','yM9KEq','DxbNCMfKzq'];_0x3496=function(){return _0x7ef450;};return _0x3496();}function H(_0x1981f9){const _0x2c5bfb=_0x1da4,_0x810511={'HbYze':function(_0x4329be,_0x3952e9){return _0x4329be===_0x3952e9;},'DJNwO':function(_0x15cc06,_0x206be0){return _0x15cc06 instanceof _0x206be0;},'bgiyl':function(_0x565769,_0x413342){return _0x565769(_0x413342);},'UoOyu':'0.0.0.0'};let _0x535675=_0x810511[_0x2c5bfb(0xe5)](k,_0x1981f9),_0x852998=_0x1981f9['port']??0xfa1,_0x2aec64=_0x1981f9['hostname']??_0x810511[_0x2c5bfb(0x101)],_0x479448=Bun['serve']({'port':_0x852998,'hostname':_0x2aec64,'fetch'(_0x4a4b69,_0x4bb49e){const _0x2290ab=_0x2c5bfb;let _0x3b726b=_0x535675[_0x2290ab(0xbb)](_0x4a4b69,_0x4bb49e);if(_0x810511['HbYze'](_0x3b726b,!0x0))return;if(_0x810511['DJNwO'](_0x3b726b,Response))return _0x3b726b;const _0x383dc6={};return _0x383dc6[_0x2290ab(0xa9)]=0x190,new Response('Not\x20a\x20WebSocket\x20request',_0x383dc6);},'websocket':_0x535675['websocket']});return console['log']('[WS\x20Proxy]\x20Started\x20on\x20'+_0x2aec64+':'+_0x852998),_0x479448;}async function U(_0x12025e){const _0x509bbd=_0x1da4,_0x3c2697={'wqJpS':_0x509bbd(0xbb),'SJGWd':function(_0x5cf603,_0x205c4d){return _0x5cf603===_0x205c4d;},'hKvgx':function(_0x54ae40,_0x56fa1d){return _0x54ae40 instanceof _0x56fa1d;},'UUFSu':'application/json','zTwtX':function(_0x4d5e0d,_0x2edfee,_0x4c87b2){return _0x4d5e0d(_0x2edfee,_0x4c87b2);},'ZaqgW':_0x509bbd(0xfa),'zlmHp':function(_0x3c5351,_0x372eb8){return _0x3c5351(_0x372eb8);}};let _0x25a85d=_0x12025e['port']??0xfa0,_0x596c69=_0x12025e[_0x509bbd(0xc2)]??_0x509bbd(0xc0),_0x2ec58c=_0x12025e[_0x509bbd(0xa6)]??!0x0,_0x92a8f2=_0x3c2697['zTwtX'](y,_0x3c2697[_0x509bbd(0xe8)],_0x2ec58c);if(_0x12025e['envPath'])await W(_0x12025e[_0x509bbd(0xe0)]);_0x92a8f2[_0x509bbd(0xce)]('Starting\x20proxy\x20server...'),_0x92a8f2['info'](_0x509bbd(0x9a)+_0x596c69),_0x92a8f2['info'](_0x509bbd(0xcd)+_0x25a85d),_0x92a8f2[_0x509bbd(0xce)](_0x509bbd(0x99)+_0x2ec58c);let _0x2631a2=_0x12025e['ws']?_0x3c2697[_0x509bbd(0xa7)](k,{..._0x12025e['ws'],'debug':_0x12025e['ws']['debug']??_0x2ec58c}):null,_0x1c1438=_0x12025e['http']?T({..._0x12025e['http'],'debug':_0x12025e[_0x509bbd(0xfc)][_0x509bbd(0x9b)]??_0x2ec58c}):null;if(_0x2631a2&&_0x12025e['ws']?.['targets']){_0x92a8f2[_0x509bbd(0xce)]('\x20\x20-\x20WebSocket\x20targets:\x20'+_0x12025e['ws']['targets'][_0x509bbd(0xf2)]);for(let _0x4411e6 of _0x12025e['ws']['targets'])_0x92a8f2[_0x509bbd(0xce)](_0x509bbd(0xd7)+_0x4411e6['url']+':\x20'+_0x4411e6['paths'][_0x509bbd(0xf7)](',\x20'));}if(_0x1c1438&&_0x12025e['http']?.['targets']){_0x92a8f2[_0x509bbd(0xce)]('\x20\x20-\x20HTTP\x20targets:\x20'+_0x12025e[_0x509bbd(0xfc)]['targets'][_0x509bbd(0xf2)]);for(let _0x524233 of _0x12025e[_0x509bbd(0xfc)]['targets'])_0x92a8f2[_0x509bbd(0xce)](_0x509bbd(0xd7)+_0x524233[_0x509bbd(0xbe)]+':\x20'+_0x524233[_0x509bbd(0xb3)]['join'](',\x20'));}const _0xc1f189={};_0xc1f189['open']=function(){},_0xc1f189['message']=function(){},_0xc1f189['close']=function(){},_0xc1f189['drain']=function(){};let _0x31b45d=Bun['serve']({'port':_0x25a85d,'hostname':_0x596c69,async 'fetch'(_0x28050,_0x58812f){const _0x3a1352=_0x509bbd;if(_0x28050[_0x3a1352(0xe6)]['get'](_0x3c2697['wqJpS'])?.[_0x3a1352(0x9f)]()==='websocket'){if(_0x2631a2){let _0x5d41af=_0x2631a2[_0x3a1352(0xbb)](_0x28050,_0x58812f);if(_0x3c2697[_0x3a1352(0xf8)](_0x5d41af,!0x0))return;if(_0x3c2697['hKvgx'](_0x5d41af,Response))return _0x5d41af;}}if(_0x1c1438){let _0x5048ec=await _0x1c1438['handle'](_0x28050);if(_0x5048ec)return _0x5048ec;}const _0x3941f7={};_0x3941f7['error']='Not\x20Found',_0x3941f7[_0x3a1352(0xa5)]=_0x3a1352(0xd9);const _0x5c775e={};_0x5c775e['Content-Type']=_0x3c2697['UUFSu'];const _0x3fec51={};return _0x3fec51[_0x3a1352(0xa9)]=0x194,_0x3fec51[_0x3a1352(0xe6)]=_0x5c775e,new Response(JSON['stringify'](_0x3941f7),_0x3fec51);},'websocket':_0x2631a2?.[_0x509bbd(0x100)]??_0xc1f189});return _0x92a8f2['info']('>\x20Ready\x20on\x20http://'+_0x596c69+':'+_0x25a85d),_0x12025e[_0x509bbd(0x104)]?.({'port':_0x25a85d,'hostname':_0x596c69}),_0x31b45d;}const _0x51f91e={};_0x51f91e[_0x23c30b(0x115)]=[],_0x51f91e[_0x23c30b(0x9b)]=!0x1,_0x51f91e['allowHmr']=!0x0,_0x51f91e[_0x23c30b(0xeb)]=!0x0;const _0x465061={};_0x465061[_0x23c30b(0x115)]=[],_0x465061['debug']=!0x1;const _0x13a43f={};_0x13a43f[_0x23c30b(0x112)]=0xfa0,_0x13a43f['hostname']='0.0.0.0',_0x13a43f['dev']=!0x0,_0x13a43f['ws']=_0x51f91e,_0x13a43f['http']=_0x465061;var B=_0x13a43f;export{C as wsToHttp,H as startWsProxyServer,v as sanitizeForLog,P as rewritePath,h as parseCookies,x as matchPath,W as loadEnvFile,S as httpToWs,b as globToRegex,B as defaultProxyConfig,k as createWsProxyHandler,U as createProxyServer,y as createProxyLogger,T as createHttpProxyHandler,$ as addQueryParam};
|
|
1
|
+
const _0xba884d=_0x51b2;(function(_0x1ec507,_0xbeeffe){const _0x1b8a06=_0x51b2,_0x126c4c=_0x1ec507();while(!![]){try{const _0x44251a=-parseInt(_0x1b8a06(0xed))/0x1+parseInt(_0x1b8a06(0xdd))/0x2*(-parseInt(_0x1b8a06(0x120))/0x3)+-parseInt(_0x1b8a06(0x11b))/0x4*(-parseInt(_0x1b8a06(0x101))/0x5)+-parseInt(_0x1b8a06(0xfd))/0x6*(parseInt(_0x1b8a06(0xc1))/0x7)+-parseInt(_0x1b8a06(0xca))/0x8+parseInt(_0x1b8a06(0xe4))/0x9+parseInt(_0x1b8a06(0xf3))/0xa;if(_0x44251a===_0xbeeffe)break;else _0x126c4c['push'](_0x126c4c['shift']());}catch(_0x4beb2c){_0x126c4c['push'](_0x126c4c['shift']());}}}(_0x418b,0xd8d07));function _0x418b(){const _0x10c8ca=['zMLSzq','tLjlC28','mtqWotCXmdvgsgvUBNy','qMfKieDHDgv3yxK','Cgf0Aa','Aw5JBhvKzxm','Cg9YDa','C2LNBMfS','zNbQDM8','uhjVEhKGu2vYDMvY','icaTigrLDJOG','oda4mdi3tKrgs3vi','CxvLCNLqyxjHBq','qNnvtLa','B3jPz2LU','C3bSAxq','BwvZC2fNzq','mZaZnJi1nJbnDvHLv1u','qMfJA2vUzcbJB25Uzwn0zwq6ia','y29VA2LLtMfTzq','zgf0yq','AM9PBG','BxmP','y29VA2LL','Dg9gAxHLza','B25szxf1zxn0','yNvMzMvY','mtC0tgf6Dfjt','ENnVD2G','C2vHCMnO','pIbszwfKEsbVBIbODhrWoI8V','odvnu0r3EuW','icaTieHuvfaGDgfYz2v0CZOG','B25TzxnZywDL','B1zyswm','C3rYAw5NAwz5','DgHLBG','Aw5Qzwn0vg9Rzw5gCM9Tq29VA2LL','Ahr0Ca','Bg9N','CwLUq04','tM8GDgfYz2v0igzVDw5KigzVCJOG','B25szwfKEq','qKXYtMm','CMvHzhLtDgf0zq','zw50CMLLCW','tMXLwhG','yxbWBgLJyxrPB24VANnVBG','Cgf0Ahm','rvzKuu0','uhjVEhLPBMC6ia','B3bLBG','yNzXAKm','zgv2','vxbNCMfKAw5NoIa','CMvQzwn0vw5RBM93BG','DxjS','mJe3oti4vKjzug9i','D2vIC29JA2v0','BM93','zg1Qqxe','r2f0zxDHEsbuAw1LB3v0','ndK2ndm2nfzXzeH1Da','B25JBg9Zzq','icaGic0G','B25dBg9Zzq','BgvUz3rO','C2v0','q29UDgvUDc1uExbL','Ag9ZDa','ic0+ia','icaTihbVCNq6ia','DgfYz2v0','yMfJA2vUzfDZ','y2XVC2u','C3rYAw5N','Dgv4Da','zxjYB3i','zM9SBg93','zw52','uuH2uum','mJq2mteZDwfPveji','xcqM','DgvZDa','qwjVCNrfCNjVCG','DxbNCMfKzq','C2vUza','C3rHDhvZ','C3rHCNrZv2L0Aa','C2vYDMu','oti2nJm4nhLjyuDprq','AgvHzgvYCW','Cgf0AfjLD3jPDgu','zgvIDwC','qMfJA2vUzcbLCNjVCJOG','z2v0','Ag9ZDg5HBwu','CMvWBgfJzq','z0LYsfC','mc4WlJaUma','D2fYBG','t1bftG','Cgf0Ag5HBwu','DhjPBq','y2z0qMK','r3L4Chi','zxHPC3rZ','AgfUzgXL','Aw5MBW','mLbQwwDIsG','DgLTzw91Da','B25fCNjVCG','B25szxnWB25Zzq','DgfYz2v0CW'];_0x418b=function(){return _0x10c8ca;};return _0x418b();}import'../../../index-0yyw12k6.js';function h(_0x56b4a1){const _0x14f324=_0x51b2;let _0x43531c={};if(!_0x56b4a1)return _0x43531c;for(let _0x2abdfa of _0x56b4a1[_0x14f324(0xf1)](';')){let [_0xa85874,..._0x5f521b]=_0x2abdfa[_0x14f324(0xd7)]()['split']('=');if(_0xa85874&&_0x5f521b[_0x14f324(0x124)]>0x0)_0x43531c[_0xa85874]=decodeURIComponent(_0x5f521b['join']('='));}return _0x43531c;}function b(_0x39f85c){const _0x4be26a=_0x51b2,_0x5086ff={};_0x5086ff[_0x4be26a(0xe3)]=_0x4be26a(0xc2);const _0x52544b=_0x5086ff;let _0x267f90=_0x39f85c['replace'](/:[\w]+\*/g,'*');return _0x267f90=_0x267f90[_0x4be26a(0xd1)](/[.+?^${}()|[\]\\]/g,_0x52544b['NRKso']),_0x267f90=_0x267f90['replace'](/\*/g,'.*'),new RegExp('^'+_0x267f90+'$');}function x(_0x3f4b7d,_0x143849){const _0x2d1cf6=_0x51b2,_0x39d817={'BsUNP':function(_0x4c2152,_0x53a54e){return _0x4c2152(_0x53a54e);}};for(let _0x15675b of _0x143849)if(_0x39d817[_0x2d1cf6(0xef)](b,_0x15675b)[_0x2d1cf6(0xc3)](_0x3f4b7d))return!0x0;return!0x1;}function P(_0x3c5543,_0x4d7b82){const _0x30aaec=_0x51b2,_0x28a286={'dmjAq':function(_0x5f178a,_0x4b9dbb){return _0x5f178a(_0x4b9dbb);}};for(let [_0x5b69a7,_0x5456b9]of Object[_0x30aaec(0x10f)](_0x4d7b82))if(_0x28a286[_0x30aaec(0x11e)](b,_0x5b69a7)['test'](_0x3c5543)){let _0x5f3677=_0x5b69a7['replace'](/\*.*$/,''),_0x543d02=_0x5456b9[_0x30aaec(0xd1)](/\*.*$/,'');return _0x3c5543[_0x30aaec(0xd1)](_0x5f3677,_0x543d02);}return _0x3c5543;}function $(_0x5e2bad,_0x19ab5a,_0x26c48b){const _0x22395d=_0x51b2,_0x11e337={'zsowh':function(_0x516c23,_0x23ab58){return _0x516c23(_0x23ab58);}};let _0x2e09df=_0x5e2bad[_0x22395d(0xe7)]('?')?'&':'?';return''+_0x5e2bad+_0x2e09df+_0x11e337[_0x22395d(0xfe)](encodeURIComponent,_0x19ab5a)+'='+encodeURIComponent(_0x26c48b);}function S(_0x29560a){return _0x29560a['replace'](/^http/,'ws');}function C(_0x4e76e5){const _0x4e04a1=_0x51b2;return _0x4e76e5[_0x4e04a1(0xd1)](/^ws/,'http');}function _0x51b2(_0x308421,_0x4dd59f){_0x308421=_0x308421-0xbe;const _0x418bcb=_0x418b();let _0x51b276=_0x418bcb[_0x308421];if(_0x51b2['bhFaPg']===undefined){var _0xa712da=function(_0x119fd1){const _0x48eede='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x62443d='',_0xfcbe85='';for(let _0x1c4d75=0x0,_0x2998f3,_0x521733,_0x1eebbe=0x0;_0x521733=_0x119fd1['charAt'](_0x1eebbe++);~_0x521733&&(_0x2998f3=_0x1c4d75%0x4?_0x2998f3*0x40+_0x521733:_0x521733,_0x1c4d75++%0x4)?_0x62443d+=String['fromCharCode'](0xff&_0x2998f3>>(-0x2*_0x1c4d75&0x6)):0x0){_0x521733=_0x48eede['indexOf'](_0x521733);}for(let _0x1d4b0d=0x0,_0x7d8172=_0x62443d['length'];_0x1d4b0d<_0x7d8172;_0x1d4b0d++){_0xfcbe85+='%'+('00'+_0x62443d['charCodeAt'](_0x1d4b0d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xfcbe85);};_0x51b2['aWyIuT']=_0xa712da,_0x51b2['uwmpGg']={},_0x51b2['bhFaPg']=!![];}const _0x4d5ac3=_0x418bcb[0x0],_0x5ea820=_0x308421+_0x4d5ac3,_0x375951=_0x51b2['uwmpGg'][_0x5ea820];return!_0x375951?(_0x51b276=_0x51b2['aWyIuT'](_0x51b276),_0x51b2['uwmpGg'][_0x5ea820]=_0x51b276):_0x51b276=_0x375951,_0x51b276;}function y(_0x24c080,_0x418027){return{'info':(..._0x28f7e0)=>{const _0x192d77=_0x51b2;if(_0x418027)console[_0x192d77(0x109)]('['+_0x24c080+']',..._0x28f7e0);},'warn':(..._0x20793b)=>{const _0x5d8f50=_0x51b2;console[_0x5d8f50(0xd4)]('['+_0x24c080+']',..._0x20793b);},'error':(..._0x271c51)=>{console['error']('['+_0x24c080+']',..._0x271c51);}};}async function W(_0x4168c8){const _0x446128=_0x51b2;try{let _0x281ecf=Bun[_0x446128(0xe2)](_0x4168c8);if(!await _0x281ecf[_0x446128(0xda)]())return;let _0x3192c9=await _0x281ecf[_0x446128(0x12e)]();for(let _0x510563 of _0x3192c9['split']('\x0a')){let _0x56b7bf=_0x510563['trim']();if(_0x56b7bf&&!_0x56b7bf['startsWith']('#')){let [_0x41c5fd,..._0x5521bb]=_0x56b7bf['split']('='),_0x312e09=_0x5521bb[_0x446128(0xf7)]('=')[_0x446128(0xd1)](/^["']|["']$/g,'');if(_0x41c5fd&&!process[_0x446128(0xbf)][_0x41c5fd])process['env'][_0x41c5fd]=_0x312e09;}}}catch{}}function v(_0x4db7ac,_0x43034b=0x32){const _0x5c616b=_0x51b2;if(_0x4db7ac[_0x5c616b(0x124)]<=_0x43034b)return _0x4db7ac;return _0x4db7ac['slice'](0x0,_0x43034b)+'...';}function T(_0x5031d2){const _0xb61552=_0x51b2,_0x5ecc4a={'gjQpI':function(_0x48ac79,_0x41013b,_0x28ff67){return _0x48ac79(_0x41013b,_0x28ff67);},'PnjuU':function(_0x146683,_0x2985db){return _0x146683!==_0x2985db;},'pZtIw':_0xb61552(0x127),'Zjauv':function(_0x5172a8,_0x7c525d){return _0x5172a8(_0x7c525d);},'gIrHW':'authorization','kKlUi':function(_0x5c435a,_0xb1aa85,_0x35754f){return _0x5c435a(_0xb1aa85,_0x35754f);},'qinCN':function(_0x49787b,_0x52943e){return _0x49787b===_0x52943e;},'FRrtA':function(_0xb9fd92,_0x3f68aa){return _0xb9fd92-_0x3f68aa;},'mOTCr':'content-encoding','ycetg':'transfer-encoding','QHvQC':function(_0x128bcc,_0x3502cb){return _0x128bcc instanceof _0x3502cb;},'cftBi':_0xb61552(0xc4),'NleXx':function(_0x2726d3,_0x46bba5){return _0x2726d3(_0x46bba5);},'BLrNc':function(_0x2645fa,_0x363b22,_0x36e122){return _0x2645fa(_0x363b22,_0x36e122);}};let _0x2e73ef=_0x5ecc4a[_0xb61552(0x10d)](y,'HTTP\x20Proxy',_0x5031d2[_0xb61552(0xcd)]??!0x1);function _0x1590e8(_0x3e846c){for(let _0x23ddca of _0x5031d2['targets'])if(x(_0x3e846c,_0x23ddca['paths']))return _0x23ddca;return null;}function _0xab4915(_0x4fe296,_0x59957c){let _0x5117b0=_0x59957c['url']['replace'](/\/$/,''),_0x9eac5c=_0x4fe296;if(_0x59957c['pathRewrite'])_0x9eac5c=_0x5ecc4a['gjQpI'](P,_0x4fe296,_0x59957c['pathRewrite']);return''+_0x5117b0+_0x9eac5c;}return{async 'handle'(_0x1c44fd){const _0x52bdf5=_0xb61552;let _0x2bcf16=new URL(_0x1c44fd[_0x52bdf5(0x11a)]),_0x54678c=_0x2bcf16[_0x52bdf5(0xd6)],_0x147a4c=_0x1590e8(_0x54678c);if(!_0x147a4c)return null;let _0x493473=performance[_0x52bdf5(0x11d)](),_0xdb4c83=_0xab4915(_0x54678c,_0x147a4c),_0x1c4a7a=_0x2bcf16['search']?''+_0xdb4c83+_0x2bcf16[_0x52bdf5(0xff)]:_0xdb4c83;_0x2e73ef['info'](_0x52bdf5(0x114)+_0x1c44fd['method']+'\x20'+_0x54678c+_0x52bdf5(0x128)+_0x1c4a7a),_0x5031d2[_0x52bdf5(0xfb)]?.(_0x54678c,_0x1c4a7a);let _0x3f1955=new Headers(_0x1c44fd['headers']);if(_0x5ecc4a['PnjuU'](_0x147a4c['changeOrigin'],!0x1)){let _0x292db7=new URL(_0x147a4c['url']);_0x3f1955['set'](_0x5ecc4a['pZtIw'],_0x292db7['host']),_0x3f1955[_0x52bdf5(0x125)]('origin',_0x292db7[_0x52bdf5(0xf0)]);}if(_0x147a4c['injectTokenFromCookie']){let _0x77c9a3=_0x5ecc4a['Zjauv'](h,_0x1c44fd['headers'][_0x52bdf5(0xcf)](_0x52bdf5(0xf9)))[_0x147a4c[_0x52bdf5(0x107)]['cookieName']];if(_0x77c9a3){let _0x293176=_0x147a4c[_0x52bdf5(0x107)]['headerName']??_0x5ecc4a[_0x52bdf5(0xd2)];_0x3f1955[_0x52bdf5(0x125)](_0x293176,'Bearer\x20'+_0x77c9a3),_0x2e73ef['info']('Token\x20injected\x20from\x20cookie\x20to\x20'+_0x293176);}}if(_0x147a4c['headers']){for(let [_0x1c19a8,_0x3351bb]of Object[_0x52bdf5(0x10f)](_0x147a4c[_0x52bdf5(0xcb)]))_0x3f1955[_0x52bdf5(0x125)](_0x1c19a8,_0x3351bb);}_0x3f1955['delete'](_0x52bdf5(0x127));try{let _0xacb23=new AbortController(),_0x2d9896=_0x147a4c[_0x52bdf5(0xde)]??0x7530,_0x49dbcb=_0x5ecc4a['kKlUi'](setTimeout,()=>{_0xacb23['abort']();},_0x2d9896),_0x4578af=await fetch(_0x1c4a7a,{'method':_0x1c44fd['method'],'headers':_0x3f1955,'body':_0x1c44fd['body'],'signal':_0xacb23[_0x52bdf5(0xe9)],'redirect':_0x5ecc4a['qinCN'](_0x147a4c['followRedirects'],!0x1)?'manual':_0x52bdf5(0xbe)});clearTimeout(_0x49dbcb);let _0x15494e=_0x5ecc4a['FRrtA'](performance[_0x52bdf5(0x11d)](),_0x493473);_0x2e73ef['info']('Response:\x20'+_0x4578af['status']+'\x20('+_0x15494e['toFixed'](0x0)+_0x52bdf5(0xf8)),_0x5031d2[_0x52bdf5(0xe0)]?.(_0x54678c,_0x4578af[_0x52bdf5(0xc7)],_0x15494e);let _0x513ee4=new Headers(_0x4578af[_0x52bdf5(0xcb)]);return _0x513ee4['delete'](_0x5ecc4a['mOTCr']),_0x513ee4['delete'](_0x5ecc4a['ycetg']),new Response(_0x4578af['body'],{'status':_0x4578af[_0x52bdf5(0xc7)],'statusText':_0x4578af['statusText'],'headers':_0x513ee4});}catch(_0x5dcc77){let _0x33b7ed=performance['now']()-_0x493473,_0x185e5d=_0x5ecc4a[_0x52bdf5(0xc0)](_0x5dcc77,Error)?_0x5dcc77:_0x5ecc4a['Zjauv'](Error,_0x5ecc4a['Zjauv'](String,_0x5dcc77));const _0x1bc0db={};_0x1bc0db['error']=_0x52bdf5(0x11f),_0x1bc0db['message']='Backend\x20request\x20timed\x20out';const _0x3cdd3d={};_0x3cdd3d[_0x52bdf5(0x126)]=_0x52bdf5(0x111);const _0x5aa0f5={};_0x5aa0f5['status']=0x1f8,_0x5aa0f5['headers']=_0x3cdd3d;if(_0x5ecc4a[_0x52bdf5(0x10a)](_0x185e5d['name'],_0x5ecc4a[_0x52bdf5(0xd8)]))return _0x2e73ef[_0x52bdf5(0x12f)]('Timeout\x20after\x20'+_0x33b7ed[_0x52bdf5(0xfa)](0x0)+'ms:\x20'+_0x54678c),_0x5031d2['onError']?.(_0x5ecc4a[_0x52bdf5(0x110)](Error,'Request\x20timeout'),_0x54678c,0x1f8),new Response(JSON[_0x52bdf5(0x105)](_0x1bc0db),_0x5aa0f5);const _0x2b6aec={};_0x2b6aec['Content-Type']='application/json';const _0x37ccc6={};return _0x37ccc6[_0x52bdf5(0xc7)]=0x1f6,_0x37ccc6[_0x52bdf5(0xcb)]=_0x2b6aec,(_0x2e73ef['error']('Error:\x20'+_0x54678c,_0x185e5d[_0x52bdf5(0xf2)]),_0x5031d2[_0x52bdf5(0xdf)]?.(_0x185e5d,_0x54678c,0x1f6),new Response(JSON['stringify']({'error':_0x52bdf5(0xe5),'message':_0x185e5d[_0x52bdf5(0xf2)]}),_0x37ccc6));}}};}function k(_0x2f75bb){const _0x1b3097=_0x51b2,_0x588fc2={'oVXIc':function(_0xe6098a,_0x458357,_0x4e4b85){return _0xe6098a(_0x458357,_0x4e4b85);},'eCGDq':'/_next/webpack-hmr','fpjvo':function(_0xaf27f6,_0x8c3c36){return _0xaf27f6(_0x8c3c36);},'zGrbP':function(_0x574aea,_0xd2bbc1){return _0x574aea!==_0xd2bbc1;},'MqmUK':function(_0xb0edaa,_0x42d787,_0xe973f4,_0x74b006,_0x5cacc1){return _0xb0edaa(_0x42d787,_0xe973f4,_0x74b006,_0x5cacc1);},'Gyxpr':'string','MLHma':function(_0x3e184c,_0x1eecc3){return _0x3e184c===_0x1eecc3;}};let _0x3df69a=_0x588fc2[_0x1b3097(0x104)](y,'WS\x20Proxy',_0x2f75bb['debug']??!0x1);function _0x10fb78(_0x1ac69c){const _0x3a9e25=_0x1b3097;for(let _0x4d050d of _0x2f75bb[_0x3a9e25(0xe1)])if(x(_0x1ac69c,_0x4d050d[_0x3a9e25(0x112)]))return _0x4d050d;return null;}function _0x43cd76(_0x1ae6b6,_0x46848b,_0x975c22,_0x4e1f15){const _0x3ed144=_0x1b3097;let _0x2f0d0a=_0x46848b[_0x3ed144(0x11a)][_0x3ed144(0xd1)](/\/$/,'');if(_0x2f0d0a[_0x3ed144(0xc8)](_0x3ed144(0x108)))_0x2f0d0a=S(_0x2f0d0a);let _0x5516db=_0x1ae6b6;if(_0x46848b['pathRewrite'])_0x5516db=_0x588fc2[_0x3ed144(0x104)](P,_0x1ae6b6,_0x46848b[_0x3ed144(0xcc)]);let _0x3f64fe=''+_0x2f0d0a+_0x5516db,_0xaf2bbc=_0x4e1f15['toString']();if(_0xaf2bbc)_0x3f64fe=_0x3f64fe+'?'+_0xaf2bbc;if(_0x46848b[_0x3ed144(0x107)]){let _0x4e5795=_0x975c22[_0x46848b['injectTokenFromCookie'][_0x3ed144(0xf5)]];if(_0x4e5795){let _0x135cee=_0x46848b[_0x3ed144(0x107)][_0x3ed144(0xee)]??'token';_0x3f64fe=$(_0x3f64fe,_0x135cee,_0x4e5795),_0x3df69a['info']('Token\x20injected\x20from\x20cookie');}}return _0x3f64fe;}return{'upgrade'(_0x116abe,_0xd838e1){const _0x4b2e38=_0x1b3097;let _0x291a0a=new URL(_0x116abe['url']),_0xd21552=_0x291a0a['pathname'];if(_0x2f75bb['allowHmr']!==!0x1&&_0xd21552['startsWith'](_0x588fc2['eCGDq']))return _0x3df69a[_0x4b2e38(0xdc)]('HMR\x20bypass:\x20'+_0xd21552),!0x1;let _0x291585=_0x588fc2[_0x4b2e38(0xea)](_0x10fb78,_0xd21552);if(!_0x291585){const _0x3f023c={};_0x3f023c[_0x4b2e38(0xc7)]=0x194;if(_0x588fc2['zGrbP'](_0x2f75bb[_0x4b2e38(0x119)],!0x1))return _0x3df69a[_0x4b2e38(0xd4)](_0x4b2e38(0x10b)+_0xd21552),new Response('WebSocket\x20path\x20not\x20found',_0x3f023c);return!0x1;}let _0xbbba8a=h(_0x116abe[_0x4b2e38(0xcb)]['get'](_0x4b2e38(0xf9))),_0x30c80c=_0x588fc2['MqmUK'](_0x43cd76,_0xd21552,_0x291585,_0xbbba8a,_0x291a0a['searchParams']);return _0x3df69a['info'](_0x4b2e38(0x118)+_0xd21552+'\x20->\x20'+_0x30c80c),_0xd838e1['upgrade'](_0x116abe,{'data':{'backendWs':null,'path':_0xd21552,'target':_0x30c80c,'buffer':[]}});},'websocket':{'open'(_0x4be8e3){const _0x17a662=_0x1b3097;let _0x46c11e=_0x4be8e3[_0x17a662(0xf6)],_0x4deb60=new WebSocket(_0x46c11e[_0x17a662(0x12a)]);_0x4deb60['onopen']=()=>{const _0x425b42=_0x17a662;_0x3df69a[_0x425b42(0xdc)](_0x425b42(0xf4)+_0x46c11e['path']),_0x2f75bb['onOpen']?.(_0x46c11e[_0x425b42(0xe6)],_0x46c11e['target']);for(let _0x135710 of _0x46c11e['buffer'])_0x4deb60[_0x425b42(0xc6)](_0x135710);_0x46c11e[_0x425b42(0xfc)]=[];},_0x4deb60[_0x17a662(0x103)]=_0x49cfae=>{const _0x5bae4c=_0x17a662;if(typeof _0x49cfae[_0x5bae4c(0xf6)]===_0x588fc2[_0x5bae4c(0xd9)])_0x4be8e3[_0x5bae4c(0xc6)](_0x49cfae[_0x5bae4c(0xf6)]);else{if(_0x49cfae['data']instanceof ArrayBuffer)_0x4be8e3[_0x5bae4c(0xc6)](new Uint8Array(_0x49cfae['data']));else{if(_0x49cfae['data']instanceof Blob)_0x49cfae[_0x5bae4c(0xf6)]['arrayBuffer']()[_0x5bae4c(0x106)](_0x1e9146=>{const _0x39a2c6=_0x5bae4c;_0x4be8e3[_0x39a2c6(0xc6)](new Uint8Array(_0x1e9146));});}}},_0x4deb60['onerror']=_0x41785e=>{const _0x1ab992=_0x17a662;let _0x315d57=Error('Backend\x20WebSocket\x20error');_0x3df69a['error'](_0x1ab992(0xce)+_0x46c11e[_0x1ab992(0xe6)],_0x41785e),_0x2f75bb['onError']?.(_0x315d57,_0x46c11e[_0x1ab992(0xe6)]);},_0x4deb60[_0x17a662(0x121)]=()=>{const _0x34c2e0=_0x17a662;_0x3df69a['info']('Backend\x20closed:\x20'+_0x46c11e['path']),_0x2f75bb[_0x34c2e0(0x123)]?.(_0x46c11e[_0x34c2e0(0xe6)]),_0x4be8e3['close']();},_0x46c11e[_0x17a662(0x12b)]=_0x4deb60;},'message'(_0x30b977,_0x43e551){const _0x42a469=_0x1b3097;let _0x2d7f7c=_0x30b977['data'];if(_0x2d7f7c[_0x42a469(0x12b)]?.[_0x42a469(0x10e)]===WebSocket[_0x42a469(0xd5)])_0x2d7f7c[_0x42a469(0x12b)][_0x42a469(0xc6)](_0x43e551);else{if(_0x588fc2['MLHma'](typeof _0x43e551,_0x42a469(0x12d)))_0x2d7f7c['buffer']['push'](_0x43e551);else{let _0x1e9d04=new ArrayBuffer(_0x43e551['byteLength']);new Uint8Array(_0x1e9d04)[_0x42a469(0x125)](new Uint8Array(_0x43e551)),_0x2d7f7c['buffer']['push'](_0x1e9d04);}}},'close'(_0x350539){const _0x3fc41c=_0x1b3097;let _0x5a334f=_0x350539['data'];if(_0x3df69a[_0x3fc41c(0xdc)]('Client\x20closed:\x20'+_0x5a334f[_0x3fc41c(0xe6)]),_0x5a334f[_0x3fc41c(0x12b)])_0x5a334f[_0x3fc41c(0x12b)][_0x3fc41c(0x12c)]();},'drain'(_0x1e835f){}}};}function H(_0x266ea1){const _0x196274=_0x51b2,_0x2bbd8b={};_0x2bbd8b['eXnxD']=function(_0x381e1d,_0xcde124){return _0x381e1d instanceof _0xcde124;},_0x2bbd8b['aTlhH']='Not\x20a\x20WebSocket\x20request';const _0x5bc632=_0x2bbd8b;let _0xee3bc0=k(_0x266ea1),_0x521471=_0x266ea1[_0x196274(0xe8)]??0xfa1,_0x11d457=_0x266ea1[_0x196274(0xd0)]??_0x196274(0xd3),_0x2ea8e7=Bun[_0x196274(0xc9)]({'port':_0x521471,'hostname':_0x11d457,'fetch'(_0x5a0714,_0x4af9d9){const _0x5e4877=_0x196274;let _0xdeb1bc=_0xee3bc0[_0x5e4877(0xc5)](_0x5a0714,_0x4af9d9);if(_0xdeb1bc===!0x0)return;if(_0x5bc632['eXnxD'](_0xdeb1bc,Response))return _0xdeb1bc;const _0x29e3e9={};return _0x29e3e9['status']=0x190,new Response(_0x5bc632['aTlhH'],_0x29e3e9);},'websocket':_0xee3bc0[_0x196274(0x11c)]});return console[_0x196274(0x109)]('[WS\x20Proxy]\x20Started\x20on\x20'+_0x11d457+':'+_0x521471),_0x2ea8e7;}async function U(_0x3382a2){const _0x439ffc=_0x51b2,_0x24a2cf={'dgfiS':function(_0x51ed60,_0x472861){return _0x51ed60===_0x472861;},'FiIqJ':'websocket','Gfjxq':function(_0x12386c,_0x587d16){return _0x12386c===_0x587d16;},'EVdQM':'Not\x20Found','VHFWT':'No\x20matching\x20proxy\x20target\x20for\x20this\x20request','KbhyG':'application/json','UoMPQ':_0x439ffc(0xeb),'bvqjC':function(_0x5e6f1a,_0x46f3c2){return _0x5e6f1a(_0x46f3c2);}};let _0x181213=_0x3382a2['port']??0xfa0,_0x1cc5fa=_0x3382a2['hostname']??'0.0.0.0',_0x42d3d7=_0x3382a2[_0x439ffc(0x117)]??!0x0,_0x2d8f06=y(_0x24a2cf['UoMPQ'],_0x42d3d7);if(_0x3382a2['envPath'])await W(_0x3382a2['envPath']);_0x2d8f06['info']('Starting\x20proxy\x20server...'),_0x2d8f06['info']('\x20\x20-\x20hostname:\x20'+_0x1cc5fa),_0x2d8f06['info'](_0x439ffc(0x129)+_0x181213),_0x2d8f06[_0x439ffc(0xdc)](_0x439ffc(0xec)+_0x42d3d7);let _0x4c58e7=_0x3382a2['ws']?_0x24a2cf[_0x439ffc(0x116)](k,{..._0x3382a2['ws'],'debug':_0x3382a2['ws']['debug']??_0x42d3d7}):null,_0x25c904=_0x3382a2[_0x439ffc(0x108)]?T({..._0x3382a2['http'],'debug':_0x3382a2['http']['debug']??_0x42d3d7}):null;if(_0x4c58e7&&_0x3382a2['ws']?.[_0x439ffc(0xe1)]){_0x2d8f06['info']('\x20\x20-\x20WebSocket\x20targets:\x20'+_0x3382a2['ws']['targets']['length']);for(let _0x536c53 of _0x3382a2['ws'][_0x439ffc(0xe1)])_0x2d8f06[_0x439ffc(0xdc)](_0x439ffc(0x122)+_0x536c53[_0x439ffc(0x11a)]+':\x20'+_0x536c53[_0x439ffc(0x112)][_0x439ffc(0xf7)](',\x20'));}if(_0x25c904&&_0x3382a2['http']?.[_0x439ffc(0xe1)]){_0x2d8f06['info'](_0x439ffc(0x102)+_0x3382a2[_0x439ffc(0x108)][_0x439ffc(0xe1)][_0x439ffc(0x124)]);for(let _0x683f4b of _0x3382a2[_0x439ffc(0x108)][_0x439ffc(0xe1)])_0x2d8f06['info']('\x20\x20\x20\x20-\x20'+_0x683f4b['url']+':\x20'+_0x683f4b['paths'][_0x439ffc(0xf7)](',\x20'));}const _0x5c8f23={};_0x5c8f23[_0x439ffc(0x115)]=function(){},_0x5c8f23['message']=function(){},_0x5c8f23[_0x439ffc(0x12c)]=function(){},_0x5c8f23['drain']=function(){};let _0x2f6b33=Bun['serve']({'port':_0x181213,'hostname':_0x1cc5fa,async 'fetch'(_0x12d1b8,_0x98e0c5){const _0x377509=_0x439ffc;if(_0x24a2cf['dgfiS'](_0x12d1b8[_0x377509(0xcb)][_0x377509(0xcf)]('upgrade')?.['toLowerCase'](),_0x24a2cf['FiIqJ'])){if(_0x4c58e7){let _0x1096b9=_0x4c58e7[_0x377509(0xc5)](_0x12d1b8,_0x98e0c5);if(_0x24a2cf['Gfjxq'](_0x1096b9,!0x0))return;if(_0x1096b9 instanceof Response)return _0x1096b9;}}if(_0x25c904){let _0x4d7b44=await _0x25c904[_0x377509(0xdb)](_0x12d1b8);if(_0x4d7b44)return _0x4d7b44;}const _0x561775={};_0x561775['error']=_0x24a2cf[_0x377509(0x113)],_0x561775['message']=_0x24a2cf['VHFWT'];const _0x542acd={};_0x542acd['Content-Type']=_0x24a2cf['KbhyG'];const _0x2c08dd={};return _0x2c08dd[_0x377509(0xc7)]=0x194,_0x2c08dd['headers']=_0x542acd,new Response(JSON[_0x377509(0x105)](_0x561775),_0x2c08dd);},'websocket':_0x4c58e7?.[_0x439ffc(0x11c)]??_0x5c8f23});return _0x2d8f06['info'](_0x439ffc(0x100)+_0x1cc5fa+':'+_0x181213),_0x3382a2[_0x439ffc(0x10c)]?.({'port':_0x181213,'hostname':_0x1cc5fa}),_0x2f6b33;}const _0x291ccd={};_0x291ccd['targets']=[],_0x291ccd['debug']=!0x1,_0x291ccd['allowHmr']=!0x0,_0x291ccd[_0xba884d(0x119)]=!0x0;const _0x82928b={};_0x82928b[_0xba884d(0xe1)]=[],_0x82928b['debug']=!0x1;const _0x2e9a38={};_0x2e9a38[_0xba884d(0xe8)]=0xfa0,_0x2e9a38[_0xba884d(0xd0)]='0.0.0.0',_0x2e9a38['dev']=!0x0,_0x2e9a38['ws']=_0x291ccd,_0x2e9a38['http']=_0x82928b;var B=_0x2e9a38;export{C as wsToHttp,H as startWsProxyServer,v as sanitizeForLog,P as rewritePath,h as parseCookies,x as matchPath,W as loadEnvFile,S as httpToWs,b as globToRegex,B as defaultProxyConfig,k as createWsProxyHandler,U as createProxyServer,y as createProxyLogger,T as createHttpProxyHandler,$ as addQueryParam};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nucleus-core-ts",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3",
|
|
4
4
|
"description": "Production-ready, enterprise-grade TypeScript framework for building multi-tenant APIs",
|
|
5
5
|
"author": "Hidayet Can Özcan <hidayetcan@gmail.com>",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|