# Slipstream Plus 🚀

**فارسی | English**: [README-fa.md](README-fa.md) | [README.md](README.md)

A Windows desktop app that scans and tests clean DNS endpoints, connects to Slipstream, and manages Slipstream configs, while routing traffic through `sing-box` with an easy GUI.

![Screenshot](screen.jpg)

**CLI Version**: [Slipstreamplus-CLI](https://github.com/payeh/Slipstreamplus-CLI)

## ✨ Key Features
- 🧩 Proxy manager with import, add, copy, and remove actions
- ⚡ Fast DNS scan with CIDR support and optional real ping test
- 🌍 Global or IR‑Direct routing modes (using geo rule sets)
- 🧭 One‑click system proxy enable/disable
- 📶 LAN mode for sharing proxy with phones on the same network
- 🔄 Auto reconnect
- 📊 Live traffic stats (optional `websocket-client`)
- 🧬 Tunnel protocols: `SLIPSTREAM` and `DNSTT`

## 🆕 Changelog (Latest)
**v1.1.5 (2026-03-03)**
- Auto reconnect: improved health detection by probing the internal SOCKS5 listener (supports auth), and use a fixed retry delay.

**v1.1.4 (2026-03-03)**
- CI: fixed Windows PowerShell quoting in “Stage Runtime Folders” step.

**v1.1.3 (2026-03-03)**
- CI: fixed Wintun download/extract script on Windows runners.

**v1.1.2 (2026-03-03)**
- Windows release includes `dnstt-client` and `wintun.dll` as separate release assets (and inside the ZIP).
- Windows build uses `icon.ico` and also ships it next to the executable.

**v1.1.1 (2026-03-03)**
- Release packaging: `bin/`, `asset/`, `geo/`, `cidrs/` are shipped next to the executable (not embedded).
- DNSTT links standardized to `DNSTT://...` (2 slashes).

**v1.1.0 (2026-03-03)**
- Fixed “connected but not working” state by adding a health monitor. If the local tunnel SOCKS listener dies/refuses, the app auto-reconnects (no manual disconnect needed).

## ✅ Requirements
- Windows 10/11
- `bin/sing-box.exe`
- `bin/slipstream-client-windows-amd64.exe`
- `bin/dnstt-client-windows-amd64.exe` (for DNSTT)
- Python 3.10+ if running from source
- Python packages: `PySide6` (required), `websocket-client` (optional)

## 🚀 Quick Start (Windows Binary)
1. Make sure the `bin/` folder is present and contains:
   - `sing-box.exe`
   - `slipstream-client-windows-amd64.exe`
   - `libcrypto-3-x64.dll` and `libssl-3-x64.dll`
2. Run `Slipstreamplus.exe`.
3. Add a Slipstream proxy and click **CONNECT**.

## 🧑‍💻 Run From Source
```bash
python -m pip install -U PySide6 websocket-client
python Slipstreamplus.py
```

## 🧭 Using The App

### 1) Proxy Tab
- **Import Links**: paste one or more links
- **Add Config**: add a single proxy manually
- **Copy Link**: copy selected proxy
- **Remove Selected**: delete selected proxies

**Slipstream link format**
```
SLIPSTREAM://<DOMAIN>:53?dns=<DNS_IP>[,<DNS_IP>...]#<REMARKS>
```
Example:
```
SLIPSTREAM://s.example.com:53?dns=1.2.3.4#My%20Server
```
With auth + multi DNS:
```
SLIPSTREAM://user:pass@s.example.com:53?dns=8.8.8.8,1.1.1.1,9.9.9.9#My%20Server
```

**DNSTT link format**
```
DNSTT://<PUBLIC_KEY_HEX>@<DOMAIN>:53?dns=<DNS_IP>#<REMARKS>
```

**Modes**
- **Global**: all traffic goes through proxy
- **IR‑Direct**: Iran traffic goes direct (requires geo rule files in `geo/srss/`)

**System Proxy**
Use **Set System Proxy** / **Clear System Proxy** to control Windows proxy settings.

### 2) Scanner Tab
- Load IPs/CIDRs from a file or paste them
- Set timeout, threads, and domain
- Start scan to find working DNS IPs
- Add results directly to the proxy list
- Multi-select results and add as a single Multi DNS proxy config

**Real Ping Test**
Runs a deeper check on scan results to estimate real latency.

### 3) LAN Mode
Enable **LAN Mode (Hotspot)** to share your proxy with devices on the same Wi‑Fi.

## ⚙️ Configuration & Data
- The app auto‑creates config files in `config/` on first run.
- **Important:** `config/` is ignored by Git because it may contain sensitive data.
- To reset the app, close it and delete the `config/` folder.

## 🧩 Updates
- Update core to Slipstream Rust Plus Deploy
- Proxy dialog supports multiple DNS addresses (add/remove fields)
- Slipstream links support multiple resolvers (dns query)
- Scanner context menu can add selected rows as one Multi DNS proxy
- Proxy auth (username/password) support for SOCKS5 connections
- Proxy logs are separated from general logs
- Remarks are required for proxy configs

## 📂 Project Structure
- `Slipstreamplus.py` — main application
- `bin/` — runtime binaries (`sing-box`, `slipstream-client`, DLLs)
- `geo/` — geo rule sets
- `cidrs/` — CIDR lists
- `asset/` — UI assets
- `icon.ico` — app icon

## 🧱 Build (PyInstaller)
```bash
pyinstaller --noconsole --onedir --icon="icon.ico" Slipstreamplus.py
```

## 🛠️ Troubleshooting
- **sing-box.exe not found**: place it in `bin/` or add it to your PATH.
- **No traffic stats**: install `websocket-client`.
- **App already running**: close the tray icon instance and try again.

## 🔐 Security Notes
- Do not commit `config/` to version control.
- If sensitive data leaked, rotate keys/tokens immediately.

## 📄 License
No license is specified yet.
