项目地址
https://github.com/HyNetwork/hysteria/releases
服务端配置
1. 生成自签证书
1 2
| openssl ecparam -genkey -name prime256v1 -out ca.key openssl req -new -x509 -days 36500 -key ca.key -out ca.crt -subj "/CN=bing.com"
|
2. 配置服务端
创建 /etc/hysteria/config.json:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| listen: :9527 tls: cert: /etc/hysteria/ca.crt key: /etc/hysteria/ca.key
auth: type: password password: 123456
masquerade: type: proxy proxy: url: https://bing.com rewriteHost: true
|
3. 启动服务端
注意:需要开放对应的 UDP 端口(默认 9527)
客户端配置
1. 创建客户端配置
1 2 3 4 5 6 7 8 9 10 11
| server: server_ip:9527 auth: 123456
tls: insecure: true
socks5: listen: 127.0.0.1:1080
http: listen: 127.0.0.1:8080
|
2. 启动客户端
启动后会在本地开启:
- SOCKS5 代理:
127.0.0.1:1080
- HTTP 代理:
127.0.0.1:8080