一元网络论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 131|回复: 0

Building ALIST public access on DCloud mobile cloud in Hangzhou.

[复制链接]

3万

主题

3万

帖子

9万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
95751
发表于 2024-9-16 01:44:41 | 显示全部楼层 |阅读模式
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
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|一元网络论坛

GMT+8, 2024-11-25 16:18 , Processed in 0.107615 second(s), 19 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表