|  | 
 
| This is the translated text into English: "The first tool material 
 1 alist installation package, select Android arm64
 https://github.com/alist-org/alist/releases
 
 2 mt manager
 
 
 Second step of operation (first need to root before):
 
 Firstly open mt manager and enter terminal emulator
 Save the following script as .sh file and execute it, get the external IP and port
 #!/bin/bash
 
 RED='\033[0;31m'
 GREEN='\033[0;32m'
 YELLOW='\033[0;33m'
 NC='\033[0m' # No Color
 
 If there is not ID - u equal to 0, then echo -e "${RED}Root?${NC}"
 exit
 
 Function install() {
 kill httpd
 rm -rf /data/139
 mkdir /data/139
 wget -q -O /data/139/httpd "https://gitee.com/ewf-9/BiJi/raw/master/%E4%BA%91%E6%89%8B%E6%9C%BA/httpd/httpd"
 chmod 777 /data/139/httpd
 /data/139/httpd -p 10003
 httpdstatus=$(ps -ef | grep httpd | grep -v grep | awk '{print $2}')
 if [[ $httpdstatus ]]; then
 echo -e "${GREEN} httpd started successfully${NC}"
 else
 echo -e "${RED} httpd start failed${NC}"
 uninstall
 exit
 fi
 }
 
 function uninstall() {
 echo -e "======Delete environment by pressing Enter======"
 read
 kill httpd
 rm -rf /data/139
 }
 
 echo -e "=====Install environment====="
 install
 ip=`curl -s "http://182.254.116.116/d?dn=myip.ipip.net&clientip=1"|sed 's/|/ /g'|awk '{print $2}'`
 #ip=$(curl -s -4 icanhazip.com)
 echo -e " Current IP: ${GREEN}${ip}${NC}"
 echo " Start to detect port"
 echo -e "=====Wait for a while===="
 for a in {000..999}; do
 a="10${a}"
 url="http://${ip}
 
  {a}"
 status=$(curl --connect-timeout 0.1 --max-time 0.1 -o /dev/null -s -w "%{http_code}" "${url}")
 if [[ ${status} == '404' ]]; then
 port=${a}
 break
 fi
 done
 if [[ ${port} ]]; then
 echo -e " Port: 10002 ---(${GREEN}$((${port} - 1))${NC})"
 echo -e " Port: 10003 ---(${GREEN}${port}${NC})"
 echo -e " Port: 10004 ---(${GREEN}$((${port} + 1))${NC})"
 else
 echo '========================'
 echo -e "${RED}No available port found${NC}"
 fi
 uninstall
 
 
 
 Any download the alist program, put in any directory under any directory. For example /data/alist/ directory down
 
 cd /data/alist/
 
 alist serve
 
 Then modify in /data/alist/ directory below find the configuration file change the port to 10002
 And use the previously obtained external IP and port access
 QQ group: 907879982
 | 
 |