From 6b3a0b47aee954955e2e407bda7d1968aa599db0 Mon Sep 17 00:00:00 2001 From: Return <151555003+H-Return@users.noreply.github.com> Date: Wed, 22 May 2024 23:10:36 +0330 Subject: [PATCH] Download geodata --- install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index dbafd0f..cddd2f7 100644 --- a/install.sh +++ b/install.sh @@ -13,11 +13,13 @@ bash <(curl -fsSL https://get.hy2.sh/) >/dev/null 2>&1 # Step 2: Create hysteria directory and navigate into it mkdir -p /etc/hysteria && cd /etc/hysteria/ -# Step 3: Generate CA key and certificate +# Step 3: Generate CA key and certificate and download geo data echo "Generating CA key and certificate..." openssl ecparam -genkey -name prime256v1 -out ca.key >/dev/null 2>&1 openssl req -new -x509 -days 36500 -key ca.key -out ca.crt -subj "/CN=bing.com" >/dev/null 2>&1 - +echo "Downloading geo data..." +wget -O /etc/hysteria/geosite.dat https://raw.githubusercontent.com/Chocolate4U/Iran-v2ray-rules/release/geosite.dat >/dev/null 2>&1 +wget -O /etc/hysteria/geoip.dat https://raw.githubusercontent.com/Chocolate4U/Iran-v2ray-rules/release/geoip.dat >/dev/null 2>&1 # Step 4: Extract the SHA-256 fingerprint fingerprint=$(openssl x509 -noout -fingerprint -sha256 -inform pem -in ca.crt | sed 's/.*=//;s/://g')