Last updated on March 19, 2024 pm
准备工作
- 安装好 docker
- Warp 与 Tor 共存
- Nginx格式的域名证书和密钥,域名解析到服务器
SOCKS5 转 QUIC
1 2 3 4 5 6 7
| docker run --rm --net=sswitch alpine ping socks5 mkdir -p ~/app/hysteria && cd ~/app/hysteria && nano docker-compose.yml && nano ./hysteria.json
sudo docker-compose up -d && sudo docker-compose logs iptables -t nat -L iptables -t nat -A DOCKER -p udp --dport 32768:61000 -j DNAT --to-destination 172.18.0.4:3234
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| version: '3.9' services: hysteria: image: tobyxdd/hysteria restart: always ports: - '13234:3234/udp' volumes: - ./hysteria.json:/etc/hysteria.json - ./my.key:/home/ubuntu/my.key - ./my.pem:/home/ubuntu/my.crt command: ["server", "--config", "/etc/hysteria.json"] networks: default: external: true name: sswitch
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| { "listen": ":3234", "protocol": "udp", "cert": "/home/ubuntu/my.crt", "key": "/home/ubuntu/my.key", "obfs": "26位随机英文数字字符", "up_mbps": 100, "down_mbps": 100, "resolver": "udp://1.1.1.1:53", "resolve_preference": "46", "socks5_outbound": { "server": "socks5:5353" } }
|
QUIC 转 SOCKS5
通用配置文件
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| { "server": "证书对应的域名:32768-61000", "obfs": "前面的26位随机字符", "idle_timeout": 30, "hop_interval": 61, "up_mbps": 10, "down_mbps": 50, "socks5": { "listen": "0.0.0.0:1580" }, "http": { "listen": "0.0.0.0:8580" } }
|
Linux 平台
1 2
| mkdir -p ~/app/hysteria && cd ~/app/hysteria && nano docker-compose.yml && nano ./hysteria.json sudo docker-compose up -d && sudo docker-compose logs
|
1 2 3 4 5 6 7 8 9 10 11 12
| version: '3.9' services: hysteria: image: tobyxdd/hysteria restart: always ports: - '1580:1580' - '1580:1580/udp' - '8580:8580' volumes: - ./hysteria.json:/etc/hysteria.json command: ["--config", "/etc/hysteria.json"]
|
Windows 平台
下载对应平台的程序文件 QUIC
在程序目录创建配置文件和下面的 run.bat 文件
1
| hysteria-windows-amd64.exe -c quic.json
|
或者 run.ps1 文件
1 2 3 4
|
.\hysteria-windows-amd64.exe -c .\quic.json
|
【记录】SOCKS5 转 QUIC
https://hexo.limour.top/-ji-lu-SOCKS5-zhuan-QUIC