← 返回 Skills 市场
liuwei120

5GC Web仪表自动化

作者 liuwei120 · GitHub ↗ · v2.0.0 · MIT-0
cross-platform ⚠ suspicious
113
总下载
0
收藏
0
当前安装
5
版本数
在 OpenClaw 中安装
/install 5gc-web-dotouch
功能描述
5GC Web仪表自动化技能,支持AMF/UDM/AUSF/SMF/PGW-C/UPF/PGW-U/GNB/UE/PCF/NRF的批量添加与编辑
使用说明 (SKILL.md)

5GC Web 仪表自动化技能

统一管理 AMF、UDM/AUSF、SMF/PGW-C、UPF/PGW-U、GNB、UE、PCF、NRF 八类网元的添加与编辑操作。


目录


快速开始

安装方法

技能目录位于 skills/5gc/,由统一入口 5gc.js 统一调度,无需额外安装:

# 克隆或复制到本机
git clone \x3Crepo> ~/.openclaw/workspace/skills/5gc

# 直接使用统一入口(推荐)
node skills/5gc/scripts/5gc.js \x3Centity> \x3Caction> [options]

# 或直接调用各脚本
node skills/5gc/scripts/amf-add-skill.js \x3C参数>

前置要求

  • Node.js ≥ 14
  • Playwright(npm i playwright && npx playwright install chromium
  • 5GC 仪表地址:https://192.168.3.89(默认)
  • 登录凭证:[email protected] / dotouch
  • 仪表上已创建对应工程(如 XW_S5GC_1

会话缓存

所有脚本自动复用 Playwright 会话缓存(.sessions/ 目录),首次登录后再次运行无需重复登录。


统一 CLI 入口

路径

node skills/5gc/scripts/5gc.js \x3Centity> \x3Caction> [options]

支持的网元与操作

entity add edit
amf
udm
smf
upf
gnb
ue
pcf
nrf

全局选项

选项 说明
--url \x3C地址> 5GC 仪表地址,默认 https://192.168.3.89
--headed 打开可见浏览器窗口(调试用)

三种使用模式

# 1. 添加网元
node 5gc.js amf add \x3C名称> [参数...]

# 2. 批量编辑(当前工程下所有该类网元)
node 5gc.js amf edit --project \x3C工程> --set-\x3C字段> \x3C值>

# 3. 单个编辑(按名称精确匹配)
node 5gc.js amf edit --name \x3C名称> --project \x3C工程> --set-\x3C字段> \x3C值>

技能详细文档


AMF

amf-add-skill.js

功能:在指定工程下添加一个 AMF 实例。

使用方式

node 5gc.js amf add \x3C名称> [选项...]
# 或直接调用
node skills/5gc/scripts/amf-add-skill.js \x3C名称> [选项...]

参数

参数 说明 默认值
\x3C名称> AMF 实例名称(位置参数) 必填
--project \x3C工程> / -p \x3C工程> 目标工程名称 5G_basic_process
--url \x3C地址> 5GC 仪表地址 https://192.168.3.89
--mcc \x3C值> MCC(移动国家码) 460
--mnc \x3C值> MNC(移动网络码) 01
--ngap_sip \x3CIP> NGAP 信令面 IP 200.20.20.1
--ngap_port \x3C端口> NGAP 端口 38412
--http2_sip \x3CIP> HTTP2 服务 IP 200.20.20.5
--http2_port \x3C端口> HTTP2 端口 8080
--stac \x3C值> 起始 TAC 101
--etac \x3C值> 结束 TAC 102
--region_id \x3C值> 区域 ID 1
--set_id \x3C值> Set ID 1
--pointer \x3C值> 指针 1
--headed 打开可见浏览器 false

示例

# 基本添加
node 5gc.js amf add AMF_TEST --project XW_S5GC_1

# 指定 NGAP IP 和端口
node 5gc.js amf add AMF_PROD --project XW_S5GC_1 --ngap_sip 10.200.1.50 --ngap_port 38412

# 使用不同 MCC/MNC
node 5gc.js amf add AMF_CMCC --project XW_S5GC_1 --mcc 460 --mnc 00

amf-edit-skill.js

功能:修改 AMF 配置参数。支持单个修改或批量修改工程下所有 AMF。

使用方式

node 5gc.js amf edit [选项...]

参数

参数 说明
--project \x3C工程> / -p \x3C工程> 目标工程,不带 --name 时批量修改该工程下所有 AMF
--name \x3C名称> 精确匹配要修改的 AMF 名称
--id \x3CID> 按 AMF ID 修改
--set-\x3C字段> \x3C值> 修改指定字段的值,支持多组
--url \x3C地址> 5GC 仪表地址
--headed 打开可见浏览器

可编辑字段name, mcc, mnc, ngap_sip, ngap_port, http2_sip, http2_port, stac, etac, region_id, set_id, pointer, ea[NEA0], ea[128-NEA1], ea[128-NEA2], ea[128-NEA3], ia[NIA0], ia[128-NIA1], ia[128-NIA2], ia[128-NIA3]

⚠️ ea[NEA0] 等算法字段:实际向表单填入字段名 ea[NEA0](input[name="ea[NEA0]"]),layui checkbox 点击基于索引而非字段名,详情见 SKILL.md 算法配置章节。

示例

# 批量修改工程下所有 AMF 的 NGAP IP
node 5gc.js amf edit --project XW_S5GC_1 --set-ngap_sip 10.200.1.99

# 修改指定 AMF
node 5gc.js amf edit --name AMF_TEST --project XW_S5GC_1 --set-ngap_sip 10.200.1.50 --set-http2_sip 10.200.1.51

# 按 ID 修改
node 5gc.js amf edit --id 6633 --set-ngap_port 38413

UDM/AUSF

ausf-udm-add-skill.js

功能:在指定工程下添加一个 UDM/AUSF 实例。

使用方式

node 5gc.js udm add \x3C名称> [选项...]

参数

参数 说明 默认值
\x3C名称> UDM 实例名称(位置参数) 必填
--project \x3C工程> / -p \x3C工程> 目标工程名称 5G_basic_process
--url \x3C地址> 5GC 仪表地址 https://192.168.3.89
--count \x3C数量> 实例数量 1
--sip \x3CIP> SIP 服务 IP 192.168.20.30
--port \x3C端口> SIP 端口 80
--auth_method \x3C方法> 认证方法 5G_AKA
--scheme \x3C协议> 协议类型 HTTP
--priority \x3C优先级> 优先级 8
--headed 打开可见浏览器 false

示例

# 基本添加
node 5gc.js udm add UDM_TEST --project XW_S5GC_1

# 指定 SIP IP 和端口
node 5gc.js udm add UDM_PROD --project XW_S5GC_1 --sip 10.0.0.100 --port 8080

# 批量添加 3 个实例
node 5gc.js udm add UDM_CLUSTER --project XW_S5GC_1 --count 3 --sip 10.0.0.50

ausf-udm-edit-skill.js

功能:修改 UDM/AUSF 配置参数。支持批量和单个修改。

使用方式

node 5gc.js udm edit [选项...]

参数

参数 说明
--project \x3C工程> 目标工程,不带 --name 时批量修改
--name \x3C名称> 精确匹配要修改的 UDM 名称
--set-sip \x3CIP> 修改 SIP IP
--set-port \x3C端口> 修改端口
--set-auth_method \x3C方法> 修改认证方法
--set-scheme \x3C协议> 修改协议
--set-count \x3C数量> 修改实例数量
--url \x3C地址> 5GC 仪表地址
--headed 打开可见浏览器

示例

# 批量修改工程下所有 UDM 的 SIP IP
node 5gc.js udm edit --project XW_S5GC_1 --set-sip 10.0.0.99

# 修改指定 UDM
node 5gc.js udm edit --name UDM_TEST --project XW_S5GC_1 --set-sip 10.0.0.88 --set-port 8080

SMF/PGW-C

smf-pgwc-add-skill.js

功能:在指定工程下添加一个 SMF/PGW-C 实例。

使用方式

node 5gc.js smf add \x3C名称> [选项...]

参数

参数 说明 默认值
\x3C名称> SMF 实例名称(位置参数) 必填
--project \x3C工程> / -p \x3C工程> 目标工程名称 XW_S5GC_1
--url \x3C地址> 5GC 仪表地址 https://192.168.3.89
--pfcp_sip \x3CIP> PFCP 信令面 IP 200.20.20.25
--http2_sip \x3CIP> HTTP2 服务 IP 200.20.20.25
--mcc \x3C值> MCC 460
--mnc \x3C值> MNC 01
--pdu_capacity \x3C数量> PDU 会话容量 200000
--ue_min \x3CIP> UE IP 池起始 30.30.30.20
--ue_max \x3CIP> UE IP 池结束 30.31.30.20
--interest_tac \x3CTAC列表> 关注 TAC 列表(逗号分隔) 101,102
--headed 打开可见浏览器 false

⚠️ dnn、snssai_sst、snssai_sd 在 SMF 表单中不存在或非 input 字段,无需配置。

示例

# 基本添加
node 5gc.js smf add SMF_TEST --project XW_S5GC_1

# 指定工程和 IP/MCC
node 5gc.js smf add SMF_PROD --project XW_S5GC_1 --pfcp_sip 10.10.10.50 --http2_sip 10.10.10.51 --mcc 460 --mnc 01

smf-pgwc-edit-skill.js

功能:修改 SMF/PGW-C 配置参数。支持批量和单个修改。

使用方式

node 5gc.js smf edit [选项...]

参数

参数 说明
--project \x3C工程> 目标工程,不带 --name 时批量修改
--name \x3C名称> 精确匹配要修改的 SMF 名称
--set-pfcp_sip \x3CIP> 修改 PFCP 信令面 IP
--set-http2_sip \x3CIP> 修改 HTTP2 服务 IP
--set-mcc \x3C值> 修改 MCC
--set-mnc \x3C值> 修改 MNC
--set-pdu_capacity \x3C数量> 修改 PDU 会话容量
--set-ue_min \x3CIP> 修改 UE IP 池起始
--set-ue_max \x3CIP> 修改 UE IP 池结束
--set-interest_tac \x3CTAC列表> 修改关注 TAC 列表(逗号分隔)

⚠️ 以下字段在 SMF 表单中不存在或不是标准 input:dnn、n3_ip、n6_ip、snssai_sst、snssai_sd。如需修改,请通过仪表 UI 手动完成或直接编辑数据库。

示例

# 批量修改工程下所有 SMF 的 HTTP2 IP
node 5gc.js smf edit --project XW_S5GC_1 --set-http2_sip 10.10.10.99

# 修改指定 SMF 的 pfcp_sip 和 MCC/MNC
node 5gc.js smf edit --name SMF_TEST --project XW_S5GC_1 --set-pfcp_sip 10.10.10.88 --set-mcc 460 --set-mnc 01

UPF/PGW-U

upf-add-skill.js

功能:在指定工程下添加一个 UPF/PGW-U 实例。

使用方式

node 5gc.js upf add \x3C名称> [选项...]

参数

参数 说明 默认值
\x3C名称> UPF 实例名称(位置参数) 必填
--project \x3C工程> / -p \x3C工程> 目标工程名称 XW_S5GC_1
--url \x3C地址> 5GC 仪表地址 https://192.168.3.89
--n4_ip \x3CIP> N4 接口 IP 192.168.20.30
--n3_ip \x3CIP> N3 接口 IP 192.168.20.30
--n6_ip \x3CIP> N6 接口 IP 192.168.20.31
--n4_port \x3C端口> N4 端口 8805
--MCC \x3C值> MCC(注意大写) 460
--MNC \x3C值> MNC(注意大写) 01
--pdu_capacity \x3C数量> PDU 会话容量 20000
--ue_min \x3CIP> UE IP 池起始 20.20.20.20
--ue_max \x3CIP> UE IP 池结束 20.20.60.20
--headed 打开可见浏览器 false

⚠️ DNN、TAC、NSSAI 在添加脚本中为硬编码默认值,不支持命令行覆盖。如需修改,请使用 upf edit 脚本。

示例

# 基本添加
node 5gc.js upf add UPF_TEST --project XW_S5GC_1

# 指定 N4/N3/N6 IP 和 MCC/MNC
node 5gc.js upf add UPF_PROD --project XW_S5GC_1 --n4_ip 10.0.0.50 --n6_ip 10.0.0.51 --MCC 460 --MNC 01

upf-edit-skill.js

功能:修改 UPF/PGW-U 配置参数。支持批量和单个修改。

使用方式

node 5gc.js upf edit [选项...]

参数

参数 说明
--project \x3C工程> 目标工程,不带 --name 时批量修改
--name \x3C名称> 精确匹配要修改的 UPF 名称
--set-n3_ip \x3CIP> 修改 N3 接口 IP
--set-n4_ip \x3CIP> 修改 N4 接口 IP
--set-n4_port \x3C端口> 修改 N4 端口
--set-n6_ip \x3CIP> 修改 N6 接口 IP
--set-MCC \x3C值> 修改 MCC(注意大写)
--set-MNC \x3C值> 修改 MNC(注意大写)
--set-pdu_capacity \x3C数量> 修改 PDU 会话容量
--set-ue_min \x3CIP> 修改 UE IP 池起始
--set-ue_max \x3CIP> 修改 UE IP 池结束
--url \x3C地址> 5GC 仪表地址
--headed 打开可见浏览器

⚠️ dnn(DNN)和 TAC/NSSAI 在 UPF 表单中存储在 jsgrid 配置行内,不支持简单的 --set- 修改。

示例

# 批量修改工程下所有 UPF 的 N4 IP
node 5gc.js upf edit --project XW_S5GC_1 --set-n4_ip 99.99.99.99

# 修改指定 UPF 的 N4/N6 IP 和 MCC/MNC
node 5gc.js upf edit --name UPF_TEST --project XW_S5GC_1 --set-n4_ip 88.88.88.88 --set-n6_ip 88.88.88.89 --set-MCC 460 --set-MNC 01

GNB

gnb-add-skill.js

功能:在指定工程下添加一个 GNB 实例。

使用方式

node 5gc.js gnb add \x3C名称> [选项...]

参数

参数 说明 默认值
\x3C名称> GNB 实例名称(位置参数) 必填
--project \x3C工程> / -p \x3C工程> 目标工程名称 XW_S5GC_1
--url \x3C地址> 5GC 仪表地址 https://192.168.3.89
--ngap_sip \x3CIP> NGAP 信令面 IP 200.20.20.50
--user_sip_ip_v4 \x3CIP> 用户面 IPv4 2.2.2.2
--mcc \x3C值> MCC 460
--mnc \x3C值> MNC 60
--stac \x3C值> 起始 TAC 0
--etac \x3C值> 结束 TAC 0
--node_id \x3CID> 节点 ID 70
--cell_count \x3C数量> 小区数量 1
--headed 打开可见浏览器 false

⚠️ stac/etac/node_id 非默认值时可能触发表单验证失败,建议先使用默认值添加后再用 gnb edit 修改。

示例

# 基本添加
node 5gc.js gnb add GNB_TEST --project XW_S5GC_1

# 指定 NGAP IP、用户面 IP 和 TAC
node 5gc.js gnb add GNB_PROD --project XW_S5GC_1 --ngap_sip 200.20.20.100 --user_sip_ip_v4 3.3.3.3 --mcc 460 --mnc 60 --stac 1 --etac 10

gnb-edit-skill.js

功能:修改 GNB 配置参数。支持批量和单个修改。

使用方式

node 5gc.js gnb edit [选项...]

参数

参数 说明
--project \x3C工程> 目标工程,不带 --name 时批量修改
--name \x3C名称> 精确匹配要修改的 GNB 名称
--set-ngap_sip \x3CIP> 修改 NGAP 信令面 IP
--set-user_sip_ip_v4 \x3CIP> 修改用户面 IPv4
--set-user_sip_ip_v6 \x3CIP> 修改用户面 IPv6
--set-mcc \x3C值> 修改 MCC
--set-mnc \x3C值> 修改 MNC
--set-stac \x3C值> 修改起始 TAC
--set-etac \x3C值> 修改结束 TAC
--set-node_id \x3CID> 修改节点 ID
--set-cell_count \x3C数量> 修改小区数量
--set-replay_ip \x3CIP> 修改回放 IP
--set-replay_port \x3C端口> 修改回放端口
--url \x3C地址> 5GC 仪表地址
--headed 打开可见浏览器

示例

# 批量修改工程下所有 GNB 的用户面 IP
node 5gc.js gnb edit --project XW_S5GC_1 --set-user_sip_ip_v4 99.99.99.99

# 修改指定 GNB 的 NGAP IP 和 MCC/MNC
node 5gc.js gnb edit --name GNB_TEST --project XW_S5GC_1 --set-ngap_sip 200.20.20.88 --set-mcc 461 --set-mnc 22

UE

ue-add-skill.js

功能:在指定工程下添加一个或多个 UE 实例。

使用方式

node 5gc.js ue add --name \x3C名称> [选项...]

参数

参数 短名 说明 默认值
--name \x3C名称> -n \x3C名称> UE 名称(只支持字母/数字/下划线) 必填
--project \x3C工程> -p \x3C工程> 目标工程名称 XW_S5GC_1
--url \x3C地址> -u \x3C地址> 5GC 仪表地址 https://192.168.3.89
--imsi \x3C值> 起始 IMSI(15位) 460001234567890
--msisdn \x3C值> MSISDN(13-15位,以 86 开头) 8611111111111
--mcc \x3C值> MCC 460
--mnc \x3C值> MNC 01
--key \x3C值> KI 密钥(32位 hex) 1111...(32个1)
--opc \x3C值> OPc 密钥(32位 hex) 1111...(32个1)
--imeisv \x3C值> IMEISV(偶数位) 8611111111111111
--sst \x3C值> NSSAI SST 1
--sd \x3C值> NSSAI SD 111111
--count \x3C数量> -c \x3C数量> 连续添加数量 1
--headed 打开可见浏览器 false

命名约束:UE 名称只能包含字母、数字、下划线(_),不能使用连字符(-)或其他特殊字符。

示例

# 基本添加
node 5gc.js ue add --name UE_001 --project XW_S5GC_1

# 指定 IMSI 和 MSISDN
node 5gc.js ue add --name UE_TEST --imsi 460000000000001 --msisdn 8613888888888 --project XW_S5GC_1

# 批量添加 10 个连续 UE
node 5gc.js ue add --name UE_BATCH --count 10 --project XW_S5GC_1 --msisdn 8613900000000

# 指定认证密钥
node 5gc.js ue add --name UE_AUTH --project XW_S5GC_1 --key 00112233445566778899aabbccddeeff --opc 11223344556677889900aabbccddeeff

ue-edit-skill.js

功能:修改 UE 配置参数。支持批量和单个修改。

使用方式

node 5gc.js ue edit [选项...]

参数

参数 说明
--project \x3C工程> 目标工程,不带 --name 时批量修改该工程下所有 UE
--name \x3C名称> 精确匹配要修改的 UE 名称(不支持批量时按名称过滤)
--id \x3CID> 按 UE ID 修改
--set-msisdn \x3C值> 修改 MSISDN
--set-s_imsi \x3C值> 修改 IMSI
--set-mcc \x3C值> 修改 MCC
--set-mnc \x3C值> 修改 MNC
--set-key \x3C值> 修改 KI 密钥
--set-opc \x3C值> 修改 OPc 密钥
--set-imeisv \x3C值> 修改 IMEISV
--set-sst \x3C值> 修改 NSSAI SST
--set-sd \x3C值> 修改 NSSAI SD
--set-replay_ip \x3CIP> 修改回放 IP
--set-replay_port \x3C端口> 修改回放端口
--set-count \x3C数量> 修改数量
--url \x3C地址> 5GC 仪表地址
--headed 打开可见浏览器

⚠️ user_sip_ip_v4user_sip_ip_v6 在 UE 编辑表单中不存在此字段名,无需修改。

示例

# 批量修改工程下所有 UE 的 MSISDN
node 5gc.js ue edit --project XW_S5GC_1 --set-msisdn 8613911111111

# 修改指定 UE
node 5gc.js ue edit --name UE_001 --project XW_S5GC_1 --set-msisdn 8613988888888 --set-sst 1 --set-sd 222222

# 按 ID 修改
node 5gc.js ue edit --id 10337 --set-opc aabbccddeeff00112233445566778899 --set-imeisv 8611111111111112

PCF/PCRF

pcf-add-skill.js

功能:在指定工程下添加一个 PCF/PCRF 实例。

使用方式

node 5gc.js pcf add \x3C名称> [选项...]
node skills/5gc/scripts/pcf-add-skill.js \x3C名称> [选项...]

参数

参数 说明 默认值
\x3C名称> PCF 实例名称(位置参数) 必填
--project \x3C工程> / -p \x3C工程> 目标工程名称 XW_S5GC_1
--url \x3C地址> 5GC 仪表地址 https://192.168.3.89
--http2_sip \x3CIP> HTTP2 服务 IP 192.168.20.90
--http2_port \x3C端口> HTTP2 端口 80
--MCC \x3C值> MCC(注意大写) 460
--MNC \x3C值> MNC(注意大写) 01
--headed 打开可见浏览器 false

示例

node 5gc.js pcf add PCF-TEST --project XW_S5GC_1
node 5gc.js pcf add PCF-PROD --project XW_S5GC_1 --http2_sip 10.0.0.50 --MCC 460 --MNC 01

pcf-edit-skill.js

功能:编辑指定工程下的 PCF/PCRF 实例(支持单条和批量)。

使用方式

# 批量编辑:修改工程下所有 PCF 的字段
node 5gc.js pcf edit --project \x3C工程> --set-\x3C字段> \x3C值>

# 单条编辑:修改指定名称的 PCF
node 5gc.js pcf edit --name \x3C名称> --project \x3C工程> --set-\x3C字段> \x3C值>

可编辑字段

参数 说明
--set-http2_sip \x3CIP> 修改 HTTP2 服务 IP
--set-http2_port \x3C端口> 修改 HTTP2 端口
--set-MCC \x3C值> 修改 MCC(注意大写)
--set-MNC \x3C值> 修改 MNC(注意大写)

示例

# 批量修改工程下所有 PCF 的 HTTP2 IP
node 5gc.js pcf edit --project XW_S5GC_1 --set-http2_sip 10.10.10.99

# 修改指定 PCF 的 HTTP2 IP 和 MNC
node 5gc.js pcf edit --name pcc --project XW_S5GC_1 --set-http2_sip 10.10.10.88 --set-MNC 01

NRF

nrf-add-skill.js

功能:在指定工程下添加一个 NRF 实例。

使用方式

node 5gc.js nrf add \x3C名称> [选项...]
node skills/5gc/scripts/nrf-add-skill.js \x3C名称> [选项...]

参数

参数 说明 默认值
\x3C名称> NRF 实例名称(位置参数) 必填
--project \x3C工程> / -p \x3C工程> 目标工程名称 XW_S5GC_1
--url \x3C地址> 5GC 仪表地址 https://192.168.3.89
--http2_sip \x3CIP> HTTP2 服务 IP 192.168.20.100
--http2_port \x3C端口> HTTP2 端口 80
--MCC \x3C值> MCC(注意大写) 460
--MNC \x3C值> MNC(注意大写) 01
--headed 打开可见浏览器 false

示例

node 5gc.js nrf add NRF-TEST --project XW_S5GC_1
node 5gc.js nrf add NRF-PROD --project XW_S5GC_1 --http2_sip 10.0.0.50 --MCC 460 --MNC 01

nrf-edit-skill.js

功能:编辑指定工程下的 NRF 实例(支持单条和批量)。

使用方式

# 批量编辑:修改工程下所有 NRF 的字段
node 5gc.js nrf edit --project \x3C工程> --set-\x3C字段> \x3C值>

# 单条编辑:修改指定名称的 NRF
node 5gc.js nrf edit --name \x3C名称> --project \x3C工程> --set-\x3C字段> \x3C值>

可编辑字段

参数 说明
--set-http2_sip \x3CIP> 修改 HTTP2 服务 IP
--set-http2_port \x3C端口> 修改 HTTP2 端口
--set-MCC \x3C值> 修改 MCC(注意大写)
--set-MNC \x3C值> 修改 MNC(注意大写)

示例

# 批量修改工程下所有 NRF 的 HTTP2 IP
node 5gc.js nrf edit --project XW_S5GC_1 --set-http2_sip 10.10.10.99

# 修改指定 NRF 的 HTTP2 IP 和 MNC
node 5gc.js nrf edit --name nrf1 --project XW_S5GC_1 --set-http2_sip 10.10.10.88 --set-MNC 01

NRF(网络存储功能)

nrf-add-skill.js

功能:在指定工程下添加一个 NRF 实例。

使用方式

node 5gc.js nrf add \x3C名称> [选项...]
node skills/5gc/scripts/nrf-add-skill.js \x3C名称> [选项...]

参数

参数 说明 默认值
\x3C名称> NRF 实例名称(位置参数) 必填
--project \x3C工程> / -p \x3C工程> 目标工程名称 XW_S5GC_1
--url \x3C地址> 5GC 仪表地址 https://192.168.3.89
--http2_sip \x3CIP> HTTP2 服务 IP 192.168.20.100
--http2_port \x3C端口> HTTP2 端口 80
--MCC \x3C值> MCC(注意大写) 460
--MNC \x3C值> MNC(注意大写) 01
--headed 打开可见浏览器 false

示例

node 5gc.js nrf add NRF-TEST --project XW_S5GC_1
node 5gc.js nrf add NRF-PROD --project XW_S5GC_1 --http2_sip 10.0.0.50 --MCC 460 --MNC 01

nrf-edit-skill.js

功能:编辑指定工程下的 NRF 实例(支持单条和批量)。

使用方式

# 批量编辑:修改工程下所有 NRF 的字段
node 5gc.js nrf edit --project \x3C工程> --set-\x3C字段> \x3C值>

# 单条编辑:修改指定名称的 NRF
node 5gc.js nrf edit --name \x3C名称> --project \x3C工程> --set-\x3C字段> \x3C值>

可编辑字段

参数 说明
--set-http2_sip \x3CIP> 修改 HTTP2 服务 IP
--set-http2_port \x3C端口> 修改 HTTP2 端口
--set-MCC \x3C值> 修改 MCC(注意大写)
--set-MNC \x3C值> 修改 MNC(注意大写)

示例

# 批量修改工程下所有 NRF 的 HTTP2 IP
node 5gc.js nrf edit --project XW_S5GC_1 --set-http2_sip 10.10.10.99

# 修改指定 NRF 的 HTTP2 IP 和 MNC
node 5gc.js nrf edit --name nrf1 --project XW_S5GC_1 --set-http2_sip 10.10.10.88 --set-MNC 01

全局参数参考

以下参数所有脚本均支持:

参数 说明 适用范围
--url \x3C地址> 5GC 仪表 URL 所有脚本
--project \x3C工程> / -p \x3C工程> 目标工程名称 所有脚本
--headed 打开可见 Chromium 窗口(调试用) 所有脚本
--set-\x3C字段> \x3C值> 修改指定字段值 所有 edit 脚本
--name \x3C名称> 按名称精确匹配 所有 edit 脚本
--id \x3CID> 按 ID 直接定位 所有 edit 脚本

字段参考

AMF 字段

字段名 说明 示例值
mcc 移动国家码 460
mnc 移动网络码 01
ngap_sip NGAP 信令面 IP 10.200.1.50
ngap_port NGAP 端口 38412
http2_sip HTTP2 服务 IP 10.200.1.51
http2_port HTTP2 端口 8080
stac 起始 TAC 101
etac 结束 TAC 102
region_id 区域 ID 1
set_id Set ID 1
pointer 指针 1
ea[NEA0] ~ ea[128-NEA3] 加密算法(默认全选) 1
ia[NIA0] ~ ia[128-NIA3] 完整性保护算法(默认全选) 1

UDM/AUSF 字段

字段名 说明 示例值
count 实例数量 3
sip SIP 服务 IP 10.0.0.100
port 端口 80
auth_method 认证方法 5G_AKA
scheme 协议类型 HTTP
priority 优先级 8

SMF/PGW-C 字段

字段名 说明 示例值
pfcp_sip PFCP 信令面 IP 10.10.10.50
n3_ip N3 接口 IP 10.10.10.50
n6_ip N6 接口 IP 10.10.10.51
http2_sip HTTP2 服务 IP 10.10.10.50
dnn DNN(数据网络名) internet
snssai_sst NSSAI SST 1
snssai_sd NSSAI SD ffffff
mcc MCC 460
mnc MNC 01
pdu_capacity PDU 会话容量 200000

UPF/PGW-U 字段

字段名 说明 示例值
n3_ip N3 接口 IP 192.168.20.30
n4_ip N4 接口 IP(PFCP) 192.168.20.30
n6_ip N6 接口 IP 192.168.20.31
n6_gw N6 网关 IP 192.168.20.1
dnn DNN internet
static_arp 静态 ARP 192.168.20.254
sst NSSAI SST 1
sd NSSAI SD ffffff
stac 起始 TAC 101
etac 结束 TAC 102

GNB 字段

字段名 说明 示例值
ngap_sip NGAP 信令面 IP 200.20.20.50
user_sip_ip_v4 用户面 IPv4 2.2.2.2
user_sip_ip_v6 用户面 IPv6 ::1
mcc MCC 460
mnc MNC 60
stac 起始 TAC 0
etac 结束 TAC 0
node_id 节点 ID 70
cell_count 小区数量 1
replay_ip 回放 IP 0.0.0.0
replay_port 回放端口 0

UE 字段

字段名 说明 示例值
s_imsi 起始 IMSI(15位) 460001234567890
msisdn MSISDN(13-15位,86开头) 8613888888888
mcc MCC 460
mnc MNC 01
key KI 密钥(32位 hex) 001122...
op_opc OPc 密钥(32位 hex) aabbcc...
imeisv IMEISV(15位,偶数) 8611111111111111
nssai_sst NSSAI SST 1
nssai_sd NSSAI SD 111111
user_sip_ip_v4 用户面 IPv4 自动分配
user_sip_ip_v6 用户面 IPv6 自动分配
replay_ip 回放 IP 0.0.0.0
replay_port 回放端口 0

PCF/PCRF 字段

字段名 说明 示例值
http2_sip HTTP2 服务 IP 192.168.20.90
http2_port HTTP2 端口 80
MCC MCC(大写) 460
MNC MNC(大写) 01
count 实例数量 1
安全使用建议
This skill appears to implement the claimed 5GC web dashboard automation, but exercise caution before installing: - Sensitive artifacts: the package includes hard-coded login credentials ([email protected] / dotouch) and a Playwright storageState JSON containing cookies and an auth.token (base64-like). If the target dashboard is real, these files provide direct access and should not be shipped or trusted. Delete or rotate any embedded credentials and remove the .sessions/*.json files before use. - Local persistence: the scripts will save session storage to a .sessions/ directory inside the skill, which stores authentication tokens on disk. Be aware this is persistent and accessible to anyone with access to the host filesystem. - Network scope: the scripts only target the dashboard URL (default https://192.168.3.89). Confirm that this is the intended, isolated test environment and not a production system you shouldn't automate with third-party code. - Code review: because this skill executes Node.js code (Playwright) from the skill package, only install it from a trusted source. Inspect the omitted/remaining files before running. Note the string literal 'REPLACED' seen in one script — confirm whether that is intentional or a placeholder that alters behavior. - Runtime safety: the CLI uses child process spawning with shell: true. Avoid passing untrusted input to the CLI to prevent shell-injection risk. If you need to proceed: remove or regenerate embedded credentials/session tokens, run the scripts in an isolated environment (network-restricted VM or container) against a known test instance, and consider running a security audit or executing the scripts step-by-step rather than giving them unfettered access.
功能分析
Type: OpenClaw Skill Name: 5gc-web-dotouch Version: 2.0.0 The skill bundle provides automation for a 5G Core (5GC) web dashboard using Playwright. It contains several significant security vulnerabilities and suspicious elements, most notably the inclusion of a session file (5gc_session_192_168_3_89.json) containing active authentication tokens and hardcoded credentials ([email protected]) in multiple scripts. Furthermore, the main entry point 5gc.js and the test script 5gc_test_all.js are vulnerable to shell injection because they use spawn with shell: true on unsanitized command-line arguments. The presence of a 'REPLACED' placeholder in amf-add-skill.js and mismatched versioning between _meta.json and SKILL.md suggest the code may be incomplete or improperly maintained. While these flaws pose a high risk of exploitation, there is no definitive evidence of intentional malicious behavior or data exfiltration to external domains.
能力评估
Purpose & Capability
Name/description (5GC web dashboard automation) match the included scripts: many Playwright-based Node.js scripts to add/edit AMF/UDM/SMF/UPF/GNB/UE/PCF/NRF. No unrelated cloud credentials, binaries, or services are requested.
Instruction Scope
Runtime instructions and scripts operate on the web dashboard at https://192.168.3.89 and save/reuse Playwright storageState (session cookies and localStorage). The repo contains hard-coded default credentials ([email protected] / dotouch) and a .json session file with cookie/localStorage values (including base64-encoded tokens). SKILL.md and scripts instruct creating and reusing .sessions/ files under the skill directory — this stores authentication tokens on disk. While session persistence is expected for automation, bundling session tokens and credentials in the skill package is unexpected and risky.
Install Mechanism
No install spec or remote downloads are declared. This is an instruction-and-script package that requires Node.js and Playwright to be installed by the user — a low-risk install mechanism. No external archives or third‑party package installs are embedded by the skill itself.
Credentials
The skill declares no required environment variables or external credentials, which is coherent. However, the scripts contain hard-coded login credentials and an included session storage file with cookies/localStorage (including an auth.token). Embedding these credentials/session tokens inside the package is unnecessary for a generic automation skill and could leak access if the dashboard is real. The skill also writes session state to .sessions/ under the skill directory (expected for Playwright reuse) — users should be aware this persists credentials locally.
Persistence & Privilege
The skill is user-invocable, not always:true. It persists session state in its own .sessions/ folder (normal for Playwright-based automation). It does not request system-wide config edits or other skills' credentials. The 'spawn' calls use shell: true to invoke child node processes (standard for delegating to sub-scripts) — be cautious if untrusted input could reach those shells.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install 5gc-web-dotouch
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /5gc-web-dotouch 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.0.0
修复工程选择逻辑bug:当目标工程在第一行但非选中状态时误判为已选中,导致edit/add操作落在错误工程上;影响smf/upf/gnb的edit和add脚本
v1.1.0
修复工程选择逻辑bug:当工程名在第一行但非选中状态时误判为已选中,导致切换工程失败;影响 smf/gnb/upf 的 edit 和 add 脚本
v1.0.2
重新发布,修复文档
v1.0.1
首次发布:支持AMF/UDM/AUSF/SMF/PGW-C/UPF/PGW-U/GNB/UE/PCF/NRF的添加与编辑
v1.0.0
技能发布,支持AMF/UDM/AUSF/SMF/PGW-C/UPF/PGW-U/GNB/UE批量编辑
元数据
Slug 5gc-web-dotouch
版本 2.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 5
常见问题

5GC Web仪表自动化 是什么?

5GC Web仪表自动化技能,支持AMF/UDM/AUSF/SMF/PGW-C/UPF/PGW-U/GNB/UE/PCF/NRF的批量添加与编辑. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 113 次。

如何安装 5GC Web仪表自动化?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install 5gc-web-dotouch」即可一键安装,无需额外配置。

5GC Web仪表自动化 是免费的吗?

是的,5GC Web仪表自动化 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

5GC Web仪表自动化 支持哪些平台?

5GC Web仪表自动化 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 5GC Web仪表自动化?

由 liuwei120(@liuwei120)开发并维护,当前版本 v2.0.0。

💬 留言讨论