From 67d37552f40e914e7a7f8fe060778b27b20547c1 Mon Sep 17 00:00:00 2001 From: rebecca554owen Date: Wed, 24 Jan 2024 18:34:43 +0800 Subject: [PATCH 1/2] fix provider error --- mtproxy-entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mtproxy-entrypoint.sh b/mtproxy-entrypoint.sh index 85d9fd8..7d458aa 100644 --- a/mtproxy-entrypoint.sh +++ b/mtproxy-entrypoint.sh @@ -25,7 +25,7 @@ set_config(){ sed -i 's/domain="[0-9A-z\.\-]*"/domain="'$domain'"/' $mtp_config fi if [ "$provider" ] && [[ "$provider" =~ ^[1-2]$ ]]; then - sed -i 's/provider=[0-9]\+/cat /='$provider'/' $mtp_config + sed -i 's/provider=[0-9]\+/provider="'$provider'"/' $mtp_config fi } From 157f060097de68489e80d61b13d9875e45356218 Mon Sep 17 00:00:00 2001 From: rebecca554owen Date: Wed, 24 Jan 2024 18:37:58 +0800 Subject: [PATCH 2/2] Update mtproxy.sh --- mtproxy.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mtproxy.sh b/mtproxy.sh index 1d5d48d..68bd464 100644 --- a/mtproxy.sh +++ b/mtproxy.sh @@ -223,9 +223,9 @@ do_install() { if [[ "$mtg_provider" == "mtg" ]]; then local arch=$(get_architecture) - local mtg_url=https://github.com/9seconds/mtg/releases/download/v1.0.11/mtg-1.0.11-linux-amd64.tar.gz + local mtg_url=https://github.com/9seconds/mtg/releases/download/v1.0.11/mtg-1.0.11-linux-$arch.tar.gz wget $mtg_url -O mtg.tar.gz - tar -xzvf mtg.tar.gz mtg-1.0.11-linux-amd64/mtg --strip-components 1 + tar -xzvf mtg.tar.gz mtg-1.0.11-linux-$arch/mtg --strip-components 1 [[ -f "./mtg" ]] && ./mtg && echo "Installed for mtg" else