Skip to content

Commit b7e105a

Browse files
author
3Kmfi6HP
committed
1
1 parent 54d8d37 commit b7e105a

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

_worker.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,38 +1353,38 @@ function getConfig(userIDs, hostName) {
13531353
const HttpPort = new Set([80, 8080, 8880, 2052, 2086, 2095, 2082]);
13541354
const HttpsPort = new Set([443, 8443, 2053, 2096, 2087, 2083]);
13551355

1356-
function GenSub(ไอดีผู้ใช้_เส้นทาง, ชื่อโฮสต์) {
1357-
const อาร์เรย์ไอดีผู้ใช้ = ไอดีผู้ใช้_เส้นทาง.includes(',') ? ไอดีผู้ใช้_เส้นทาง.split(',') : [ไอดีผู้ใช้_เส้นทาง];
1356+
function GenSub(userID_path, hostname) {
1357+
const userIDArray = userID_path.includes(',') ? userID_path.split(',') : [userID_path];
13581358
const randomPath = () => '/' + Math.random().toString(36).substring(2, 15) + '?ed=2048';
1359-
const ส่วนUrlทั่วไปHttp = `?encryption=none&security=none&fp=random&type=ws&host=${ชื่อโฮสต์}&path=${encodeURIComponent(randomPath())}#`;
1360-
const ส่วนUrlทั่วไปHttps = `?encryption=none&security=tls&sni=${ชื่อโฮสต์}&fp=random&type=ws&host=${ชื่อโฮสต์}&path=%2F%3Fed%3D2048#`;
1361-
1362-
const ผลลัพธ์ = อาร์เรย์ไอดีผู้ใช้.flatMap((ไอดีผู้ใช้) => {
1363-
const PartHttp = Array.from(HttpPort).flatMap((พอร์ต) => {
1364-
if (!ชื่อโฮสต์.includes('pages.dev')) {
1365-
const ส่วนUrl = `${ชื่อโฮสต์}-HTTP-${พอร์ต}`;
1366-
const protocolหลักHttp = atob(pt) + '://' + ไอดีผู้ใช้ + atob(at) + ชื่อโฮสต์ + ':' + พอร์ต + ส่วนUrlทั่วไปHttp + ส่วนUrl;
1359+
const commonUrlPartHttp = `?encryption=none&security=none&fp=random&type=ws&host=${hostname}&path=${encodeURIComponent(randomPath())}#`;
1360+
const commonUrlPartHttps = `?encryption=none&security=tls&sni=${hostname}&fp=random&type=ws&host=${hostname}&path=%2F%3Fed%3D2048#`;
1361+
1362+
const result = userIDArray.flatMap((userID) => {
1363+
const PartHttp = Array.from(HttpPort).flatMap((port) => {
1364+
if (!hostname.includes('pages.dev')) {
1365+
const urlPart = `${hostname}-HTTP-${port}`;
1366+
const mainProtocolHttp = atob(pt) + '://' + userID + atob(at) + hostname + ':' + port + commonUrlPartHttp + urlPart;
13671367
return proxyIPs.flatMap((proxyIP) => {
1368-
const protocolรองHttp = atob(pt) + '://' + ไอดีผู้ใช้ + atob(at) + proxyIP + ':' + proxyPort + ส่วนUrlทั่วไปHttp + ส่วนUrl + '-' + proxyIP + '-' + atob(ed);
1369-
return [protocolหลักHttp, protocolรองHttp];
1368+
const secondaryProtocolHttp = atob(pt) + '://' + userID + atob(at) + proxyIP.split(':')[0] + ':' + proxyPort + commonUrlPartHttp + urlPart + '-' + proxyIP + '-' + atob(ed);
1369+
return [mainProtocolHttp, secondaryProtocolHttp];
13701370
});
13711371
}
13721372
return [];
13731373
});
13741374

1375-
const PartHttps = Array.from(HttpsPort).flatMap((พอร์ต) => {
1376-
const ส่วนUrl = `${ชื่อโฮสต์}-HTTPS-${พอร์ต}`;
1377-
const protocolหลักHttps = atob(pt) + '://' + ไอดีผู้ใช้ + atob(at) + ชื่อโฮสต์ + ':' + พอร์ต + ส่วนUrlทั่วไปHttps + ส่วนUrl;
1375+
const PartHttps = Array.from(HttpsPort).flatMap((port) => {
1376+
const urlPart = `${hostname}-HTTPS-${port}`;
1377+
const mainProtocolHttps = atob(pt) + '://' + userID + atob(at) + hostname + ':' + port + commonUrlPartHttps + urlPart;
13781378
return proxyIPs.flatMap((proxyIP) => {
1379-
const protocolรองHttps = atob(pt) + '://' + ไอดีผู้ใช้ + atob(at) + proxyIP + ':' + proxyPort + ส่วนUrlทั่วไปHttps + ส่วนUrl + '-' + proxyIP + '-' + atob(ed);
1380-
return [protocolหลักHttps, protocolรองHttps];
1379+
const secondaryProtocolHttps = atob(pt) + '://' + userID + atob(at) + proxyIP.split(':')[0] + ':' + proxyPort + commonUrlPartHttps + urlPart + '-' + proxyIP + '-' + atob(ed);
1380+
return [mainProtocolHttps, secondaryProtocolHttps];
13811381
});
13821382
});
13831383

13841384
return [...PartHttp, ...PartHttps];
13851385
});
13861386

1387-
return ผลลัพธ์.join('\n');
1387+
return result.join('\n');
13881388
}
13891389

13901390
const hostnames = [

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"build": "wrangler deploy --dry-run",
99
"dev": "wrangler dev --remote",
1010
"dev-local": "wrangler dev index.js --remote",
11-
"obfuscate": "javascript-obfuscator _worker.js"
11+
"obfuscate": "javascript-obfuscator index.js --output _worker.js --compact true --control-flow-flattening true --control-flow-flattening-threshold 1 --dead-code-injection true --dead-code-injection-threshold 1 --string-array true --string-array-encoding 'rc4' --string-array-threshold 1 --transform-object-keys true --unicode-escape-sequence true"
1212
},
1313
"author": "",
1414
"license": "ISC",

0 commit comments

Comments
 (0)