Debian & Ubuntu 上部署 shadowsocks-rust 服务端

本文最后更新于 2026 年 4 月 26 日


本文以 Debian 13 / Ubuntu 24.04 LTS 系统为例,介绍如何部署 shadowsocks-rust 服务端。同样适用于其他基于 Debian 的发行版。

注:请先参照 Debian & Ubuntu 服务器的初始化配置 一文对服务器进行必要配置。本文以 sammy 用户为例,默认已完成初始化配置。


准备

  • 一台拥有公网 IP 的服务器(例如 BandwagonHostVultr 等 VPS)
  • 基础 Linux 操作知识,了解 vim 编辑器的基本用法

关于加密方式的选择

shadowsocks-rust 目前支持两代 AEAD 加密:

旧版 AEAD(仍可用,但不再推荐):aes-256-gcmchacha20-ietf-poly1305 等。存在重放过滤器误报率随时间增长、无 UDP 重放保护等已知问题。

AEAD-2022(SIP022,强烈推荐)2022-blake3-aes-256-gcm2022-blake3-chacha20-poly1305 等。使用 BLAKE3 派生会话子密钥,内置完整的重放保护和时间戳校验,性能与安全性均优于旧版。密钥必须是符合算法长度要求的 Base64 编码随机密钥,不再支持自定义明文密码。

建议:如果客户端支持(shadowsocks-rust、sing-box、Clash.Meta/mihomo 等均已支持),一律使用 2022-blake3-aes-256-gcm。如果客户端仅支持旧版 AEAD(如部分老旧移动客户端),退而使用 aes-256-gcm

Read More

Software Product Management

Last updated on 26.05.2022.


Business Model

Introduction to Business Models

  • What does a business model describe for a company?
    • all the parts of the company necessary to create, deliver and capture the value
  • What are the nine building blocks of the business model canvas?
    • Customer Segments
    • Value Propositions
    • Channels
    • Customer Relationships
    • Revenue Streams
    • Key Resources
    • Key Activities
    • Key Partnerships
    • Cost Structure

Read More

Debian 搭建 WireGuard 服务端

本文以 Debian 10 为例,介绍如何搭建 WireGuard 服务端,并说明对应的客户端搭建方法和配置文件的格式。Ubuntu 20.04 系统与之大同小异。

注:请先参照 Debian & Ubuntu 服务器的初始化配置 一文对服务器进行各种必要的配置。本文以 sammy 用户为例,进行 WireGuard 的部署,并默认已按初始化配置文章对服务器进行了配置。


准备工作

安装步骤所需软件包:

1
2
sudo apt update
sudo apt install apt-transport-https vim -y

安装 WireGuard

添加 backports 源:

1
sudo sh -c "echo 'deb https://deb.debian.org/debian buster-backports main contrib non-free' > /etc/apt/sources.list.d/buster-backports.list"

安装软件包:

1
2
sudo apt update
sudo apt -t buster-backports install wireguard -y

Read More

为 Snap 设置代理

由于 snap 在部分地区下载缓慢,使用代理则可获得理想速度。本文将以 Ubuntu 系统为例,介绍如何为 snap 设置代理。


执行命令:

1
sudo systemctl edit snapd.service

添加以下内容,以监听在 1080 端口上的 socks5 代理为例:

1
2
3
[Service]
Environment="http_proxy=socks5://127.0.0.1:1080"
Environment="https_proxy=socks5://127.0.0.1:1080"

重新加载 snapd 服务:

1
2
sudo systemctl daemon-reload
sudo systemctl restart snapd.service

Read More

Mastodon