An automated Bash script to easily set up, manage, and monitor the Slipstream DNS Tunnel on both Client (Iran) and Server (Kharej) sides. This script handles dependencies, file fetching, certificate generation, and systemd service creation automatically.
Thanks to https://t.me/@Amo_mohammadreza
- Menu-based Interface: Easy-to-use menu for installation, status checks, editing configs, and uninstallation.
- Auto Dependency Handling: Automatically installs
openssl,wget, and required.deblibraries (libssl,ca-certificates). - Flexible File Sourcing:
- On Iran servers: Choose between downloading from GitHub or using local files (useful if GitHub is restricted).
- On Kharej servers: Files are fetched automatically.
- Certificate Generation: Automatically generates self-signed certificates (
cert.pem,key.pem) on the server. - Service Management: Creates permanent
systemdservices that auto-restart on failure.
Run this single command on your server to download and start the script immediately:
bash <(curl -Ls https://raw.githubusercontent.com/AmirHBuilds/slipstream-tunnel/refs/heads/main/install.sh)If you already have install.sh on your server or prefer to download it manually:
- Download or upload
install.shto your server. - Make it executable:
chmod +x install.sh
- Run the script:
./install.sh
Select Option 2 in the menu.
- Prerequisite: Port
53(UDP/TCP) must be free. The script will attempt to stopsystemd-resolved. - Domain: Enter your tunnel domain (e.g.,
ns.example.com). - Target Port: Enter the local inbound port that is SOCKS or Shadowsocks only (e.g.,
1087). ⚠️ IMPORTANT (LARGE NOTE): VLESS and other protocols fail in this mode. Only SOCKS/Shadowsocks works.- Result: The script generates certificates and starts the server listening on Port 53.
Select Option 1 in the menu.
- File Source:
- Select
1to download files from GitHub automatically. - Select
2if you have the files locally (useful for restricted networks). You will be asked for the folder path.
- Select
- Domain: Enter the same domain used on the Kharej server.
- Port: Enter the local listening port that maps to a SOCKS or Shadowsocks inbound (e.g.,
1087). ⚠️ IMPORTANT (LARGE NOTE): Do not use VLESS (or other protocols) for this port; they fail here.- DNS: Enter a DNS resolver (default:
8.8.8.8).
Run the script again (./install.sh or the curl command) to access the menu:
- Check Status: View logs and running status.
- Edit Config: Modify parameters without reinstalling.
- Restart Service: Quickly restart the tunnel.
- Uninstall: Remove the service and files completely.
- منوی مدیریت: رابط کاربری ساده برای نصب، بررسی وضعیت، ویرایش و حذف.
- نصب خودکار پیشنیازها: نصب اتوماتیک پکیجهای
.debمورد نیاز و کتابخانهها. - انتخاب منبع فایلها:
- در سرور ایران: میتوانید انتخاب کنید فایلها از گیتهاب دانلود شوند یا از فایلهای موجود در پوشه سرور استفاده شود (مناسب برای زمانهایی که گیتهاب فیلتر است).
- در سرور خارج: فایلها به صورت خودکار دانلود میشوند.
- ساخت سرتیفیکیت: ساخت خودکار فایلهای
cert.pemوkey.pem. - سرویس پایدار: ایجاد سرویس
systemdکه در صورت ریستارت سرور یا کرش کردن، تانل را مجدد اجرا میکند.
کد زیر را کپی کرده و در ترمینال سرور خود اجرا کنید:
bash <(curl -Ls https://raw.githubusercontent.com/AmirHBuilds/slipstream-tunnel/refs/heads/main/install.sh)اگر فایل install.sh را روی سرور دارید یا میخواهید دستی آپلود کنید:
۱. فایل install.sh را در سرور قرار دهید.
۲. دسترسی اجرا به آن بدهید:
chmod +x install.sh۳. اسکریپت را اجرا کنید:
./install.shگزینه 2 را انتخاب کنید.
- پورت ۵۳: این پورت باید آزاد باشد (اسکریپت سعی میکند سرویسهای مزاحم را غیرفعال کند).
- Domain: دامنه تانل را وارد کنید (دامنهای که رکورد NS دارد).
- Target Port: پورت ورودی لوکال را وارد کنید که فقط از نوع SOCKS یا Shadowsocks باشد (مثلاً
1087). ⚠️ نکته مهم (با تاکید): پروتکل VLESS و سایر پروتکلها در این حالت خطا میدهند و کار نمیکنند.- نتیجه: اسکریپت سرتیفیکیت میسازد و روی پورت ۵۳ آماده دریافت ترافیک میشود.
گزینه 1 را انتخاب کنید.
- File Source:
- عدد
1را بزنید تا فایلها از اینترنت دانلود شوند. - عدد
2را بزنید اگر فایلها را دستی روی سرور ریختهاید (باید آدرس پوشه فایلها را وارد کنید).
- عدد
- Domain: همان دامنهای که در سرور خارج تنظیم کردید را وارد کنید.
- Port: پورتی را وارد کنید که به یک ورودی SOCKS یا Shadowsocks وصل میشود (مثلاً
1087). ⚠️ نکته مهم (با تاکید): برای این قسمت از VLESS یا پروتکلهای دیگر استفاده نکنید چون fail میشود.- DNS: آدرس DNS را وارد کنید (پیشفرض
8.8.8.8مناسب است).
با اجرای مجدد اسکریپت به منو دسترسی خواهید داشت:
- Check Status: بررسی وضعیت اتصال و لاگها.
- Edit Config: ویرایش فایل کانفیگ سرویس.
- Uninstall: حذف کامل سرویس و فایلها.
If you choose Option 2 (Local Files) in Iran setup, ensure these files exist in your folder: اگر گزینه لوکال را انتخاب میکنید، این فایلها باید در پوشه باشند:
slipstream-serverslipstream-clientca-certificates_20240203_all.deblibssl3t64_3.0.13-0ubuntu3.6_amd64.deb