Hysteria2 install script
Now that Hysteria2 is officially released, there is a Hysteria2 install script. This post demonstrates the install process using the official script.
Hysteria2 uses a custom version of the QUIC (Quick UDP Internet Connections) protocol to deliver unparalleled performance over unreliable or lossy networks. The protocol is designed to masquerade as standard HTTP/3 traffic, making it difficult to detect and block without widespread collateral damage. Hysteria2 is almost a complete rewrite of the original Hysteria, with a new protocol and new features. Version 2 documentation is at https://v2.hysteria.network. Hysteria2 is not compatible with the original Hysteria, so users must choose either version 1 or version 2 for both client and server.
Linux server
You will need a server, a domain name, and a hostname DNS A
record (or AAAA
or IPv6).
Open ports tcp/80
, tcp/443
, and udp/443
in the server firewall. Note that Hysteria uses UDP.
Install Hysteria on the server using script provided by the Hysteria developers:
1 | bash <(curl -fsSL https://get.hy2.sh) |
Edit the server configuration file at /etc/hysteria/config.yaml
using an editor such as vi
or nano
. Specify your server hostname, your email, and your choice of password (or use the default generated by the install script). Optionally you can also change the masquerade URL. See the Hysteria2 documentation.
1 | # listen: :443 |
Save the file.
Start your Hysteria server with:
1 | systemctl start hysteria-server |
Configure Hysteria to start on system boot with:
1 | systemctl enable hysteria-server |
Windows client
Download the latest Hysteria for Windows from https://github.com/apernet/hysteria/releases. The file you need for most Windows PCs will be hysteria-windows-amd64.exe
.
Create a configuration file config.yaml
in the same directory as hysteria-windows-amd64.exe
, which by default will be Downloads
.
Make the client config.yaml
match your server address and password, and your bandwidth capabilities. For example:
1 | server: vps4.example.com:443 |
See the documentation for details of the client configuration file.
Open a Command Prompt window and change into your Downloads
directory.
1 | cd Downloads |
Optionally set the log level:
1 | set HYSTERIA_LOG_LEVEL=debug |
Start the program with the configuration file config.yaml
:
1 | .\hysteria-windows-amd64.exe |
Leave the Command Prompt window open with Hysteria running in it.
Now either proxy an individual browser to 127.0.0.1
port 10808
or set the Windows system proxy (Settings > Network & Internet > Proxy > Manual proxy setup).