Preparation#
- Install docker
- Coexistence of Warp and Tor
- Nginx-formatted domain certificate and key, domain resolution to the server
SOCKS5 to QUIC#
docker run --rm --net=sswitch alpine ping socks5 # Record the IP of socks5
mkdir -p ~/app/hysteria && cd ~/app/hysteria && nano docker-compose.yml && nano ./hysteria.json
# Change the "socks5" in the json file to the IP corresponding to socks5 (such as 172.18.0.2)
# Apply for a certificate and upload it, rename it to my.pem my.key
sudo docker-compose up -d && sudo docker-compose logs
iptables -t nat -L # View the IP of the QUIC container
iptables -t nat -A DOCKER -p udp --dport 32768:61000 -j DNAT --to-destination 172.18.0.4:3234 # Imitate the operation of docker, map 32768:61000 to port 3234 of the QUIC container
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
{
"listen": ":3234",
"protocol": "udp",
"cert": "/home/ubuntu/my.crt",
"key": "/home/ubuntu/my.key",
"obfs": "26 random alphanumeric characters",
"up_mbps": 100,
"down_mbps": 100,
"resolver": "udp://1.1.1.1:53",
"resolve_preference": "46",
"socks5_outbound": {
"server": "socks5:5353"
}
}
QUIC to SOCKS5#
General configuration file#
{
"server": "domain corresponding to the certificate:32768-61000",
"obfs": "26 random characters",
"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 platform#
mkdir -p ~/app/hysteria && cd ~/app/hysteria && nano docker-compose.yml && nano ./hysteria.json
sudo docker-compose up -d && sudo docker-compose logs
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 platform#
Download the corresponding program file for your platform QUIC
Create a configuration file and the following run.bat file in the program directory
hysteria-windows-amd64.exe -c quic.json
Or the run.ps1 file
# set-executionpolicy remotesigned
# New-PSDrive HKCR Registry HKEY_CLASSES_ROOT
# Set-ItemProperty HKCR:\\Microsoft.PowerShellScript.1\\Shell '(Default)' 0
.\hysteria-windows-amd64.exe -c .\quic.json