Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
mgqnfoqv7k2w
AutoBuildImmortalWrt
Commits
b41544d2
Unverified
Commit
b41544d2
authored
Aug 14, 2025
by
wukongdaily
Committed by
GitHub
Aug 14, 2025
Browse files
23.04.5 x86 新增用户设置路由器管理地址功能
parent
edeca3ec
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
4 deletions
+27
-4
.github/workflows/build-x86-64-23.05.4.yml
.github/workflows/build-x86-64-23.05.4.yml
+21
-1
.github/workflows/build-x86-64-24.10.2.yml
.github/workflows/build-x86-64-24.10.2.yml
+1
-1
files/etc/uci-defaults/99-custom.sh
files/etc/uci-defaults/99-custom.sh
+5
-2
No files found.
.github/workflows/build-x86-64-23.05.4.yml
View file @
b41544d2
...
...
@@ -3,6 +3,10 @@ name: build-x86-64-immortalwrt-23.05.4
on
:
workflow_dispatch
:
inputs
:
custom_router_ip
:
description
:
"
请设置路由器的管理地址(仅对多网口路由器有效)
格式:192.168.x.1
或
10.x.x.1"
required
:
true
default
:
"
192.168.100.1"
profile
:
description
:
'
请输入要编译固件大小
单位(MB)'
required
:
true
...
...
@@ -42,6 +46,14 @@ jobs:
-
name
:
Set executable permissions
run
:
chmod +x ${{ github.workspace }}/x86-64/build23.sh
-
name
:
Save Custom Router IP into OpenWrt files
run
:
|
mkdir -p "${{ github.workspace }}/custom"
echo "${{ github.event.inputs.custom_router_ip }}" > "${{ github.workspace }}/custom/custom_router_ip.txt"
echo "您设置的路由器管理地址是:${{ github.event.inputs.custom_router_ip }}"
# 后续步骤会将该文件映射到路由器/etc/config/custom_router_ip.txt 以便用于开机脚本99-custom.sh读取用户设置的ip
-
name
:
Validate PPPoE Inputs
run
:
|
if [[ "${{ inputs.enable_pppoe }}" == "yes" ]]; then
...
...
@@ -65,6 +77,7 @@ jobs:
--user root \
-v "${{ github.workspace }}/bin:/home/build/immortalwrt/bin" \
-v "${{ github.workspace }}/files:/home/build/immortalwrt/files" \
-v "${{ github.workspace }}/custom:/home/build/immortalwrt/files/etc/config" \
-v "${{ github.workspace }}/x86-64/imm.config:/home/build/immortalwrt/.config" \
-v "${{ github.workspace }}/shell:/home/build/immortalwrt/shell" \
-v "${{ github.workspace }}/x86-64/build23.sh:/home/build/immortalwrt/build.sh" \
...
...
@@ -78,9 +91,16 @@ jobs:
-
name
:
Create info
run
:
|
cat > router-info.md <<EOF
## 📡 路由器后台信息
- 🏠 **后台地址**: ${{ github.event.inputs.custom_router_ip }}
- 👤 **用户名**: root
- 🔑 **密码**: 无
EOF
if [ "${{ github.event.inputs.include_docker }}" == "yes" ]; then
extra_content="#### 默认带docker"
echo -e "\n $extra_content" >> ${{ github.workspace }}/info.md
echo -e "\n $extra_content" >> ${{ github.workspace }}/
router-
info.md
else
echo -e "NO docker"
fi
...
...
.github/workflows/build-x86-64-24.10.2.yml
View file @
b41544d2
...
...
@@ -86,7 +86,7 @@ jobs:
-
name
:
Create info
run
:
|
cat > router-info.md <<EOF
# 📡 路由器后台信息
#
#
📡 路由器后台信息
- 🏠 **后台地址**: ${{ github.event.inputs.custom_router_ip }}
- 👤 **用户名**: root
...
...
files/etc/uci-defaults/99-custom.sh
View file @
b41544d2
...
...
@@ -74,15 +74,18 @@ elif [ "$count" -gt 1 ]; then
fi
# LAN口设置静态IP
uci
set
network.lan.proto
=
'static'
# 多网口设备 支持修改为别的管理后台地址 在Github Action 的UI上自行输入即可
默认192.168.100.1
# 多网口设备 支持修改为别的管理后台地址 在Github Action 的UI上自行输入即可
uci
set
network.lan.netmask
=
'255.255.255.0'
# 设置路由器管理后台地址
IP_VALUE_FILE
=
"/etc/config/custom_router_ip.txt"
if
[
-f
"
$IP_VALUE_FILE
"
]
;
then
CUSTOM_IP
=
$(
cat
"
$IP_VALUE_FILE
"
)
# 设置路由器
的管理
后台地址
#
用户在UI上
设置
的
路由器后台
管理
地址
uci
set
network.lan.ipaddr
=
$CUSTOM_IP
echo
"custom router ip is
$CUSTOM_IP
"
>>
$LOGFILE
else
uci
set
network.lan.ipaddr
=
'192.168.100.1'
echo
"default router ip is 192.168.100.1"
>>
$LOGFILE
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment