fix android (#531)

This commit is contained in:
Sijie.Sun
2024-12-23 19:38:32 -05:00
committed by GitHub
parent f3de00be37
commit 2f4a097787
17 changed files with 147 additions and 159 deletions

View File

@@ -89,7 +89,7 @@ class TauriVpnService : VpnService() {
for (route in routes) {
val ipParts = route.split("/")
if (ipParts.size != 2) throw IllegalArgumentException("Invalid IP addr string")
if (ipParts.size != 2) throw IllegalArgumentException("Invalid route cidr string")
builder.addRoute(ipParts[0], ipParts[1].toInt())
}

View File

@@ -3,7 +3,7 @@ const COMMANDS: &[&str] = &[
"prepare_vpn",
"start_vpn",
"stop_vpn",
"register_listener",
"registerListener",
];
fn main() {

View File

@@ -0,0 +1,13 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-registerListener"
description = "Enables the registerListener command without any pre-configured scope."
commands.allow = ["registerListener"]
[[permission]]
identifier = "deny-registerListener"
description = "Denies the registerListener command without any pre-configured scope."
commands.deny = ["registerListener"]

View File

@@ -69,6 +69,32 @@ Denies the prepare_vpn command without any pre-configured scope.
<tr>
<td>
`vpnservice:allow-registerListener`
</td>
<td>
Enables the registerListener command without any pre-configured scope.
</td>
</tr>
<tr>
<td>
`vpnservice:deny-registerListener`
</td>
<td>
Denies the registerListener command without any pre-configured scope.
</td>
</tr>
<tr>
<td>
`vpnservice:allow-register-listener`
</td>

View File

@@ -314,6 +314,16 @@
"type": "string",
"const": "deny-prepare-vpn"
},
{
"description": "Enables the registerListener command without any pre-configured scope.",
"type": "string",
"const": "allow-registerListener"
},
{
"description": "Denies the registerListener command without any pre-configured scope.",
"type": "string",
"const": "deny-registerListener"
},
{
"description": "Enables the register_listener command without any pre-configured scope.",
"type": "string",