mirror of
https://github.com/bin456789/reinstall.git
synced 2025-12-10 07:28:56 +08:00
core: 添加 frpc 内网穿透
This commit is contained in:
17
debian.cfg
17
debian.cfg
@ -164,6 +164,7 @@ d-i partman/early_command string true; \
|
||||
# kali ssh 默认关闭
|
||||
# 另一种方法处理 cloudcone
|
||||
# if [ "$link_grub_dir" = 1 ]; then mkdir /target/boot/grub2; echo 'chainloader (hd0)+1' >/target/boot/grub2/grub.cfg; fi; \
|
||||
# debian 9 tar 不支持 --strip-components
|
||||
d-i preseed/late_command string true; \
|
||||
for str in $(grep -wo "extra_[^ ]*" /proc/cmdline | sed 's/^extra_//'); do eval "$str"; done; \
|
||||
|
||||
@ -186,6 +187,22 @@ d-i preseed/late_command string true; \
|
||||
echo "Port $ssh_port" >>/target/etc/ssh/sshd_config; \
|
||||
fi; \
|
||||
|
||||
if [ -s /configs/frpc.toml ]; then \
|
||||
url=$(sh /get-frpc-url.sh linux); \
|
||||
basename=$(echo "$url" | sed 's,.*/,,' | sed 's,\.tar\.gz,,'); \
|
||||
mkdir -p /target/usr/local/bin; \
|
||||
mkdir -p /target/usr/local/etc/frpc; \
|
||||
for i in {1..5}; do \
|
||||
wget -O /target/frpc.tar.gz "$url" && break; \
|
||||
done; \
|
||||
tar xzf /target/frpc.tar.gz "$basename/frpc" -O >/target/usr/local/bin/frpc; \
|
||||
rm -f /target/frpc.tar.gzx; \
|
||||
chmod a+x /target/usr/local/bin/frpc; \
|
||||
cp /configs/frpc.toml /target/usr/local/etc/frpc/; \
|
||||
cp /frpc.service /target/etc/systemd/system/; \
|
||||
in-target systemctl enable frpc; \
|
||||
fi; \
|
||||
|
||||
cp /fix-eth-name.sh /target/; \
|
||||
cp /fix-eth-name.service /target/etc/systemd/system/; \
|
||||
in-target systemctl enable fix-eth-name
|
||||
|
||||
Reference in New Issue
Block a user