diff --git a/Others/hysteria2/服务端-容器启动hysteria2.md b/Others/hysteria2/服务端-容器启动hysteria2.md index 5e31fa6..cb41b9b 100644 --- a/Others/hysteria2/服务端-容器启动hysteria2.md +++ b/Others/hysteria2/服务端-容器启动hysteria2.md @@ -24,4 +24,24 @@ masquerade: rewriteHost: true listenHTTPS: :443 EOF -``` \ No newline at end of file +``` + +## 启动 +```shell +docker pull tobyxdd/hysteria +docker run -td --restart always --name hysteria2 --network=host -v /etc/hysteria2/hysteria2.yaml:/etc/hysteria2.yaml tobyxdd/hysteria -c /etc/hysteria2.yaml server +``` + +## 服务器放开443/udp,443/tcp +``` +# 若为云上环境,安全组放开即可 +# ubuntu +ufw allow 443/udp +ufw allow 443/tcp + +# centos +firewall-cmd --zone=public --add-port=443/tcp --permanent +firewall-cmd --zone=public --add-port=443/udp --permanent + +firewall-cmd --reload +```