Skip to content

Commit

Permalink
Fix mtg startup failure in due to the error in obtaining the public ip
Browse files Browse the repository at this point in the history
  • Loading branch information
ellermister authored Apr 5, 2024
1 parent 81c7307 commit f156301
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mtproxy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -424,10 +424,11 @@ function get_run_command(){
domain_hex=$(str_to_hex $domain)
client_secret="ee${secret}${domain_hex}"
local local_ip=$(get_local_ip)
public_ip=$(get_ip_public)

# ./mtg simple-run -n 1.1.1.1 -t 30s -a 512kib 0.0.0.0:$port $client_secret >/dev/null 2>&1 &
[[ -f "./mtg" ]] || (echo -e "提醒:\033[33m MTProxy 代理程序不存在请重新安装! \033[0m" && exit 1)
echo "./mtg run $client_secret $proxy_tag -b 0.0.0.0:$port --multiplex-per-connection 500 --prefer-ip=ipv6 -t $local_ip:$web_port"
echo "./mtg run $client_secret $proxy_tag -b 0.0.0.0:$port --multiplex-per-connection 500 --prefer-ip=ipv6 -t $local_ip:$web_port" -4 "$public_ip:$port"
else
curl -s https://core.telegram.org/getProxyConfig -o proxy-multi.conf
curl -s https://core.telegram.org/getProxySecret -o proxy-secret
Expand Down

0 comments on commit f156301

Please sign in to comment.