Skip to content

Commit

Permalink
add config uri for hysteria2
Browse files Browse the repository at this point in the history
  • Loading branch information
aleskxyz authored Sep 5, 2023
1 parent 5feb9b9 commit 0f0f52c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion reality-ezpz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1252,7 +1252,14 @@ function print_client_configuration {
client_config="${client_config}$([[ ${config[security]} == 'selfsigned' ]] && echo "&allow_insecure=1" || true)"
client_config="${client_config}#${username}"
elif [[ ${config[transport]} == 'hysteria2' ]]; then
client_config="hysteria2://"
client_config="hy2://"
client_config="${client_config}${users[${username}]}"
client_config="${client_config}:$(echo -n "${username}${users[${username}]}" | sha256sum | cut -d ' ' -f 1 | head -c 16)"
client_config="${client_config}@${config[server]}"
client_config="${client_config}:${config[port]}"
client_config="${client_config}/?&obfs-password=${config[service_path]}"
client_config="${client_config}$([[ ${config[security]} == 'selfsigned' ]] && echo "&allow_insecure=1" || true)"
client_config="${client_config}#${username}"
else
client_config="vless://"
client_config="${client_config}${users[${username}]}"
Expand Down

0 comments on commit 0f0f52c

Please sign in to comment.