缩小随机端口范围

This commit is contained in:
Olia Lisa
2026-05-19 10:19:15 +08:00
parent a5cd2efb4d
commit 6092b94b5d
+1 -1
View File
@@ -164,7 +164,7 @@ update_port(){
local port=$1
# 如果没有提供端口参数,则自动查找一个随机空闲端口
if [[ -z "$port" ]]; then
port=$(find_free_port)
port=$(find_free_port 5000 15000)
fi
modify_json_file "$config_dir/config.json" ".inbounds[0].listen_port" "$port"