{"id":43995837,"url":"https://github.com/samnet-dev/paqctl","last_synced_at":"2026-02-10T14:01:08.175Z","repository":{"id":336381484,"uuid":"1149409687","full_name":"SamNet-dev/paqctl","owner":"SamNet-dev","description":"Unified proxy manager for bypassing firewalls - supports Paqet (KCP/raw socket) and GFW-Knocker (violated TCP/QUIC) with dual-backend simultaneous operation","archived":false,"fork":false,"pushed_at":"2026-02-09T01:35:34.000Z","size":381,"stargazers_count":617,"open_issues_count":3,"forks_count":77,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-02-09T15:55:39.331Z","etag":null,"topics":["china","firewall-bypass","gfw","gfw-breaker","iran","proxy","raw-socket","socks5","socks5-proxy","tunnel","vpn","windows"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SamNet-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-04T04:39:02.000Z","updated_at":"2026-02-09T15:09:11.000Z","dependencies_parsed_at":"2026-02-09T13:00:44.486Z","dependency_job_id":null,"html_url":"https://github.com/SamNet-dev/paqctl","commit_stats":null,"previous_names":["samnet-dev/paqctl"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/SamNet-dev/paqctl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamNet-dev%2Fpaqctl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamNet-dev%2Fpaqctl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamNet-dev%2Fpaqctl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamNet-dev%2Fpaqctl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SamNet-dev","download_url":"https://codeload.github.com/SamNet-dev/paqctl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamNet-dev%2Fpaqctl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29303008,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T12:55:56.056Z","status":"ssl_error","status_checked_at":"2026-02-10T12:55:55.692Z","response_time":65,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["china","firewall-bypass","gfw","gfw-breaker","iran","proxy","raw-socket","socks5","socks5-proxy","tunnel","vpn","windows"],"created_at":"2026-02-07T11:34:54.962Z","updated_at":"2026-02-10T14:01:08.089Z","avatar_url":"https://github.com/SamNet-dev.png","language":"Shell","readme":"```\n                            _   _\n _ __   __ _  __ _  ___| |_| |\n| '_ \\ / _` |/ _` |/ __| __| |\n| |_) | (_| | (_| | (__| |_| |\n| .__/ \\__,_|\\__, |\\___|\\__|_|\n|_|             |_|\n```\n\n[![Version](https://img.shields.io/badge/version-1.0.0-blue.svg)](https://github.com/SamNet-dev/paqctl/releases)\n[![License](https://img.shields.io/badge/license-AGPL--3.0-green.svg)](LICENSE)\n[![Server](https://img.shields.io/badge/server-Linux-lightgrey.svg)](https://github.com/SamNet-dev/paqctl)\n[![Client](https://img.shields.io/badge/client-Windows%20%7C%20macOS%20%7C%20Linux-green.svg)](https://github.com/SamNet-dev/paqctl)\n\n**Bypass firewall restrictions and access the free internet**\n\n[نسخه فارسی](#نسخه-فارسی)\n\n---\n\n## What is this?\n\npaqctl is a unified management tool for bypass proxies. It helps you connect to a server outside restricted networks (like behind the Great Firewall) and access the internet freely. You run the **server** component on a VPS, and the **client** on your Windows/Mac/Linux machine.\n\n---\n\n## Two Methods\n\nThis tool supports **two different bypass methods**. Choose based on your situation:\n\n| | **Paqet** | **GFW-Knocker (GFK)** |\n|---|---|---|\n| **Difficulty** | Easy ⭐ | Advanced ⭐⭐⭐ |\n| **Best for** | Most situations | Heavy censorship (GFW) |\n| **Your proxy** | `127.0.0.1:1080` | `127.0.0.1:14000` |\n| **Technology** | KCP over raw sockets | Violated TCP + QUIC tunnel |\n| **Server needs** | Just paqet | GFK + Xray |\n\n### Which should I use?\n\n```\nSTART HERE\n     |\n     v\n+----------------------------------+\n| Is your network heavily censored |\n| (like Iran or China's GFW)?      |\n+----------------------------------+\n     |                |\n    YES               NO\n     |                |\n     v                v\n+-----------+    +-----------+\n| Try GFK   |    | Use Paqet |\n| first     |    |           |\n+-----------+    +-----------+\n```\n\n\u003e **Tip:** You can install BOTH and have a backup! They use different ports.\n\n---\n\n## How It Works\n\n### Paqet (Simple)\n\n```\nYOUR COMPUTER                YOUR VPS                   INTERNET\n+--------------+            +--------------+           +----------+\n|  Browser     |            |    Paqet     |           |  Google  |\n|      |       |            |    Server    |           |  YouTube |\n|      v       |  ---KCP--\u003e |      |       |  -------\u003e |  etc.    |\n|  Paqet       | (random    |      v       |           |          |\n|  Client      |    UDP)    |    SOCKS5    |           |          |\n+--------------+            +--------------+           +----------+\n  127.0.0.1:1080              your.vps.ip\n```\n\n**How Paqet bypasses firewalls:**\n1. Uses KCP protocol over raw TCP packets with custom TCP flags\n2. Sends packets via raw sockets, making them hard to fingerprint\n3. DPI systems can't easily identify it as proxy traffic\n\n---\n\n### GFW-Knocker (Advanced)\n\n```\nYOUR COMPUTER                YOUR VPS                   INTERNET\n+--------------+            +--------------+           +----------+\n|  Browser     |            |  GFK Server  |           |  Google  |\n|      |       | \"Violated  |      |       |           |  YouTube |\n|      v       |    TCP\"    |      v       |           |  etc.    |\n|  GFK Client  | ---------\u003e | QUIC Tunnel  |  -------\u003e |          |\n|  (VIO+QUIC)  | (malformed |      |       |           |          |\n|      |       |  +QUIC)    |      v       |           |          |\n|  Port 14000  |            |    Xray      |           |          |\n+--------------+            +--------------+           +----------+\n  127.0.0.1:14000             your.vps.ip\n```\n\n**How GFK bypasses firewalls:**\n1. **Violated TCP**: Sends TCP packets that are intentionally \"broken\" - they have wrong flags, no proper handshake. Firewalls expect normal TCP and often pass these through.\n2. **QUIC Tunnel**: Inside these violated packets, there's a QUIC connection carrying your actual data.\n3. **Xray Backend**: On the server, Xray provides the actual SOCKS5 proxy service.\n\n---\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eUsing GFK with an Existing Xray Panel (3x-ui, Marzban, etc.)\u003c/strong\u003e\u003c/summary\u003e\n\nIf your foreign server already has an Xray panel (3x-ui, Marzban, etc.), paqctl detects it and works alongside it. Your panel stays untouched — paqctl only adds what's needed.\n\n**What paqctl does when it detects Xray:**\n\n| Scenario | What paqctl does |\n|---|---|\n| **No Xray installed** | Installs Xray with SOCKS5 proxy automatically (nothing to configure) |\n| **Xray panel running** | Keeps your panel, adds a SOCKS5 inbound on a free port (e.g. 10443), appends an extra port mapping automatically |\n| **Xray installed but not running** | Installs its own SOCKS5 (same as fresh install) |\n\nWhen a panel is detected, paqctl gives you **two connections** automatically:\n- **Panel mapping** (`14000:443`) — for server-to-server panel traffic (vmess/vless)\n- **SOCKS5 mapping** (`14001:10443`) — for direct proxy use from Windows/Mac (no v2rayN needed)\n\n---\n\n### Setup A: Server-to-Server (Iran panel to Foreign panel)\n\nThis is for when you have a panel on **both** servers (Iran + foreign) and want to route the Iran panel's outbound through the GFK tunnel instead of a direct connection.\n\n**1. Install paqctl on the foreign server (server role):**\n```bash\ncurl -fsSL https://raw.githubusercontent.com/SamNet-dev/paqctl/main/paqctl.sh | sudo bash\n```\n- Choose **server** role\n- Set port mapping: `14000:443` (where `443` is your panel's inbound port)\n- paqctl detects Xray and adds SOCKS5 alongside your panel (e.g. `14001:10443`)\n\n**2. Install paqctl on the Iran server (client role):**\n```bash\ncurl -fsSL https://raw.githubusercontent.com/SamNet-dev/paqctl/main/paqctl.sh | sudo bash\n```\n- Choose **client** role\n- Use the **exact same** port mappings shown in the server output (e.g. `14000:443,14001:10443`)\n- Use the same auth code from the server setup\n\n**3. Update your Iran panel outbound to route through GFK:**\n\nIn your Iran panel (3x-ui, Marzban, etc.), change the outbound that connects to the foreign server:\n\n**Before** (direct connection — blocked by DPI):\n```json\n{\n  \"tag\": \"vmess_out\",\n  \"protocol\": \"vmess\",\n  \"settings\": {\n    \"vnext\": [{\n      \"address\": \"FOREIGN_SERVER_IP\",\n      \"port\": 443,\n      \"users\": [{\"id\": \"your-uuid\", \"security\": \"auto\"}]\n    }]\n  }\n}\n```\n\n**After** (routed through GFK tunnel):\n```json\n{\n  \"tag\": \"vmess_out\",\n  \"protocol\": \"vmess\",\n  \"settings\": {\n    \"vnext\": [{\n      \"address\": \"127.0.0.1\",\n      \"port\": 14000,\n      \"users\": [{\"id\": \"your-uuid\", \"security\": \"auto\"}]\n    }]\n  }\n}\n```\n\nIn 3x-ui: go to **Xray Configs → Outbounds → Add Outbound** (or edit existing), and fill in:\n- **Address**: `127.0.0.1`\n- **Port**: `14000` (the VIO port, NOT the original server port)\n- **Protocol/ID/encryption**: keep the same as before (from your foreign panel's inbound)\n- **Security**: None (traffic is already encrypted inside the GFK tunnel)\n\n\u003e **Where do I get the UUID?** From your foreign server's panel — go to **Inbounds**, find the inbound you're connecting to, and copy its UUID/ID. If you already had a working outbound before, just change the address and port — everything else stays the same.\n\n**Traffic flow:**\n```\nEnd user --\u003e Iran panel inbound --\u003e Iran panel outbound (127.0.0.1:14000)\n  --\u003e GFK client (VIO port) --\u003e QUIC tunnel over violated TCP\n  --\u003e Foreign GFK server --\u003e 127.0.0.1:443 (foreign panel inbound) --\u003e Internet\n```\n\n---\n\n### Setup B: Direct Client (Windows/Mac to Foreign server)\n\nThis is for when you **don't have an Iran server** — you connect directly from your Windows or Mac to the foreign server through GFK. paqctl auto-adds a SOCKS5 proxy so you can use it as a simple browser proxy.\n\n**1. Install paqctl on the foreign server** (same as above)\n\n**2. On your Windows/Mac**, install the GFK client and use the SOCKS5 mapping:\n- The server output will show something like: `Mappings: 14000:443,14001:10443`\n- Use `14001` as your proxy port — this is the direct SOCKS5 (no panel/v2rayN needed)\n- Configure your browser or system proxy to `SOCKS5 127.0.0.1:14001`\n\n**Traffic flow:**\n```\nBrowser (SOCKS5 127.0.0.1:14001) --\u003e GFK client\n  --\u003e QUIC tunnel over violated TCP\n  --\u003e Foreign GFK server --\u003e 127.0.0.1:10443 (SOCKS5 proxy) --\u003e Internet\n```\n\n---\n\n**Multiple ports:** If your panel uses multiple ports, map them all:\n```\n14000:443,14001:8080,14002:2020\n```\npaqctl will add SOCKS5 on the next available port and append it automatically.\n\n\u003e **Note:** The \"Firewall: VIO port blocked\" status message (shown in green) is **normal and correct**. It means the firewall is properly configured for GFK's raw socket to work.\n\n\u003c/details\u003e\n\n---\n\n## Quick Start\n\n### 1. Server Setup (Linux VPS)\n\nRun this on your VPS (requires root):\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/SamNet-dev/paqctl/main/paqctl.sh | sudo bash\n```\n\nThen open the interactive menu:\n\n```bash\nsudo paqctl menu\n```\n\nAfter setup, get your connection info:\n\n```bash\nsudo paqctl info\n```\n\nThis will show you the **Server IP**, **Port**, and **Key/Auth Code** you need for the client.\n\n---\n\n### 2. Client Setup\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003ch3\u003e🪟 Windows Client Setup (Click to expand)\u003c/h3\u003e\u003c/summary\u003e\n\n## Windows Client - Complete Guide\n\n### Prerequisites\n\n- Windows 10 or 11\n- Administrator access\n- Your server's connection info (from `paqctl info` on server)\n\n---\n\n## 🚀 Easy Method (Recommended) - Using .bat Files\n\nThe simplest way to get started - just download, double-click, and connect!\n\n### Step 1: Download\n\n1. Go to: https://github.com/SamNet-dev/paqctl\n2. Click the green **\"Code\"** button → **\"Download ZIP\"**\n3. Extract the ZIP file anywhere (e.g., Desktop)\n4. Open the `windows` folder inside\n\n### Step 2: Install Protocol\n\nYou'll see two `.bat` files:\n- `Paqet-Client.bat` - For Paqet protocol (simple, recommended)\n- `GFK-Client.bat` - For GFW-knocker protocol (advanced)\n\n**Right-click** your chosen `.bat` file → **\"Run as administrator\"**\n\nFirst run will install Npcap (required for raw sockets). Follow the installer prompts.\n\n### Step 3: Configure \u0026 Connect\n\nAfter installation, the script will ask for your server info:\n- **Paqet:** Server address (e.g., `1.2.3.4:8443`) and encryption key\n- **GFK:** Server IP and auth code\n\nEnter the values from your server (shown after server setup or via `paqctl info`).\n\nOnce configured, press **Connect** and you're done!\n\n### Step 4: Use the Proxy\n\nConfigure your browser to use SOCKS5 proxy:\n- **Paqet:** `127.0.0.1:1080`\n- **GFK:** `127.0.0.1:14000`\n\nTo disconnect, press `Ctrl+C` in the window.\n\n---\n\n## 💻 Advanced Method - PowerShell Script\n\nFor more control, use the interactive PowerShell menu.\n\n### Step 1: Open PowerShell as Administrator\n\n1. Press `Win + S`, type `PowerShell`\n2. Right-click \"Windows PowerShell\" → **\"Run as administrator\"**\n3. Click \"Yes\" on the UAC prompt\n\n### Step 2: Run the Script\n\n**Option A: One-liner (downloads and runs automatically)**\n```powershell\nirm https://raw.githubusercontent.com/SamNet-dev/paqctl/main/windows/paqet-client.ps1 | iex\n```\n\n**Option B: Download first, then run**\n```powershell\ngit clone https://github.com/SamNet-dev/paqctl.git\ncd paqctl\\windows\n.\\paqet-client.ps1\n```\n\n### Step 3: Use the Menu\n\nThe interactive menu lets you:\n1. Install paqet or GFK\n2. Configure connection\n3. Start/stop client\n4. Check status\n\n---\n\n### Step 4: Allow Script Execution\n\nWindows blocks scripts by default. Run this once:\n\n```powershell\nSet-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser\n```\n\nType `Y` and press Enter when prompted.\n\n---\n\n### Step 5: Run the Client\n\n**Option 1: Double-click (Easiest)**\n- Double-click `Paqet-Client.bat`\n- It will automatically run as Administrator\n\n**Option 2: From PowerShell**\n```powershell\n.\\paqet-client.ps1\n```\n\nYou'll see an interactive menu:\n\n```\n===============================================\n  PAQET/GFK CLIENT MANAGER\n===============================================\n\n  No backend installed yet\n\n  1. Install paqet        (simple, all-in-one SOCKS5)\n  2. Install GFW-knocker  (advanced, for heavy DPI)\n  3. Configure connection\n  4. Start client\n  5. Stop client\n  6. Show status\n  7. About (how it works)\n  0. Exit\n\n  Select option:\n```\n\n---\n\n### Step 6: Install Your Chosen Backend\n\n\u003e **Tip:** For a smoother experience, download and install [Npcap](https://npcap.com/#download) separately first.\n\n#### For Paqet (Recommended for most users):\n\n1. Press `1` and Enter\n2. The script will:\n   - Download and install **Npcap** (network capture driver)\n   - Download the **paqet binary**\n3. When Npcap installer opens:\n   - Click \"I Agree\"\n   - Keep default options checked\n   - Click \"Install\"\n   - Click \"Finish\"\n\n#### For GFK (If Paqet is blocked):\n\n1. Press `2` and Enter\n2. The script will:\n   - Install **Npcap**\n   - Install **Python 3.10+** (if not present)\n   - Install Python packages: `scapy`, `aioquic`\n   - Copy GFK client scripts\n\n---\n\n### Step 7: Configure Connection\n\n1. Press `3` and Enter\n2. Enter the info from your server:\n\n**For Paqet:**\n```\nServer address (e.g., 1.2.3.4:8443): \u003cyour server IP:port\u003e\nEncryption key (16+ chars): \u003cyour key from server\u003e\n```\n\n**For GFK:**\n```\nServer IP (e.g., 1.2.3.4): \u003cyour server IP\u003e\nAuth code (from server setup): \u003cyour auth code from server\u003e\n```\n\n---\n\n### Step 8: Start the Client\n\n1. Press `4` and Enter\n2. The client will start and show logs\n3. Keep this window open while using the proxy\n\n---\n\n### Step 9: Configure Your Browser\n\nNow you need to tell your browser to use the proxy.\n\n**Your proxy address is:**\n- **Paqet:** `127.0.0.1:1080` (SOCKS5)\n- **GFK:** `127.0.0.1:14000` (SOCKS5)\n\n#### Firefox (Recommended):\n1. Open Firefox\n2. Go to Settings → General → Network Settings → Settings...\n3. Select \"Manual proxy configuration\"\n4. In \"SOCKS Host\": `127.0.0.1`\n5. Port: `1080` (for Paqet) or `14000` (for GFK)\n6. Select \"SOCKS v5\"\n7. Check \"Proxy DNS when using SOCKS v5\" ← **Important!**\n8. Click OK\n\n#### Chrome (via extension):\nChrome uses Windows proxy settings. Use a browser extension instead:\n1. Install \"SwitchyOmega\" extension\n2. Create a new profile\n3. Set SOCKS5 proxy: `127.0.0.1:1080` or `127.0.0.1:14000`\n4. Activate the profile\n\n---\n\n### Step 10: Test Your Connection\n\n1. Open your browser (with proxy configured)\n2. Go to: https://whatismyipaddress.com\n3. Your IP should show your **VPS IP**, not your real IP\n4. Try accessing blocked sites\n\n---\n\n### Stopping the Client\n\n- Press `Ctrl+C` in the PowerShell window, OR\n- Run the script again and choose option `5` (Stop client)\n\n---\n\n### Troubleshooting Windows\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\"Running scripts is disabled\" error\u003c/strong\u003e\u003c/summary\u003e\n\nRun this command first:\n```powershell\nSet-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\"Administrator privileges required\"\u003c/strong\u003e\u003c/summary\u003e\n\nYou must run PowerShell as Administrator. Right-click PowerShell and select \"Run as administrator\".\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eNpcap installation fails\u003c/strong\u003e\u003c/summary\u003e\n\n1. Download manually from https://npcap.com\n2. Run the installer as Administrator\n3. Make sure \"WinPcap API-compatible Mode\" is checked\n4. Restart your computer after installation\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eConnection times out\u003c/strong\u003e\u003c/summary\u003e\n\n1. Make sure your server is running (`paqctl status` on server)\n2. Check if your VPS firewall allows the port (8443 for Paqet, 45000 for GFK)\n3. Try the other method (if Paqet fails, try GFK)\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eGFK: \"Gateway MAC not found\"\u003c/strong\u003e\u003c/summary\u003e\n\nThe script couldn't detect your router's MAC address. You'll need to enter it manually:\n\n1. Open Command Prompt\n2. Run: `arp -a`\n3. Find your gateway IP (usually 192.168.1.1 or 192.168.0.1)\n4. Copy the MAC address next to it (format: aa-bb-cc-dd-ee-ff)\n5. Enter it when the script asks\n\u003c/details\u003e\n\n\u003c/details\u003e\n\n---\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003ch3\u003e🍎 macOS Client Setup (Click to expand)\u003c/h3\u003e\u003c/summary\u003e\n\n## macOS Client - Complete Guide\n\nmacOS requires manual setup since there's no automated script yet.\n\n### Prerequisites\n\n- macOS 10.15 (Catalina) or newer\n- Administrator access (for sudo)\n- Homebrew (recommended)\n- Your server's connection info\n\n---\n\n### Option A: Paqet on macOS\n\n#### Step 1: Install Homebrew (if not installed)\n\n```bash\n/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"\n```\n\n#### Step 2: Download Paqet Binary\n\n```bash\n# Create directory\nmkdir -p ~/paqet \u0026\u0026 cd ~/paqet\n\n# Download latest release (Intel Mac)\ncurl -LO https://github.com/hanselime/paqet/releases/download/v1.0.0-alpha.15/paqet-darwin-amd64-v1.0.0-alpha.15.tar.gz\ntar -xzf paqet-darwin-amd64-v1.0.0-alpha.15.tar.gz\n\n# For Apple Silicon (M1/M2/M3):\n# curl -LO https://github.com/hanselime/paqet/releases/download/v1.0.0-alpha.15/paqet-darwin-arm64-v1.0.0-alpha.15.tar.gz\n# tar -xzf paqet-darwin-arm64-v1.0.0-alpha.15.tar.gz\n\n# Make executable\nchmod +x paqet_darwin_amd64\n```\n\n#### Step 3: Create Config File\n\n```bash\ncat \u003e ~/paqet/config.yaml \u003c\u003c 'EOF'\nrole: \"client\"\n\nlog:\n  level: \"info\"\n\nsocks5:\n  - listen: \"127.0.0.1:1080\"\n\nnetwork:\n  interface: \"en0\"  # Your network interface (en0 for macOS, eth0 for Linux)\n  ipv4:\n    addr: \"YOUR_LOCAL_IP:0\"  # Your local IP, e.g., 192.168.1.100:0\n    router_mac: \"YOUR_ROUTER_MAC\"  # Gateway MAC, e.g., aa:bb:cc:dd:ee:ff\n\nserver:\n  addr: \"YOUR_SERVER_IP:8443\"\n\ntransport:\n  protocol: \"kcp\"\n  kcp:\n    mode: \"fast\"\n    key: \"YOUR_SECRET_KEY\"\nEOF\n```\n\nReplace the placeholders:\n- `YOUR_LOCAL_IP`: Run `ifconfig en0 | grep inet` to find your IP\n- `YOUR_ROUTER_MAC`: Run `arp -n | grep gateway` or check your router\n- `YOUR_SERVER_IP` and `YOUR_SECRET_KEY`: Get from your server admin\n\n\u003e **Tip:** Use `paqctl` for automatic configuration - it detects these values for you.\n\n#### Step 4: Run Paqet\n\n```bash\n# Requires sudo for raw socket access\nsudo ~/paqet/paqet_darwin_amd64 run -c ~/paqet/config.yaml\n```\n\nFor Apple Silicon:\n```bash\nsudo ~/paqet/paqet_darwin_arm64 run -c ~/paqet/config.yaml\n```\n\nYour SOCKS5 proxy is now at `127.0.0.1:1080`\n\n---\n\n### Option B: GFK on macOS\n\nGFK requires Python and some setup:\n\n#### Step 1: Install Python 3.10+\n\n```bash\nbrew install python@3.11\n```\n\n#### Step 2: Clone the Repository\n\n```bash\ngit clone https://github.com/SamNet-dev/paqctl.git\ncd paqctl/gfk/client\n```\n\n#### Step 3: Install Python Dependencies\n\n```bash\npip3 install scapy aioquic\n```\n\n#### Step 4: Create parameters.py\n\n```bash\ncat \u003e parameters.py \u003c\u003c 'EOF'\n# GFW-knocker client configuration\nfrom scapy.all import conf\n\n# Server settings\nvps_ip = \"YOUR_SERVER_IP\"\nxray_server_ip = \"127.0.0.1\"\n\n# Port mappings (local_port: remote_port)\ntcp_port_mapping = {14000: 443}\nudp_port_mapping = {}\n\n# VIO (raw socket) ports\nvio_tcp_server_port = 45000\nvio_tcp_client_port = 40000\nvio_udp_server_port = 35000\nvio_udp_client_port = 30000\n\n# QUIC tunnel ports\nquic_server_port = 25000\nquic_client_port = 20000\nquic_local_ip = \"127.0.0.1\"\n\n# QUIC settings\nquic_verify_cert = False\nquic_idle_timeout = 86400\nudp_timeout = 300\nquic_mtu = 1420\nquic_max_data = 1073741824\nquic_max_stream_data = 1073741824\nquic_auth_code = \"YOUR_AUTH_CODE\"\nquic_certificate = \"cert.pem\"\nquic_private_key = \"key.pem\"\n\n# SOCKS proxy\nsocks_port = 14000\nEOF\n```\n\nReplace `YOUR_SERVER_IP` and `YOUR_AUTH_CODE` with your actual values.\n\n#### Step 5: Run GFK Client\n\n```bash\n# Requires sudo for raw socket access\nsudo python3 mainclient.py\n```\n\nYour SOCKS5 proxy is now at `127.0.0.1:14000`\n\n---\n\n### Configure macOS to Use Proxy\n\n#### System-wide (all apps):\n\n1. Open **System Preferences** → **Network**\n2. Select your connection (Wi-Fi or Ethernet)\n3. Click **Advanced** → **Proxies**\n4. Check **SOCKS Proxy**\n5. Server: `127.0.0.1`\n6. Port: `1080` (Paqet) or `14000` (GFK)\n7. Click **OK** → **Apply**\n\n#### Firefox only:\n\nSame as Windows - go to Firefox Settings → Network Settings → Manual proxy.\n\n---\n\n### Troubleshooting macOS\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\"Operation not permitted\" error\u003c/strong\u003e\u003c/summary\u003e\n\nmacOS requires special permissions for raw sockets:\n\n1. Run with `sudo`\n2. If still failing, you may need to disable SIP (not recommended) or use a different method\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003ePython package installation fails\u003c/strong\u003e\u003c/summary\u003e\n\nTry using a virtual environment:\n\n```bash\npython3 -m venv ~/paqet-venv\nsource ~/paqet-venv/bin/activate\npip install scapy aioquic\n```\n\nThen run GFK from within the venv.\n\u003c/details\u003e\n\n\u003c/details\u003e\n\n---\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003ch3\u003e🐧 Linux Client Setup (Click to expand)\u003c/h3\u003e\u003c/summary\u003e\n\n## Linux Client - Complete Guide\n\n### Option A: Paqet\n\n```bash\n# Download paqet\nmkdir -p ~/paqet \u0026\u0026 cd ~/paqet\ncurl -LO https://github.com/hanselime/paqet/releases/download/v1.0.0-alpha.15/paqet-linux-amd64-v1.0.0-alpha.15.tar.gz\ntar -xzf paqet-linux-amd64-v1.0.0-alpha.15.tar.gz\nchmod +x paqet_linux_amd64\n\n# Create config\ncat \u003e config.yaml \u003c\u003c 'EOF'\nrole: \"client\"\n\nlog:\n  level: \"info\"\n\nsocks5:\n  - listen: \"127.0.0.1:1080\"\n\nnetwork:\n  interface: \"eth0\"  # Your network interface (ip link show)\n  ipv4:\n    addr: \"YOUR_LOCAL_IP:0\"  # Your local IP, e.g., 192.168.1.100:0\n    router_mac: \"YOUR_ROUTER_MAC\"  # Gateway MAC (ip neigh | grep default)\n\nserver:\n  addr: \"YOUR_SERVER_IP:8443\"\n\ntransport:\n  protocol: \"kcp\"\n  kcp:\n    mode: \"fast\"\n    key: \"YOUR_SECRET_KEY\"\nEOF\n\n# Run (requires root for raw sockets)\nsudo ./paqet_linux_amd64 run -c config.yaml\n```\n\n\u003e **Tip:** Use `paqctl` for automatic configuration - it detects network values for you.\n\n### Option B: GFK\n\n```bash\n# Install dependencies\nsudo apt install python3 python3-pip  # Debian/Ubuntu\n# or: sudo dnf install python3 python3-pip  # Fedora\n\npip3 install scapy aioquic\n\n# Clone and configure\ngit clone https://github.com/SamNet-dev/paqctl.git\ncd paqctl/gfk/client\n\n# Create parameters.py (same as macOS section above)\n# Then run:\nsudo python3 mainclient.py\n```\n\n### Configure Browser\n\nFirefox: Settings → Network Settings → Manual proxy → SOCKS5 `127.0.0.1:1080` or `127.0.0.1:14000`\n\nOr use system-wide proxy via environment variables:\n\n```bash\nexport ALL_PROXY=socks5://127.0.0.1:1080\n```\n\n\u003c/details\u003e\n\n---\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003ch3\u003e📦 Offline/Manual Installation - If GitHub is Blocked (Click to expand)\u003c/h3\u003e\u003c/summary\u003e\n\n## Offline/Manual Installation\n\nCan't download from GitHub? (e.g., behind DPI/firewall in Iran, China, etc.)\n\nNo problem! Paqet is just **one small file** (~8MB). Download it somewhere else and copy it over.\n\n---\n\n### Step 1: Get your server info first\n\nOn your **server** (VPS), run:\n```bash\nsudo paqctl info\n```\n\nWrite down these 3 things:\n```\nServer IP:    _______________  (e.g., 185.1.2.3)\nPort:         _______________  (e.g., 8443)\nKey:          _______________  (e.g., mySecretKey123)\n```\n\n---\n\n### Step 2: Download paqet binary\n\nDo this on a machine that CAN access GitHub (your VPS, a friend's computer, VPN, etc.)\n\n**Go to:** https://github.com/hanselime/paqet/releases\n\n\u003e **Note:** Check for the latest version. Examples below use v1.0.0-alpha.15 - use newer if available.\n\n**Click to download the right file for your CLIENT machine:**\n\n| Your Client OS | Download this file |\n|----------------|-------------------|\n| Windows | `paqet-windows-amd64-v1.0.0-alpha.15.zip` |\n| Linux (most computers) | `paqet-linux-amd64-v1.0.0-alpha.15.tar.gz` |\n| Linux (Raspberry Pi 3/4/5, ARM 64-bit) | `paqet-linux-arm64-v1.0.0-alpha.15.tar.gz` |\n| Linux (Raspberry Pi 2, ARM 32-bit) | `paqet-linux-arm32-v1.0.0-alpha.15.tar.gz` |\n| macOS (Intel) | `paqet-darwin-amd64-v1.0.0-alpha.15.tar.gz` |\n| macOS (M1/M2/M3) | `paqet-darwin-arm64-v1.0.0-alpha.15.tar.gz` |\n\n---\n\n### Step 3: Extract the binary\n\n**On Linux/macOS:**\n```bash\ntar -xzf paqet-linux-amd64-v1.0.0-alpha.15.tar.gz\nmv paqet_linux_amd64 paqet\nchmod +x paqet\n```\n\n**On Windows:**\n- Right-click the ZIP file → \"Extract All\"\n- You'll get `paqet.exe`\n\n---\n\n### Step 4: Transfer to your client machine\n\nPick ONE method:\n\n**Method A - SCP (if you downloaded on your VPS):**\n```bash\n# Run this FROM your VPS\nscp paqet user@CLIENT_IP:/home/user/paqet\n```\n\n**Method B - USB Drive:**\n1. Copy `paqet` (or `paqet.exe`) to USB\n2. Plug USB into client machine\n3. Copy file to a folder (e.g., `C:\\paqet\\` on Windows or `~/paqet/` on Linux)\n\n**Method C - SFTP/FileZilla:**\n1. Connect to your client machine\n2. Upload the `paqet` file\n\n---\n\n### Step 5: Create config file\n\nOn your **client machine**, create a file called `config.yaml` in the same folder as paqet.\n\n**First, find your network info:**\n\n| OS | Find Local IP | Find Router MAC |\n|----|---------------|-----------------|\n| Linux | `ip addr` or `hostname -I` | `ip neigh \\| grep default` |\n| macOS | `ifconfig en0 \\| grep inet` | `arp -a \\| grep gateway` |\n| Windows | `ipconfig` | `arp -a` (look for your gateway IP) |\n\n**Copy this and fill in your values:**\n\n```yaml\nrole: \"client\"\n\nlog:\n  level: \"info\"\n\nsocks5:\n  - listen: \"127.0.0.1:1080\"\n\nnetwork:\n  interface: \"eth0\"  # Linux: eth0/wlan0, macOS: en0, Windows: see note below\n  ipv4:\n    addr: \"YOUR_LOCAL_IP:0\"       # e.g., 192.168.1.100:0\n    router_mac: \"YOUR_ROUTER_MAC\" # e.g., aa:bb:cc:dd:ee:ff\n\nserver:\n  addr: \"YOUR_SERVER_IP:8443\"\n\ntransport:\n  protocol: \"kcp\"\n  kcp:\n    mode: \"fast\"\n    key: \"YOUR_SECRET_KEY\"\n```\n\n\u003e **Windows note:** Leave `interface: \"\"` empty - paqet will auto-detect. Or find your interface name in Network Connections.\n\n**Example with real values:**\n```yaml\nrole: \"client\"\n\nlog:\n  level: \"info\"\n\nsocks5:\n  - listen: \"127.0.0.1:1080\"\n\nnetwork:\n  interface: \"eth0\"\n  ipv4:\n    addr: \"192.168.1.100:0\"\n    router_mac: \"aa:bb:cc:dd:ee:ff\"\n\nserver:\n  addr: \"185.1.2.3:8443\"\n\ntransport:\n  protocol: \"kcp\"\n  kcp:\n    mode: \"fast\"\n    key: \"mySecretKey123\"\n```\n\n---\n\n### Step 6: Run paqet\n\n**Linux/macOS:**\n```bash\ncd ~/paqet              # Go to the folder with paqet\nsudo ./paqet run -c config.yaml\n```\n\n**Windows (must run as Administrator):**\n1. Open Command Prompt as Administrator\n2. Run:\n```cmd\ncd C:\\paqet\npaqet.exe run -c config.yaml\n```\n\nYou should see:\n```\n[INFO] Starting paqet client...\n[INFO] Connecting to server...\n[INFO] SOCKS5 proxy listening on 127.0.0.1:1080\n```\n\n---\n\n### Step 7: Configure your browser\n\n**Firefox:**\n1. Settings → Network Settings → Settings...\n2. Select \"Manual proxy configuration\"\n3. SOCKS Host: `127.0.0.1`  Port: `1080`\n4. Select \"SOCKS v5\"\n5. Check \"Proxy DNS when using SOCKS v5\"\n6. Click OK\n\n**Chrome (use system proxy or extension like SwitchyOmega)**\n\n---\n\n### Step 8: Test it!\n\n1. Go to https://whatismyipaddress.com\n2. Your IP should show your **VPS IP**, not your real IP\n3. Try accessing blocked sites\n\n---\n\n### Troubleshooting\n\n**\"Connection refused\" or timeout:**\n- Check server is running: `sudo paqctl status` on VPS\n- Check IP/port/key are correct in config.yaml\n- Check firewall allows the port on VPS\n\n**\"Permission denied\":**\n- Linux/macOS: Must run with `sudo`\n- Windows: Must run as Administrator\n\n**To stop paqet:**\n- Press `Ctrl+C` in the terminal\n\n### Notes\n\n- You don't need `paqctl` script for basic usage - paqet runs standalone\n- Server and client versions should match\n- For GFK, the process is more complex (needs Python) - use paqet if possible\n\n\u003c/details\u003e\n\n---\n\n## Server Management\n\nAfter installing on your VPS, use these commands:\n\n```bash\n# Show interactive menu\nsudo paqctl menu\n\n# Quick commands\nsudo paqctl status      # Check if running\nsudo paqctl start       # Start the service\nsudo paqctl stop        # Stop the service\nsudo paqctl restart     # Restart the service\nsudo paqctl info        # Show connection info for clients\nsudo paqctl logs        # View recent logs\n```\n\n---\n\n## Security Notes\n\n- **Change default keys/auth codes** - Never use example values in production\n- **Keep your VPS IP private** - Don't share it publicly\n- **Use strong encryption keys** - At least 16 characters for Paqet\n- **Keep software updated** - Run `sudo paqctl update` periodically\n\n---\n\n## FAQ\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eCan I run both Paqet and GFK at the same time?\u003c/strong\u003e\u003c/summary\u003e\n\n**Yes!** They use different ports:\n- Paqet: `127.0.0.1:1080`\n- GFK: `127.0.0.1:14000`\n\nThis is useful as a backup - if one method gets blocked, switch to the other.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eWhich VPS provider should I use?\u003c/strong\u003e\u003c/summary\u003e\n\nAny VPS outside your restricted region works. Popular choices:\n- DigitalOcean\n- Vultr\n- Linode\n- AWS Lightsail\n- Hetzner\n\nChoose a location close to you for better speed (but outside the firewall).\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eIs this legal?\u003c/strong\u003e\u003c/summary\u003e\n\nThis tool is for legitimate privacy and access needs. Laws vary by country. Use responsibly and check your local regulations.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eMy connection is slow. How can I improve it?\u003c/strong\u003e\u003c/summary\u003e\n\n1. Choose a VPS closer to your location\n2. Try the other method (Paqet vs GFK)\n3. Check your VPS isn't overloaded\n4. Make sure your local network is stable\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eThe server keeps disconnecting\u003c/strong\u003e\u003c/summary\u003e\n\n1. Check server logs: `sudo paqctl logs`\n2. Make sure your VPS has enough resources\n3. Check if the port is blocked by your ISP\n4. Try switching between Paqet and GFK\n\u003c/details\u003e\n\n---\n\n## Contributing\n\nIssues and pull requests are welcome at:\nhttps://github.com/SamNet-dev/paqctl\n\n---\n\n## License\n\nAGPL-3.0 License - See [LICENSE](LICENSE) file.\n\n---\n\n## Acknowledgments\n\n- [paqet](https://github.com/hanselime/paqet) - KCP over raw TCP packets with custom flags (original source)\n- [paqetNG](https://github.com/AliRezaBeigy/paqetNG) - Android client for paqet\n- [GFW-knocker](https://github.com/GFW-knocker/gfw_resist_tcp_proxy) - Violated TCP technique\n- [aioquic](https://github.com/aiortc/aioquic) - QUIC protocol implementation\n- [scapy](https://scapy.net/) - Packet manipulation library\n- [kcptun](https://github.com/xtaci/kcptun) - KCP protocol inspiration\n\n---\n\n---\n\n# نسخه فارسی\n\n## این چیست؟\n\nپاکت‌کنترل یک ابزار مدیریت پروکسی برای دور زدن فایروال است. این ابزار به شما کمک می‌کند تا به سروری خارج از شبکه‌های محدود (مثل پشت فایروال بزرگ) متصل شوید و آزادانه به اینترنت دسترسی داشته باشید.\n\nشما کامپوننت **سرور** را روی VPS و **کلاینت** را روی ویندوز/مک/لینوکس خود اجرا می‌کنید.\n\n---\n\n## دو روش\n\nاین ابزار از **دو روش مختلف** پشتیبانی می‌کند:\n\n| | **Paqet** | **GFW-Knocker (GFK)** |\n|---|---|---|\n| **سختی** | آسان ⭐ | پیشرفته ⭐⭐⭐ |\n| **مناسب برای** | اکثر شرایط | سانسور سنگین (GFW) |\n| **پروکسی شما** | `127.0.0.1:1080` | `127.0.0.1:14000` |\n| **تکنولوژی** | KCP روی raw socket | TCP نقض‌شده + تونل QUIC |\n| **نیاز سرور** | فقط paqet | GFK + Xray |\n\n### کدام را استفاده کنم؟\n\n- اگر شبکه شما سانسور سنگین دارد (مثل ایران یا GFW چین): **ابتدا GFK را امتحان کنید**\n- در غیر این صورت: **از Paqet استفاده کنید**\n\n\u003e **نکته:** می‌توانید هر دو را نصب کنید و یک بکاپ داشته باشید! از پورت‌های مختلف استفاده می‌کنند.\n\n---\n\n## نحوه کار\n\n### Paqet (ساده)\n\n```\n[Browser] --\u003e [Paqet Client] --KCP/Raw TCP--\u003e [Paqet Server] --SOCKS5--\u003e [Internet]\n                 127.0.0.1:1080              your.vps.ip\n```\n\n**نحوه دور زدن فایروال:**\n1. از پروتکل KCP روی پکت‌های TCP خام با فلگ‌های سفارشی استفاده می‌کند\n2. بسته‌ها را از طریق raw socket ارسال می‌کند که شناسایی آن‌ها سخت است\n3. سیستم‌های DPI نمی‌توانند به راحتی آن را شناسایی کنند\n\n### GFW-Knocker (پیشرفته)\n\n```\n[Browser] --\u003e [GFK Client] --Violated TCP--\u003e [GFK Server] --\u003e [Xray] --\u003e [Internet]\n              (VIO+QUIC)                      (QUIC Tunnel)    (SOCKS5)\n               127.0.0.1:14000                 your.vps.ip\n```\n\n**نحوه دور زدن فایروال:**\n1. **TCP نقض‌شده**: بسته‌های TCP ارسال می‌کند که عمداً \"خراب\" هستند\n2. **تونل QUIC**: درون این بسته‌ها، یک اتصال QUIC داده‌های واقعی را حمل می‌کند\n3. **بکند Xray**: روی سرور، Xray سرویس SOCKS5 را ارائه می‌دهد\n\n---\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eاستفاده از GFK با پنل Xray موجود (3x-ui، Marzban و غیره)\u003c/strong\u003e\u003c/summary\u003e\n\nاگر سرور خارج شما از قبل پنل Xray دارد (3x-ui، Marzban و غیره)، paqctl آن را تشخیص می‌دهد و در کنار آن کار می‌کند. پنل شما دست نخورده می‌ماند — paqctl فقط چیزهای لازم را اضافه می‌کند.\n\n**رفتار paqctl هنگام تشخیص Xray:**\n\n| سناریو | عملکرد paqctl |\n|---|---|\n| **Xray نصب نیست** | Xray با پروکسی SOCKS5 به صورت خودکار نصب می‌شود (نیازی به تنظیم نیست) |\n| **پنل Xray در حال اجراست** | پنل را نگه می‌دارد، یک اینباند SOCKS5 روی پورت آزاد اضافه می‌کند (مثلاً 10443)، و یک مپینگ اضافی اضافه می‌شود |\n| **Xray نصب شده ولی اجرا نمی‌شود** | SOCKS5 خودش را نصب می‌کند (مثل نصب جدید) |\n\nوقتی پنل تشخیص داده می‌شود، paqctl **دو اتصال** به صورت خودکار می‌دهد:\n- **مپینگ پنل** (`14000:443`) — برای ترافیک سرور به سرور (vmess/vless)\n- **مپینگ SOCKS5** (`14001:10443`) — برای استفاده مستقیم از ویندوز/مک (بدون نیاز به v2rayN)\n\n---\n\n### روش A: سرور به سرور (پنل ایران به پنل خارج)\n\nاین روش برای وقتی است که روی **هر دو سرور** (ایران + خارج) پنل دارید و می‌خواهید اوتباند پنل ایران از تونل GFK عبور کند.\n\n**۱. نصب paqctl روی سرور خارج (نقش server):**\n```bash\ncurl -fsSL https://raw.githubusercontent.com/SamNet-dev/paqctl/main/paqctl.sh | sudo bash\n```\n- نقش **server** را انتخاب کنید\n- مپینگ پورت: `14000:443` (که `443` پورت اینباند پنل شماست)\n- paqctl تشخیص می‌دهد Xray در حال اجراست و SOCKS5 را در کنار پنل اضافه می‌کند (مثلاً `14001:10443`)\n\n**۲. نصب paqctl روی سرور ایران (نقش client):**\n```bash\ncurl -fsSL https://raw.githubusercontent.com/SamNet-dev/paqctl/main/paqctl.sh | sudo bash\n```\n- نقش **client** را انتخاب کنید\n- **دقیقاً همان** مپینگ‌هایی که در خروجی سرور نمایش داده شد را استفاده کنید (مثلاً `14000:443,14001:10443`)\n- همان کد احراز هویت سرور را استفاده کنید\n\n**۳. اوتباند پنل ایران را تغییر دهید:**\n\nدر پنل ایران (3x-ui، Marzban و غیره)، اوتباندی که به سرور خارج متصل می‌شود را تغییر دهید:\n\n**قبل** (اتصال مستقیم — توسط DPI مسدود می‌شود):\n```json\n{\n  \"tag\": \"vmess_out\",\n  \"protocol\": \"vmess\",\n  \"settings\": {\n    \"vnext\": [{\n      \"address\": \"IP_SERVER_KHAREJ\",\n      \"port\": 443,\n      \"users\": [{\"id\": \"your-uuid\", \"security\": \"auto\"}]\n    }]\n  }\n}\n```\n\n**بعد** (از طریق تونل GFK):\n```json\n{\n  \"tag\": \"vmess_out\",\n  \"protocol\": \"vmess\",\n  \"settings\": {\n    \"vnext\": [{\n      \"address\": \"127.0.0.1\",\n      \"port\": 14000,\n      \"users\": [{\"id\": \"your-uuid\", \"security\": \"auto\"}]\n    }]\n  }\n}\n```\n\nدر 3x-ui: به **Xray Configs → Outbounds → Add Outbound** بروید (یا اوتباند موجود را ویرایش کنید):\n- **Address**: `127.0.0.1`\n- **Port**: `14000` (پورت VIO، نه پورت اصلی سرور)\n- **Protocol/ID/encryption**: همان تنظیمات قبلی (از اینباند پنل خارج شما)\n- **Security**: None (ترافیک قبلاً درون تونل GFK رمزگذاری شده)\n\n\u003e **UUID از کجا بیاورم؟** از پنل سرور خارج — به **Inbounds** بروید، اینباندی که می‌خواهید به آن متصل شوید را پیدا کنید و UUID/ID آن را کپی کنید. اگر قبلاً اوتباند کار می‌کرد، فقط address و port را تغییر دهید — بقیه تنظیمات همان می‌ماند.\n\n**مسیر ترافیک:**\n```\nکاربر --\u003e اینباند پنل ایران --\u003e اوتباند پنل ایران (127.0.0.1:14000)\n  --\u003e GFK client (پورت VIO) --\u003e تونل QUIC روی TCP نقض‌شده\n  --\u003e GFK server خارج --\u003e 127.0.0.1:443 (اینباند پنل خارج) --\u003e اینترنت\n```\n\n---\n\n### روش B: کلاینت مستقیم (ویندوز/مک به سرور خارج)\n\nاین روش برای وقتی است که **سرور ایران ندارید** — مستقیماً از ویندوز یا مک خود به سرور خارج از طریق GFK متصل می‌شوید. paqctl به صورت خودکار یک پروکسی SOCKS5 اضافه می‌کند تا بتوانید به عنوان پروکسی مرورگر استفاده کنید.\n\n**۱. نصب paqctl روی سرور خارج** (مثل بالا)\n\n**۲. روی ویندوز/مک خود** کلاینت GFK را نصب کنید و از مپینگ SOCKS5 استفاده کنید:\n- خروجی سرور چیزی شبیه این نشان می‌دهد: `Mappings: 14000:443,14001:10443`\n- از `14001` به عنوان پورت پروکسی استفاده کنید — این SOCKS5 مستقیم است (نیازی به پنل/v2rayN نیست)\n- پروکسی مرورگر یا سیستم را روی `SOCKS5 127.0.0.1:14001` تنظیم کنید\n\n**مسیر ترافیک:**\n```\nمرورگر (SOCKS5 127.0.0.1:14001) --\u003e GFK client\n  --\u003e تونل QUIC روی TCP نقض‌شده\n  --\u003e GFK server خارج --\u003e 127.0.0.1:10443 (پروکسی SOCKS5) --\u003e اینترنت\n```\n\n---\n\n**چند پورت:** اگر پنل شما از چند پورت استفاده می‌کند، همه را مپ کنید:\n```\n14000:443,14001:8080,14002:2020\n```\npaqctl به صورت خودکار SOCKS5 را روی پورت آزاد بعدی اضافه و مپ می‌کند.\n\n\u003e **توجه:** پیام وضعیت \"Firewall: VIO port blocked\" (که با رنگ سبز نمایش داده می‌شود) **عادی و صحیح** است. این به معنای آن است که فایروال به درستی برای کار raw socket در GFK تنظیم شده است.\n\n\u003c/details\u003e\n\n---\n\n## شروع سریع\n\n### ۱. راه‌اندازی سرور (VPS لینوکس)\n\nاین دستور را روی VPS خود اجرا کنید (نیاز به root دارد):\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/SamNet-dev/paqctl/main/paqctl.sh | sudo bash\n```\n\nسپس منوی تعاملی را باز کنید:\n\n```bash\nsudo paqctl menu\n```\n\nبعد از راه‌اندازی، اطلاعات اتصال را دریافت کنید:\n\n```bash\nsudo paqctl info\n```\n\nاین دستور **آی‌پی سرور**، **پورت** و **کلید/کد احراز هویت** را نشان می‌دهد.\n\n---\n\n### ۲. راه‌اندازی کلاینت\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003ch3\u003e🪟 راه‌اندازی کلاینت ویندوز (کلیک کنید)\u003c/h3\u003e\u003c/summary\u003e\n\n## راهنمای کامل کلاینت ویندوز\n\n### پیش‌نیازها\n\n- ویندوز ۱۰ یا ۱۱\n- دسترسی Administrator\n- اطلاعات اتصال سرور (از دستور `paqctl info` روی سرور)\n\n---\n\n## 🚀 روش آسان (پیشنهادی) - استفاده از فایل‌های .bat\n\nساده‌ترین روش - فقط دانلود کنید، دوبار کلیک کنید و وصل شوید!\n\n### مرحله ۱: دانلود\n\n1. بروید به: https://github.com/SamNet-dev/paqctl\n2. روی دکمه سبز **\"Code\"** کلیک کنید → **\"Download ZIP\"**\n3. فایل ZIP را در هر جایی استخراج کنید (مثلاً دسکتاپ)\n4. وارد پوشه `windows` شوید\n\n### مرحله ۲: نصب پروتکل\n\nدو تا فایل `.bat` می‌بینید:\n- `Paqet-Client.bat` - برای پروتکل Paqet (ساده، پیشنهادی)\n- `GFK-Client.bat` - برای پروتکل GFW-knocker (پیشرفته)\n\nروی فایل `.bat` مورد نظر **راست‌کلیک** کنید → **\"Run as administrator\"**\n\nاجرای اول Npcap را نصب می‌کند (برای raw socket لازم است). مراحل نصب را دنبال کنید.\n\n### مرحله ۳: پیکربندی و اتصال\n\nبعد از نصب، اسکریپت اطلاعات سرور را می‌خواهد:\n- **Paqet:** آدرس سرور (مثلاً `1.2.3.4:8443`) و کلید رمزنگاری\n- **GFK:** آی‌پی سرور و کد احراز هویت\n\nمقادیر را از سرور وارد کنید (بعد از نصب سرور نشان داده می‌شود یا با `paqctl info`).\n\nوقتی تنظیم شد، **Connect** را بزنید و تمام!\n\n### مرحله ۴: استفاده از پروکسی\n\nمرورگر را روی پروکسی SOCKS5 تنظیم کنید:\n- **Paqet:** `127.0.0.1:1080`\n- **GFK:** `127.0.0.1:14000`\n\nبرای قطع اتصال، `Ctrl+C` را در پنجره فشار دهید.\n\n---\n\n## 💻 روش پیشرفته - اسکریپت PowerShell\n\nبرای کنترل بیشتر، از منوی تعاملی PowerShell استفاده کنید.\n\n### مرحله ۱: باز کردن PowerShell با دسترسی Administrator\n\n1. کلید `Win + S` را فشار دهید، تایپ کنید `PowerShell`\n2. روی \"Windows PowerShell\" راست‌کلیک → **\"Run as administrator\"**\n3. روی \"Yes\" در پنجره UAC کلیک کنید\n\n### مرحله ۲: اجرای اسکریپت\n\n**گزینه A: یک خطی (خودکار دانلود و اجرا می‌کند)**\n```powershell\nirm https://raw.githubusercontent.com/SamNet-dev/paqctl/main/windows/paqet-client.ps1 | iex\n```\n\n**گزینه B: اول دانلود، بعد اجرا**\n```powershell\ngit clone https://github.com/SamNet-dev/paqctl.git\ncd paqctl\\windows\n.\\paqet-client.ps1\n```\n\n### مرحله ۳: استفاده از منو\n\nمنوی تعاملی امکان این کارها را می‌دهد:\n1. نصب paqet یا GFK\n2. پیکربندی اتصال\n3. شروع/توقف کلاینت\n4. بررسی وضعیت\n\n\u003e **نکته:** اگر خطای \"Running scripts is disabled\" دیدید، این را یک بار اجرا کنید:\n\u003e ```powershell\n\u003e Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser\n\u003e ```\n\n---\n\n### مرحله ۵: اجرای کلاینت\n\n**روش ۱: دوبار کلیک (آسان‌تر)**\n- روی فایل `Paqet-Client.bat` دوبار کلیک کنید\n- به صورت خودکار با دسترسی Administrator اجرا می‌شود\n\n**روش ۲: از PowerShell**\n```powershell\n.\\paqet-client.ps1\n```\n\nیک منوی تعاملی خواهید دید:\n\n```\n===============================================\n  PAQET/GFK CLIENT MANAGER\n===============================================\n\n  1. Install paqet        (ساده، SOCKS5 همه‌کاره)\n  2. Install GFW-knocker  (پیشرفته، برای DPI سنگین)\n  3. Configure connection\n  4. Start client\n  5. Stop client\n  6. Show status\n  0. Exit\n\n  Select option:\n```\n\n---\n\n### مرحله ۶: نصب بکند انتخابی\n\n\u003e **نکته:** برای تجربه روان‌تر، ابتدا [Npcap](https://npcap.com/#download) را جداگانه دانلود و نصب کنید.\n\n#### برای Paqet (توصیه‌شده):\n\n1. کلید `1` را بزنید و Enter\n2. اسکریپت موارد زیر را انجام می‌دهد:\n   - دانلود و نصب **Npcap**\n   - دانلود **باینری paqet**\n3. وقتی نصب‌کننده Npcap باز شد:\n   - روی \"I Agree\" کلیک کنید\n   - روی \"Install\" کلیک کنید\n   - روی \"Finish\" کلیک کنید\n\n#### برای GFK (اگر Paqet مسدود است):\n\n1. کلید `2` را بزنید و Enter\n2. اسکریپت موارد زیر را انجام می‌دهد:\n   - نصب **Npcap**\n   - نصب **Python 3.10+**\n   - نصب پکیج‌های Python\n\n---\n\n### مرحله ۷: پیکربندی اتصال\n\n1. کلید `3` را بزنید و Enter\n2. اطلاعات سرور خود را وارد کنید:\n\n**برای Paqet:**\n```\nServer address: \u003cآی‌پی:پورت سرور\u003e\nEncryption key: \u003cکلید از سرور\u003e\n```\n\n**برای GFK:**\n```\nServer IP: \u003cآی‌پی سرور\u003e\nAuth code: \u003cکد احراز هویت از سرور\u003e\n```\n\n---\n\n### مرحله ۸: شروع کلاینت\n\n1. کلید `4` را بزنید و Enter\n2. کلاینت شروع به کار می‌کند\n3. این پنجره را باز نگه دارید\n\n---\n\n### مرحله ۹: پیکربندی مرورگر\n\n**آدرس پروکسی شما:**\n- **Paqet:** `127.0.0.1:1080` (SOCKS5)\n- **GFK:** `127.0.0.1:14000` (SOCKS5)\n\n#### Firefox (توصیه‌شده):\n1. Firefox را باز کنید\n2. بروید به Settings → General → Network Settings → Settings...\n3. \"Manual proxy configuration\" را انتخاب کنید\n4. در \"SOCKS Host\": `127.0.0.1`\n5. Port: `1080` (برای Paqet) یا `14000` (برای GFK)\n6. \"SOCKS v5\" را انتخاب کنید\n7. \"Proxy DNS when using SOCKS v5\" را تیک بزنید ← **مهم!**\n8. روی OK کلیک کنید\n\n#### Chrome:\n1. افزونه \"SwitchyOmega\" را نصب کنید\n2. یک پروفایل جدید بسازید\n3. پروکسی SOCKS5 را تنظیم کنید: `127.0.0.1:1080` یا `127.0.0.1:14000`\n4. پروفایل را فعال کنید\n\n---\n\n### مرحله ۱۰: تست اتصال\n\n1. مرورگر خود را باز کنید\n2. بروید به: https://whatismyipaddress.com\n3. آی‌پی شما باید **آی‌پی VPS** را نشان دهد\n4. سایت‌های مسدود را امتحان کنید\n\n---\n\n### متوقف کردن کلاینت\n\n- در پنجره PowerShell کلید `Ctrl+C` را بزنید، یا\n- اسکریپت را دوباره اجرا کنید و گزینه `5` را انتخاب کنید\n\n---\n\n### رفع مشکلات\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eخطای \"اجرای اسکریپت غیرفعال است\"\u003c/strong\u003e\u003c/summary\u003e\n\nابتدا این دستور را اجرا کنید:\n```powershell\nSet-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\"نیاز به دسترسی Administrator\"\u003c/strong\u003e\u003c/summary\u003e\n\nباید PowerShell را به عنوان Administrator اجرا کنید. روی PowerShell راست‌کلیک کنید و \"Run as administrator\" را انتخاب کنید.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eنصب Npcap ناموفق است\u003c/strong\u003e\u003c/summary\u003e\n\n1. به صورت دستی از https://npcap.com دانلود کنید\n2. نصب‌کننده را به عنوان Administrator اجرا کنید\n3. مطمئن شوید \"WinPcap API-compatible Mode\" تیک خورده است\n4. کامپیوتر را ریستارت کنید\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eاتصال timeout می‌شود\u003c/strong\u003e\u003c/summary\u003e\n\n1. مطمئن شوید سرور در حال اجرا است\n2. بررسی کنید که فایروال VPS پورت را اجازه می‌دهد\n3. روش دیگر را امتحان کنید\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eGFK: \"MAC گیت‌وی پیدا نشد\"\u003c/strong\u003e\u003c/summary\u003e\n\n1. Command Prompt را باز کنید\n2. اجرا کنید: `arp -a`\n3. آی‌پی گیت‌وی خود را پیدا کنید (معمولاً 192.168.1.1)\n4. آدرس MAC کنار آن را کپی کنید\n5. وقتی اسکریپت پرسید آن را وارد کنید\n\u003c/details\u003e\n\n\u003c/details\u003e\n\n---\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003ch3\u003e🍎 راه‌اندازی کلاینت مک (کلیک کنید)\u003c/h3\u003e\u003c/summary\u003e\n\n## راهنمای کامل کلاینت macOS\n\nmacOS نیاز به راه‌اندازی دستی دارد.\n\n### پیش‌نیازها\n\n- macOS 10.15 یا جدیدتر\n- دسترسی Administrator (برای sudo)\n- Homebrew (توصیه‌شده)\n- اطلاعات اتصال سرور\n\n---\n\n### گزینه A: Paqet روی macOS\n\n#### مرحله ۱: نصب Homebrew\n\n```bash\n/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"\n```\n\n#### مرحله ۲: دانلود باینری Paqet\n\n```bash\nmkdir -p ~/paqet \u0026\u0026 cd ~/paqet\n\n# برای Intel Mac:\ncurl -LO https://github.com/hanselime/paqet/releases/download/v1.0.0-alpha.15/paqet-darwin-amd64-v1.0.0-alpha.15.tar.gz\ntar -xzf paqet-darwin-amd64-v1.0.0-alpha.15.tar.gz\n\n# برای Apple Silicon (M1/M2/M3):\n# curl -LO https://github.com/hanselime/paqet/releases/download/v1.0.0-alpha.15/paqet-darwin-arm64-v1.0.0-alpha.15.tar.gz\n# tar -xzf paqet-darwin-arm64-v1.0.0-alpha.15.tar.gz\n\nchmod +x paqet_darwin_amd64\n```\n\n#### مرحله ۳: ایجاد فایل پیکربندی\n\n```bash\ncat \u003e ~/paqet/config.yaml \u003c\u003c 'EOF'\nrole: \"client\"\n\nlog:\n  level: \"info\"\n\nsocks5:\n  - listen: \"127.0.0.1:1080\"\n\nnetwork:\n  interface: \"en0\"  # اینترفیس شبکه (ifconfig برای پیدا کردن)\n  ipv4:\n    addr: \"YOUR_LOCAL_IP:0\"  # IP محلی شما، مثلا 192.168.1.100:0\n    router_mac: \"YOUR_ROUTER_MAC\"  # MAC روتر (arp -a | grep gateway)\n\nserver:\n  addr: \"YOUR_SERVER_IP:8443\"\n\ntransport:\n  protocol: \"kcp\"\n  kcp:\n    mode: \"fast\"\n    key: \"YOUR_SECRET_KEY\"\nEOF\n```\n\nمقادیر زیر را جایگزین کنید:\n- `YOUR_LOCAL_IP`: با `ifconfig en0 | grep inet` پیدا کنید\n- `YOUR_ROUTER_MAC`: با `arp -a | grep gateway` پیدا کنید\n- `YOUR_SERVER_IP` و `YOUR_SECRET_KEY`: از ادمین سرور بگیرید\n\n\u003e **نکته:** از `paqctl` برای تنظیم خودکار استفاده کنید - مقادیر شبکه را خودش تشخیص می‌دهد.\n\n#### مرحله ۴: اجرای Paqet\n\n```bash\nsudo ~/paqet/paqet_darwin_amd64 run -c ~/paqet/config.yaml\n# یا برای Apple Silicon:\nsudo ~/paqet/paqet_darwin_arm64 run -c ~/paqet/config.yaml\n```\n\nپروکسی SOCKS5 شما اکنون در `127.0.0.1:1080` است.\n\n---\n\n### گزینه B: GFK روی macOS\n\n#### مرحله ۱: نصب Python\n\n```bash\nbrew install python@3.11\n```\n\n#### مرحله ۲: کلون مخزن\n\n```bash\ngit clone https://github.com/SamNet-dev/paqctl.git\ncd paqctl/gfk/client\n```\n\n#### مرحله ۳: نصب وابستگی‌ها\n\n```bash\npip3 install scapy aioquic\n```\n\n#### مرحله ۴: ایجاد parameters.py\n\nفایل `parameters.py` را با اطلاعات سرور خود بسازید (مشابه بخش انگلیسی بالا).\n\n#### مرحله ۵: اجرا\n\n```bash\nsudo python3 mainclient.py\n```\n\nپروکسی در `127.0.0.1:14000` است.\n\n---\n\n### پیکربندی macOS برای استفاده از پروکسی\n\n1. **System Preferences** → **Network** را باز کنید\n2. اتصال خود را انتخاب کنید\n3. **Advanced** → **Proxies** را کلیک کنید\n4. **SOCKS Proxy** را تیک بزنید\n5. Server: `127.0.0.1`\n6. Port: `1080` یا `14000`\n7. **OK** → **Apply**\n\n\u003c/details\u003e\n\n---\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003ch3\u003e🐧 راه‌اندازی کلاینت لینوکس (کلیک کنید)\u003c/h3\u003e\u003c/summary\u003e\n\n## راهنمای کامل کلاینت لینوکس\n\n### گزینه A: Paqet\n\n```bash\n# دانلود paqet\nmkdir -p ~/paqet \u0026\u0026 cd ~/paqet\ncurl -LO https://github.com/hanselime/paqet/releases/download/v1.0.0-alpha.15/paqet-linux-amd64-v1.0.0-alpha.15.tar.gz\ntar -xzf paqet-linux-amd64-v1.0.0-alpha.15.tar.gz\nchmod +x paqet_linux_amd64\n\n# ایجاد config\ncat \u003e config.yaml \u003c\u003c 'EOF'\nrole: \"client\"\n\nlog:\n  level: \"info\"\n\nsocks5:\n  - listen: \"127.0.0.1:1080\"\n\nnetwork:\n  interface: \"eth0\"  # اینترفیس شبکه (ip link show)\n  ipv4:\n    addr: \"YOUR_LOCAL_IP:0\"  # IP محلی شما، مثلا 192.168.1.100:0\n    router_mac: \"YOUR_ROUTER_MAC\"  # MAC روتر (ip neigh | grep default)\n\nserver:\n  addr: \"YOUR_SERVER_IP:8443\"\n\ntransport:\n  protocol: \"kcp\"\n  kcp:\n    mode: \"fast\"\n    key: \"YOUR_SECRET_KEY\"\nEOF\n\n# اجرا (نیاز به root)\nsudo ./paqet_linux_amd64 run -c config.yaml\n```\n\n\u003e **نکته:** از `paqctl` برای تنظیم خودکار استفاده کنید - مقادیر شبکه را خودش تشخیص می‌دهد.\n\n### گزینه B: GFK\n\n```bash\n# نصب وابستگی‌ها\nsudo apt install python3 python3-pip  # Debian/Ubuntu\npip3 install scapy aioquic\n\n# کلون و پیکربندی\ngit clone https://github.com/SamNet-dev/paqctl.git\ncd paqctl/gfk/client\n\n# ایجاد parameters.py (مشابه بخش macOS)\n# سپس اجرا:\nsudo python3 mainclient.py\n```\n\n### پیکربندی مرورگر\n\nFirefox: Settings → Network Settings → Manual proxy → SOCKS5 `127.0.0.1:1080` یا `127.0.0.1:14000`\n\n\u003c/details\u003e\n\n---\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003ch3\u003e📦 نصب آفلاین/دستی - اگر GitHub مسدود است (کلیک کنید)\u003c/h3\u003e\u003c/summary\u003e\n\n## نصب آفلاین/دستی\n\nنمی‌توانید از GitHub دانلود کنید؟ (مثلاً پشت فایروال در ایران، چین و غیره)\n\nمشکلی نیست! Paqet فقط **یک فایل کوچک** (~۸ مگابایت) است. از جای دیگر دانلود کنید و کپی کنید.\n\n---\n\n### مرحله ۱: اول اطلاعات سرور را بگیرید\n\nروی **سرور** (VPS)، این دستور را بزنید:\n```bash\nsudo paqctl info\n```\n\nاین ۳ چیز را یادداشت کنید:\n```\nآی‌پی سرور:    _______________  (مثلاً 185.1.2.3)\nپورت:         _______________  (مثلاً 8443)\nکلید:          _______________  (مثلاً mySecretKey123)\n```\n\n---\n\n### مرحله ۲: دانلود باینری paqet\n\nاین کار را روی دستگاهی انجام دهید که به GitHub دسترسی دارد (VPS شما، کامپیوتر دوست، VPN و غیره)\n\n**بروید به:** https://github.com/hanselime/paqet/releases\n\n\u003e **نکته:** آخرین نسخه را چک کنید. مثال‌های زیر از v1.0.0-alpha.15 استفاده می‌کنند - اگر جدیدتر موجود است آن را بگیرید.\n\n**فایل مناسب سیستم کلاینت خود را دانلود کنید:**\n\n| سیستم کلاینت شما | این فایل را دانلود کنید |\n|-----------------|----------------------|\n| ویندوز | `paqet-windows-amd64-v1.0.0-alpha.15.zip` |\n| لینوکس (اکثر کامپیوترها) | `paqet-linux-amd64-v1.0.0-alpha.15.tar.gz` |\n| لینوکس (Raspberry Pi 3/4/5, ARM 64-bit) | `paqet-linux-arm64-v1.0.0-alpha.15.tar.gz` |\n| لینوکس (Raspberry Pi 2, ARM 32-bit) | `paqet-linux-arm32-v1.0.0-alpha.15.tar.gz` |\n| مک (Intel) | `paqet-darwin-amd64-v1.0.0-alpha.15.tar.gz` |\n| مک (M1/M2/M3) | `paqet-darwin-arm64-v1.0.0-alpha.15.tar.gz` |\n\n---\n\n### مرحله ۳: استخراج باینری\n\n**در لینوکس/مک:**\n```bash\ntar -xzf paqet-linux-amd64-v1.0.0-alpha.15.tar.gz\nmv paqet_linux_amd64 paqet\nchmod +x paqet\n```\n\n**در ویندوز:**\n- روی فایل ZIP راست‌کلیک کنید ← \"Extract All\"\n- فایل `paqet.exe` را خواهید داشت\n\n---\n\n### مرحله ۴: انتقال به دستگاه کلاینت\n\nیک روش را انتخاب کنید:\n\n**روش A - SCP (اگر روی VPS دانلود کردید):**\n```bash\n# این را روی VPS خود اجرا کنید\nscp paqet user@CLIENT_IP:/home/user/paqet\n```\n\n**روش B - فلش USB:**\n1. فایل `paqet` (یا `paqet.exe`) را به USB کپی کنید\n2. USB را به دستگاه کلاینت وصل کنید\n3. فایل را به یک پوشه کپی کنید (مثلاً `C:\\paqet\\` در ویندوز یا `~/paqet/` در لینوکس)\n\n**روش C - SFTP/FileZilla:**\n1. به دستگاه کلاینت متصل شوید\n2. فایل `paqet` را آپلود کنید\n\n---\n\n### مرحله ۵: ساخت فایل کانفیگ\n\nروی **دستگاه کلاینت**، یک فایل به نام `config.yaml` در همان پوشه‌ای که paqet است بسازید.\n\n**اول اطلاعات شبکه خود را پیدا کنید:**\n\n| سیستم‌عامل | پیدا کردن IP محلی | پیدا کردن MAC روتر |\n|-----------|------------------|-------------------|\n| لینوکس | `ip addr` یا `hostname -I` | `ip neigh \\| grep default` |\n| مک | `ifconfig en0 \\| grep inet` | `arp -a \\| grep gateway` |\n| ویندوز | `ipconfig` | `arp -a` (دنبال IP گیت‌وی بگردید) |\n\n**این را کپی کنید و مقادیر خود را بگذارید:**\n\n```yaml\nrole: \"client\"\n\nlog:\n  level: \"info\"\n\nsocks5:\n  - listen: \"127.0.0.1:1080\"\n\nnetwork:\n  interface: \"eth0\"  # لینوکس: eth0/wlan0، مک: en0، ویندوز: نکته پایین را ببینید\n  ipv4:\n    addr: \"YOUR_LOCAL_IP:0\"       # مثلاً 192.168.1.100:0\n    router_mac: \"YOUR_ROUTER_MAC\" # مثلاً aa:bb:cc:dd:ee:ff\n\nserver:\n  addr: \"YOUR_SERVER_IP:8443\"\n\ntransport:\n  protocol: \"kcp\"\n  kcp:\n    mode: \"fast\"\n    key: \"YOUR_SECRET_KEY\"\n```\n\n\u003e **نکته ویندوز:** مقدار `interface: \"\"` را خالی بگذارید - paqet خودش تشخیص می‌دهد. یا نام اینترفیس را در Network Connections پیدا کنید.\n\n**مثال با مقادیر واقعی:**\n```yaml\nrole: \"client\"\n\nlog:\n  level: \"info\"\n\nsocks5:\n  - listen: \"127.0.0.1:1080\"\n\nnetwork:\n  interface: \"eth0\"\n  ipv4:\n    addr: \"192.168.1.100:0\"\n    router_mac: \"aa:bb:cc:dd:ee:ff\"\n\nserver:\n  addr: \"185.1.2.3:8443\"\n\ntransport:\n  protocol: \"kcp\"\n  kcp:\n    mode: \"fast\"\n    key: \"mySecretKey123\"\n```\n\n---\n\n### مرحله ۶: اجرای paqet\n\n**لینوکس/مک:**\n```bash\ncd ~/paqet              # به پوشه paqet بروید\nsudo ./paqet run -c config.yaml\n```\n\n**ویندوز (باید به عنوان Administrator اجرا شود):**\n1. Command Prompt را به عنوان Administrator باز کنید\n2. اجرا کنید:\n```cmd\ncd C:\\paqet\npaqet.exe run -c config.yaml\n```\n\nباید این را ببینید:\n```\n[INFO] Starting paqet client...\n[INFO] Connecting to server...\n[INFO] SOCKS5 proxy listening on 127.0.0.1:1080\n```\n\n---\n\n### مرحله ۷: پیکربندی مرورگر\n\n**فایرفاکس:**\n1. Settings ← Network Settings ← Settings...\n2. \"Manual proxy configuration\" را انتخاب کنید\n3. SOCKS Host: `127.0.0.1`  Port: `1080`\n4. \"SOCKS v5\" را انتخاب کنید\n5. تیک \"Proxy DNS when using SOCKS v5\" را بزنید\n6. OK کنید\n\n**کروم (از system proxy یا افزونه SwitchyOmega استفاده کنید)**\n\n---\n\n### مرحله ۸: تست کنید!\n\n1. بروید به https://whatismyipaddress.com\n2. آی‌پی شما باید **آی‌پی VPS** باشد، نه آی‌پی واقعی شما\n3. سایت‌های مسدود را امتحان کنید\n\n---\n\n### عیب‌یابی\n\n**\"Connection refused\" یا تایم‌اوت:**\n- چک کنید سرور اجرا باشد: `sudo paqctl status` روی VPS\n- چک کنید IP/پورت/کلید در config.yaml درست باشد\n- چک کنید فایروال VPS پورت را اجازه دهد\n\n**\"Permission denied\":**\n- لینوکس/مک: باید با `sudo` اجرا شود\n- ویندوز: باید به عنوان Administrator اجرا شود\n\n**برای توقف paqet:**\n- در ترمینال `Ctrl+C` بزنید\n\n\u003c/details\u003e\n\n---\n\n## مدیریت سرور\n\nبعد از نصب روی VPS:\n\n```bash\nsudo paqctl menu      # منوی تعاملی\nsudo paqctl status    # بررسی وضعیت\nsudo paqctl start     # شروع سرویس\nsudo paqctl stop      # توقف سرویس\nsudo paqctl restart   # ریستارت\nsudo paqctl info      # اطلاعات اتصال\nsudo paqctl logs      # مشاهده لاگ‌ها\n```\n\n---\n\n## نکات امنیتی\n\n- **کلیدها را تغییر دهید** - هرگز از مقادیر نمونه استفاده نکنید\n- **آی‌پی VPS را خصوصی نگه دارید**\n- **از کلیدهای قوی استفاده کنید** - حداقل ۱۶ کاراکتر\n- **به‌روز نگه دارید** - `sudo paqctl update`\n\n---\n\n## سوالات متداول\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eآیا می‌توانم Paqet و GFK را همزمان اجرا کنم؟\u003c/strong\u003e\u003c/summary\u003e\n\n**بله!** از پورت‌های مختلف استفاده می‌کنند:\n- Paqet: `127.0.0.1:1080`\n- GFK: `127.0.0.1:14000`\n\nاگر یکی مسدود شد، به دیگری سوییچ کنید.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eاز کدام VPS استفاده کنم؟\u003c/strong\u003e\u003c/summary\u003e\n\nهر VPS خارج از منطقه محدود:\n- DigitalOcean\n- Vultr\n- Linode\n- AWS Lightsail\n- Hetzner\n\nمکانی نزدیک انتخاب کنید (اما خارج از فایروال).\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eاتصال کند است\u003c/strong\u003e\u003c/summary\u003e\n\n1. VPS نزدیک‌تر انتخاب کنید\n2. روش دیگر را امتحان کنید\n3. VPS را بررسی کنید\n4. شبکه محلی را بررسی کنید\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eسرور مدام قطع می‌شود\u003c/strong\u003e\u003c/summary\u003e\n\n1. لاگ‌ها را بررسی کنید: `sudo paqctl logs`\n2. منابع VPS را بررسی کنید\n3. پورت توسط ISP مسدود نشده باشد\n4. بین Paqet و GFK سوییچ کنید\n\u003c/details\u003e\n\n---\n\n## مشارکت\n\nمشکلات و pull request در گیت‌هاب:\nhttps://github.com/SamNet-dev/paqctl\n\n---\n\n## قدردانی\n\n- [paqet](https://github.com/hanselime/paqet) - پروکسی مبتنی بر KCP با SOCKS5 داخلی (سورس اصلی)\n- [GFW-knocker](https://github.com/GFW-knocker/gfw_resist_tcp_proxy) - تکنیک TCP نقض‌شده\n- [aioquic](https://github.com/aiortc/aioquic) - پیاده‌سازی QUIC\n- [scapy](https://scapy.net/) - کتابخانه دستکاری بسته\n- [kcptun](https://github.com/xtaci/kcptun) - الهام‌بخش پروتکل KCP\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamnet-dev%2Fpaqctl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamnet-dev%2Fpaqctl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamnet-dev%2Fpaqctl/lists"}