Sign inSign up

domizhang/snell

By domizhang

Updated about 2 months ago

Docker image for Snell - A lean encrypted proxy protocol

Image
0

3.2K

domizhang/snell repository overview

Snell

Docker image for Snell, a lean encrypted proxy protocol.

Docker Pulls Docker Image Size

Included version

  • Snell: 6.0.0rc
  • Runtime base image: debian:bullseye-slim
  • Release artifacts are verified with pinned SHA256 checksums during build.

Supported platforms

  • linux/amd64
  • linux/arm64

Tags

  • latest: latest build from the default branch
  • 6.0.0rc: current Snell version build
  • 6, 6.0: latest Snell v6 build
  • 5, 5.0: latest Snell v5 build, currently 5.0.1

Quick start

Run with a generated password:

docker run -d \
  --name snell \
  -p 6333:6333/tcp \
  -p 6333:6333/udp \
  domizhang/snell:latest

Read the generated password from logs:

docker logs snell

Run with a fixed password:

docker run -d \
  --name snell \
  -p 6333:6333/tcp \
  -p 6333:6333/udp \
  -e PSK="your-secure-password" \
  domizhang/snell:latest

Customize listener, IPv6 compatibility, DNS, DNS IP preference, egress interface, mode, and extra Snell arguments:

docker run -d \
  --name snell \
  -p 6444:6444/tcp \
  -p 6444:6444/udp \
  -e SERVER_HOST="0.0.0.0" \
  -e SERVER_PORT="6444" \
  -e PSK="your-secure-password" \
  -e IPV6="true" \
  -e DNS="1.1.1.1,8.8.8.8" \
  -e DNS_IP_PREFERENCE="prefer-ipv4" \
  -e EGRESS_INTERFACE="eth0" \
  -e MODE="default" \
  domizhang/snell:latest \
  -l verbose

Docker Compose

services:
  snell:
    image: domizhang/snell:latest
    container_name: snell
    restart: unless-stopped
    ports:
      - "6333:6333/tcp"
      - "6333:6333/udp"
    environment:
      SERVER_HOST: 0.0.0.0
      SERVER_PORT: "6333"
      PSK: your-secure-password
      IPV6: "false"
      DNS: 1.1.1.1,8.8.8.8
      DNS_IP_PREFERENCE: prefer-ipv4
      EGRESS_INTERFACE: eth0
      MODE: default

Environment variables

VariableDefaultDescription
SERVER_HOST0.0.0.0Server listen host
SERVER_PORT6333Server listen port for TCP and UDP
PSKgeneratedPre-shared key. If empty, a random key is generated and printed once at startup. Snell v6 requires 12 to 255 bytes
IPV6falseDeprecated Snell compatibility option. false maps to IPv4-only behavior unless DNS_IP_PREFERENCE is set
DNSemptyDNS servers, comma-separated
DNS_IP_PREFERENCEemptyOptional Snell v6 dns-ip-preference value: default, prefer-ipv4, prefer-ipv6, ipv4-only, or ipv6-only
EGRESS_INTERFACEemptyOptional Snell v6 outbound interface binding
MODEemptyOptional Snell v6 mode: default, unshaped, or unsafe-raw. If empty, Snell uses its upstream default
ARGSemptyDeprecated compatibility option. Prefer passing extra arguments after the image name
CONFIG_FILE/tmp/snell.confGenerated config file path inside the container

Surge client example

[Proxy]
Proxy = snell, SERVER_IP, 6333, psk=YOUR_PSK, version=6

Security notes

  • Use a strong explicit PSK in production.
  • The generated PSK is printed to container logs so the client can be configured. Treat logs as sensitive.
  • Provided PSK values are not printed, and the generated config path is logged with the key hidden.
  • Do not expose the service publicly without firewall rules or an explicit access policy.

Build locally

docker build \
  --build-arg VERSION=6.0.0rc \
  -t domizhang/snell:local .

Update policy

The Snell version is pinned in VERSION and Dockerfile. To update:

  1. Check the upstream Snell release notes.
  2. Update the VERSION file, ARG VERSION defaults, and the per-architecture SHA256 build arguments.
  3. Build and test the image.
  4. Tag the repository as vX.Y.Z to publish versioned tags.

License

This repository only builds a Docker image. Snell is distributed under its upstream license.

Tag summary

Content type

Image

Digest

sha256:9c495bf6e

Size

32 MB

Last updated

about 2 months ago

docker pull domizhang/snell