KiNG Github
44 subscribers
5 photos
1 file
16 links
Design & Developer — a WordPress/WooCommerce plugins
https://github.com/ehsanking/
•••••••••••••••••••••••••••••••••••••
Donation:
https://nowpayments.io/donation/ehsanking
Download Telegram
Channel created
X-UI Sales Associate — WooCommerce → 3x-ui automation

Run your VPN business straight from WooCommerce.
This plugin automatically talks to your 3x-ui panel and handles the boring parts for you.

Key features
Auto-create / renew accounts after paid orders (status: Selected).
Sends the job to your Cloudflare Worker proxy (secure, decoupled).
Saves & shows customer details in My Account: subscription URL, UUID, expiry, server info.
Plans / Defaults per product: traffic (GB) + duration (days).
Server Settings: transport (WS / gRPC), TLS on/off, WS path, SNI/Server Name.
Worker security: Shared Secret + (Optional) Allowed Origins.
Diagnostics: one-click Ping to verify connectivity.
Tested with 3x-ui (Xray multi-protocol panel): VLESS, VMESS, Trojan, ShadowSocks, WireGuard, Tunnel, Mixed, HTTP.
Requirements
• WordPress 6.6+, PHP 7.4+
• WooCommerce active
• A reachable 3x-ui panel (admin access)
• A deployed Cloudflare Worker URL (acting as proxy)
• Set the Shared Secret in both plugin & worker
• Site over HTTPS recommended
1
Quick setup
1. In X-UI SA → Settings, enter Worker Proxy URL + Shared Secret.
2. (Optional) Add Allowed Origins for tighter security.
3. In product edit → X-UI-SA tab, set GB and Days.
4. Make a test order → check My Account for subscription details.

Need help or want to follow updates?
Telegram: https://t.me/VPN_SalesAssociate
Dev’s GitHub: https://github.com/ehsanking/

#WooCommerce #WordPress #3xui #Xray #VLESS #VMESS #Trojan #WireGuard #CloudflareWorkers #VPN #Automation
👍1
X-UI Sales Associate — End-to-End Setup (Cloudflare Worker → WordPress/WooCommerce → 3x-ui)
0) What you need

WordPress 6.6+, PHP 7.4+

WooCommerce installed & active

A running 3x-ui (Xray) panel (admin access)

A Cloudflare account to deploy a Worker

The plugin ZIP installed: X-UI Sales Associate

1) Create the Cloudflare Worker (as a secure proxy)
1.1 Create a Worker

Cloudflare Dashboard → Workers & Pages → Create application → Create Worker → name it (e.g., x-ui-proxy) → save.

1.2 Configure environment variables (secrets)

Open your Worker → Settings → Variables:

Secrets (Add → Encrypt):

SHARED_SECRET: a long random string (the same value will be entered in the WP plugin).

PANEL_USER: your 3x-ui admin user (or service user).

PANEL_PASS: password for that user.

Plain text variables:

PANEL_URL: base URL of your 3x-ui admin (e.g., https://your-3xui.example.com).

ALLOWED_ORIGINS: comma-separated origins that are allowed to call this Worker (e.g., https://yoursite.com,https://admin.yoursite.com).

(Optional) DEBUG: 1 to return extra info on ping.

Tip: Keep PANEL_USER/PASS in Secrets, not as plain variables.

1.3 Paste the Worker code

Edit the Worker, switch to Module type if asked, and paste
Deploy, then copy your Worker URL, e.g.
https://x-ui-yourbrand.yourname.workers.dev

2) Configure the WordPress plugin

Install & Activate the plugin ZIP.

Go to X-UI SA → Settings → Worker & API and fill:

Worker Proxy URL: your Worker URL

Shared Secret: exactly the SHARED_SECRET you set in Worker

(Optional) Allowed Origins: https://yoursite.com, https://admin.yoursite.com

Click Test Connection (Ping) → it should return success.

Server Settings (match your 3x-ui):

Transport: WS or gRPC

TLS: On/Off

WS Path: e.g. / or /xray

SNI/Server Name: your domain (if needed)

Plans / Defaults per product:

GB (traffic cap)

Days (expiry)

Save.

3) WooCommerce order flow

The plugin triggers account create/renew after the order is paid (status completed).

For online gateways, WooCommerce typically auto-completes; for COD/manual, set to Completed yourself.

When your Worker returns success, the plugin stores details (subscription URL / UUID / expiry / server) and shows them in the buyer’s My Account.

4) Quick test

Make a hidden product (e.g., “Test VPN 5GB / 7 days”) and set GB=5, Days=7.

Place an order → mark Completed if needed.

Check:

WP admin → order notes (look for success / errors)

Worker logs (Cloudflare → Worker → Logs)

Customer My Account → subscription/UUID visible

5) Security checklist

Never hardcode credentials; keep them as Worker Secrets.

Use Allowed Origins to limit who can call the Worker.

Only accept HTTPS for site & panel.

Validate the Shared Secret on the Worker for every request.

Consider Cloudflare Firewall Rules / Rate Limiting for the Worker route.

If your 3x-ui is exposed, IP-allowlist Cloudflare egress or protect via auth.

6) Troubleshooting

Ping fails

Wrong Worker URL / secret mismatch / CORS origin not allowed.

401 unauthorized from Worker

X-SA-Secret missing or incorrect.

3x-ui login failed

Wrong PANEL_URL/PANEL_USER/PANEL_PASS or API path. Test with curl/Postman.

Traffic/expiry wrong

Ensure unit conversion GB → bytes and days → seconds matches your 3x-ui API.

Nothing appears in My Account

Check Worker’s JSON response includes subscription or identifiers; plugin can only display what it receives.

7) Reference

3x-ui (MHSanaei): https://github.com/MHSanaei/3x-ui

Telegram: https://t.me/VPN_SalesAssociate

GitHub: https://github.com/ehsanking
————————————————————————
راهنمای نصب
۰) پیش‌نیازها

وردپرس 6.6+، PHP 7.4+

ووکامرس فعال

پنل 3x-ui در حال اجرا (دسترسی ادمین)

اکانت کلادفلر برای ساخت Worker

نصب ZIP افزونه X-UI Sales Associate

۱) ساخت Cloudflare Worker (پروکسی امن)
۱.۱ ساخت Worker

Cloudflare → Workers & Pages → Create application → Create Worker → یک نام بدهید → ذخیره.

۱.۲ تنظیم متغیرها/اسرار

داخل Worker → Settings → Variables:

Secrets (رمزگذاری شده):

SHARED_SECRET: یک رشته تصادفی امن (همین را در افزونه هم می‌زنید).

PANEL_USER: کاربر ادمین 3x-ui (یا سرویس یوزر).
👍1
PANEL_PASS: پسورد آن کاربر.

Plain text:

PANEL_URL: آدرس پایه پنل 3x-ui (مثلاً https://your-3xui.example.com).

ALLOWED_ORIGINS: دامنه‌های مجاز برای فراخوانی Worker (با کاما جدا).

(اختیاری) DEBUG: اگر 1 باشد، در ping اطلاعات اضافه می‌دهد.

۱.۳ قراردادن کد Worker

کد بالا را (بخش انگلیسی) عیناً در ادیتور Worker قرار دهید و Deploy کنید.
سپس URL Worker را کپی کنید، مثل:
https://x-ui-yourbrand.yourname.workers.dev

نوت: توابع تماس با 3x-ui (آدرس‌ها و فیلدها) را مطابق نسخه/ساخت شما جایگزین کنید. هدف کد، الگوی امنِ «ورود → ایجاد/تمدید → برگرداندن اطلاعات» است.

۲) تنظیم افزونه داخل وردپرس

افزونه را نصب و فعال کنید.

مسیر X-UI SA → Settings → Worker & API:

Worker Proxy URL: آدرس Worker

Shared Secret: دقیقاً همان SHARED_SECRET

(Optional) Allowed Origins: مثل https://yoursite.com, https://admin.yoursite.com

روی Test Connection (Ping) بزنید؛ باید موفق باشد.

Server Settings را مطابق پنل خودتان بزنید: Transport (WS/gRPC)، TLS، مسیر WS، SNI.

در Plans / Defaults (داخل صفحه محصول)، GB و Days را تنظیم و ذخیره کنید.

۳) فرایند سفارش ووکامرس

ساخت/تمدید اکانت بعد از پرداخت و وقتی وضعیت سفارش completed شد انجام می‌شود.

در پرداخت آنلاین معمولاً خود ووکامرس کامل می‌کند؛ در COD/دستی، خودتان به Completed تغییر دهید.

Worker که OK بدهد، افزونه جزئیات (subscription/UUID/expiry/server) را ذخیره و در حساب کاربری من نمایش می‌دهد.

۴) تست سریع

یک محصول تستی: ۵GB / ۷ روز.

سفارش بدهید → اگر لازم بود دستی Completed کنید.

بررسی:

نوت‌های سفارش داخل ادمین

لاگ Worker در Cloudflare

نمایش لینک/UUID در حساب کاربری من

۵) نکات امنیتی

یوزر/پسورد را هرگز هاردکد نکنید؛ در Secrets نگه دارید.

Allowed Origins را ست کنید.

فقط HTTPS.

در Worker برای هر درخواست Shared Secret را چک کنید.

از Firewall Rules/Rate Limit کلادفلر استفاده کنید.

در صورت نیاز IPهای خروجی کلادفلر را مجاز کنید یا پنل را با احراز هویت محافظت کنید.

۶) رفع اشکال

Ping ناموفق: URL/Secret/CORS اشتباه.

401 از Worker: هدر X-SA-Secret وجود ندارد یا غلط است.

Login 3x-ui خطا: PANEL_URL/PANEL_USER/PANEL_PASS یا مسیر API اشتباه.

GB/Days اشتباه: تبدیل‌ها را چک کنید (GB→بایت، روز→ثانیه).

نمایش در My Account نیست: Worker باید subscription/uuid/... برگرداند.

۷) مرجع

3x-ui (MHSanaei): https://github.com/MHSanaei/3x-ui

تلگرام: https://t.me/VPN_SalesAssociate

گیت‌هاب: https://github.com/ehsanking
👍1
X-UI Sales Associate v1.0.0 is live!
Run your VPN business from WooCommerce → automate account create/renew on 3x-ui (Xray) via a secure Cloudflare Worker.

What you get

Auto create/renew on Completed orders

Per-product GB & Days

Server Settings (WS/gRPC, TLS, WS path, SNI)

Diagnostics: one-click Ping

Shows subscription/UUID/expiry/server in My Account

Tested with 3x-ui (VLESS/VMESS/Trojan/SS/WireGuard/…)

Requirements: WordPress 6.6+, PHP 7.4+, WooCommerce, Cloudflare account, a reachable 3x-ui panel.

Quick start

Deploy a Cloudflare Worker, set env vars:
SHARED_SECRET, PANEL_URL, PANEL_USER, PANEL_PASS, (ALLOWED_ORIGINS)

In WP → X-UI SA → Settings → Worker & API: paste Worker URL + Shared Secret, run Ping.

In product → X-UI SA tab: set GB + Days, place a test order.

GitHub (code & release)
🔗 https://github.com/ehsanking/xui-sales-associate
👍1
نسخه 1.0.0 منتشر شد!
با افزونه X-UI Sales Associate اکانت‌های 3x-ui (Xray) را مستقیماً از ووکامرس و با Cloudflare Worker به‌صورت امن بسازید/تمدید کنید.

امکانات

ساخت/تمدید خودکار بعد از Completed شدن سفارش

تعیین GB و Days برای هر محصول

Server Settings (WS/gRPC، TLS، مسیر WS، SNI)

Diagnostics با دکمه Ping

نمایش Subscription/UUID/Expiry/Server در حساب کاربری من

تست‌شده با 3x-ui (VLESS/VMESS/Trojan/SS/WireGuard/…)

پیش‌نیازها: وردپرس 6.6+، PHP 7.4+، ووکامرس، اکانت کلادفلر، پنل 3x-ui در دسترس.

شروع سریع

یک Worker در Cloudflare بساز و متغیرها را تنظیم کن:
SHARED_SECRET, PANEL_URL, PANEL_USER, PANEL_PASS, (ALLOWED_ORIGINS)

در وردپرس → X-UI SA → Settings → Worker & API: آدرس Worker و Shared Secret را وارد کن و Ping بگیر.

داخل محصول → تب X-UI SA: GB و Days را بزن، یک سفارش تستی ثبت کن.

گیت‌هاب (کد و ریلیز)
🔗 https://github.com/ehsanking/xui-sales-associate
👍1
🌍 مولتی سرور در افزونه تعبیه شده است.
برخی از دوستان درخواست داشتند که افزونه توانایی ارتباط با چند سرور را داشته باشد. باید مطرح کرد که این قابلیت در بخش محصولات تعبیه شده و کافیست ورکر مخصوص آن سرور را وارد کنید.
🔥1
💢 ساخت سایت فروش خودکار فیلترشکن | اتصال وردپرس به X-UI 🔥

🔹همیشه دوست داشتی یک کسب و کار آنلاین خودکار برای خودت راه بندازی؟ توی این آموزش جامع و قدم به قدم، بهت یاد میدم چطور یک سیستم فروش کاملاً اتوماتیک (فیلترشکن) با استفاده از وردپرس و پنل قدرتمند X-UI بسازی. بعد از دیدن این ویدیو، می‌تونی سایتی داشته باشی که کاربر خودش ثبت نام می‌کنه، هزینه رو پرداخت می‌کنه و به صورت آنی لینک کانفیگ فیلترشکن خودش رو تحویل می‌گیره!

🔗 تماشا ویدیو در یوتیوب



#آموزش #وردپرس #فیلترشکن #ورکر #xui #worker
برای دور زدن فیلترینگ و آموزش تکنولوژی و هوش مصنوعی ما رو دنبال کنید 💚

🆔@iaghapour
👏1
🛠مرزبان بزودی تحت پوشش افزونه قرار می گیرد.
1
Worker-Marzban-1.0.1.js
10.7 KB
ورکر مرزبان
لطفا تست کنید
و باگ [ها] را اطلاع دهید.
مقادیر وریبل:
MARZBAN_URL (مثل: https://panel.example.com، بدون اسلش آخر)

MARZBAN_USER

MARZBAN_PASS

SHARED_SECRET

ALLOWED_ORIGINS (اختیاری)

MARZBAN_SUB_PREFIX (اختیاری برای ساخت لینک سابسکرایب اگر API نداد؛ مثل https://sub.example.com)