{"id":49056223,"url":"https://github.com/samnet-dev/snix","last_synced_at":"2026-04-25T04:01:23.933Z","repository":{"id":352286882,"uuid":"1214587652","full_name":"SamNet-dev/snix","owner":"SamNet-dev","description":"Cross-platform SNI-spoofing DPI-bypass proxy. Single binary, no cgo. Go rewrite of patterniha/SNI-Spoofing.","archived":false,"fork":false,"pushed_at":"2026-04-18T21:12:02.000Z","size":263,"stargazers_count":42,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-24T03:03:42.763Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://snix.sh","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-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":"CONTRIBUTING.md","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-04-18T19:25:07.000Z","updated_at":"2026-04-23T20:07:05.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/SamNet-dev/snix","commit_stats":null,"previous_names":["samnet-dev/snix"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/SamNet-dev/snix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamNet-dev%2Fsnix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamNet-dev%2Fsnix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamNet-dev%2Fsnix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamNet-dev%2Fsnix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SamNet-dev","download_url":"https://codeload.github.com/SamNet-dev/snix/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamNet-dev%2Fsnix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32249492,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T03:17:44.950Z","status":"ssl_error","status_checked_at":"2026-04-25T03:16:45.208Z","response_time":59,"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":[],"created_at":"2026-04-19T23:10:51.715Z","updated_at":"2026-04-25T04:01:23.886Z","avatar_url":"https://github.com/SamNet-dev.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🛰️ snix\n\n\u003e **Cross-platform SNI-spoofing DPI-bypass proxy.** Single binary. No cgo. Batteries included.\n\n[![build](https://github.com/SamNet-dev/snix/actions/workflows/release.yml/badge.svg)](https://github.com/SamNet-dev/snix/actions/workflows/release.yml)\n[![release](https://img.shields.io/github/v/release/SamNet-dev/snix.svg)](https://github.com/SamNet-dev/snix/releases)\n[![license](https://img.shields.io/badge/license-GPL--3.0-blue.svg)](LICENSE)\n[![platforms](https://img.shields.io/badge/platforms-linux%20%7C%20windows%20%7C%20macOS-blue)](https://github.com/SamNet-dev/snix/releases)\n\nsnix tricks DPI censorship systems into accepting your TLS connections by\ninjecting a fake ClientHello with a whitelisted SNI during the TCP\nhandshake. The real TLS handshake then proceeds unobstructed. It is a Go\nrewrite of [patterniha/SNI-Spoofing](https://github.com/patterniha/SNI-Spoofing),\nexpanded with multi-platform backends, anti-fingerprinting, a TUI, and a\nbuilt-in network scanner.\n\n\u003e 📖 **New here?** Read the full walkthrough:\n\u003e - 🇬🇧 **[GUIDE.md](GUIDE.md)** — zero-to-finish in English.\n\u003e - 🇮🇷 **[GUIDE-fa.md](GUIDE-fa.md)** — صفر تا صد به فارسی.\n\u003e\n\u003e Both cover every step from signing up for Cloudflare through a working\n\u003e bypass, including Xray client configs and optional domain setup. Start\n\u003e there if this is the first time you've set up any circumvention tool.\n\u003e The README below is the short reference for everyone else.\n\n### ✨ At a glance\n\n- ⚡ **Single binary, no runtime deps** — 10 MB static executable for Linux + Windows.\n- 🥷 **Anti-fingerprinting** — randomized packet size, timing, IP ID, and SNI pool.\n- 🔍 **Built-in scanner** — `snix scan` finds working SNIs and CDN IPs for your ISP.\n- 🎛️ **Full TUI** — `snix tui` gives you a dashboard, live logs, and one-key profile switching.\n- 🪄 **First-run wizard** — `snix init --wizard` writes a working config in under a minute.\n- ☁️ **Free-tier server path** — deploy a Cloudflare Worker as your proxy server in ~60 seconds.\n- 🔄 **Self-update** — `snix update` verifies SHA-256 and atomically swaps the binary.\n- 🌍 **English + Farsi docs** throughout.\n\n## Table of contents\n\n- [What snix does](#what-snix-does)\n- [What snix is NOT](#what-snix-is-not)\n- [What you need before installing](#what-you-need-before-installing)\n- [Install — Linux](#install--linux)\n- [Install — Windows](#install--windows)\n- [Install — build from source](#install--build-from-source)\n- [First-time setup](#first-time-setup)\n- [Daily usage](#daily-usage)\n- [TUI walkthrough](#tui-walkthrough)\n- [CLI reference](#cli-reference)\n- [Configuration reference](#configuration-reference)\n- [Anti-fingerprinting knobs](#anti-fingerprinting-knobs)\n- [Hooking snix into your proxy client](#hooking-snix-into-your-proxy-client)\n- [Troubleshooting](#troubleshooting)\n- [Relation to patterniha/SNI-Spoofing](#relation-to-patternihasni-spoofing)\n- [Credits + license](#credits--license)\n- [نسخه فارسی / Persian version](#نسخه-فارسی)\n\n---\n\n## 🎯 What snix does\n\n```\n[your browser or proxy client]\n        │\n        ▼\n[snix on 127.0.0.1:40443]  ──── at TCP handshake time snix:\n        │                         1) observes outbound SYN\n        │                         2) observes inbound SYN-ACK\n        │                         3) observes outbound ACK\n        │                         4) injects a fake TLS ClientHello\n        ▼                            with a whitelisted SNI such as\n[your upstream proxy server, e.g.    `auth.vercel.com` and a deliberately\n VLESS over Cloudflare on port 443]  wrong TCP sequence number\n```\n\n- The DPI middlebox reads the fake ClientHello first, sees a whitelisted\n  domain (`auth.vercel.com`), and marks the flow as allowed.\n- The real server receives the fake packet too — but because its sequence\n  number is out-of-window (or its checksum is corrupted) the server\n  silently drops it. No connection damage.\n- The real TLS handshake to your proxy server then proceeds over the\n  already-whitelisted TCP flow and succeeds.\n\n## ⚠️ What snix is NOT\n\nsnix is a **client-side DPI-bypass layer**, not a VPN.\n\nYou still need:\n- A proxy server somewhere outside the censored network (Xray/VLESS,\n  VMess, Trojan, sing-box, etc.), ideally on port 443 and fronted via a\n  CDN such as Cloudflare.\n- A client that speaks that proxy protocol (Xray, v2ray, sing-box,\n  NekoBox, v2rayN, etc.). snix does not speak VLESS/VMess/Trojan yet —\n  that's in the v1.0 roadmap.\n\nsnix sits between the client and the internet. Every connection the\nclient opens gets the SNI-spoof treatment.\n\n## 📋 What you need before installing\n\n1. **A proxy server.** If you don't have one, the first-run wizard\n   (`snix init --wizard`) can walk you through deploying a free\n   Cloudflare Worker that acts as your proxy in about 60 seconds.\n2. **Root / Administrator access** on the device you're installing on.\n   Packet interception requires kernel-level filter access on both Linux\n   (NFQUEUE + iptables) and Windows (WinDivert).\n3. **A TLS-based proxy client** already installed. snix is the layer in\n   front; you still need Xray / v2ray / sing-box / NekoBox to speak the\n   proxy protocol itself.\n\n---\n\n## 🐧 Install — Linux\n\n### One-liner (recommended)\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/SamNet-dev/snix/main/installer/linux/install.sh | sudo sh\n```\n\n*(A shorter `https://get.snix.sh` form will be set up once the domain is\nregistered; until then the raw GitHub URL above is the canonical install\ncommand.)*\n\nThe script:\n1. Detects your distro + architecture.\n2. Downloads the signed release tarball from GitHub.\n3. Verifies the `minisign` signature.\n4. Places `snix` into `/usr/local/bin`.\n5. Writes `/etc/systemd/system/snix.service` (disabled by default).\n6. Installs bash + zsh completions.\n\nThen:\n\n```bash\nsudo snix init --wizard      # create config + pick best SNIs/IPs for your ISP\nsudo snix start              # run the engine in your shell, or:\nsudo systemctl enable --now snix    # run as a managed service\n```\n\n### Manual install\n\nDownload from \u003chttps://github.com/SamNet-dev/snix/releases\u003e:\n\n```bash\ncurl -LO https://github.com/SamNet-dev/snix/releases/latest/download/snix-linux-amd64.tar.gz\ncurl -LO https://github.com/SamNet-dev/snix/releases/latest/download/snix-linux-amd64.tar.gz.minisig\n\nminisign -Vm snix-linux-amd64.tar.gz -P $(cat snix-pubkey.txt)   # verify\n\ntar -xzf snix-linux-amd64.tar.gz\nsudo install -m 0755 snix /usr/local/bin/snix\n```\n\nArchitectures: `amd64`, `arm64`, `armv7`.\n\n### Distribution packages\n\n- Debian/Ubuntu `.deb` and Fedora/RHEL `.rpm` ship with each release.\n- AUR: `yay -S snix-bin`.\n- Arch: coming soon.\n\n---\n\n## 🪟 Install — Windows\n\n### Installer (recommended)\n\n1. Download `snix-setup.exe` from \u003chttps://github.com/SamNet-dev/snix/releases\u003e.\n2. Right-click → Run as Administrator. Follow the installer.\n3. The installer:\n   - Puts `snix.exe` into `C:\\Program Files\\snix\\`.\n   - Bundles `WinDivert.dll` and `WinDivert64.sys` alongside it.\n   - Adds a Start Menu shortcut that launches the TUI with auto-UAC.\n   - Optionally registers a Windows Service for automatic startup.\n4. Launch from the Start Menu. First launch shows the wizard.\n\n### Portable zip\n\n1. Download `snix-windows-amd64.zip`, extract anywhere.\n2. Open an **elevated** Command Prompt or PowerShell.\n3. `cd` to the folder, then:\n   ```cmd\n   snix.exe init --wizard\n   snix.exe tui\n   ```\n\nThe zip contains:\n\n```\nsnix-windows-amd64/\n  snix.exe\n  WinDivert.dll\n  WinDivert64.sys\n  LICENSE\n  README.md\n```\n\nAll three files must live in the same directory for snix to find the\nWinDivert driver.\n\n---\n\n## 🔨 Install — build from source\n\n```bash\ngit clone https://github.com/SamNet-dev/snix.git\ncd snix\ngo build -o snix ./cmd/snix\n```\n\nRequirements: Go 1.23+, no C toolchain, no other tooling. Cross-compile:\n\n```bash\nGOOS=linux   GOARCH=amd64 go build -o snix-linux   ./cmd/snix\nGOOS=windows GOARCH=amd64 go build -o snix.exe     ./cmd/snix\nGOOS=darwin  GOARCH=arm64 go build -o snix-macos   ./cmd/snix\n```\n\nOn Windows the engine requires WinDivert. Download v2.2.2 from\n\u003chttps://github.com/basil00/Divert/releases/tag/v2.2.2\u003e, extract\n`x64/WinDivert.dll` and `x64/WinDivert64.sys`, put them next to the built\n`snix.exe`.\n\n---\n\n## 🚀 First-time setup\n\nRun the wizard:\n\n```bash\nsnix init --wizard\n```\n\nYou'll see:\n\n```\nsnix first-run wizard\n\nStep 1/5 — Do you have a proxy server already?  (y/n)\n\u003e y\n\nStep 2/5 — Paste your server address:\n  Host:        my-proxy.example.com\n  Port [443]:  443\n\nStep 3/5 — Scanning your network for working SNIs and CDN IPs…\n  SNI probes  [████████████████] 55/55  ok=55  reset=0  timeout=0\n  IP probes   [████████████████] 20/20  reachable=18\n\n  Top SNIs:\n    1. auth.vercel.com           12ms\n    2. cdn.segment.io            14ms\n    3. static.cloudflareinsights 16ms\n  Top IPs:\n    1. 104.21.2.17    3ms\n    2. 172.65.250.78  3ms\n\nStep 4/5 — Anti-fingerprinting knobs (recommended ON):\n  Randomize timing?   (Y/n) y\n  Randomize padding?  (Y/n) y\n  Strategy rotation?  (Y/n) y\n\nStep 5/5 — Integrate with a proxy client?\n  Detected: xray at /usr/local/bin/xray\n  Update Xray config to use snix on 127.0.0.1:40443? (y/N) y\n  Backup written to ~/.config/xray/config.json.bak\n  Done.\n\nConfig written to /root/.config/snix/config.yaml\nRun `sudo snix start` to launch.\n```\n\nIf you said \"n\" at Step 1, the wizard offers to deploy a Cloudflare\nWorker:\n\n```\n  You don't have a proxy server yet. snix can deploy one for free on\n  Cloudflare in ~60 seconds.\n\n  Deploy Cloudflare Worker? (Y/n) y\n  Open this URL in your browser:\n    https://dash.cloudflare.com/?to=/:account/workers/services/new?name=snix-\u003crandom\u003e\n  After deploy completes, paste the Worker URL here:\n  \u003e worker-name.username.workers.dev\n```\n\n## 🎮 Daily usage\n\nTwo ways to drive snix: the TUI (interactive) or the CLI (scriptable).\n\n### TUI\n\n```bash\nsnix tui        # opens full-screen dashboard\n```\n\nPress `1-7` to switch tabs, `?` for help, `q` to quit. See [TUI walkthrough](#tui-walkthrough).\n\n### CLI + systemd (Linux)\n\n```bash\nsudo systemctl enable --now snix\njournalctl -u snix -f            # follow logs\nsudo systemctl stop snix\n```\n\n### CLI + Services (Windows)\n\nIf you chose \"Install as Service\" during setup:\n\n```cmd\nsc query snix\nsc start snix\nsc stop snix\n```\n\nOtherwise, launch from the Start Menu shortcut.\n\n---\n\n## 🖥️ TUI walkthrough\n\n### Tab 1 — Home\n\nShows:\n- Which config file is loaded.\n- How many profiles are defined.\n- Which profile is active and its summary (listen, connect, strategy).\n- A short explainer of what snix does.\n\n### Tab 2 — Profiles\n\nList of profiles. Keys:\n\n| key | action |\n|---|---|\n| `↑↓` / `jk` | move cursor |\n| `⏎`         | set the selected profile as active (writes config.yaml) |\n| `e`         | open the config file in `$EDITOR` / notepad |\n| `r`         | reload config from disk |\n\nRight pane shows full details of the highlighted profile including its\nSNI pool, randomization settings, and fallback IPs.\n\n### Tab 3 — Scan\n\nProbe the network to find which SNIs and CDN IPs work. Keys:\n\n| key | action |\n|---|---|\n| `s` | probe candidate SNIs against the target IP |\n| `i` | probe the Cloudflare IP pool for reachability + RTT |\n| `a` | run both concurrently |\n| `t` | edit the SNI-probe target IP |\n| `x` | stop the running scan |\n| `e` | save top results into the active profile (writes config.yaml) |\n\nLive progress bars for each scan type. Top-10 leaderboards update as\nresults arrive.\n\n### Tab 4 — Run\n\nStarts / stops the bypass engine as a subprocess. Keys:\n\n| key | action |\n|---|---|\n| `s` | start engine |\n| `x` | stop engine (SIGINT / Kill) |\n| `r` | restart |\n| `c` | clear logs |\n\nEngine stdout and stderr are tailed live into the Engine Output panel.\nScrollable with `↑↓` / `PgUp`/`PgDn`.\n\nWindows: the engine subprocess needs Administrator. If the TUI was\nlaunched non-elevated you'll see the missing-privilege error in the log\npanel; restart the TUI from an elevated shell.\n\n### Tab 5 — Settings\n\nToggle anti-fingerprinting knobs on the active profile. All changes save\nto disk immediately. Keys:\n\n| key | action |\n|---|---|\n| `↑↓` / `jk` | move cursor |\n| `space` / `⏎` | toggle the selected knob |\n| `+` / `-` | adjust numeric values |\n\nThe right pane explains what the highlighted knob does and why you'd\nwant it.\n\n### Tab 6 — Help\n\nScrollable long-form help: what SNI spoofing is, every keybinding, CLI\nparity table, troubleshooting.\n\n### Tab 7 — About\n\nVersion, license, credits, support links.\n\n---\n\n## 📖 CLI reference\n\n```\nsnix init                     create a starter config at ~/.config/snix/config.yaml\nsnix init --wizard            interactive first-time setup (recommended)\nsnix status                   show loaded config + active profile\nsnix tui                      launch the full interactive TUI\nsnix start                    run the bypass engine (needs root / admin)\nsnix start -p NAME            start using a non-active profile\nsnix scan sni --target IP     probe SNIs against IP (default 1.1.1.1)\nsnix scan ip                  probe Cloudflare IPs for reachability + RTT\nsnix scan all                 run both scans and print a ready-to-paste profile\nsnix profile list             list profiles\nsnix profile switch NAME      make NAME the active profile\nsnix update                   upgrade to the latest release (verifies signature)\nsnix --version                print version\nsnix --help                   print top-level help\n```\n\nGlobal flags:\n\n```\n-c, --config PATH    use a non-default config path\n-v, --verbose        verbose logging\n```\n\n---\n\n## ⚙️ Configuration reference\n\nDefault location:\n- Linux / macOS: `~/.config/snix/config.yaml` (or `$XDG_CONFIG_HOME/snix/config.yaml`).\n- Windows: `%APPDATA%\\snix\\config.yaml`.\n\nFull example with every field:\n\n```yaml\nversion: 1\n\n# Which profile to use on `snix start`. Must match one of `profiles[].name`.\nactive: default\n\nlog:\n  # debug | info | warn | error\n  level: info\n\nprofiles:\n  - name: default\n\n    # Where snix listens for client connections (Xray, v2ray, etc.).\n    listen: \"127.0.0.1:40443\"\n\n    connect:\n      # Your upstream proxy server. Domain or IP.\n      host: my-proxy.example.com\n      port: 443\n      # If `host` fails or its DNS resolution is blocked, snix will try\n      # these IPs in order. Useful to pin known-working Cloudflare edges.\n      fallback_ips:\n        - 104.21.2.17\n        - 172.65.250.78\n\n    spoof:\n      # Default strategy. Used when `strategy_rotation` is empty.\n      # wrong_seq     — inject fake ClientHello with out-of-window seq\n      # wrong_checksum — same + corrupted TCP checksum (double-safety)\n      strategy: wrong_seq\n\n      # If set (recommended), snix picks a strategy per flow at random\n      # from this list. Breaks DPI pattern-matching on packet shape.\n      strategy_rotation: [wrong_seq, wrong_checksum]\n\n      # The SNIs snix rotates through when building the fake ClientHello.\n      # Run `snix scan sni` to discover which ones work on your ISP.\n      sni_pool:\n        - auth.vercel.com\n        - cdn.segment.io\n        - static.cloudflareinsights.com\n\n      # random (default): uniform random pick per flow\n      # round_robin: deterministic cycle\n      sni_selection: random\n\n      # Jitters the delay between the real ACK and the fake ClientHello.\n      # Defeats timing-based DPI fingerprints.\n      randomize_timing: true\n      min_delay: 500us\n      max_delay: 5ms\n\n      # Varies the ClientHello packet length so it's not always 517 bytes.\n      randomize_padding: true\n      min_extra_pad: 0\n      max_extra_pad: 600\n\n      # Random offset applied to the fake packet's IP identification\n      # field. 1 = upstream behaviour (always +1). Higher = more variance.\n      ip_id_delta_range: 64\n\n    health:\n      # Background probe interval (not yet wired to auto-failover).\n      interval: 30s\n      auto_failover: true\n```\n\nDefaults (if you omit the field):\n\n| field | default |\n|---|---|\n| `connect.port` | 443 |\n| `spoof.sni_selection` | `random` |\n| `spoof.randomize_timing` | `false` |\n| `spoof.min_delay` | `1ms` |\n| `spoof.max_delay` | `1ms` |\n| `spoof.randomize_padding` | `false` |\n| `spoof.ip_id_delta_range` | `1` |\n| `health.interval` | `30s` |\n| `log.level` | `info` |\n\n## 🎛️ Anti-fingerprinting knobs\n\nWhy each knob matters:\n\n- **`randomize_timing`** — upstream emits the fake ClientHello exactly\n  1 ms after the final ACK. A DPI watching for \"ACK immediately followed\n  by 517-byte PSH packet with specific seq pattern\" can flag this. Random\n  jitter in [500 µs, 5 ms] makes the timing an uninteresting noise field.\n- **`randomize_padding`** — upstream's fake ClientHello is always 517\n  bytes. With `randomize_padding: true` + `max_extra_pad: 600`, snix\n  emits packets in [517, 1117] bytes. Removes a trivially fingerprintable\n  invariant.\n- **`strategy_rotation`** — wrong_seq alone always produces the same\n  shape (valid TLS, valid checksum, wildly wrong seq). Rotating with\n  wrong_checksum means half of your connections have valid seq +\n  invalid checksum instead. Two different shapes to pattern-match means\n  twice the DPI engineering required to catch you.\n- **`ip_id_delta_range`** — upstream always sets the fake packet's IPv4\n  `ident` field to `ack_packet.ident + 1`. A range of 64 scatters the\n  delta uniformly in [1, 64], removing the predictable tell.\n- **`sni_selection: random`** — round-robin is deterministic; random\n  makes per-flow SNI choice unrelated to flow order.\n\nRecommended for production:\n\n```yaml\nspoof:\n  strategy_rotation: [wrong_seq, wrong_checksum]\n  sni_pool: [... at least 3 SNIs ...]\n  sni_selection: random\n  randomize_timing: true\n  min_delay: 500us\n  max_delay: 5ms\n  randomize_padding: true\n  max_extra_pad: 600\n  ip_id_delta_range: 64\n```\n\n## 🔌 Hooking snix into your proxy client\n\nPoint your proxy client's outbound at `127.0.0.1:40443`. Every proxy\nstack works slightly differently; quick notes:\n\n### Xray / v2ray\n\nIn your `config.json`, under `outbounds[0].settings.vnext[0].address`\n(or equivalent), replace your real proxy server address with\n`\"127.0.0.1\"` and port `40443`. Then in snix's config put the real\nserver in `connect.host` + `connect.port`.\n\nsnix's wizard can edit this for you: `snix init --wizard` → Step 5.\n\n### sing-box\n\nSame concept: set the `server` field of your outbound to\n`\"127.0.0.1\"` and `server_port: 40443`. snix handles the actual TLS.\n\n### NekoBox / v2rayN\n\nImport your existing profile, then edit the node's address → `127.0.0.1`,\nport → `40443`.\n\n### SOCKS5-ready clients (browsers, curl)\n\nsnix doesn't currently expose SOCKS5; it's a transparent TCP relay. Use\nXray or sing-box to expose SOCKS5 on a different port, with snix as the\noutbound address.\n\n---\n\n## 🔧 Troubleshooting\n\n**\"No config loaded\" on the Home screen**\n→ Run `snix init` or `snix init --wizard` to create one. Check\n`snix status` to see where it's looking.\n\n**`ERROR_ACCESS_DENIED (run as Administrator)` on Windows**\n→ Launch from an elevated shell. The TUI does a pre-check and prints\n`snix/windows: process is not running elevated`; relaunch elevated.\n\n**`WinDivert.dll not loadable` on Windows**\n→ The DLL and driver must be in the same folder as `snix.exe`, or on\n`%PATH%`. If you used the installer, this is automatic. For portable\nusage, keep all three files together.\n\n**Scan reports \"0 OK\" in Scan → SNI**\n→ Try a different `--target`. The default `1.1.1.1` accepts any SNI\nbecause Cloudflare DNS has a universal default cert. Other edge IPs\nonly serve their own customers' domains. If even `1.1.1.1` shows resets,\nyour ISP may be blocking raw TLS handshakes at the TCP layer — use the\n`--target` of a known-working proxy IP instead.\n\n**`snix start` succeeds but the proxy client can't reach anything**\n→ Verify your proxy server is actually reachable without DPI first\n(try `curl -vk --resolve myserver:443:YOUR_IP https://myserver/` on a\nnetwork without DPI). If that works, turn on snix's `--verbose` and watch\nthe log for `snix: injected ...` lines. No injection log = client isn't\nhitting `127.0.0.1:40443`; misconfigured proxy client.\n\n**Connection works for 30 seconds, then drops**\n→ Some ISPs use flow-based classifiers that catch unusual patterns\nlater. Enable full anti-fingerprinting (all three knobs) and restart.\n\n**Real traffic stalls when `strategy_rotation: [wrong_seq, wrong_checksum]`**\n→ Shouldn't happen in this release; we always pair wrong_checksum with\nout-of-window seq. If it does, remove `wrong_checksum` from rotation and\nfile an issue with the tcpdump from the failing flow.\n\n**High CPU under load**\n→ Expected at this version (we don't yet use `splice()` on Linux or\n`TransmitFile` on Windows). v0.8 brings a zero-copy relay.\n\n**How do I uninstall?**\n- Linux: `sudo rm /usr/local/bin/snix /etc/systemd/system/snix.service`\n- Windows: Control Panel → Apps → snix → Uninstall.\n\n**How do I update?**\n- `snix update` auto-upgrades to the latest release (signature verified).\n- Or re-run the installer; it's safe to overwrite.\n\n**Where are the logs?**\n- When run via `snix start`: stdout/stderr.\n- When run via systemd: `journalctl -u snix`.\n- When run via Windows Service: Event Viewer → Application logs.\n- TUI Run tab: in-memory tail (not persistent).\n\n---\n\n## 🤝 Relation to patterniha/SNI-Spoofing\n\nsnix is a Go rewrite of\n[patterniha/SNI-Spoofing](https://github.com/patterniha/SNI-Spoofing).\nThat project discovered and implemented the wrong-seq bypass technique\nthat makes everything here possible. If you like snix, **please star\ntheir repo too**. This project would not exist without their work.\n\nOur bypass engine is **byte-for-byte identical** to theirs for the core\ntrick: the fake ClientHello, the wrong TCP sequence number, the timing,\nand the state machine all produce wire-identical packets. That parity is\nlocked in with a golden test that regenerates reference bytes from the\nupstream Python and fails any build that diverges.\n\nOn top of that identical foundation we add:\n\n| Area | patterniha/SNI-Spoofing | snix |\n|---|---|---|\n| **Core bypass (`wrong_seq`)** | ✓ | ✓ *(byte-identical)* |\n| Platforms | Windows only | **Windows + Linux** *(macOS + Android planned)* |\n| Runtime dependency | Python + pydivert + WinDivert | **Single 10 MB binary** *(no cgo, no Python)* |\n| Second bypass strategy | not available | **`wrong_checksum`** rotates with `wrong_seq` |\n| Timing randomization | fixed 1 ms | uniform in `[min, max]` (e.g. 500 µs to 5 ms) |\n| Packet-size randomization | fixed 517 bytes | `[517, 517 + max_extra_pad]` |\n| IP-ID randomization | always `+1` | uniform in `[1, IP ID delta range]` |\n| SNI strategy | single fixed SNI | pool + random/round-robin selection |\n| Network scanner | not available | **`snix scan`**: probes SNIs and CDN IPs, ranks by success + latency |\n| First-run wizard | not available | **`snix init --wizard`**: 5 prompts to a working profile |\n| Proxy-client integration | manual | **auto-detects Xray / v2ray / sing-box** and patches their config (with backup) |\n| Free-tier server path | not available | **Cloudflare Worker** template + deploy instructions |\n| UI | CLI only | **CLI + full TUI** (dashboard, profiles, scan, live logs, settings, help) |\n| Multiple profiles | edit config file | **switch active profile at runtime** |\n| Self-update | not available | **`snix update`** (signature-verified) |\n| Graceful shutdown | not available | removes iptables / WinDivert rules on exit |\n| Test coverage | not available | **race-detector-clean**, golden tests, unit tests per package |\n| CI + signed releases | not available | GitHub Actions matrix + minisign + SBOM |\n| Localisation | English + Persian (README) | **English + Persian** (README + full user guide) |\n\n**Design decision:** we never remove a capability that upstream has. You\ncan run snix with every randomization knob turned OFF and the engine\nbehaves exactly like patterniha/SNI-Spoofing: same packet on the wire,\nsame timing, same state transitions. The randomization layer is additive.\n\nWhere we are **stricter** than upstream: we narrow the packet filter to\nthe exact IP+port pair instead of just the host, so unrelated traffic\nnever gets pulled into the bypass engine. Where we are **more\npermissive** than upstream: we don't tear down a connection when we see\nan unexpected packet. We skip the bypass for that flow but let the\nconnection continue. Both are safety improvements that don't change the\ncore behaviour.\n\nIf you want the smaller, simpler, Windows-only Python version, go use\nthe upstream. If you want the same bypass as a single signed binary on\nLinux and Windows, with a wizard, a scanner, and a TUI, that's snix.\n\n---\n\n## 🙏 Credits + license\n\n- Upstream algorithm + first implementation:\n  [patterniha](https://github.com/patterniha) — **this project would not\n  exist without their work**. The core wrong-seq bypass is theirs;\n  everything else here is a cross-platform rewrite and expansion.\n- [WinDivert](https://reqrypt.org/windivert.html) by Basil Fierz — the\n  signed kernel driver we use on Windows.\n- [Bubble Tea](https://github.com/charmbracelet/bubbletea) and\n  [Lipgloss](https://github.com/charmbracelet/lipgloss) — the TUI framework.\n- Linux kernel netfilter team — for NFQUEUE.\n\nSupport the upstream author:\n```\nUSDT (BEP20): 0x76a768B53Ca77B43086946315f0BDF21156bF424\nTelegram:     @patterniha\n```\n\nLicense: GPL-3.0. Matches upstream. See [LICENSE](LICENSE).\n\n## 💬 Community\n\n- GitHub Discussions: \u003chttps://github.com/SamNet-dev/snix/discussions\u003e\n- Issues: \u003chttps://github.com/SamNet-dev/snix/issues\u003e\n- Telegram: *(link once channel exists)*\n\n---\n\n\u003ca id=\"نسخه-فارسی\"\u003e\u003c/a\u003e\n\n# snix — نسخهٔ فارسی\n\n\u003cdiv dir=\"rtl\"\u003e\n\n\u003e پروکسیِ دور زدنِ DPI با جعلِ SNI، چند-پلتفرمی، تک‌فایلی، بدون cgo، با ابزارهای کامل تویِ بسته.\n\n\u003e **تازه‌وارد؟** راهنمایِ کاملِ صفر تا صد را بخوانید: **[GUIDE-fa.md](GUIDE-fa.md)** — همهٔ مراحل از ثبتِ Cloudflare تا دور زدنِ کاری، شاملِ پیکربندیِ کلاینتِ Xray و دامنهٔ اختیاری.\n\nsnix سامانه‌هایِ سانسور مبتنی بر DPI را گول می‌زند: در لحظهٔ دست‌دادنِ TCP، یک ClientHello جعلی با دامنه‌ای مجاز (مثل `auth.vercel.com`) تزریق می‌شود. سپس دست‌دادنِ واقعیِ TLS بدون مزاحمت انجام می‌گیرد. این پروژه بازنویسیِ [patterniha/SNI-Spoofing](https://github.com/patterniha/SNI-Spoofing) در زبان Go است، با پشتیبانی از چند پلتفرم، ضد-اثرانگشت، رابطِ TUI، و اسکنرِ شبکه.\n\n## فهرست\n\n- [snix چه می‌کند](#snix-چه-میکند)\n- [snix چه نیست](#snix-چه-نیست)\n- [پیش‌نیازها](#پیشنیازها)\n- [نصب — لینوکس](#نصب--لینوکس)\n- [نصب — ویندوز](#نصب--ویندوز)\n- [نصب — ساختن از سورس](#نصب--ساختن-از-سورس)\n- [راه‌اندازیِ اول](#راهاندازیِ-اول)\n- [استفادهٔ روزانه](#استفادهٔ-روزانه)\n- [راهنمایِ TUI](#راهنمایِ-tui)\n- [مرجعِ CLI](#مرجعِ-cli)\n- [مرجعِ پیکربندی](#مرجعِ-پیکربندی)\n- [کلیدهایِ ضد-اثرانگشت](#کلیدهایِ-ضد-اثرانگشت)\n- [اتصالِ snix به کلاینتِ پروکسی](#اتصالِ-snix-به-کلاینتِ-پروکسی)\n- [عیب‌یابی](#عیبیابی)\n- [نسبت با patterniha/SNI-Spoofing](#نسبت-با-patternihasni-spoofing)\n- [اعتبار و مجوز](#اعتبار-و-مجوز)\n\n## snix چه می‌کند\n\n\u003cdiv dir=\"ltr\" markdown=\"1\"\u003e\n\n```\n[مرورگر یا کلاینتِ پروکسیِ شما]\n        │\n        ▼\n[snix روی 127.0.0.1:40443] ─── در لحظهٔ دست‌دادنِ TCP:\n        │                       ۱) بستهٔ SYNِ خروجی را رصد می‌کند\n        │                       ۲) بستهٔ SYN-ACKِ ورودی را رصد می‌کند\n        │                       ۳) بستهٔ ACKِ خروجی را رصد می‌کند\n        │                       ۴) یک ClientHelloِ جعلی تزریق می‌کند\n        ▼                         با SNIِ مجاز مثلِ `auth.vercel.com`\n[سرورِ پروکسیِ شما، مثلِ          و با شمارهٔ توالیِ TCPِ عمداً غلط\n VLESS پشتِ Cloudflare رویِ ۴۴۳]\n```\n\n\u003c/div\u003e\n\n- دیوارهٔ DPI اول بستهٔ جعلی را می‌خواند، دامنهٔ مجاز را می‌بیند، و جریان را «مجاز» علامت می‌زند.\n- سرورِ واقعی هم همان بسته را می‌گیرد، ولی چون شمارهٔ توالی در بازهٔ درست نیست (یا checksum خراب است) ساکت dropش می‌کند — هیچ آسیبی به اتصال نمی‌خورد.\n- سپس دست‌دادنِ واقعیِ TLS رویِ همان جریانِ از پیش تأییدشده انجام می‌گیرد و موفق می‌شود.\n\n## snix چه نیست\n\nsnix **لایهٔ دور زدنِ DPI در سمتِ کلاینت** است، نه VPN.\n\nبه این‌ها هنوز نیاز دارید:\n- یک سرورِ پروکسی بیرون از شبکهٔ سانسور‌شده (Xray/VLESS، VMess، Trojan، sing-box و …)، ترجیحاً رویِ پورتِ ۴۴۳ و پشتِ CDN مثلِ Cloudflare.\n- یک کلاینت که آن پروتکل را بفهمد (Xray، v2ray، sing-box، NekoBox، v2rayN و …). فعلاً snix خودش VLESS/VMess/Trojan صحبت نمی‌کند — این در نقشهٔ v1.0 است.\n\nsnix بین کلاینت و اینترنت می‌نشیند. هر اتصالِ جدیدی که کلاینت باز می‌کند از همین ترفندِ SNI-spoof بهره می‌برد.\n\n## پیش‌نیازها\n\n۱. **یک سرورِ پروکسی.** اگر ندارید، دستیارِ راه‌اندازیِ اول (`snix init --wizard`) می‌تواند یک Cloudflare Workerِ رایگان را در حدودِ ۶۰ ثانیه برایتان بسازد.\n۲. **دسترسیِ root یا Administrator** رویِ دستگاهِ نصب. رهگیریِ بسته‌ها نیاز به دسترسیِ لایهٔ کرنل دارد — در لینوکس (NFQUEUE + iptables) و در ویندوز (WinDivert).\n۳. **یک کلاینتِ پروکسی مبتنی بر TLS از قبل نصب‌شده.** snix لایهٔ جلویی است؛ برایِ صحبتِ واقعیِ VLESS/VMess/Trojan هنوز به Xray / v2ray / sing-box / NekoBox نیاز دارید.\n\n## نصب — لینوکس\n\n### تک‌خطی (توصیه‌شده)\n\n\u003cdiv dir=\"ltr\" markdown=\"1\"\u003e\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/SamNet-dev/snix/main/installer/linux/install.sh | sudo sh\n```\n\n\u003c/div\u003e\n\n*(فرمِ کوتاه‌تر `https://get.snix.sh` پس از ثبتِ دامنه فعال می‌شود؛ تا\nآن موقع، URLِ بالا مسیرِ رسمیِ نصب است.)*\n\nاسکریپت:\n۱. توزیع و معماریِ شما را تشخیص می‌دهد.\n۲. آرشیوِ امضاشدهٔ نسخه را از GitHub دانلود می‌کند.\n۳. امضایِ `minisign` را بررسی می‌کند.\n۴. `snix` را در `/usr/local/bin` قرار می‌دهد.\n۵. فایلِ systemd به نامِ `/etc/systemd/system/snix.service` می‌نویسد (به‌صورتِ پیش‌فرض غیرفعال).\n۶. auto-completionِ bash و zsh نصب می‌کند.\n\nسپس:\n\n\u003cdiv dir=\"ltr\" markdown=\"1\"\u003e\n\n```bash\nsudo snix init --wizard      # ساختِ پیکربندی + پیدا کردنِ بهترین SNI/IP\nsudo snix start              # اجرایِ موتور در همین شلِ جاری، یا:\nsudo systemctl enable --now snix    # اجرا به‌صورتِ سرویسِ مدیریت‌شده\n```\n\n\u003c/div\u003e\n\n### نصبِ دستی\n\nاز \u003chttps://github.com/SamNet-dev/snix/releases\u003e:\n\n\u003cdiv dir=\"ltr\" markdown=\"1\"\u003e\n\n```bash\ncurl -LO https://github.com/SamNet-dev/snix/releases/latest/download/snix-linux-amd64.tar.gz\ncurl -LO https://github.com/SamNet-dev/snix/releases/latest/download/snix-linux-amd64.tar.gz.minisig\n\nminisign -Vm snix-linux-amd64.tar.gz -P $(cat snix-pubkey.txt)   # بررسیِ امضا\n\ntar -xzf snix-linux-amd64.tar.gz\nsudo install -m 0755 snix /usr/local/bin/snix\n```\n\n\u003c/div\u003e\n\nمعماری‌ها: `amd64`, `arm64`, `armv7`.\n\n### بسته‌هایِ توزیع\n\n- فایلِ `.deb` برای Debian/Ubuntu و `.rpm` برای Fedora/RHEL در هر نسخه منتشر می‌شوند.\n- AUR: `yay -S snix-bin`.\n\n## نصب — ویندوز\n\n### نصب‌کننده (توصیه‌شده)\n\n۱. `snix-setup.exe` را از \u003chttps://github.com/SamNet-dev/snix/releases\u003e دانلود کنید.\n۲. راست‌کلیک → Run as Administrator. مراحلِ نصب را دنبال کنید.\n۳. نصب‌کننده:\n   - `snix.exe` را در `C:\\Program Files\\snix\\` قرار می‌دهد.\n   - `WinDivert.dll` و `WinDivert64.sys` را در کنارِ آن می‌گذارد.\n   - یک میانبرِ Start Menu اضافه می‌کند که TUI را با UAC خودکار اجرا می‌کند.\n   - اختیاری: snix را به‌عنوانِ سرویسِ ویندوز برایِ استارتِ خودکار ثبت می‌کند.\n۴. از Start Menu اجرا کنید. اولین اجرا دستیارِ راه‌اندازی را نشان می‌دهد.\n\n### بستهٔ قابل‌حمل (zip)\n\n۱. `snix-windows-amd64.zip` را دانلود و در هر پوشه‌ای استخراج کنید.\n۲. یک Command Prompt یا PowerShellِ **بالارفته (Administrator)** باز کنید.\n۳. به آن پوشه بروید و اجرا کنید:\n\u003cdiv dir=\"ltr\" markdown=\"1\"\u003e\n\n   ```cmd\n   snix.exe init --wizard\n   snix.exe tui\n   ```\n\n\u003c/div\u003e\n\nمحتوایِ zip:\n\n\u003cdiv dir=\"ltr\" markdown=\"1\"\u003e\n\n```\nsnix-windows-amd64/\n  snix.exe\n  WinDivert.dll\n  WinDivert64.sys\n  LICENSE\n  README.md\n```\n\n\u003c/div\u003e\n\nهر سه فایل باید در یک پوشه کنارِ هم باشند تا snix درایورِ WinDivert را پیدا کند.\n\n## نصب — ساختن از سورس\n\n\u003cdiv dir=\"ltr\" markdown=\"1\"\u003e\n\n```bash\ngit clone https://github.com/SamNet-dev/snix.git\ncd snix\ngo build -o snix ./cmd/snix\n```\n\n\u003c/div\u003e\n\nپیش‌نیاز: Go نسخهٔ ۱.۲۳ یا بالاتر، بدونِ نیاز به ابزارهایِ C، بدونِ وابستگیِ دیگر.\n\nکراس-کامپایل:\n\n\u003cdiv dir=\"ltr\" markdown=\"1\"\u003e\n\n```bash\nGOOS=linux   GOARCH=amd64 go build -o snix-linux   ./cmd/snix\nGOOS=windows GOARCH=amd64 go build -o snix.exe     ./cmd/snix\nGOOS=darwin  GOARCH=arm64 go build -o snix-macos   ./cmd/snix\n```\n\n\u003c/div\u003e\n\nدر ویندوز، موتورِ snix به WinDivert نیاز دارد. نسخهٔ ۲.۲.۲ را از \u003chttps://github.com/basil00/Divert/releases/tag/v2.2.2\u003e دانلود کنید، `x64/WinDivert.dll` و `x64/WinDivert64.sys` را استخراج و کنارِ `snix.exe` بگذارید.\n\n## راه‌اندازیِ اول\n\n\u003cdiv dir=\"ltr\" markdown=\"1\"\u003e\n\n```bash\nsnix init --wizard\n```\n\n\u003c/div\u003e\n\nچیزی شبیهِ این می‌بینید:\n\n\u003cdiv dir=\"ltr\" markdown=\"1\"\u003e\n\n```\nsnix first-run wizard\n\nگامِ ۱ از ۵ — آیا از قبل سرورِ پروکسی دارید؟  (y/n)\n\u003e y\n\nگامِ ۲ از ۵ — آدرسِ سرور را وارد کنید:\n  Host:        my-proxy.example.com\n  Port [443]:  443\n\nگامِ ۳ از ۵ — در حالِ اسکنِ شبکه برای SNI و IPهایِ کارآمد…\n  SNI probes  [████████████████] 55/55  ok=55  reset=0  timeout=0\n  IP probes   [████████████████] 20/20  reachable=18\n\nگامِ ۴ از ۵ — کلیدهایِ ضد-اثرانگشت (پیشنهاد: فعال):\n  Randomize timing?   (Y/n) y\n  Randomize padding?  (Y/n) y\n  Strategy rotation?  (Y/n) y\n\nگامِ ۵ از ۵ — ادغام با کلاینتِ پروکسی؟\n  شناسایی شد: xray در /usr/local/bin/xray\n  آیا تنظیماتِ Xray برایِ استفاده از snix تغییر کند؟ (y/N) y\n  نسخهٔ پشتیبان در ~/.config/xray/config.json.bak\n  انجام شد.\n\nپیکربندی در /root/.config/snix/config.yaml ذخیره شد.\nبرای اجرا: `sudo snix start`\n```\n\n\u003c/div\u003e\n\nاگر در گامِ ۱ «n» بگویید، دستیار پیشنهادِ ساختِ Cloudflare Worker می‌دهد:\n\n\u003cdiv dir=\"ltr\" markdown=\"1\"\u003e\n\n```\n  هنوز سرورِ پروکسی ندارید. snix می‌تواند یک سرورِ رایگان رویِ\n  Cloudflare در حدودِ ۶۰ ثانیه برایتان بسازد.\n\n  آیا Cloudflare Worker مستقر شود؟ (Y/n) y\n  این آدرس را در مرورگر باز کنید:\n    https://dash.cloudflare.com/?to=/:account/workers/services/new?name=snix-\u003crandom\u003e\n  پس از اتمام، آدرسِ Worker را اینجا جای‌گذاری کنید:\n  \u003e worker-name.username.workers.dev\n```\n\n\u003c/div\u003e\n\n## استفادهٔ روزانه\n\n### TUI\n\n\u003cdiv dir=\"ltr\" markdown=\"1\"\u003e\n\n```bash\nsnix tui\n```\n\n\u003c/div\u003e\n\nعددِ ۱ تا ۷ برایِ تعویضِ تب، `?` برای راهنما، `q` برای خروج.\n\n### CLI + systemd (لینوکس)\n\n\u003cdiv dir=\"ltr\" markdown=\"1\"\u003e\n\n```bash\nsudo systemctl enable --now snix\njournalctl -u snix -f\nsudo systemctl stop snix\n```\n\n\u003c/div\u003e\n\n### CLI + Services (ویندوز)\n\nاگر در نصب گزینهٔ «Install as Service» را انتخاب کرده باشید:\n\n\u003cdiv dir=\"ltr\" markdown=\"1\"\u003e\n\n```cmd\nsc query snix\nsc start snix\nsc stop snix\n```\n\n\u003c/div\u003e\n\n## راهنمایِ TUI\n\nهر تب به اختصار:\n\n- **Home** — فایلِ پیکربندیِ بارگذاری‌شده، تعدادِ profile، profileِ فعال، توضیحِ کوتاهِ snix.\n- **Profiles** — فهرستِ profileها. `⏎` انتخاب برایِ فعال کردن، `e` بازکردن در ویرایشگر، `r` بارگذاریِ مجدد.\n- **Scan** — اسکنِ SNI و IP. `s` شروعِ SNI، `i` شروعِ IP، `a` اسکنِ همزمانِ هر دو، `t` ویرایشِ هدفِ SNI، `x` توقف، `e` ذخیره در profileِ فعال.\n- **Run** — اجرایِ موتور. `s` شروع، `x` توقف، `r` راه‌اندازیِ مجدد، `c` پاک‌کردنِ لاگ.\n- **Settings** — کلیدهایِ ضد-اثرانگشت. `↑↓` حرکت، `space` یا `⏎` تغییر، `+/−` تنظیمِ عددی.\n- **Help** — راهنمایِ کامل.\n- **About** — نسخه، مجوز، اعتبار.\n\n## مرجعِ CLI\n\n\u003cdiv dir=\"ltr\" markdown=\"1\"\u003e\n\n```\nsnix init                     ساختِ پیکربندیِ اولیه\nsnix init --wizard            راه‌اندازیِ تعاملی (توصیه‌شده)\nsnix status                   نمایشِ پیکربندیِ بارگذاری‌شده و profileِ فعال\nsnix tui                      اجرایِ TUIِ کامل\nsnix start                    اجرایِ موتور (نیازمند root/admin)\nsnix start -p NAME            اجرا با profileِ غیرفعال\nsnix scan sni --target IP     اسکنِ SNI\nsnix scan ip                  اسکنِ IPهایِ Cloudflare\nsnix scan all                 اسکنِ کامل و چاپِ پیکربندیِ آماده\nsnix profile list             فهرستِ profileها\nsnix profile switch NAME      تغییرِ profileِ فعال\nsnix update                   ارتقا به آخرین نسخه\n```\n\n\u003c/div\u003e\n\n## مرجعِ پیکربندی\n\nمکانِ پیش‌فرض:\n- لینوکس/macOS: `~/.config/snix/config.yaml` (یا `$XDG_CONFIG_HOME/snix/config.yaml`).\n- ویندوز: `%APPDATA%\\snix\\config.yaml`.\n\nنمونهٔ کامل در بخشِ انگلیسی بالا آمده — ساختار دقیقاً همان است و تمامِ کلیدها توضیح داده شده‌اند.\n\n## کلیدهایِ ضد-اثرانگشت\n\n- **`randomize_timing`** — نسخهٔ اصلی دقیقاً ۱ میلی‌ثانیه پس از ACK بسته می‌فرستد؛ DPI می‌تواند این الگو را تشخیص دهد. jitterِ تصادفی در بازهٔ [۵۰۰µs، ۵ms] این ثابت را نویزی می‌کند.\n- **`randomize_padding`** — اندازهٔ بستهٔ اصلی همیشه ۵۱۷ بایت است. با `max_extra_pad: 600`، snix بسته‌هایی بین ۵۱۷ تا ۱۱۱۷ بایت می‌سازد.\n- **`strategy_rotation`** — تنها `wrong_seq` همیشه شکلِ یکسانی می‌سازد. با چرخش بینِ `wrong_seq` و `wrong_checksum` نصفِ اتصال‌ها شکلِ دیگری دارند.\n- **`ip_id_delta_range`** — به‌جایِ +۱ ثابت، بازهٔ [۱، ۶۴] را تصادفی می‌کند.\n- **`sni_selection: random`** — round-robin پیش‌بینی‌پذیر است؛ random شانسِ هر SNI را یکنواخت می‌کند.\n\nپیکربندیِ توصیه‌شده برای استفادهٔ واقعی:\n\n\u003cdiv dir=\"ltr\" markdown=\"1\"\u003e\n\n```yaml\nspoof:\n  strategy_rotation: [wrong_seq, wrong_checksum]\n  sni_pool: [... دستِ‌کم ۳ SNI ...]\n  sni_selection: random\n  randomize_timing: true\n  min_delay: 500us\n  max_delay: 5ms\n  randomize_padding: true\n  max_extra_pad: 600\n  ip_id_delta_range: 64\n```\n\n\u003c/div\u003e\n\n## اتصالِ snix به کلاینتِ پروکسی\n\nکلاینتِ پروکسیِ شما باید به `127.0.0.1:40443` متصل شود. یعنی در تنظیماتِ کلاینت، آدرسِ سرور را `127.0.0.1` و پورت را `40443` بگذارید، و در پیکربندیِ snix آدرسِ واقعیِ سرور در `connect.host` و `connect.port` باشد.\n\nدستیارِ راه‌اندازی (`snix init --wizard` گامِ ۵) این کار را خودکار برایِ Xray / v2ray / sing-box / NekoBox انجام می‌دهد — همیشه اول نسخهٔ پشتیبانِ پیکربندیِ شما را می‌گیرد.\n\n## عیب‌یابی\n\n- **«No config loaded»** → `snix init` یا `snix init --wizard` را اجرا کنید.\n- **`ERROR_ACCESS_DENIED (run as Administrator)` در ویندوز** → از شلِ بالارفته اجرا کنید.\n- **`WinDivert.dll not loadable` در ویندوز** → هر سه فایل باید در یک پوشه باشند.\n- **Scan گزارش «0 OK» می‌دهد** → `--target` را عوض کنید (پیش‌فرض `1.1.1.1` است چون سرتیفیکیتِ پیش‌فرض دارد).\n- **اتصال پس از ۳۰ ثانیه قطع می‌شود** → تمامِ کلیدهایِ ضد-اثرانگشت را روشن کنید.\n- **لاگ‌ها کجاست؟**\n  - `snix start` → stdout/stderr\n  - systemd → `journalctl -u snix`\n  - سرویسِ ویندوز → Event Viewer → Application\n  - تبِ Run در TUI → بافرِ زنده (ناپایدار)\n- **به‌روزرسانی** → `snix update` (با تأییدِ امضا) یا اجرایِ دوبارهٔ نصب‌کننده.\n\n## نسبت با patterniha/SNI-Spoofing\n\nsnix یک بازنویسی در Go از\n[patterniha/SNI-Spoofing](https://github.com/patterniha/SNI-Spoofing) است.\nآن پروژه ترفندِ wrong-seq را کشف و پیاده کرده که همهٔ این کار رویِ شانه‌ی\nآن ایستاده. اگر snix دوست‌تان آمد، **لطفاً repoِ ایشان را هم ستاره بزنید**.\nاین پروژه بدونِ کارِ ایشان وجود نداشت.\n\nموتورِ دور زدنِ ما برایِ ترفندِ اصلی **دقیقاً بایت-به-بایت همانِ\nupstream** است: ClientHelloِ جعلی، شمارهٔ توالیِ اشتباه، زمان‌بندی، و\nماشینِ حالت همگی بسته‌هایی هم‌سان در شبکه تولید می‌کنند. این تطابق با یک\nتستِ «golden» قفل شده که بایت‌هایِ مرجع را از پایتونِ upstream تولید\nمی‌کند و هر buildِ نا-منطبق را fail می‌کند.\n\nرویِ همین پایهٔ یکسان این‌ها را اضافه کرده‌ایم:\n\n| مورد | patterniha/SNI-Spoofing | snix |\n|---|---|---|\n| **هستهٔ بای‌پس (`wrong_seq`)** | ✓ | ✓ *(بایت-به-بایت یکسان)* |\n| پلتفرم‌ها | فقط ویندوز | **ویندوز + لینوکس** *(macOS و اندروید در برنامه)* |\n| وابستگیِ اجرا | Python + pydivert + WinDivert | **یک باینریِ ۱۰ مگابایتی** *(بدونِ cgo، بدونِ پایتون)* |\n| استراتژیِ دومِ بای‌پس | ندارد | **`wrong_checksum`** با `wrong_seq` چرخش می‌کند |\n| randomization زمانی | ۱ میلی‌ثانیهٔ ثابت | یکنواخت در `[min, max]` (مثلاً ۵۰۰µs تا ۵ms) |\n| randomization اندازه | ثابتِ ۵۱۷ بایت | `[۵۱۷, ۵۱۷ + max_extra_pad]` |\n| randomization IP-ID | همیشه `+1` | یکنواخت در `[1, IP ID delta range]` |\n| استراتژیِ SNI | یک SNIِ ثابت | استخر + انتخابِ تصادفی یا round-robin |\n| اسکنرِ شبکه | ندارد | **`snix scan`**: SNI و IPهایِ CDN را بررسی می‌کند، بر اساسِ موفقیت و تأخیر رتبه می‌دهد |\n| دستیارِ راه‌اندازیِ اول | ندارد | **`snix init --wizard`**: ۵ پرسش تا profileِ کاری |\n| ادغام با کلاینتِ پروکسی | دستی | **شناساییِ خودکارِ Xray / v2ray / sing-box** و ویرایشِ پیکربندیِ آن‌ها (با پشتیبان) |\n| مسیرِ سرورِ رایگان | ندارد | قالبِ **Cloudflare Worker** + دستورالعملِ استقرار |\n| UI | فقط CLI | **CLI + TUIِ کامل** (داشبورد، profileها، اسکن، لاگِ زنده، تنظیمات، راهنما) |\n| چند profile | ویرایشِ فایلِ پیکربندی | **جابه‌جاییِ profileِ فعال در زمانِ اجرا** |\n| به‌روزرسانیِ خودکار | ندارد | **`snix update`** (با تأییدِ امضا) |\n| خاموشیِ تمیز | ندارد | قوانینِ iptables و WinDivert را هنگامِ خروج حذف می‌کند |\n| پوششِ تست | ندارد | **race-detector تمیز**، تست‌هایِ golden، تستِ واحد به ازایِ هر بسته |\n| CI و release امضاشده | ندارد | ماتریسِ GitHub Actions + minisign + SBOM |\n| بومی‌سازی | انگلیسی + فارسی (README) | **انگلیسی + فارسی** (README + راهنمایِ کاملِ کاربر) |\n\n**اصلِ طراحی:** هیچ‌گاه قابلیتی را که upstream دارد حذف نمی‌کنیم. اگر\nهمهٔ کلیدهایِ randomization را خاموش کنید، snix دقیقاً مثلِ\npatterniha/SNI-Spoofing رفتار می‌کند: همان بسته در سیم، همان زمان‌بندی،\nهمان حالت‌ها. لایهٔ randomization فقط اضافه است.\n\nجاهایی که از upstream **سخت‌گیرتر** هستیم: فیلترِ بسته را به جفتِ دقیقِ\nIP+port محدود می‌کنیم تا ترافیکِ غیرِ مربوط وارد موتور نشود. جاهایی که\n**آزادتر** هستیم: اتصال را در صورتِ دیدنِ بستهٔ غیرمنتظره قطع نمی‌کنیم.\nبای‌پس را برایِ آن جریان رد می‌کنیم ولی اتصالِ کاربر زنده می‌ماند. هر دو\nبهبودهایِ ایمنی‌اند که رفتارِ هسته را تغییر نمی‌دهند.\n\nاگر نسخهٔ کوچک‌تر، ساده‌تر، و فقط-ویندوزِ پایتون را می‌خواهید، از upstream\nاستفاده کنید. اگر همان بای‌پس را به‌صورتِ یک باینریِ امضاشده برایِ لینوکس\nو ویندوز، به‌همراهِ wizard و scanner و TUI می‌خواهید، این snix است.\n\n## اعتبار و مجوز\n\n- الگوریتمِ اصلی و اولین پیاده‌سازی: [patterniha](https://github.com/patterniha) — **این پروژه بدون کارِ ایشان وجود نداشت**. هستهٔ wrong-seq از ایشان است؛ بقیه بازنویسیِ چند‌پلتفرمی و گسترش است.\n- [WinDivert](https://reqrypt.org/windivert.html) اثرِ Basil Fierz — درایورِ امضاشده‌ای که در ویندوز استفاده می‌کنیم.\n- [Bubble Tea](https://github.com/charmbracelet/bubbletea) و [Lipgloss](https://github.com/charmbracelet/lipgloss) — چارچوبِ TUI.\n- تیمِ netfilterِ کرنلِ لینوکس — برایِ NFQUEUE.\n\nحمایت از نویسندهٔ اصلی:\n\u003cdiv dir=\"ltr\" markdown=\"1\"\u003e\n\n```\nUSDT (BEP20): 0x76a768B53Ca77B43086946315f0BDF21156bF424\nTelegram:     @patterniha\n```\n\n\u003c/div\u003e\n\nمجوز: GPL-3.0. مطابقِ upstream. در فایلِ [LICENSE](LICENSE).\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamnet-dev%2Fsnix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamnet-dev%2Fsnix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamnet-dev%2Fsnix/lists"}