Pages

Sunday, 25 August 2024

利用open-snell翻墙

 This is an unofficial open source port of https://github.com/surge-networks/snell.(已被原作者删除.可以参考fork: https://github.com/AustinZhou/snell)

An open source port of snell

Features

  • snell-server: v1, v2, v3

  • snell-client: v1, v2

snell-client is bug-fix-only, please consider clash for full feature opensource snell client

Build

Requirements

  • git

  • go 1.17+

Build Steps

Only tested on macOS.

# clone and enter the repo

make

# or `make server/client' to build snell-server/snell-client separately

The binaries are produced at ./build/snell-{server,client}

Usage

An ini file is needed (compatible with the offical port):

# snell.conf

# section "snell-client" is used by snell-client
[snell-client]
listen = 0.0.0.0:1234
server = 1.2.3.4:5678
psk = psk
obfs = tls
obfs-host = www.bing.com
version = 1 # default 2

# section "snell-server" is used by snell-client
[snell-server]
listen = 0.0.0.0:5678
psk = psk
obfs = tls

Start the snell-*:

./snell-{server,client} -c ./snell.conf

Docker image

The auto-built docker image is also available at ghcr.io/icpz/snell-server:latest and ghcr.io/icpz/snell-client:latest.

from https://github.com/icpz/open-snell 

(snell's documentation: https://manual.nssurge.com/others/snell.html)

-----

Snell 管理脚本

纯自用。

使用:

wget -O snell.sh --no-check-certificate https://git.io/Snell.sh && chmod +x snell.sh && ./snell.sh

注意:

  • 请手动放行防火墙相应端口。

from https://github.com/xOS/Snell 

------

snell

An encrypted proxy service program.

Highlights

  • Extreme performance.
  • Single binary with zero dependency.
  • A wizard to help you start.
  • Traffic obfuscating is embedded. (Only HTTP in the current version)
  • Proxy server will report remote errors to client if encounters. Clients may choose countermeasures for different scenarios.
  • Protocol is ready for multiple users ACL. (No implementation yet)
  • Protocol is ready for cipher/version auto-negotiation. (No implementation yet)

Quickstart

  1. Download the binary from the Release page.
  2. Decompress and execute the binary. A wizard will guide you to generate a new config.
  3. Re-execute the binary to start service.
  4. Add a proxy line in Surge (The latest beta version is required)

Proxy = snell, [SERVER ADDRESS], [GENERATED PORT], psk=[GENERATED PSK], obfs=http

Opens Source

We haven't decided whether to open source the project for complicated reasons.

from https://github.com/AustinZhou/snell 

------

Installation script of Snell v4.

Snell v4 Installation Script

Snell Protocol Official Manual

Install

bash -c "$(curl -sL https://raw.githubusercontent.com/sebersta/snell/main/snell.sh)"

or

bash -c "$(curl -sL https://mirror.ghproxy.com/https://raw.githubusercontent.com/sebersta/snell/main/snell.sh)"

Uninstall

bash -c "$(curl -sL https://raw.githubusercontent.com/sebersta/snell/main/rmsnell.sh)"

or

bash -c "$(curl -sL https://mirror.ghproxy.com/https://raw.githubusercontent.com/sebersta/snell/main/rmsnell.sh)"

 from https://github.com/sebersta/snell

-------

snell的一键安装脚本.

适用于64位Linux系统。

运行完毕后屏幕显示psk,默认端口号13254(我随手那么一按( ̀⌄ ́),按照标准填入Surge即可。

请使用root用户运行.

建议使用docker.

Debian & Ubuntu 用户请运行

wget --no-check-certificate -O snell.sh https://raw.githubusercontent.com/primovist/snell.sh/master/snell.sh
chmod +x snell.sh
./snell.sh

Centos & RedHat 用户请运行

wget --no-check-certificate -O snell.sh https://raw.githubusercontent.com/primovist/snell.sh/master/snell.centos.sh
chmod +x snell.sh
./snell.sh

首次安装默认端口号13254,如需修改请 在所有脚本运行结束后运行

nano /etc/snell/snell-server.conf
systemctl restart snell

自行修改。

当然你也可以用 vi ^o^

查看运行状态:

systemctl status snell

卸载方法:

wget --no-check-certificate -O uninstall-snell.sh https://raw.githubusercontent.com/primovist/snell.sh/master/uninstall-snell.sh
chmod +x uninstall-snell.sh
./uninstall-snell.sh 
from https://github.com/kkkbook/snell.sh 
-------------------------------------------------
Obfuscating Algorithm

HTTP
目前的 http 就是 simple-obfs(https://github.com/shadowsocks/simple-obfs) 的 http mode,可作如下验证:
./snell-server -c ./snell-server.conf &
obfs-server -s 0.0.0.0 -p 8787 -r 127.0.0.1:9898 --obfs=http

假定 snell-server.conf 内容如下:

$ cat ./snell-server.conf
[snell-server]
listen = 0.0.0.0:9898
psk = zzz

现在 surge 中添加代理test_snell = snell, [SERVER ADDRESS], 8787, psk=zzz, obfs=http可成功访问网络。

TLS
TLS 也就是 simple-obfs 的 tls mode,验证方式同上。


Build Demo
macOS:
brew update && brew install boost libsodium glog gflags cmake
# clone and cd into the repo
mkdir build && cd build
cmake .. && make

debian

apt update && apt install build-essential libboost-dev libsodium-dev libgoogle-glog-dev libgflags-dev cmake
# clone and cd into the repo
mkdir build && cd build
cmake .. && make

 

 

No comments:

Post a Comment