Hysteria2|Second Generation Hysteria Node Setup Tutorial

image

One: Introduction

Hysteria2 is a feature-rich network tool optimized for harsh network environments (bidirectional acceleration), such as satellite networks, crowded public Wi-Fi, connecting to foreign servers from China, etc. Based on a modified version of the QUIC protocol.

It effectively solves the biggest pain point when setting up a robust magical server—line instability.

  1. Direct CT connection to JP NTT data center + Cloudflare Warp, with no optimizations for the 163 line, tested on Speedtest during evening peak hours from 20-23.

  2. No optimization for mainland China lines, Los Angeles shockhosting data center, 1c128m ovznat 4k@p60:

    image

Two: Advantages

Click me to expand and view the full feature list
  • Supports the three masquerade modes provided by hysteria2 and offers highly customizable masquerade content
  • Provides four certificate import methods:
    • ACME HTTP challenge
    • ACME DNS
    • Self-signed certificate for any domain
    • Local certificate
  • Supports viewing hysteria2 server statistics via SSH terminal:
    • User traffic statistics
    • Number of online devices
    • Information on currently active connections
  • Provides domain routing rules implemented solely through ACL, as well as blocking requests for corresponding domains
  • Supports all mainstream operating systems and architectures currently available:
    • Operating systems: Arch, Alpine, RHEL, Centos, AlmaLinux, Debian, Ubuntu, Rocky Linux, etc.
    • Architectures: x86_64, i386|i686, aarch64|arm64, armv7, s390x, ppc64le
  • Supports generating QR codes for hy2 share links and outputting them to the terminal, reducing the tedious copy-paste process
  • Supports generating hysteria2 original client configuration files, retaining the fullest set of client parameters
  • Uses high-priority startup for hysteria2 processes to maintain speed priority
  • Port hopping and hysteria2 daemon use self-start scripts for management, providing stronger extensibility and compatibility
  • Retains the installation script for hysteria v1, allowing users to choose
  • Calculates BDP (Bandwidth Delay Product) to adjust QUIC parameters, adapting to a variety of demand scenarios
  • Supports adding SOCKS5 outbound, including automatic addition of Warp outbound functionality
  • Updates promptly, with adaptations completed within 24 hours after hysteria2 updates

Three: Usage

Pull and Install

1
2
su - root #switch to root user.
bash <(curl -fsSL https://git.io/hysteria.sh)

Configuration Process

After the first installation: The hihy command brings up the menu. If the hihy script has been updated, execute option 9 to get the latest configuration.

Supports directly invoking the corresponding function via numeric index, for example, hihy 5 will restart hysteria2.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
-------------------------------------------
|********** Hi Hysteria **********|
|********** Author: emptysuns **********|
|********** Version: 1.0.1 **********|
-------------------------------------------
Tips: hihy command to run this script again.
.............................................
###############################
.....................
1) Install hysteria2
2) Uninstall
.....................
3) Start
4) Pause
5) Restart
6) Running status
.....................
7) Update Core
8) View current configuration
9) Reconfigure
10) Switch IPv4/IPv6 priority
11) Update hihy
12) Domain routing/ACL management
13) View hysteria2 statistics
14) View real-time logs
15) Add SOCKS5 outbound [supports automatic configuration of Warp]
###############################
0) Exit
.............................................
Please select:

hihy

References: