UserPass Method

This commit is contained in:
H-Return
2024-06-05 19:40:12 +00:00
parent 03455bf3a8
commit ef197b3e16
2 changed files with 7 additions and 5 deletions

View File

@ -13,8 +13,10 @@
} }
}, },
"auth": { "auth": {
"type": "password", "type": "userpass",
"password": "$authpassword" "userpass": {
"default": "$authpassword"
}
}, },
"quic": { "quic": {
"initStreamReceiveWindow": 8388608, "initStreamReceiveWindow": 8388608,

View File

@ -82,7 +82,7 @@ jq --arg port "$port" \
.tls.key = "/etc/hysteria/ca.key" | .tls.key = "/etc/hysteria/ca.key" |
.tls.pinSHA256 = $sha256 | .tls.pinSHA256 = $sha256 |
.obfs.salamander.password = $obfspassword | .obfs.salamander.password = $obfspassword |
.auth.password = $authpassword | .auth.userpass.default = $authpassword |
.trafficStats.secret = $UUID | .trafficStats.secret = $UUID |
.outbounds[0].direct.bindDevice = $networkdef' /etc/hysteria/config.json > /etc/hysteria/config_temp.json && mv /etc/hysteria/config_temp.json /etc/hysteria/config.json .outbounds[0].direct.bindDevice = $networkdef' /etc/hysteria/config.json > /etc/hysteria/config_temp.json && mv /etc/hysteria/config_temp.json /etc/hysteria/config.json
@ -105,8 +105,8 @@ if systemctl is-active --quiet hysteria-server.service; then
echo "Generating URI Scheme..." echo "Generating URI Scheme..."
IP=$(curl -4 ip.sb) IP=$(curl -4 ip.sb)
IP6=$(curl -6 ip.sb) IP6=$(curl -6 ip.sb)
URI="hy2://$authpassword@$IP:$port?obfs=salamander&obfs-password=$obfspassword&pinSHA256=$sha256&insecure=1&sni=bts.com#Hysteria2-IPv4" URI="hy2://default:$authpassword@$IP:$port?obfs=salamander&obfs-password=$obfspassword&pinSHA256=$sha256&insecure=1&sni=bts.com#Hysteria2-IPv4"
URI6="hy2://$authpassword@[$IP6]:$port?obfs=salamander&obfs-password=$obfspassword&pinSHA256=$sha256&insecure=1&sni=bts.com#Hysteria2-IPv6" URI6="hy2://default:$authpassword@[$IP6]:$port?obfs=salamander&obfs-password=$obfspassword&pinSHA256=$sha256&insecure=1&sni=bts.com#Hysteria2-IPv6"
# Step 15: Generate and display QR Code in the center of the terminal # Step 15: Generate and display QR Code in the center of the terminal
cols=$(tput cols) cols=$(tput cols)
rows=$(tput lines) rows=$(tput lines)