Skip to content

Commit 6703057

Browse files
authored
优化逻辑
1 parent e27a2b7 commit 6703057

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

api/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ let ghName = base64Decode('aHR0cHM6Ly9naXRodWIuY29tL2FtY2x1YnMvYW0tY2YtdHVubmVs'
7272
let bName = base64Decode('aHR0cHM6Ly9hbWNsdWJzcy5jb20=');
7373
let pName = '5pWw5a2X5aWX5Yip';
7474
let hostRemark = false;
75-
let enableLog = true;
75+
let enableLog = false;
7676

7777
// ========== Vercel handler ==========
7878
export default async function handler(req, res) {
@@ -160,7 +160,8 @@ export default async function handler(req, res) {
160160
subConverter = subConverterWithoutProtocol;
161161

162162
fakeUserId = await getFakeUserId(uuid);
163-
fakeHostName = fakeUserId.slice(6, 9) + "." + fakeUserId.slice(13, 19);
163+
const baseFakeHost = fakeUserId.slice(6, 9) + "." + fakeUserId.slice(13, 19);
164+
fakeHostName = getFakeHostName(rawHost);
164165
log(`[handler]-->fakeUserId: ${fakeUserId}`);
165166

166167
if (url.pathname === "/login") {
@@ -421,7 +422,7 @@ async function getchannelConfig(rawHost, userId, host, proxyIP, parsedSocks5, us
421422
if (protType && !randomNum) {
422423
num = num * 2;
423424
}
424-
fakeHostName = getFakeHostName(rawHost);
425+
425426
const ipUrlTxtAndCsv = await getIpUrlTxtAndCsv(noTLS, ipUrlTxt, ipUrlCsv, num);
426427

427428
log(`txt: ${ipUrlTxtAndCsv.txt} \n csv: ${ipUrlTxtAndCsv.csv}`);

0 commit comments

Comments
 (0)