Skip to content

Commit 9fbb0f4

Browse files
committed
bump version to 3.5
Update iSH-Tools to version 3.5 - Change license to GPL 3.0 - Correct SSH service startup message to display active port - Fix issue causing mirror site to be unavailable
1 parent 326a1bf commit 9fbb0f4

File tree

5 files changed

+31
-837
lines changed

5 files changed

+31
-837
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,20 @@ iSH-Tools主要用于在iSH快捷方便地安装管理SSH和VNC,同时还提
8585
> 比如 支持跳过网络检查,地区检查等<br/>
8686
</details>
8787
88+
<details>
89+
<summary> 2025-09-14 | 3.5 更新日志 </summary>
90+
91+
> 优化:<br/>
92+
> 1. SSH服务启动信息端口现在会读取配置文件,显示正在使用的端口,不再写死8022<br/>
93+
>
94+
> 修复:<br/>
95+
> 1. 修改镜像站地址为 https://ghproxy.net<br/>
96+
>
97+
> 其他变更:<br/>
98+
> 1. 修改 License 为 GPL 3.0<br/>
99+
>
100+
</details>
101+
88102
# 脚本主要功能
89103

90104
- 交互式安装配置VNC服务和SSH服务

iSH-Tools-CN.sh

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44
# coremark https://github.com/eembc/coremark
55
# cpuid2cpuflags https://github.com/projg2/cpuid2cpuflags
66
# coremark参考成绩来自:https://www.bilibili.com/read/cv21181867
7-
# Moded by lurenJBD 2024.07.15
8-
# iSH-Tools by lurenJBD 2020.10.17
7+
# iSH-Tools by lurenJBD 2020-10-17
8+
# Moded by lurenJBD 2025-09-14
99

1010
########### Variable ###########
11-
tools_version="3.4"
11+
tools_version="3.5"
1212
inite_repo="wget ncurses openrc bash"
1313
error_times=0
1414

1515
HOST="${HOST:="www.baidu.com"}" # 网络检测 ping 的域名
1616
NAMESERVER="${NAMESERVER:="223.5.5.5"}" # 当遇到域名解析故障时替换的DNS服务器
1717
Github_Url="${Github_Url:="https://github.com"}"
18-
Mirror_Url="${Mirror_Url:="https://mirror.ghproxy.com/https://github.com"}" # 默认使用的Github镜像
18+
Mirror_Url="${Mirror_Url:="https://ghproxy.net/https://github.com"}" # 默认使用的Github镜像
1919
Mirror_Repo="${Mirror_Repo:="http://mirrors.tuna.tsinghua.edu.cn"}" # 默认替换的镜像源链接
2020
Bypass_Check="${Bypass_Check:=0}" # 1:跳过网络&地区检查 Net:只跳过网络检查 Loc:只跳过地区检查
2121
Dev_Mode="${Dev_Mode:=0}" # 允许运行在非iSH下的Alpine
@@ -81,7 +81,7 @@ init_run() {
8181
printf "\r\033[K\033[A" && printf_tips info "检测到第一次运行脚本,正在初始化..."
8282
fi
8383
if [ "$Timeout_or_not" = 0 ]; then
84-
# 当进入开发者模式不应该修改 openrc启动项,会导致正常的Alpine无法启动
84+
# 当进入开发者模式不应该修改openrc启动项,会导致正常的Alpine无法启动
8585
[[ $Dev_Mode -eq 0 ]] && sed -i "s#::sysinit:/sbin/openrc sysinit#::sysinit:/sbin/openrc#g" /etc/inittab
8686
echo inited_version=\"$tools_version\" >>/etc/iSH-Tools/tools_inited
8787
echo inited_repo=\"$inite_repo\" >>/etc/iSH-Tools/tools_inited
@@ -157,7 +157,7 @@ check_location() {
157157
esac
158158
if [ "$user_choice" = "y" ] || [ "$user_choice" = "a" ]; then
159159
rm -rf /etc/apk/repositories
160-
[ "$user_choice" = "a" ] && rm -rf /ish # 不让iSH自动恢复为原本的源
160+
[ "$user_choice" = "a" ] && rm -rf /ish
161161
echo "# Generated by iSH-Tools, choose to use the 默认源" >>/etc/apk/repositories
162162
echo "${Mirror_Repo}/alpine/${alpine_version}/main" >> /etc/apk/repositories
163163
echo "${Mirror_Repo}/alpine/${alpine_version}/community" >> /etc/apk/repositories
@@ -408,7 +408,7 @@ error_tips() {
408408
[ $error_times -ge 10 ] && $echo_ERROR "已累计出现${error_times}次错误,脚本已退出" && exit 1
409409
}
410410

411-
# X-org配置初始化
411+
# Xorg配置初始化
412412
xinit_vnc() {
413413
[ ! -e /etc/X11/xorg.conf.d ] && mkdir -p /etc/X11/xorg.conf.d
414414
if [ ! -e /etc/X11/xorg.conf.d/10-headless.conf ]; then
@@ -686,9 +686,8 @@ run_tools() {
686686
"${tools_dir}/coremark/$file" 0x0 0x0 0x66 0 7 1 2000 > "${tools_dir}/coremark/logs/$file.log"
687687
score=$(cat "${tools_dir}/coremark/logs/$file.log" | grep "CoreMark 1.0" | awk '{print $4}')
688688
formatted_score=$(printf "%.1f" "$score")
689-
printf '\033[A\r\033[K' # 光标回到上一行,并清除该行内容
689+
printf '\033[A\r\033[K'
690690
printf "${CYAN}%-7s${PLAIN} ${YELLOW}%-8s${PLAIN} %-9s \n" "INFO" "${name}线程" "得分:$formatted_score"
691-
# 倒计时显示效果器
692691
if [ "$num" -lt 8 ]; then
693692
wait_time=(5 + 1)
694693
start_time=$(date +%s)
@@ -698,7 +697,7 @@ run_tools() {
698697
printf '设备散热中,等待 %s 秒\r' "$(( --c ))"
699698
sleep 1
700699
done
701-
printf '\r\033[K' # 清除该行的内容
700+
printf '\r\033[K'
702701
tput cnorm
703702
fi
704703
fi
@@ -940,7 +939,8 @@ config_vnc_resolution() {
940939
# 配置服务启动
941940
config_services_boot() {
942941
local_ip=$(/etc/iSH-Tools/get_local_ip 2>/dev/null) || local_ip='<设备IP>'
943-
local notes="${services}服务已经启动,请用${services}客户端访问 \${local_ip}:${services_port}"
942+
local services_lower=$(echo "$services" | tr 'A-Z' 'a-z')
943+
local notes="${services}服务已经启动,请用${services}客户端访问 \${local_ip}:\${${services_lower}_port:-$services_port}"
944944
enable_color=(0 1 1)
945945
menu_color=("1"); menu_action=("1"); do_service=("1"); pnum=24
946946

@@ -993,6 +993,7 @@ config_services_boot() {
993993
export PS1="\u@\h:\w\# "
994994
echo_INFO="echo -e \033[0;36mINFO\033[0m"
995995
local_ip=\$(/etc/iSH-Tools/get_local_ip 2>/dev/null) || local_ip='<设备IP>'
996+
ssh_port=\$(grep -E '^[^#]*Port[[:space:]]+[0-9]+' /etc/ssh/sshd_config | tail -n1 | awk '{print \$2}')
996997
EOF
997998
source /root/.profile
998999
fi

iSH-Tools-Setup-CN.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#!/bin/sh
2-
# Moded by lurenJBD 2024.07.09
3-
# iSH-Tools by lurenJBD 2020.10.17
2+
# iSH-Tools by lurenJBD 2020-10-17
3+
# Moded by lurenJBD 2025-09-14
44

55
########### Variable ###########
66
HOST="${HOST:="www.baidu.com"}"
77
NAMESERVER="${NAMESERVER:="223.5.5.5"}"
88
Github_Url="${Github_Url:="https://github.com"}"
9-
Mirror_Url="${Mirror_Url:="https://mirror.ghproxy.com/https://github.com"}"
9+
Mirror_Url="${Mirror_Url:="https://ghproxy.net/https://github.com"}"
1010
Mirror_Repo="${Mirror_Repo:="http://mirrors.tuna.tsinghua.edu.cn"}" # 默认替换的镜像源链接
1111
Bypass_Check="${Bypass_Check:=0}" # 1:跳过网络&地区检查 Net:只跳过网络检查 Loc:只跳过地区检查
1212

@@ -236,4 +236,4 @@ run_main() {
236236
}
237237

238238
########### Main ###########
239-
run_main
239+
run_main

0 commit comments

Comments
 (0)