Load SNI From env
This commit is contained in:
@ -9,11 +9,9 @@ define_colors() {
|
||||
NC='\033[0m' # No Color
|
||||
}
|
||||
|
||||
# Function to get system information
|
||||
get_system_info() {
|
||||
OS=$(lsb_release -d | awk -F'\t' '{print $2}')
|
||||
ARCH=$(uname -m)
|
||||
# Fetching detailed IP information in JSON format
|
||||
IP_API_DATA=$(curl -s https://ipapi.co/json/ -4)
|
||||
ISP=$(echo "$IP_API_DATA" | jq -r '.org')
|
||||
IP=$(echo "$IP_API_DATA" | jq -r '.ip')
|
||||
@ -53,3 +51,13 @@ check_version() {
|
||||
echo -e "${cyan}Bug squashing party!${yellow} Update for the best invitation.${NC}"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
load_hysteria2_env() {
|
||||
if [ -f /etc/hysteria/hysteria2.env ]; then
|
||||
export $(grep -v '^#' /etc/hysteria/hysteria2.env | xargs)
|
||||
else
|
||||
echo "Error: hysteria2.env file not found. Using default SNI 'bts.com'."
|
||||
SNI="bts.com"
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user