Modify【Default Port】:Panel --->> 13688, Sub --->> 13788
This commit is contained in:
parent
56936672d7
commit
2d71aa7704
12
x-ui.sh
12
x-ui.sh
@ -298,7 +298,7 @@ reset_config() {
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
/usr/local/x-ui/x-ui setting -reset
|
/usr/local/x-ui/x-ui setting -reset
|
||||||
echo -e "所有面板设置已重置为默认,请立即重新启动面板,并使用默认的${green}2053${plain}端口访问网页面板"
|
echo -e "所有面板设置已重置为默认,请立即重新启动面板,并使用默认的${green}13688${plain}端口访问网页面板"
|
||||||
confirm_restart
|
confirm_restart
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -709,18 +709,18 @@ open_ports() {
|
|||||||
ufw allow ssh
|
ufw allow ssh
|
||||||
ufw allow http
|
ufw allow http
|
||||||
ufw allow https
|
ufw allow https
|
||||||
ufw allow 2053/tcp
|
ufw allow 13688/tcp
|
||||||
|
|
||||||
# Enable the firewall
|
# Enable the firewall
|
||||||
ufw --force enable
|
ufw --force enable
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Prompt the user to enter a list of ports
|
# Prompt the user to enter a list of ports
|
||||||
read -p "输入您要打开的端口(例如 80,443,2053 或端口范围 400-500): " ports
|
read -p "输入您要打开的端口(例如 80,443,13688 或端口范围 400-500): " ports
|
||||||
|
|
||||||
# Check if the input is valid
|
# Check if the input is valid
|
||||||
if ! [[ $ports =~ ^([0-9]+|[0-9]+-[0-9]+)(,([0-9]+|[0-9]+-[0-9]+))*$ ]]; then
|
if ! [[ $ports =~ ^([0-9]+|[0-9]+-[0-9]+)(,([0-9]+|[0-9]+-[0-9]+))*$ ]]; then
|
||||||
echo "错误:输入无效。请输入以英文逗号分隔的端口列表或端口范围(例如 80,443,2053 或 400-500)" >&2
|
echo "错误:输入无效。请输入以英文逗号分隔的端口列表或端口范围(例如 80,443,13688 或 400-500)" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -746,11 +746,11 @@ open_ports() {
|
|||||||
|
|
||||||
delete_ports() {
|
delete_ports() {
|
||||||
# Prompt the user to enter the ports they want to delete
|
# Prompt the user to enter the ports they want to delete
|
||||||
read -p "输入要删除的端口(例如 80,443,2053 或范围 400-500): " ports
|
read -p "输入要删除的端口(例如 80,443,13688 或范围 400-500): " ports
|
||||||
|
|
||||||
# Check if the input is valid
|
# Check if the input is valid
|
||||||
if ! [[ $ports =~ ^([0-9]+|[0-9]+-[0-9]+)(,([0-9]+|[0-9]+-[0-9]+))*$ ]]; then
|
if ! [[ $ports =~ ^([0-9]+|[0-9]+-[0-9]+)(,([0-9]+|[0-9]+-[0-9]+))*$ ]]; then
|
||||||
echo "错误:输入无效。请输入以英文逗号分隔的端口列表或端口范围(例如 80,443,2053 或 400-500)" >&2
|
echo "错误:输入无效。请输入以英文逗号分隔的端口列表或端口范围(例如 80,443,13688 或 400-500)" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user