Skip to content

Instantly share code, notes, and snippets.

@dongfg
Last active December 29, 2025 08:30
Show Gist options
  • Select an option

  • Save dongfg/e2f93851c0cc2769e36f8f37795da911 to your computer and use it in GitHub Desktop.

Select an option

Save dongfg/e2f93851c0cc2769e36f8f37795da911 to your computer and use it in GitHub Desktop.
iOS iSH init
#!/bin/sh
# ios ish setup
# wget -qO - http://10.64.60.244:9000/setup.sh | sh
# 文件/文本加密:
# echo "this is a secret." | openssl enc -e -des3 -base64 -pbkdf2 -A
# cat ~/.ssh/id_rsa_vps | openssl enc -e -des3 -base64 -pbkdf2 -A
printf "1. 更换镜像源...\n"
mirror=$(sed -e 's/https:\/\/\(.*\)\/alpine.*/\1/' /etc/apk/repositories | uniq)
newMirror="mirrors.tuna.tsinghua.edu.cn"
printf "当前镜像源: $mirror\n"
sed -i "s/$mirror/$newMirror/g" /etc/apk/repositories
printf "切换到镜像源: $newMirror\n"
apk update && apk upgrade
printf "\n"
printf "2. 安装常用软件...\n"
apk add openssh-client zsh git openssl
printf "\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment