Warp 转 SOCKS5
申请 Warp 账户
下载 wgcf
wget https://github.com/ViRb3/wgcf/releases/download/v2.2.15/wgcf\_2.2.15\_linux\_amd64 -O wgcf && chmod +x wgcf
./wgcf register
./wgcf generate 拷贝内容如下:
1 |
|
Warp 转 SOCKS5
1 |
|
1 |
|
sudo docker network create warp
mkdir -p ~/app/socks5 && cd ~/app/socks5 && nano docker-compose.yml
nano ./config.json
sudo docker-compose up -d && sudo docker-compose logs
# sudo docker-compose down
SOCKS5 转 hysteria
1 |
|
1 |
|
mkdir -p ~/app/hysteria && cd ~/app/hysteria
wget https://raw.githubusercontent.com/apernet/hysteria/master/docker-compose.yaml
nano docker-compose.yml
nano ./hysteria.json
sudo docker-compose up -d && sudo docker-compose logs
sudo docker exec -it hysteria apk add curl
sudo docker exec -it hysteria curl –socks5 socks5:20808 –proxy-user limour:my-password http://myip.ipip.net
sudo docker exec -it hysteria curl –socks5 socks5:20808 –proxy-user limour:my-password https://api.ipify.org/?format=json
sudo docker exec -it hysteria ping socks5
将json文件里的socks5:20808中的socks5改为socks5对应的ip(如172.18.0.2)
sudo docker-compose restart
hysteria 端口跳跃
iptables -t nat -L
模仿 docker 的操作,将 10000:60000 都映射到 hysteria 容器的3234端口
iptables -t nat -A DOCKER -p udp –dport 10000:60000 -j DNAT –to-destination 172.18.0.2:3234
hysteria 客户端
1 |
|
1 |
|
mkdir -p ~/app/hysteria && cd ~/app/hysteria && nano docker-compose.yml
nano ./hysteria.json
sudo docker-compose up -d && sudo docker-compose logs
# sudo docker-compose down
curl –socks5 127.0.0.1:1580 http://myip.ipip.net
# sudo docker-compose restart && sudo docker-compose logs
curl –socks5 127.0.0.1:1580 https://api.ipify.org/?format=json