Linux部署Hysteria

By | 2022-05-07

Linux部署Hysteria

创建并切换至Hysteria存放文件夹

mkdir hy
cd hy

下载Hysteria服务端

wget https://github.com/HyNetwork/hysteria/releases/download/v1.0.3/hysteria-linux-amd64

设置执行权限:

chmod 755 hysteria-linux-amd64

自签证书:

生成私钥:

openssl ecparam -genkey -name prime256v1 -out ca.key

生成证书:

openssl req -new -x509 -days 36500 -key ca.key -out ca.crt  -subj "/CN=bing.com"

Hysteria服务端配置:

{
  "listen": ":9527",
  "cert": "/root/hy/ca.crt",
  "key": "/root/hy/ca.key",
  "obfs": "password"
}

关闭防火墙:

ufw disable

服务端后台运行:

nohup ./hysteria-linux-amd64 server

Hysteria客户端配置:

{
  "server": "ip:port",
  "obfs": "password",
  "up_mbps": 20,
  "down_mbps": 100,
  "insecure": true,
  "socks5": {
    "listen": "127.0.0.1:1080"
  },
  "http": {
    "listen": "127.0.0.1:1081"
  }
}

下载windows客户端

https://github.com/HyNetwork/hysteria/releases/download/v1.0.3/hysteria-tun-windows-6.0-amd64.exe

windows运行hysteria客户端,命令行执行:

hysteria-tun-windows-6.0-amd64.exe client