更新 Others/hysteria2/服务端-容器启动hysteria2.md

This commit is contained in:
iProbe 2024-06-12 16:08:23 +08:00
parent 76c8daf2c2
commit be718f5ad6

View file

@ -24,4 +24,24 @@ masquerade:
rewriteHost: true rewriteHost: true
listenHTTPS: :443 listenHTTPS: :443
EOF EOF
``` ```
## 启动
```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
```