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

相关推荐
苏-言16 分钟前
深入核心:一步步手撕Tomcat搭建自己的Web服务器
服务器·前端·tomcat
烛.照10340 分钟前
Linux中安装rabbitMQ
linux·rabbitmq
Two_brushes.1 小时前
【Linux】文件描述符
linux·服务器
你好呀我是裤裤2 小时前
Linux:指令大全(二)
linux·运维·服务器
丢丢丢丢丢丢~3 小时前
在 Debian/Ubuntu 系统上,永久固定网口的IP地址
运维·ubuntu·debian
zhangzhangkeji3 小时前
(9) 上:学习与验证 linux 里的 epoll 对象里的 EPOLLIN、 EPOLLHUP 与 EPOLLRDHUP 的不同
linux·网络·epoll 标志
我们的五年3 小时前
【Linux网络编程】:URL(encode),HTTP协议,telnet工具
linux·服务器·网络·c++·网络协议·http
biubiubiu07063 小时前
关于maven
java·linux·maven
Roadinforest4 小时前
结合 vim-plug 安装并使用 Gruvbox 主题教程
linux·编辑器·vim