Skip to content

Overview

jinqians edited this page Oct 6, 2026 · 2 revisions

Moved here from the README | Wiki home | 中文

This project offers two ways to deploy a Snell server; pick whichever fits:

  • One-click scripts — install a systemd / OpenRC-managed Snell directly on a VPS. Covers Debian, Ubuntu, CentOS, RHEL and Alpine, with an interactive management menu.
  • Docker images — multi-arch jinqians/snell-server; one docker run starts the service and prints a Surge-ready client config to the log.

Capabilities:

Capability Notes
Snell v4 / v5 / v6 Pick any channel; scripts and images can switch between them
Side-by-side versions Different ports on the same host can run v4 / v5 / v6 independently (script install)
ShadowTLS v3 Wraps Snell in TLS camouflage and hides the raw port
Multi-user Multiple ports / PSKs on one host, managed separately; each user picks its own version
BBR One-click BBR congestion control
Egress control egress-interface setting for Snell v5 / v6
Rule-based routing the server stays the official snell-server; its outgoing traffic goes direct, is rejected, or leaves through another exit (SOCKS5 / HTTP / Shadowsocks / WireGuard) by rule sets (ads, mainland China, AI, streaming…), done by sing-box (scripts, systemd)
Auto update Scripts self-update; images track upstream weekly via GitHub Actions
Client config output Both scripts and containers emit Surge-format config, with country tags

For traffic quotas, VLESS Reality, Hysteria2 and other larger setups, use the same author's PSM (Proxy Stack Manager) — this project stays focused on Snell itself.

Repository layout (click to expand)
README.md  README.en.md  LICENSE  surge.conf
snell.sh  snell-centos.sh  snell-alpine.sh
                        # ↑ generated release files, kept in the root because older installs' snell
                        #   command and PSM fetch these raw URLs (snell-centos.sh is snell.sh); do not edit them
scripts/                # the other generated release files (the menu / snell-docker / install short domains redirect here)
  menu.sh  multi-user.sh  shadowtls.sh  bbr.sh  snell-docker.sh  install.sh
docker/                 # Docker image
  Dockerfile            #   multi-arch image build
  entrypoint.sh         #   entrypoint: generate config + print client config
  build-docker-images.sh  # local batch image build
src/                    # the source: edit here
  snell.sh              #   main script for Debian / Ubuntu / CentOS / RHEL (install, manage, update)
  multi-user.sh         #   Snell multi-user management
  shadowtls.sh          #   ShadowTLS v3 management
  menu.sh               #   all-in-one menu (Snell / SS-2022 / ShadowTLS ...)
  snell-alpine.sh       #   native install on Alpine 3.18 (POSIX sh)
  snell-docker.sh       #   Docker install (POSIX sh)
  bbr.sh                #   BBR management
  install.sh            #   distro-detecting installer entry
  lib/                  #   what the scripts share, one copy of each function
    common.sh           #     colours, root check, distro and package manager (apt / dnf / yum / apk), download URLs
    release.sh          #     official Snell versions and download links
    netinfo.sh          #     public address and its country
    firewall.sh         #     open / close ports: firewalld, ufw, iptables + ip6tables, nftables
    channels.sh         #     install layout and side-by-side v4 / v5 / v6
    conf.sh             #     user configs, v6 options, Surge lines
    routing.sh          #     rule-based routing (sing-box)
tools/build.sh          # bundles src/ into the single-file scripts in the root and scripts/ (--check: verify only)
sources/                # backup of the official Snell v4 packages

⚠️ Keep snell.sh, snell-centos.sh and snell-alpine.sh in the root: older installs' snell command and PSM fetch https://raw.githubusercontent.com/jinqians/snell/main/<script>.sh directly, and raw URLs can't be redirected. New versions rewrite an old snell command to use the short domain. The other scripts are only reached through the short domains or from the main script, so moving them only needs the Cloudflare redirects changed. The source lives in src/; what's published are the single files bash tools/build.sh generates (bash <(curl …) can only fetch one file).


Clone this wiki locally