From d420dec21936fab7669291769d85918d33dfda12 Mon Sep 17 00:00:00 2001 From: ArmanTaheriGhaleTaki Date: Mon, 1 Jul 2024 05:09:44 +0330 Subject: [PATCH] chore(): change .env to best403unlocker.conf --- CONTRIBUTING.md | 2 +- README.md | 8 ++++---- bash.sh | 6 +++--- .env => best403unlocker.conf | 0 main.sh | 18 +++++++++--------- 5 files changed, 17 insertions(+), 17 deletions(-) rename .env => best403unlocker.conf (100%) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 37a9d1d..a51e4d5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,4 @@ -you can add new DNS servers in [.env](https://github.com/ArmanTaheriGhaleTaki/speed-test-dns/blob/main/.env) with the following format +you can add new DNS servers in [best403unlocker.conf](https://github.com/ArmanTaheriGhaleTaki/speed-test-dns/blob/main/best403unlocker.conf) with the following format ``` ######################### #https://example.com/ diff --git a/README.md b/README.md index 905c700..4982793 100644 --- a/README.md +++ b/README.md @@ -83,17 +83,17 @@ wget -c https://raw.githubusercontent.com/ArmanTaheriGhaleTaki/best403unlocker/m ## Docker -You only need **docker** installed and you can edit variables in [.env](https://github.com/ArmanTaheriGhaleTaki/best403unlocker/blob/main/.env) for your needs. +You only need **docker** installed and you can edit variables in [best403unlocker.conf](https://github.com/ArmanTaheriGhaleTaki/best403unlocker/blob/main/best403unlocker.conf) for your needs. ```sh -git clone --depth 1 https://github.com/ArmanTaheriGhaleTaki/best403unlocker/ && cd best403unlocker && docker build -t best403unlocker . && docker run --env-file .env best403unlocker +git clone --depth 1 https://github.com/ArmanTaheriGhaleTaki/best403unlocker/ && cd best403unlocker && docker build -t best403unlocker . && docker run --env-file best403unlocker.conf best403unlocker ``` or you can use built image uploaded in dockerhub - _for that case you need to use [.env](https://github.com/ArmanTaheriGhaleTaki/best403unlocker/blob/main/.env) at run time_ + _for that case you need to use [best403unlocker.conf](https://github.com/ArmanTaheriGhaleTaki/best403unlocker/blob/main/best403unlocker.conf) at run time_ ```sh -wget -c https://raw.githubusercontent.com/ArmanTaheriGhaleTaki/best403unlocker/main/.env && docker run --env-file .env armantaherighaletaki/best403unlocker +wget -c https://raw.githubusercontent.com/ArmanTaheriGhaleTaki/best403unlocker/main/best403unlocker.conf && docker run --env-file best403unlocker.conf armantaherighaletaki/best403unlocker ``` diff --git a/bash.sh b/bash.sh index 7b09325..d2b1fda 100644 --- a/bash.sh +++ b/bash.sh @@ -1,10 +1,10 @@ # Functions check_and_source_env() { if [ -z "$dns" ]; then - if [ ! -f ./.env ]; then - wget -c https://raw.githubusercontent.com/ArmanTaheriGhaleTaki/best403unlocker/main/.env + if [ ! -f ./best403unlocker.conf ]; then + wget -c https://raw.githubusercontent.com/ArmanTaheriGhaleTaki/best403unlocker/main/best403unlocker.conf fi - source .env + source best403unlocker.conf fi } diff --git a/.env b/best403unlocker.conf similarity index 100% rename from .env rename to best403unlocker.conf diff --git a/main.sh b/main.sh index 8a478dd..8c88def 100755 --- a/main.sh +++ b/main.sh @@ -1,5 +1,5 @@ #!/bin/bash -source .env +source best403unlocker.conf # Function to display the main menu main_menu() { @@ -38,8 +38,8 @@ best_dns_finder() { # Replace the value of file_url with the value of the file_url environment variable - if grep -q "^file_url=" ".env" ; then - sed -i "s|^file_url=.*|file_url=$file_url|" .env + if grep -q "^file_url=" "best403unlocker.conf" ; then + sed -i "s|^file_url=.*|file_url=$file_url|" best403unlocker.conf fi choices=$(whiptail --title "choose engine otherwise it runs on system" --checklist "Choose options:" 15 60 1 \ @@ -49,12 +49,12 @@ best_dns_finder() { selected_options=($(echo $choices | tr -d '"')) # Check if "docker" is in the selected options if [[ " ${selected_options[@]} " =~ " docker " ]]; then - docker run --env-file .env armantaherighaletaki/best403unlocker 2>&1 | tee log.txt + docker run --env-file best403unlocker.conf armantaherighaletaki/best403unlocker 2>&1 | tee log.txt status=$? if [ $status -eq 0 ] && grep -q permission log.txt; then password_checker - echo "$password" | sudo -S docker run --env-file .env armantaherighaletaki/best403unlocker | tee log.txt 2>&1 + echo "$password" | sudo -S docker run --env-file best403unlocker.conf armantaherighaletaki/best403unlocker | tee log.txt 2>&1 elif [ $status -eq 0 ]; then whiptail --title "Error" --yesno "An error occurred. See log.txt for more info.\nDo you want to try again?" 15 60 status=$? @@ -90,8 +90,8 @@ download_file_with_best_dns() { # Replace the value of file_url with the value of the file_url environment variable - if grep -q "^file_url=" ".env" ; then - sed -i "s|^file_url=.*|file_url=$file_url|" .env + if grep -q "^file_url=" "best403unlocker.conf" ; then + sed -i "s|^file_url=.*|file_url=$file_url|" best403unlocker.conf fi save_filepath=$(echo "$file_url" | grep -o '[^/]*$') save_filepath=$HOME/Downloads/$save_filepath @@ -108,12 +108,12 @@ download_file_with_best_dns() { selected_options=($(echo $choices | tr -d '"')) # Check if "docker" is in the selected options if [[ " ${selected_options[@]} " =~ " docker " ]]; then - docker run --env-file .env armantaherighaletaki/best403unlocker 2>&1 | tee log.txt + docker run --env-file best403unlocker.conf armantaherighaletaki/best403unlocker 2>&1 | tee log.txt status=$? if [ $status -eq 0 ] && grep -q permission log.txt; then password_checker - echo "$password" | sudo -S docker run --env-file .env armantaherighaletaki/best403unlocker | tee log.txt 2>&1 + echo "$password" | sudo -S docker run --env-file best403unlocker.conf armantaherighaletaki/best403unlocker | tee log.txt 2>&1 fi else