domain setup

This commit is contained in:
adrapier03
2026-07-05 19:49:37 +07:00
parent 1274bd5a03
commit 620a3de21c
8 changed files with 313 additions and 42 deletions
+23 -2
View File
@@ -18,7 +18,7 @@ import { readFileSync, appendFileSync, existsSync } from 'fs';
import { fileURLToPath } from 'url';
import { dirname, join } from 'path';
import { MimoRegistration } from './index.js';
import { MimoRegistration, loadProxyList } from './index.js';
import './extras.js'; // attach getReferralCode
import { generateFingerprint, buildInitScript, buildExtraHeaders } from './fingerprint.js';
@@ -50,6 +50,27 @@ const outputFile = outputIdx !== -1
const failLog = join(outputDir, 'chain-fail.log');
const proxyIdx = args.indexOf('--proxy');
let proxyList = [];
if (proxyIdx !== -1) {
const nextArg = args[proxyIdx + 1];
let proxyPath = 'proxy.txt';
if (nextArg && !nextArg.startsWith('-')) {
proxyPath = nextArg;
}
const resolvedPath = join(__dirname, proxyPath);
if (existsSync(resolvedPath)) {
proxyList = loadProxyList(resolvedPath);
console.log(`Loaded ${proxyList.length} proxies from ${proxyPath}`);
} else if (nextArg && !nextArg.startsWith('-')) {
proxyList = [nextArg];
} else {
console.log(`Proxy option enabled but ${proxyPath} not found.`);
}
} else if (config.proxy) {
proxyList = [config.proxy];
}
// ---- File helpers -----------------------------------------------------
function saveResult(row) {
@@ -75,4 +96,4 @@ function logFail(email, error) {
appendFileSync(failLog, line, 'utf8');
}
export { config, saveResult, logFail, count, seedRef, outputFile, failLog, __dirname };
export { config, saveResult, logFail, count, seedRef, outputFile, failLog, __dirname, proxyList };