Hysteria2节点搭建,满载宽带,拯救垃圾线路!最大限度提升稳定性!第二代歇斯底里Hysteria2节点搭建教程!


一、准备工作

1、VPS一台,重置好 Dibian系统,看清楚是Dibian系统

2、不需要域名

3、使用 Finalshell SSH工具

Finalshell下载地址:点此下载 (支持:windows MacOS Linux)

5、V2rayN下载地址:点此打开

6、梦歌自用VPS官网:点此进入


二、更新 VPS 系统安装所需组件

apt update -y
apt install curl sudo -y

三、安装Hysteria2一键脚本

wget -N --no-check-certificate https://raw.githubusercontent.com/flame1ce/hysteria2-install/main/hysteria2-install-main/hy2/hysteria.sh && bash hysteria.sh

四、Hysteria2相关命令

#启动Hysteria2
systemctl start hysteria-server.service
#查看Hysteria2状态
systemctl status hysteria-server.service
#设置开机自启
systemctl enable hysteria-server.service
#重启Hysteria2
systemctl restart hysteria-server.service
#停止Hysteria2
systemctl stop hysteria-server.service
#查看日志
journalctl -u hysteria-server.service

五、部分厂商VPS如搭建完Hysteria2无法正常启动,请执行如下命令添加私钥的读写权限完成之后执行重启Hysteria2命令,再执行查看Hysteria2状态命令,如果启动成功即可!

chmod +rw /root/private.key

Hysteria2相关命令

#重启Hysteria2
systemctl restart hysteria-server.service
#查看Hysteria2状态
systemctl status hysteria-server.service

六、部分厂商VPS如搭建完成后无法正常使用,请依次在 Finalshell 执行如下命令放行端口即可,以下命令适用于 Dibian 系统

安装iptables(通常系统都会自带,如果没有就需要安装)

apt-get update
apt-get install iptables

例如要放行8888端口

iptables -I INPUT -p tcp --dport 8888 -j ACCEPT

然后保存放行规则

iptables-save

设置完就已经放行了指定的端口,但重启后会失效,下面设置持续生效规则;

安装iptables-persistent

apt-get install iptables-persistent

保存规则持续生效

netfilter-persistent save
netfilter-persistent reload

设置完成后指定端口就会持续放行了;


PS:如果问题详见本期教程视频!

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注