Yukuii commited on
Commit
024c9e1
·
verified ·
1 Parent(s): 109a867

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +1 -1
index.js CHANGED
@@ -1 +1 @@
1
- const _0x1711a5=_0x4b46;(function(_0x3a7e19,_0x1088f5){const _0x1341c5=_0x4b46,_0x2b6673=_0x3a7e19();while(!![]){try{const _0x48518f=-parseInt(_0x1341c5(0x130))/0x1+-parseInt(_0x1341c5(0x141))/0x2+parseInt(_0x1341c5(0x157))/0x3+parseInt(_0x1341c5(0x153))/0x4*(-parseInt(_0x1341c5(0x109))/0x5)+-parseInt(_0x1341c5(0x12e))/0x6*(parseInt(_0x1341c5(0x15e))/0x7)+parseInt(_0x1341c5(0x14d))/0x8+-parseInt(_0x1341c5(0x156))/0x9*(-parseInt(_0x1341c5(0x15f))/0xa);if(_0x48518f===_0x1088f5)break;else _0x2b6673['push'](_0x2b6673['shift']());}catch(_0x4dd0fd){_0x2b6673['push'](_0x2b6673['shift']());}}}(_0x5dc2,0x3d29c));const http=require(_0x1711a5(0x163)),https=require(_0x1711a5(0x12b)),fs=require('fs'),axios=require(_0x1711a5(0x116)),net=require('net'),path=require(_0x1711a5(0x110)),crypto=require(_0x1711a5(0x135)),{Buffer}=require(_0x1711a5(0x139)),{WebSocket,createWebSocketStream}=require('ws');function generateUUID(){return crypto['randomUUID']();}const UUID=process[_0x1711a5(0x160)]['UUID']||generateUUID(),DOMAIN=process[_0x1711a5(0x160)][_0x1711a5(0x15a)]||'yukuii-coding.hf.space',WSPATH=process['env'][_0x1711a5(0x149)]||UUID[_0x1711a5(0x128)](0x0,0x8),SUB_PATH=process[_0x1711a5(0x160)][_0x1711a5(0x113)]||_0x1711a5(0x13a),NAME=process[_0x1711a5(0x160)][_0x1711a5(0x143)]||'',PORT=process['env']['PORT']||0x1eb4,TLS_KEY_PATH=process[_0x1711a5(0x160)][_0x1711a5(0x147)]||'',TLS_CERT_PATH=process[_0x1711a5(0x160)]['TLS_CERT_PATH']||'';function _0x5dc2(){const _0xa523ca=['408855YUcfFO','decode','TLS_CERT','DOMAIN','connection','Server\x20is\x20running\x20on\x20','createHash','7AlyTqC','2580exVmRR','env','then','length','http','1.1.1.1','Failed\x20to\x20resolve\x20','country_code','1205nOfgeU','data','?security=tls&sni=','createServer','Status','replace','HTTP/WS','path','text/plain','message','SUB_PATH','test','base64','axios','catch','log','find','Unknown','hex','\x20port\x20','readUInt16BE','send','readFile','isAbsolute','error','isp','join','map','readFileSync','digest','Server','slice','substr','end','https','index.html','get','307434hYRqpt','Answer','91609wPjRIi','type','sha224','warn','utf8','crypto','https://dns.google/resolve?name=','&fp=chrome&type=ws&host=','write','buffer','yukuii','url','reduce','close','connect','HTTPS/WSS','listen','872248Oldmze','Failed\x20to\x20read\x20TLS\x20file\x20','NAME','concat','every','trojan://','TLS_KEY_PATH','from','WSPATH','text/html','&path=%2F','&type=A','3588592IRcqIY','writeHead','pipe','readUInt8','toString','Both\x20TLS\x20key\x20and\x20certificate\x20are\x20required;\x20falling\x20back\x20to\x20HTTP.','6508SXJZnJ','Not\x20Found\x0a','includes','22212NrdHOJ'];_0x5dc2=function(){return _0xa523ca;};return _0x5dc2();}let ISP='';const GetISP=async()=>{const _0x3023e8=_0x1711a5;try{const _0x242bc0=await axios[_0x3023e8(0x12d)]('https://api.ip.sb/geoip'),_0x1cab3a=_0x242bc0[_0x3023e8(0x10a)];ISP=(_0x1cab3a[_0x3023e8(0x108)]+'-'+_0x1cab3a[_0x3023e8(0x122)])[_0x3023e8(0x10e)](/ /g,'_');}catch(_0x10ae99){ISP=_0x3023e8(0x11a);}};GetISP();function normalizeSecret(_0x187661){const _0x43111f=_0x1711a5;if(!_0x187661)return'';return _0x187661[_0x43111f(0x155)]('\x5cn')?_0x187661[_0x43111f(0x10e)](/\\n/g,'\x0a'):_0x187661;}function readOptionalFile(_0x2e1865){const _0x47e5cd=_0x1711a5;if(!_0x2e1865)return'';const _0x455c0d=path[_0x47e5cd(0x120)](_0x2e1865)?_0x2e1865:path[_0x47e5cd(0x123)](__dirname,_0x2e1865);try{return fs[_0x47e5cd(0x125)](_0x455c0d,'utf8');}catch(_0x2fe968){return console[_0x47e5cd(0x133)](_0x47e5cd(0x142)+_0x455c0d+':\x20'+_0x2fe968[_0x47e5cd(0x112)]),'';}}function getTLSOptions(){const _0x5b15b5=_0x1711a5;let _0x3f8d3f=normalizeSecret(process[_0x5b15b5(0x160)]['TLS_KEY']),_0x1db736=normalizeSecret(process[_0x5b15b5(0x160)][_0x5b15b5(0x159)]);!_0x3f8d3f&&(_0x3f8d3f=readOptionalFile(TLS_KEY_PATH));!_0x1db736&&(_0x1db736=readOptionalFile(TLS_CERT_PATH));if(_0x3f8d3f&&_0x1db736)return{'key':_0x3f8d3f,'cert':_0x1db736};return(_0x3f8d3f||_0x1db736)&&console[_0x5b15b5(0x133)](_0x5b15b5(0x152)),null;}const requestHandler=(_0x8fb37a,_0x352a7a)=>{const _0x5bd326=_0x1711a5;if(_0x8fb37a[_0x5bd326(0x13b)]==='/'){const _0x25561d=path[_0x5bd326(0x123)](__dirname,_0x5bd326(0x12c));fs[_0x5bd326(0x11f)](_0x25561d,_0x5bd326(0x134),(_0x28dc0a,_0x3e8ad2)=>{const _0x59c9d2=_0x5bd326;if(_0x28dc0a){_0x352a7a[_0x59c9d2(0x14e)](0xc8,{'Content-Type':_0x59c9d2(0x14a)}),_0x352a7a[_0x59c9d2(0x12a)]('Hello\x20world!');return;}_0x352a7a[_0x59c9d2(0x14e)](0xc8,{'Content-Type':'text/html'}),_0x352a7a['end'](_0x3e8ad2);});return;}else{if(_0x8fb37a[_0x5bd326(0x13b)]==='/'+SUB_PATH){const _0xef9fa3=NAME?NAME+'-'+ISP:ISP,_0x453531='vless://'+UUID+'@'+DOMAIN+'?encryption=none&security=tls&sni='+DOMAIN+_0x5bd326(0x137)+DOMAIN+_0x5bd326(0x14b)+WSPATH+'#'+_0xef9fa3,_0xd0bc6f=_0x5bd326(0x146)+UUID+'@'+DOMAIN+_0x5bd326(0x10b)+DOMAIN+_0x5bd326(0x137)+DOMAIN+_0x5bd326(0x14b)+WSPATH+'#'+_0xef9fa3,_0x42e613=_0x453531+'\x0a'+_0xd0bc6f,_0x1f2257=Buffer[_0x5bd326(0x148)](_0x42e613)[_0x5bd326(0x151)](_0x5bd326(0x115));_0x352a7a[_0x5bd326(0x14e)](0xc8,{'Content-Type':_0x5bd326(0x111)}),_0x352a7a[_0x5bd326(0x12a)](_0x1f2257+'\x0a');}else _0x352a7a[_0x5bd326(0x14e)](0x194,{'Content-Type':_0x5bd326(0x111)}),_0x352a7a[_0x5bd326(0x12a)](_0x5bd326(0x154));}},tlsOptions=getTLSOptions(),httpServer=tlsOptions?https['createServer'](tlsOptions,requestHandler):http[_0x1711a5(0x10c)](requestHandler),wss=new WebSocket[(_0x1711a5(0x127))]({'server':httpServer}),uuid=UUID['replace'](/-/g,''),DNS_SERVERS=['8.8.4.4',_0x1711a5(0x164)];function _0x4b46(_0x59e10d,_0x481a72){_0x59e10d=_0x59e10d-0x108;const _0x5dc24d=_0x5dc2();let _0x4b463c=_0x5dc24d[_0x59e10d];return _0x4b463c;}function resolveHost(_0x39f3df){return new Promise((_0x28fc64,_0x104d65)=>{const _0x5aed9b=_0x4b46;if(/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/[_0x5aed9b(0x114)](_0x39f3df)){_0x28fc64(_0x39f3df);return;}let _0x3ed8d2=0x0;function _0x11604f(){const _0x2ca365=_0x5aed9b;if(_0x3ed8d2>=DNS_SERVERS['length']){_0x104d65(new Error(_0x2ca365(0x165)+_0x39f3df+'\x20with\x20all\x20DNS\x20servers'));return;}const _0x111b0d=DNS_SERVERS[_0x3ed8d2];_0x3ed8d2++;const _0x191e56=_0x2ca365(0x136)+encodeURIComponent(_0x39f3df)+_0x2ca365(0x14c);axios['get'](_0x191e56,{'timeout':0x1388,'headers':{'Accept':'application/dns-json'}})[_0x2ca365(0x161)](_0x58e01c=>{const _0x40650e=_0x2ca365,_0x4e7c99=_0x58e01c[_0x40650e(0x10a)];if(_0x4e7c99[_0x40650e(0x10d)]===0x0&&_0x4e7c99[_0x40650e(0x12f)]&&_0x4e7c99[_0x40650e(0x12f)][_0x40650e(0x162)]>0x0){const _0x46a033=_0x4e7c99[_0x40650e(0x12f)][_0x40650e(0x119)](_0x58e16a=>_0x58e16a[_0x40650e(0x131)]===0x1);if(_0x46a033){_0x28fc64(_0x46a033['data']);return;}}_0x11604f();})['catch'](_0x5876f7=>{_0x11604f();});}_0x11604f();});}function handleVlessConnection(_0x59d25b,_0x386557){const _0x4e0fc6=_0x1711a5,[_0x57a498]=_0x386557,_0x5716f1=_0x386557['slice'](0x1,0x11);if(!_0x5716f1[_0x4e0fc6(0x145)]((_0x288559,_0xa0f251)=>_0x288559==parseInt(uuid[_0x4e0fc6(0x129)](_0xa0f251*0x2,0x2),0x10)))return![];let _0x4a9708=_0x386557[_0x4e0fc6(0x128)](0x11,0x12)[_0x4e0fc6(0x150)]()+0x13;const _0x51dff8=_0x386557['slice'](_0x4a9708,_0x4a9708+=0x2)[_0x4e0fc6(0x11d)](0x0),_0x401f11=_0x386557[_0x4e0fc6(0x128)](_0x4a9708,_0x4a9708+=0x1)['readUInt8'](),_0x2163b5=_0x401f11==0x1?_0x386557['slice'](_0x4a9708,_0x4a9708+=0x4)[_0x4e0fc6(0x123)]('.'):_0x401f11==0x2?new TextDecoder()[_0x4e0fc6(0x158)](_0x386557[_0x4e0fc6(0x128)](_0x4a9708+0x1,_0x4a9708+=0x1+_0x386557['slice'](_0x4a9708,_0x4a9708+0x1)[_0x4e0fc6(0x150)]())):_0x401f11==0x3?_0x386557[_0x4e0fc6(0x128)](_0x4a9708,_0x4a9708+=0x10)[_0x4e0fc6(0x13c)]((_0x3abf2f,_0x4ec10c,_0x2311d7,_0x155134)=>_0x2311d7%0x2?_0x3abf2f[_0x4e0fc6(0x144)](_0x155134[_0x4e0fc6(0x128)](_0x2311d7-0x1,_0x2311d7+0x1)):_0x3abf2f,[])['map'](_0x364adc=>_0x364adc[_0x4e0fc6(0x11d)](0x0)[_0x4e0fc6(0x151)](0x10))[_0x4e0fc6(0x123)](':'):'';_0x59d25b[_0x4e0fc6(0x11e)](new Uint8Array([_0x57a498,0x0]));const _0x43b2b5=createWebSocketStream(_0x59d25b);return resolveHost(_0x2163b5)[_0x4e0fc6(0x161)](_0x2d99cb=>{const _0x5437c6=_0x4e0fc6;net[_0x5437c6(0x13e)]({'host':_0x2d99cb,'port':_0x51dff8},function(){const _0x5561f0=_0x5437c6;this[_0x5561f0(0x138)](_0x386557[_0x5561f0(0x128)](_0x4a9708)),_0x43b2b5['on'](_0x5561f0(0x121),()=>{})[_0x5561f0(0x14f)](this)['on']('error',()=>{})[_0x5561f0(0x14f)](_0x43b2b5);})['on'](_0x5437c6(0x121),()=>{});})[_0x4e0fc6(0x117)](_0x143c5c=>{const _0x2fc390=_0x4e0fc6;net[_0x2fc390(0x13e)]({'host':_0x2163b5,'port':_0x51dff8},function(){const _0x1b8861=_0x2fc390;this[_0x1b8861(0x138)](_0x386557['slice'](_0x4a9708)),_0x43b2b5['on'](_0x1b8861(0x121),()=>{})[_0x1b8861(0x14f)](this)['on'](_0x1b8861(0x121),()=>{})[_0x1b8861(0x14f)](_0x43b2b5);})['on'](_0x2fc390(0x121),()=>{});}),!![];}function handleTrojanConnection(_0x3e8e38,_0x27125e){const _0x4db7a5=_0x1711a5;try{if(_0x27125e[_0x4db7a5(0x162)]<0x3a)return![];const _0x12ec57=_0x27125e[_0x4db7a5(0x128)](0x0,0x38)[_0x4db7a5(0x151)](),_0x5c2c31=[UUID];let _0x180a1f=null;for(const _0x1f3189 of _0x5c2c31){const _0x509134=crypto[_0x4db7a5(0x15d)](_0x4db7a5(0x132))['update'](_0x1f3189)[_0x4db7a5(0x126)](_0x4db7a5(0x11b));if(_0x509134===_0x12ec57){_0x180a1f=_0x1f3189;break;}}if(!_0x180a1f)return![];let _0x424e26=0x38;_0x27125e[_0x424e26]===0xd&&_0x27125e[_0x424e26+0x1]===0xa&&(_0x424e26+=0x2);const _0x5dcd6a=_0x27125e[_0x424e26];if(_0x5dcd6a!==0x1)return![];_0x424e26+=0x1;const _0x558d66=_0x27125e[_0x424e26];_0x424e26+=0x1;let _0x5e65e0,_0x8cf9bf;if(_0x558d66===0x1)_0x5e65e0=_0x27125e[_0x4db7a5(0x128)](_0x424e26,_0x424e26+0x4)[_0x4db7a5(0x123)]('.'),_0x424e26+=0x4;else{if(_0x558d66===0x3){const _0x20d96c=_0x27125e[_0x424e26];_0x424e26+=0x1,_0x5e65e0=_0x27125e[_0x4db7a5(0x128)](_0x424e26,_0x424e26+_0x20d96c)['toString'](),_0x424e26+=_0x20d96c;}else{if(_0x558d66===0x4)_0x5e65e0=_0x27125e[_0x4db7a5(0x128)](_0x424e26,_0x424e26+0x10)['reduce']((_0x1fcb71,_0x3d78ff,_0xb8ac09,_0x375b9f)=>_0xb8ac09%0x2?_0x1fcb71[_0x4db7a5(0x144)](_0x375b9f[_0x4db7a5(0x128)](_0xb8ac09-0x1,_0xb8ac09+0x1)):_0x1fcb71,[])[_0x4db7a5(0x124)](_0x587b2d=>_0x587b2d[_0x4db7a5(0x11d)](0x0)['toString'](0x10))[_0x4db7a5(0x123)](':'),_0x424e26+=0x10;else return![];}}_0x8cf9bf=_0x27125e['readUInt16BE'](_0x424e26),_0x424e26+=0x2;_0x424e26<_0x27125e['length']&&_0x27125e[_0x424e26]===0xd&&_0x27125e[_0x424e26+0x1]===0xa&&(_0x424e26+=0x2);const _0x38f50b=createWebSocketStream(_0x3e8e38);return resolveHost(_0x5e65e0)[_0x4db7a5(0x161)](_0x145bb5=>{const _0x53a0d4=_0x4db7a5;net[_0x53a0d4(0x13e)]({'host':_0x145bb5,'port':_0x8cf9bf},function(){const _0xb85e0=_0x53a0d4;_0x424e26<_0x27125e['length']&&this[_0xb85e0(0x138)](_0x27125e[_0xb85e0(0x128)](_0x424e26)),_0x38f50b['on'](_0xb85e0(0x121),()=>{})[_0xb85e0(0x14f)](this)['on']('error',()=>{})[_0xb85e0(0x14f)](_0x38f50b);})['on']('error',()=>{});})[_0x4db7a5(0x117)](_0x3d768a=>{const _0x1b0d4e=_0x4db7a5;net[_0x1b0d4e(0x13e)]({'host':_0x5e65e0,'port':_0x8cf9bf},function(){const _0x27fd81=_0x1b0d4e;_0x424e26<_0x27125e[_0x27fd81(0x162)]&&this['write'](_0x27125e[_0x27fd81(0x128)](_0x424e26)),_0x38f50b['on'](_0x27fd81(0x121),()=>{})['pipe'](this)['on']('error',()=>{})[_0x27fd81(0x14f)](_0x38f50b);})['on'](_0x1b0d4e(0x121),()=>{});}),!![];}catch(_0x3d7376){return![];}}wss['on'](_0x1711a5(0x15b),(_0x102d5d,_0x5bc685)=>{const _0x218f58=_0x1711a5,_0x5130fe=_0x5bc685[_0x218f58(0x13b)]||'';_0x102d5d['once'](_0x218f58(0x112),_0x5f11fb=>{const _0x4acda5=_0x218f58;if(_0x5f11fb[_0x4acda5(0x162)]>0x11&&_0x5f11fb[0x0]===0x0){const _0xee1a06=_0x5f11fb[_0x4acda5(0x128)](0x1,0x11),_0x43716f=_0xee1a06[_0x4acda5(0x145)]((_0x108e4e,_0x53f431)=>_0x108e4e==parseInt(uuid[_0x4acda5(0x129)](_0x53f431*0x2,0x2),0x10));if(_0x43716f){!handleVlessConnection(_0x102d5d,_0x5f11fb)&&_0x102d5d[_0x4acda5(0x13d)]();return;}}!handleTrojanConnection(_0x102d5d,_0x5f11fb)&&_0x102d5d[_0x4acda5(0x13d)]();})['on'](_0x218f58(0x121),()=>{});}),httpServer[_0x1711a5(0x140)](PORT,()=>{const _0x583078=_0x1711a5,_0xd23658=tlsOptions?_0x583078(0x13f):_0x583078(0x10f);console[_0x583078(0x118)](_0x583078(0x15c)+_0xd23658+_0x583078(0x11c)+PORT);});
 
1
+ const _0x185829=_0x59d5;(function(_0x57d56c,_0x50a926){const _0x3f0aa0=_0x59d5,_0x425350=_0x57d56c();while(!![]){try{const _0x144e34=-parseInt(_0x3f0aa0(0x1e8))/0x1*(parseInt(_0x3f0aa0(0x1f0))/0x2)+-parseInt(_0x3f0aa0(0x1a1))/0x3+parseInt(_0x3f0aa0(0x1de))/0x4+parseInt(_0x3f0aa0(0x19a))/0x5*(-parseInt(_0x3f0aa0(0x1b2))/0x6)+parseInt(_0x3f0aa0(0x1dd))/0x7+-parseInt(_0x3f0aa0(0x1b5))/0x8+parseInt(_0x3f0aa0(0x1b3))/0x9;if(_0x144e34===_0x50a926)break;else _0x425350['push'](_0x425350['shift']());}catch(_0x5baf75){_0x425350['push'](_0x425350['shift']());}}}(_0x4364,0xc9594));const http=require(_0x185829(0x1d1)),https=require(_0x185829(0x1e0)),fs=require('fs'),axios=require(_0x185829(0x19c)),net=require(_0x185829(0x1e9)),path=require('path'),crypto=require('crypto'),{Buffer}=require('buffer'),{WebSocket,createWebSocketStream}=require('ws');function generateUUID(){const _0x3200ca=_0x185829;return crypto[_0x3200ca(0x1d8)]();}const UUID=process['env']['UUID']||generateUUID(),DOMAIN=process['env'][_0x185829(0x1d7)]||_0x185829(0x1b1),WSPATH=process[_0x185829(0x1b6)]['WSPATH']||UUID['slice'](0x0,0x8),SUB_PATH=process[_0x185829(0x1b6)][_0x185829(0x1d5)]||_0x185829(0x1b9),NAME=process[_0x185829(0x1b6)][_0x185829(0x1d2)]||'',PORT=process[_0x185829(0x1b6)]['PORT']||0x1eb4,TLS_KEY_PATH=process[_0x185829(0x1b6)]['TLS_KEY_PATH']||'',TLS_CERT_PATH=process[_0x185829(0x1b6)][_0x185829(0x1ea)]||'';let ISP='';const GetISP=async()=>{const _0x56d65f=_0x185829;try{const _0x4d3e1a=await axios[_0x56d65f(0x1e2)](_0x56d65f(0x1c7)),_0x63869=_0x4d3e1a['data'];ISP=(_0x63869[_0x56d65f(0x19b)]+'-'+_0x63869[_0x56d65f(0x1a8)])[_0x56d65f(0x1da)](/ /g,'_');}catch(_0x5018d3){ISP=_0x56d65f(0x1d9);}};GetISP();function normalizeSecret(_0x2e9d0f){const _0x36bac7=_0x185829;if(!_0x2e9d0f)return'';return _0x2e9d0f[_0x36bac7(0x1bc)]('\x5cn')?_0x2e9d0f[_0x36bac7(0x1da)](/\\n/g,'\x0a'):_0x2e9d0f;}function readOptionalFile(_0x36b064){const _0x31a1ac=_0x185829;if(!_0x36b064)return'';const _0x1c217c=path[_0x31a1ac(0x1c4)](_0x36b064)?_0x36b064:path['join'](__dirname,_0x36b064);try{return fs['readFileSync'](_0x1c217c,'utf8');}catch(_0x58d5ea){return console[_0x31a1ac(0x19d)](_0x31a1ac(0x1e3)+_0x1c217c+':\x20'+_0x58d5ea[_0x31a1ac(0x1b0)]),'';}}function getTLSOptions(){const _0x1d081f=_0x185829;let _0x4ccdc1=normalizeSecret(process[_0x1d081f(0x1b6)][_0x1d081f(0x1c1)]),_0x585301=normalizeSecret(process[_0x1d081f(0x1b6)][_0x1d081f(0x1a6)]);!_0x4ccdc1&&(_0x4ccdc1=readOptionalFile(TLS_KEY_PATH));!_0x585301&&(_0x585301=readOptionalFile(TLS_CERT_PATH));if(_0x4ccdc1&&_0x585301)return{'key':_0x4ccdc1,'cert':_0x585301};return(_0x4ccdc1||_0x585301)&&console[_0x1d081f(0x19d)](_0x1d081f(0x1ce)),null;}function _0x4364(){const _0x576cd3=['reduce','TLS_KEY','close','&type=A','isAbsolute','update','\x20with\x20all\x20DNS\x20servers','https://api.ip.sb/geoip','sha224','Hello\x20world!','once','text/plain','readUInt8','utf8','Both\x20TLS\x20key\x20and\x20certificate\x20are\x20required;\x20falling\x20back\x20to\x20HTTP.','from','HTTP/WS','http','NAME','createHash','&path=%2F','SUB_PATH','catch','DOMAIN','randomUUID','Unknown','replace','log','decode','7373289FmIpYQ','2194688GaTiRp','type','https','write','get','Failed\x20to\x20read\x20TLS\x20file\x20','listen','length','writeHead','createServer','5DkoqyV','net','TLS_CERT_PATH','8.8.4.4','then','end','?encryption=none&security=tls&sni=','every','538230FNbTyB','connect','toString','url','Status','readFile','1854465njzBOn','country_code','axios','warn','connection','\x20port\x20','pipe','4008900TNMeTM','base64','index.html','https://dns.google/resolve?name=','Answer','TLS_CERT','Not\x20Found\x0a','isp','join','concat','send','digest','slice','test','find','message','ray.coding.nyc.mn','18BNuvSw','38860290EUYMDT','substr','10404248xEAIyS','env','readUInt16BE','&fp=chrome&type=ws&host=','yukuii','?security=tls&sni=','map','includes','Server','error','text/html'];_0x4364=function(){return _0x576cd3;};return _0x4364();}const requestHandler=(_0x274049,_0x6b16f7)=>{const _0x1d5983=_0x185829;if(_0x274049[_0x1d5983(0x197)]==='/'){const _0x5ad89d=path[_0x1d5983(0x1a9)](__dirname,_0x1d5983(0x1a3));fs[_0x1d5983(0x199)](_0x5ad89d,_0x1d5983(0x1cd),(_0x152498,_0x389304)=>{const _0x55f063=_0x1d5983;if(_0x152498){_0x6b16f7['writeHead'](0xc8,{'Content-Type':_0x55f063(0x1bf)}),_0x6b16f7[_0x55f063(0x1ed)](_0x55f063(0x1c9));return;}_0x6b16f7[_0x55f063(0x1e6)](0xc8,{'Content-Type':_0x55f063(0x1bf)}),_0x6b16f7[_0x55f063(0x1ed)](_0x389304);});return;}else{if(_0x274049[_0x1d5983(0x197)]==='/'+SUB_PATH){const _0xdd4c31=NAME?NAME+'-'+ISP:ISP,_0x244130='vless://'+UUID+'@'+DOMAIN+_0x1d5983(0x1ee)+DOMAIN+_0x1d5983(0x1b8)+DOMAIN+_0x1d5983(0x1d4)+WSPATH+'#'+_0xdd4c31,_0x46b620='trojan://'+UUID+'@'+DOMAIN+_0x1d5983(0x1ba)+DOMAIN+_0x1d5983(0x1b8)+DOMAIN+_0x1d5983(0x1d4)+WSPATH+'#'+_0xdd4c31,_0x1bf3f6=_0x244130+'\x0a'+_0x46b620,_0x53d24a=Buffer[_0x1d5983(0x1cf)](_0x1bf3f6)[_0x1d5983(0x196)](_0x1d5983(0x1a2));_0x6b16f7['writeHead'](0xc8,{'Content-Type':_0x1d5983(0x1cb)}),_0x6b16f7[_0x1d5983(0x1ed)](_0x53d24a+'\x0a');}else _0x6b16f7['writeHead'](0x194,{'Content-Type':_0x1d5983(0x1cb)}),_0x6b16f7[_0x1d5983(0x1ed)](_0x1d5983(0x1a7));}},tlsOptions=getTLSOptions(),httpServer=tlsOptions?https['createServer'](tlsOptions,requestHandler):http[_0x185829(0x1e7)](requestHandler),wss=new WebSocket[(_0x185829(0x1bd))]({'server':httpServer}),uuid=UUID[_0x185829(0x1da)](/-/g,''),DNS_SERVERS=[_0x185829(0x1eb),'1.1.1.1'];function _0x59d5(_0x1b7bf6,_0x17ee03){_0x1b7bf6=_0x1b7bf6-0x195;const _0x43643a=_0x4364();let _0x59d543=_0x43643a[_0x1b7bf6];return _0x59d543;}function resolveHost(_0x28518f){return new Promise((_0x4d8ce1,_0x192f10)=>{const _0x1bb820=_0x59d5;if(/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/[_0x1bb820(0x1ae)](_0x28518f)){_0x4d8ce1(_0x28518f);return;}let _0x186185=0x0;function _0x4892b3(){const _0x25edc9=_0x1bb820;if(_0x186185>=DNS_SERVERS[_0x25edc9(0x1e5)]){_0x192f10(new Error('Failed\x20to\x20resolve\x20'+_0x28518f+_0x25edc9(0x1c6)));return;}const _0x3cb1ae=DNS_SERVERS[_0x186185];_0x186185++;const _0x57bb57=_0x25edc9(0x1a4)+encodeURIComponent(_0x28518f)+_0x25edc9(0x1c3);axios['get'](_0x57bb57,{'timeout':0x1388,'headers':{'Accept':'application/dns-json'}})[_0x25edc9(0x1ec)](_0x1da4f1=>{const _0x421858=_0x25edc9,_0x5b90ef=_0x1da4f1['data'];if(_0x5b90ef[_0x421858(0x198)]===0x0&&_0x5b90ef['Answer']&&_0x5b90ef[_0x421858(0x1a5)][_0x421858(0x1e5)]>0x0){const _0x2b1bcb=_0x5b90ef[_0x421858(0x1a5)][_0x421858(0x1af)](_0x373799=>_0x373799[_0x421858(0x1df)]===0x1);if(_0x2b1bcb){_0x4d8ce1(_0x2b1bcb['data']);return;}}_0x4892b3();})[_0x25edc9(0x1d6)](_0x4027c9=>{_0x4892b3();});}_0x4892b3();});}function handleVlessConnection(_0x151e36,_0x32e2ea){const _0x4682d7=_0x185829,[_0x18eb1d]=_0x32e2ea,_0x5e36ab=_0x32e2ea[_0x4682d7(0x1ad)](0x1,0x11);if(!_0x5e36ab['every']((_0x51ce81,_0x48e070)=>_0x51ce81==parseInt(uuid[_0x4682d7(0x1b4)](_0x48e070*0x2,0x2),0x10)))return![];let _0x57aca6=_0x32e2ea[_0x4682d7(0x1ad)](0x11,0x12)['readUInt8']()+0x13;const _0xcbf475=_0x32e2ea[_0x4682d7(0x1ad)](_0x57aca6,_0x57aca6+=0x2)['readUInt16BE'](0x0),_0xb7d51c=_0x32e2ea['slice'](_0x57aca6,_0x57aca6+=0x1)[_0x4682d7(0x1cc)](),_0xc3b1cb=_0xb7d51c==0x1?_0x32e2ea[_0x4682d7(0x1ad)](_0x57aca6,_0x57aca6+=0x4)[_0x4682d7(0x1a9)]('.'):_0xb7d51c==0x2?new TextDecoder()[_0x4682d7(0x1dc)](_0x32e2ea[_0x4682d7(0x1ad)](_0x57aca6+0x1,_0x57aca6+=0x1+_0x32e2ea[_0x4682d7(0x1ad)](_0x57aca6,_0x57aca6+0x1)[_0x4682d7(0x1cc)]())):_0xb7d51c==0x3?_0x32e2ea[_0x4682d7(0x1ad)](_0x57aca6,_0x57aca6+=0x10)['reduce']((_0x4f2eb8,_0xb33de6,_0x489309,_0x32f66e)=>_0x489309%0x2?_0x4f2eb8[_0x4682d7(0x1aa)](_0x32f66e[_0x4682d7(0x1ad)](_0x489309-0x1,_0x489309+0x1)):_0x4f2eb8,[])['map'](_0x32c8e5=>_0x32c8e5[_0x4682d7(0x1b7)](0x0)['toString'](0x10))[_0x4682d7(0x1a9)](':'):'';_0x151e36[_0x4682d7(0x1ab)](new Uint8Array([_0x18eb1d,0x0]));const _0x4ee984=createWebSocketStream(_0x151e36);return resolveHost(_0xc3b1cb)[_0x4682d7(0x1ec)](_0x88b893=>{const _0x3bb7f=_0x4682d7;net[_0x3bb7f(0x195)]({'host':_0x88b893,'port':_0xcbf475},function(){const _0x18a364=_0x3bb7f;this['write'](_0x32e2ea[_0x18a364(0x1ad)](_0x57aca6)),_0x4ee984['on']('error',()=>{})[_0x18a364(0x1a0)](this)['on'](_0x18a364(0x1be),()=>{})[_0x18a364(0x1a0)](_0x4ee984);})['on']('error',()=>{});})[_0x4682d7(0x1d6)](_0x51db24=>{const _0x3236b2=_0x4682d7;net[_0x3236b2(0x195)]({'host':_0xc3b1cb,'port':_0xcbf475},function(){const _0x46a1c7=_0x3236b2;this['write'](_0x32e2ea['slice'](_0x57aca6)),_0x4ee984['on'](_0x46a1c7(0x1be),()=>{})[_0x46a1c7(0x1a0)](this)['on'](_0x46a1c7(0x1be),()=>{})['pipe'](_0x4ee984);})['on'](_0x3236b2(0x1be),()=>{});}),!![];}function handleTrojanConnection(_0x131f11,_0x1350f5){const _0x339fb7=_0x185829;try{if(_0x1350f5['length']<0x3a)return![];const _0x3f4cb4=_0x1350f5[_0x339fb7(0x1ad)](0x0,0x38)[_0x339fb7(0x196)](),_0x20dbd5=[UUID];let _0x472f74=null;for(const _0x26f7ea of _0x20dbd5){const _0x258be9=crypto[_0x339fb7(0x1d3)](_0x339fb7(0x1c8))[_0x339fb7(0x1c5)](_0x26f7ea)[_0x339fb7(0x1ac)]('hex');if(_0x258be9===_0x3f4cb4){_0x472f74=_0x26f7ea;break;}}if(!_0x472f74)return![];let _0x19ba51=0x38;_0x1350f5[_0x19ba51]===0xd&&_0x1350f5[_0x19ba51+0x1]===0xa&&(_0x19ba51+=0x2);const _0x4b1078=_0x1350f5[_0x19ba51];if(_0x4b1078!==0x1)return![];_0x19ba51+=0x1;const _0x30acea=_0x1350f5[_0x19ba51];_0x19ba51+=0x1;let _0x4092b1,_0x1f6b32;if(_0x30acea===0x1)_0x4092b1=_0x1350f5[_0x339fb7(0x1ad)](_0x19ba51,_0x19ba51+0x4)['join']('.'),_0x19ba51+=0x4;else{if(_0x30acea===0x3){const _0x1c5e9a=_0x1350f5[_0x19ba51];_0x19ba51+=0x1,_0x4092b1=_0x1350f5[_0x339fb7(0x1ad)](_0x19ba51,_0x19ba51+_0x1c5e9a)[_0x339fb7(0x196)](),_0x19ba51+=_0x1c5e9a;}else{if(_0x30acea===0x4)_0x4092b1=_0x1350f5[_0x339fb7(0x1ad)](_0x19ba51,_0x19ba51+0x10)[_0x339fb7(0x1c0)]((_0x3a526d,_0x5e3cf3,_0x567853,_0x460bc5)=>_0x567853%0x2?_0x3a526d[_0x339fb7(0x1aa)](_0x460bc5['slice'](_0x567853-0x1,_0x567853+0x1)):_0x3a526d,[])[_0x339fb7(0x1bb)](_0x507000=>_0x507000[_0x339fb7(0x1b7)](0x0)[_0x339fb7(0x196)](0x10))[_0x339fb7(0x1a9)](':'),_0x19ba51+=0x10;else return![];}}_0x1f6b32=_0x1350f5[_0x339fb7(0x1b7)](_0x19ba51),_0x19ba51+=0x2;_0x19ba51<_0x1350f5['length']&&_0x1350f5[_0x19ba51]===0xd&&_0x1350f5[_0x19ba51+0x1]===0xa&&(_0x19ba51+=0x2);const _0x3df44f=createWebSocketStream(_0x131f11);return resolveHost(_0x4092b1)['then'](_0xd7efe3=>{net['connect']({'host':_0xd7efe3,'port':_0x1f6b32},function(){const _0x4caf28=_0x59d5;_0x19ba51<_0x1350f5[_0x4caf28(0x1e5)]&&this[_0x4caf28(0x1e1)](_0x1350f5[_0x4caf28(0x1ad)](_0x19ba51)),_0x3df44f['on'](_0x4caf28(0x1be),()=>{})['pipe'](this)['on'](_0x4caf28(0x1be),()=>{})[_0x4caf28(0x1a0)](_0x3df44f);})['on']('error',()=>{});})[_0x339fb7(0x1d6)](_0x3464d8=>{const _0xdf4467=_0x339fb7;net[_0xdf4467(0x195)]({'host':_0x4092b1,'port':_0x1f6b32},function(){const _0x1dd67a=_0xdf4467;_0x19ba51<_0x1350f5[_0x1dd67a(0x1e5)]&&this['write'](_0x1350f5[_0x1dd67a(0x1ad)](_0x19ba51)),_0x3df44f['on'](_0x1dd67a(0x1be),()=>{})[_0x1dd67a(0x1a0)](this)['on'](_0x1dd67a(0x1be),()=>{})[_0x1dd67a(0x1a0)](_0x3df44f);})['on'](_0xdf4467(0x1be),()=>{});}),!![];}catch(_0x327de2){return![];}}wss['on'](_0x185829(0x19e),(_0x5d8801,_0x5a0d39)=>{const _0x40ceac=_0x185829,_0x101bff=_0x5a0d39['url']||'';_0x5d8801[_0x40ceac(0x1ca)](_0x40ceac(0x1b0),_0x157464=>{const _0x36901a=_0x40ceac;if(_0x157464[_0x36901a(0x1e5)]>0x11&&_0x157464[0x0]===0x0){const _0x2fc276=_0x157464[_0x36901a(0x1ad)](0x1,0x11),_0x4d6204=_0x2fc276[_0x36901a(0x1ef)]((_0x17bb9f,_0x7021da)=>_0x17bb9f==parseInt(uuid[_0x36901a(0x1b4)](_0x7021da*0x2,0x2),0x10));if(_0x4d6204){!handleVlessConnection(_0x5d8801,_0x157464)&&_0x5d8801[_0x36901a(0x1c2)]();return;}}!handleTrojanConnection(_0x5d8801,_0x157464)&&_0x5d8801[_0x36901a(0x1c2)]();})['on']('error',()=>{});}),httpServer[_0x185829(0x1e4)](PORT,()=>{const _0x3aa5b7=_0x185829,_0x1dfd3f=tlsOptions?'HTTPS/WSS':_0x3aa5b7(0x1d0);console[_0x3aa5b7(0x1db)]('Server\x20is\x20running\x20on\x20'+_0x1dfd3f+_0x3aa5b7(0x19f)+PORT);});