第五步 蜗居在lxc里的Alist和DDNS - cooip-jm/About-openwrt GitHub Wiki
lxc-create --name Alist --template download -- --dist debian --release bookworm --arch arm64 --server mirrors.bfsu.edu.cn/lxc-images

nano /var/lib/lxc/Alist/config
# Distribution configuration
lxc.include = /usr/share/lxc/config/common.conf
lxc.arch = linux64
# Container specific configuration
lxc.apparmor.profile = generated
lxc.apparmor.allow_nesting = 1
lxc.rootfs.path = dir:/var/lib/lxc/Alist/rootfs
lxc.uts.name = Alist
# Network configuration
lxc.net.0.type = veth
lxc.net.0.link = vmbr0
lxc.net.0.flags = up
lxc-start Alist
lxc-attach Alist
换源
https://mirrors.bfsu.edu.cn/help/debian/

vi /etc/apt/sources.list

安装基础应用
apt update && apt upgrade -y && apt install -y openssh-server nano cron curl wget apt-transport-https ca-certificates
nano /etc/ssh/sshd_config
passwd
curl http://v6.sync.afraid.org/u/你的token/
crontab -e
https://alist.nn.ci/zh/guide/install/script.html
curl -fsSL "https://alist.nn.ci/v3.sh" | bash -s install



ip a | grep 2408 |awk '{print $2}' | cut -d'/' -f1 | sed -n '1p' ###联通
ip a | grep 2409 |awk '{print $2}' | cut -d'/' -f1 | sed -n '1p' ###移动
ip a | grep 240e |awk '{print $2}' | cut -d'/' -f1 | sed -n '1p' ###电信
curl "http://上报地址&token=ABCefsaaafd&$(ip a | grep 2409 |awk '{print $2}' | cut -d'/' -f1 | sed -n '1p')" ###按照服务商格式自行修改
API v2 supports these four URLs:
https://sync.afraid.org/u/<record-token>/?ip=<address>
https://sync.afraid.org/u/?u=<user>&p=<password>&h=<hostname>&ip=<address>
https://<user>:<password>@sync.afraid.org/u/?h=<hostname>&ip=<address> (basic auth)
https://<user>:<password>@sync.afraid.org/nic/update/?hostname=<hostname>&myip=<address> (basic auth)
sync.afraid.org only has an A record. To reach the update service via IPv6 you have to use v6.sync.afraid.org. Both hosts can update both record types (A or AAAA); the only difference is the auto-detected IP address if the &ip= query parameter is left out.
https://v6.sync.afraid.org/u/<record-token>/?ip=$(ip a | grep 2408 |awk '{print $2}' | cut -d'/' -f1 | sed -n '1p')"
添加 每天凌晨3点5分更新一次
5 3 * * * curl -fsSL "https://alist.nn.ci/v3.sh" | bash -s update