这里我选用自签证书
mkdir /root/hysteria && touch /root/hysteria/hysteria.yaml && cd /root/hysteria
openssl req -x509 -nodes -newkey ec:<(openssl ecparam -name prime256v1) -keyout /root/hysteria/server.key -out /root/hysteria/server.crt -subj "/CN=bing.com" -days 36500
cat > /root/hysteria/hysteria.yaml <<EOF
listen: :4431
tls:
cert: /etc/hysteria/server.crt
key: /etc/hysteria/server.key
auth:
type: password
password: 12345678
masquerade:
type: proxy
proxy:
url: https://bing.com/
rewriteHost: true
EOF
docker run -dt --network=host --restart=always --name hysteria -v /root/hysteria/:/etc/hysteria/ tobyxdd/hysteria server -c /etc/hysteria/hysteria.yaml