Running a Snowflake on Debian 11

Running a Snowflake

1. Install golang

bash 复制代码
wget https://go.dev/dl/go1.21.4.linux-amd64.tar.gz
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.21.4.linux-amd64.tar.gz
echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrc
source ~/.bashrc
go version
bash 复制代码
ed2k://|file|go1.21.4.linux-amd64.tar.gz|66615271|E68373CE54C547E2D9BEF41297231176|/ 
  1. Install Snowflake
bash 复制代码
git clone https://git.torproject.org/pluggable-transports/snowflake.git
git branch -a
git checkout remotes/origin/renovate/github.com-aws-aws-sdk-go-v2-config-1.x
cd snowflake/proxy
go build
  1. Run

./proxy --verbose

You should see output indicating that the pr0xy is running and communicating with the broker.

  1. create a systemd service.

sudo vim /etc/systemd/system/snowflake-proxy.service

bash 复制代码
[Unit]
Description=Snowflake Network
After=network.target

[Service]
ExecStart=/home/linuxuser/snowflake/proxy/proxy
Restart=always
User=linuxuser
WorkingDirectory=/home/linuxuser/snowflake/proxy

[Install]
WantedBy=multi-user.target

sudo systemctl daemon-reload

sudo systemctl enable snowflake-proxy

sudo systemctl start snowflake-proxy

sudo systemctl status snowflake-proxy

  1. Set firewall
bash 复制代码
sudo ufw allow 3478/udp
sudo ufw allow 443/udp
sudo ufw allow 10000:60000/udp
sudo ufw reload
bash 复制代码
sudo iptables -I INPUT 7 -p udp --dport 10000:65535 -j ACCEPT
sudo iptables -I OUTPUT 10 -p udp --sport 10000:65535-j ACCEPT
sudo /sbin/iptables -L OUTPUT -v --line-numbers
sudo /sbin/iptables -L INPUT -v --line-numbers
sudo apt-get install netfilter-persistent
sudo netfilter-persistent save
# sudo iptables-save | sudo tee /etc/iptables/rules.v4
  1. Verify

journalctl -u snowflake-proxy -f

curl -4 ifconfig.me

webrtc test page

sudo iftop -i enp1s0 -P

  1. Troubleshooting
  • Verify the process is running (ps aux | grep proxy)
  • Check logs for errors (journalctl -u snowflake-proxy)
  • Run it manually for debugging (./proxy -verbose)
  • Confirm UDP port binding (ss -lunp | grep proxy)
  • Allow UDP traffic through firewall
  • Try running it with -relay to see the assigned port

$ netstat -tulnp

an entry looked like:

udp 0 0 0.0.0.0:41730 0.0.0.0:* 50767/proxy

"Config Bridge" -> "snowflake" -> "Provide a Bridge I know"

snowflake x.x.x.x:41730

x.x.x.x is your VPS IP address

$ sudo iftop -i enp1s0 -P # Adjust "enp1s0" based on your network interface

sudo iptables -t nat -L PREROUTING --line-numbers -v -n

sudo iptables -A OUTPUT -p udp --sport 34672 -j ACCEPT

sudo iptables -A INPUT -p udp --dport 34672 -j ACCEPT

sudo iptables -A OUTPUT -p tcp --sport 34662 -j ACCEPT

sudo iptables -A INPUT -p tcp --dport 34662 -j ACCEPT

sudo /sbin/iptables -L OUTPUT -v --line-numbers

sudo /sbin/iptables -L INPUT -v --line-numbers

sudo apt-get install netfilter-persistent

sudo netfilter-persistent save

相关推荐
wgc2k5 分钟前
Java游戏服务器开发流水账(4)游戏的数据持久化
java·服务器·游戏
chennalC#c.h.JA Ptho7 分钟前
archlinux 详解系统层面
linux·经验分享·笔记·系统架构·系统安全
R-sz12 分钟前
如何创建伪服务器,伪接口
运维·服务器
python算法(魔法师版)13 分钟前
Docker容器启动失败?无法启动?
linux·运维·nginx·docker·容器
酷爱码14 分钟前
Ubuntu日志文件清空的三种方式
linux·运维·ubuntu
狄加山6754 小时前
Linux Input子系统与驱动开发实战
linux·运维·驱动开发
小刘|4 小时前
对称加密以及非对称加密
linux·运维·网络
Levin__NLP_CV_AIGC6 小时前
更新 / 安装 Nvidia Driver 驱动 - Ubuntu - 2
linux·运维·ubuntu
DLR-SOFT6 小时前
Windows远程访问Ubuntu的方法
linux·运维·ubuntu
咸鱼2333号程序员6 小时前
Linux ifconfig命令详解
linux·服务器·网络