feat: stabilize mobile runtime and VPN portal (#2536)

This commit is contained in:
KKRainbow
2026-08-29 13:40:56 +08:00
committed by GitHub
parent 4a10d1c2b9
commit 25f6e2dc5e
31 changed files with 1415 additions and 1302 deletions
@@ -27,8 +27,8 @@ vpn_portal_add_client: 添加客户端
vpn_portal_no_clients: 尚未配置客户端
vpn_portal_client_name: 客户端名称
vpn_portal_client_name_placeholder: 例如:alice-phone
vpn_portal_client_virtual_ip: 虚拟网地址
vpn_portal_client_virtual_ip_placeholder: 例如:10.126.126.10
vpn_portal_client_virtual_ip: 虚拟网 CIDR
vpn_portal_client_virtual_ip_placeholder: 例如:10.126.126.10/24
vpn_portal_client_groups: ACL 组
vpn_portal_client_groups_placeholder: 选择 ACL 组
vpn_portal_remove_client: 删除客户端
@@ -27,8 +27,8 @@ vpn_portal_add_client: Add Client
vpn_portal_no_clients: No clients configured
vpn_portal_client_name: Client Name
vpn_portal_client_name_placeholder: "Example: alice-phone"
vpn_portal_client_virtual_ip: Virtual Network Address
vpn_portal_client_virtual_ip_placeholder: "Example: 10.126.126.10"
vpn_portal_client_virtual_ip: Virtual Network CIDR
vpn_portal_client_virtual_ip_placeholder: "Example: 10.126.126.10/24"
vpn_portal_client_groups: ACL Groups
vpn_portal_client_groups_placeholder: Select ACL groups
vpn_portal_remove_client: Remove Client
@@ -331,7 +331,7 @@ function makeConfig(): NetworkConfig {
wireguard_private_key: 'portal-private-key',
clients: [{
name: 'phone-a',
virtual_ip: '10.1.2.10',
virtual_ip: '10.1.2.10/24',
groups: ['ops'],
}],
},
@@ -421,7 +421,7 @@ describe('Config.vue network config projection', () => {
expect(input(wrapper, '#vpn_portal_wireguard_listen').value).toBe('0.0.0.0:22023')
expect(input(wrapper, '#vpn_portal_wireguard_private_key').value).toBe('portal-private-key')
expect(input(wrapper, '#vpn_portal_client_name_0').value).toBe('phone-a')
expect(input(wrapper, '#vpn_portal_client_virtual_ip_0').value).toBe('10.1.2.10')
expect(input(wrapper, '#vpn_portal_client_virtual_ip_0').value).toBe('10.1.2.10/24')
expect(input(wrapper, '#vpn_portal_client_groups_0').value).toBe('ops')
expect(input(wrapper, '#dev_name').value).toBe('tun-test')
expect(input(wrapper, '#mtu').value).toBe('1280')
@@ -455,7 +455,7 @@ describe('Config.vue network config projection', () => {
await setInput(wrapper, '#vpn_portal_wireguard_listen', '[::]:23000')
await setInput(wrapper, '#vpn_portal_wireguard_private_key', 'edited-private-key')
await setInput(wrapper, '#vpn_portal_client_name_0', 'laptop-a')
await setInput(wrapper, '#vpn_portal_client_virtual_ip_0', '10.1.2.20')
await setInput(wrapper, '#vpn_portal_client_virtual_ip_0', '10.1.2.20/24')
await setInput(wrapper, '#vpn_portal_client_groups_0', 'ops,admin')
await setInput(wrapper, 'input[data-add-label="add_listener_url"]', 'tcp://0.0.0.0:13010')
await setInput(wrapper, '#dev_name', 'tun-edited')
@@ -489,7 +489,7 @@ describe('Config.vue network config projection', () => {
wireguard_private_key: 'edited-private-key',
clients: [{
name: 'laptop-a',
virtual_ip: '10.1.2.20',
virtual_ip: '10.1.2.20/24',
groups: ['ops', 'admin'],
}],
},
@@ -525,7 +525,7 @@ describe('Config.vue network config projection', () => {
wireguard_private_key: 'edited-private-key',
clients: [{
name: 'laptop-a',
virtual_ip: '10.1.2.20',
virtual_ip: '10.1.2.20/24',
groups: ['ops', 'admin'],
}],
},