Added hysteria http3
This commit is contained in:
parent
0d12288a51
commit
8e368a9022
1 changed files with 68 additions and 18 deletions
86
yarx.sh
86
yarx.sh
|
|
@ -202,25 +202,75 @@ if [ $HYSTERIAYN = "Y" ] || [ $HYSTERIAYN = "y" ]; then
|
|||
read -p "Введите Ваш пароль от пользователя Hysteria: " HYSTERIAPASS
|
||||
read -p "Введите Ваш пароль от обфускатора Salamander: " SALAMANDERPASS
|
||||
read -p "Введите почту для уведомлений: " EMAILFORNOTIFICATIONS
|
||||
rm /etc/hysteria/config.yaml
|
||||
sudo tee /etc/hysteria/config.yaml <<EOF
|
||||
listen: :443
|
||||
|
||||
acme:
|
||||
domains:
|
||||
- $HYSTERIADOMEN
|
||||
email: $EMAILFORNOTIFICATIONS
|
||||
|
||||
obfs:
|
||||
type: salamander
|
||||
salamander:
|
||||
password: $SALAMANDERPASS
|
||||
|
||||
auth:
|
||||
type: password
|
||||
password: $HYSTERIAPASS
|
||||
read -p "Хотите использовать маскировку под HTTP3 и обычный сайт или обфускацию (H/O)?: " TYPEMASQ
|
||||
if [ $TYPEMASQ = "O" ] || [ $TYPEMASQ = "o" ]; then
|
||||
sudo rm /etc/hysteria/config.yaml
|
||||
sudo tee /etc/hysteria/config.yaml <<EOF
|
||||
listen: :443
|
||||
|
||||
acme:
|
||||
domains:
|
||||
- $HYSTERIADOMEN
|
||||
email: $EMAILFORNOTIFICATIONS
|
||||
|
||||
obfs:
|
||||
type: salamander
|
||||
salamander:
|
||||
password: $SALAMANDERPASS
|
||||
|
||||
auth:
|
||||
type: password
|
||||
password: $HYSTERIAPASS
|
||||
EOF
|
||||
sudo systemctl start hysteria-server.service
|
||||
elif [ $TYPEMASQ = "H" ] || [ $TYPEMASQ = "h" ]; then
|
||||
sudo rm /var/www/masq/index.html
|
||||
sudo tee /var/www/masq/index.html <<EOF
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Welcome to nginx!</title>
|
||||
<style>
|
||||
html { color-scheme: light dark; }
|
||||
body { width: 35em; margin: 0 auto;
|
||||
font-family: Tahoma, Verdana, Arial, sans-serif; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Welcome to nginx!</h1>
|
||||
<p>If you see this page, the nginx web server is successfully installed and
|
||||
working. Further configuration is required.</p>
|
||||
|
||||
<p>For online documentation and support please refer to
|
||||
<a href="http://nginx.org/">nginx.org</a>.<br/>
|
||||
Commercial support is available at
|
||||
<a href="http://nginx.com/">nginx.com</a>.</p>
|
||||
|
||||
<p><em>Thank you for using nginx.</em></p>
|
||||
</body>
|
||||
</html>
|
||||
EOF
|
||||
sudo rm /etc/hysteria/config.yaml
|
||||
sudo tee /etc/hysteria/config.yaml <<EOF
|
||||
listen: :443
|
||||
|
||||
acme:
|
||||
domains:
|
||||
- $HYSTERIADOMEN
|
||||
email: $EMAILFORNOTIFICATIONS
|
||||
|
||||
auth:
|
||||
type: password
|
||||
password: $HYSTERIAPASS
|
||||
|
||||
masquerade:
|
||||
type: file
|
||||
file:
|
||||
dir: /var/www/masq
|
||||
listenHTTP: :80
|
||||
listenHTTPS: :443
|
||||
forceHTTPS: true
|
||||
EOF
|
||||
sudo systemctl restart hysteria-server.service
|
||||
sudo systemctl enable hysteria-server.service
|
||||
sudo tee hysteria-client.yaml <<EOF
|
||||
server: $HYSTERIADOMEN:443
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue