این پروژه نسخهی بهبودیافته و تطبیقیافتهی موتور mhr-cfw است که به جای استفاده از Cloudflare Workers، از یک سرور شخصی (VPS) به عنوان ورکر استفاده میکند.
- آیپی ثابت: جلوگیری از مسدود شدن توسط سرویسهایی که به آیپی حساس هستند.
- باز شدن سایت های حساس به IP: باز شدن بدون مشکل Gemini، ChatGPT و سایر ابزارهای AI.
- بدون محدودیت روزانه: عبور از محدودیتهای رایگانِ روزانهی کلادفلر ورکر.
- نصب بودن پروژه اصلی: این پروژه جایگزین بخش ورکر است. اگر هنوز کلاینت را ندارید، ابتدا mhr-cfw را نصب کنید.
- سرور لینوکس (VPS): حتی ضعیفترین سرور (Minimum Specs) با سیستمعامل Ubuntu/Debian کافی است.
ابتدا از طریق SSH به سرور خود متصل شوید و دستورات زیر را برای نصب Node.js و PM2 اجرا کنید:
# نصب Node.js
curl -fsSL [https://deb.nodesource.com/setup_20.x](https://deb.nodesource.com/setup_20.x) | sudo -E bash -
sudo apt-get install -y nodejs
# نصب PM2 برای مدیریت فرآیندها
sudo npm install pm2 -gپورت 8081 را در فایروال لینوکس (UFW) باز کنید:
sudo ufw allow 8081/tcp
sudo ufw reloadفایل server.js را در سرور قرار داده و اجرا کنید:
pm2 start server.js --name mhr-relay --node-args="--max-http-header-size=65536"
pm2 save✅ بررسی صحت اجرا: پس از اجرای دستور بالا، باید یک جدول سبز رنگ ببینید که وضعیت mhr-relay را online نشان میدهد. برای اطمینان بیشتر، دستور pm2 logs mhr-relay را بزنید؛ باید پیام Rock-Solid Worker running on port 8081 را مشاهده کنید.
در پنل Google Apps Script، فایل Code.gs را باز کرده و آدرس ورکر را به آیپی سرور خود تغییر دهید:
// آیپی سرور خود را جایگزین کنید
const VPS_IP = "YOUR_SERVER_IP"; سپس پروژه را مجدداً Deploy کنید و آیدی (Deployment ID) جدید را بردارید.
به پوشهی اصلی کلاینت (mhr-cfw) در سیستم خود بروید و فایل config.json را با یک ویرایشگر متنی باز کنید. تغییرات زیر را اعمال کنید:
- تایماوت: مقدار
relay_timeoutرا حتماً به 60 تغییر دهید. - آیدی اسکریپت: در بخش
script_idآیدی جدید را قرار دهید. (میتوانید برای لودبالانسینگ و جلوگیری از محدودیت، چند آیدی را با کاما,جدا کنید).
{
"relay_timeout": 60,
"script_id": "ID1,ID2"mhr-vps-worker is a specialized adaptation of the mhr-cfw engine that replaces Cloudflare Workers with a private VPS-based Node.js worker.
- Static IP: Maintain a consistent IP address for all proxied requests.
- AI Ready: Seamlessly access Gemini, ChatGPT, and other AI platforms without chunking drops.
- No Daily Limits: Bypass Cloudflare's free tier request limits.
- Private Infrastructure: Runs exclusively on your own VPS.
- Core Project: This is a worker replacement. Ensure you have the mhr-cfw client installed first.
- Linux VPS: A basic VPS (minimum specs) running Ubuntu/Debian.
Connect to your VPS via SSH and install Node.js and PM2:
# Install Node.js
curl -fsSL [https://deb.nodesource.com/setup_20.x](https://deb.nodesource.com/setup_20.x) | sudo -E bash -
sudo apt-get install -y nodejs
# Install PM2
sudo npm install pm2 -gOpen port 8081 in your Linux firewall (UFW):
sudo ufw allow 8081/tcp
sudo ufw reloadDeploy the server.js file and run it:
pm2 start server.js --name mhr-relay --node-args="--max-http-header-size=65536"
pm2 save✅ Verification: You should see a green table indicating mhr-relay is online. To double-check, run pm2 logs mhr-relay. You should see the message: Rock-Solid Worker running on port 8081.
Open your Code.gs in the Google Apps Script editor and point it to your VPS:
const VPS_IP = "YOUR_SERVER_IP";
const WORKER_URL = "http://" + VPS_IP + ":8081";Re-Deploy the script and copy the new Deployment ID.
Navigate to your main mhr-cfw folder on your local machine and open the config.json file. Make the following adjustments:
- Timeout: Set
relay_timeoutto 60. - Script IDs: Update the
script_id. You can use multiple IDs separated by commas for load balancing.
{
"relay_timeout": 60,
"script_id": "YOUR_DEPLOYMENT_ID_1,YOUR_DEPLOYMENT_ID_2",
"direct_google_exclude": [
"gemini.google.com",
"chatgpt.com"
]
}Disclaimer: This tool is for educational purposes only. Use it responsibly.