Hysteria2 安装
安装
使用安装脚本
1
| bash <(curl -fsSL https://get.hy2.sh/)
|
之后修改配置/etc/hysteria/config.yaml, 分为有域名和自签证书两种方案。
自有域名
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| listen: :443 speedTest: true
bandwidth: up: 1 gbps down: 1 gbps
acme: domains: - domain.org email: youemail@mail.com
auth: type: password password: password
masquerade: type: proxy proxy: url: https://bing.com/ rewriteHost: true
|
客户端 sni 填域名。
自签证书
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| listen: :443 speedTest: true
tls: cert: xxx.cer key: xxx.key
auth: type: password password: password sniGuard: disable masquerade: type: proxy proxy: url: https://bing.com/ rewriteHost: true
|
客户端 sni 填 bing.com。
自签证书
1
| openssl req -x509 -nodes -newkey ec:<(openssl ecparam -name prime256v1) -keyout ./server.key -out ./server.crt -subj "/CN=bing.com" -days 36500
|