mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-20 06:56:17 -05:00
feat: build and publish Windows NSH packages with verified updates
This commit is contained in:
113 files changed
+7264
-801
No files matched your search
@@ -0,0 +1,18 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$request = [Console]::In.ReadToEnd() | ConvertFrom-Json
|
||||
switch ($request.operation) {
|
||||
'add' {
|
||||
Add-DnsClientNrptRule -Namespace ([string[]]$request.namespaces) -NameServers ([string[]]$request.servers) -Comment $request.tag | Out-Null
|
||||
}
|
||||
'remove' {
|
||||
Get-DnsClientNrptRule | Where-Object { $_.Comment -eq $request.tag } | ForEach-Object {
|
||||
Remove-DnsClientNrptRule -Name $_.Name -Force
|
||||
}
|
||||
}
|
||||
'clear-stale' {
|
||||
Get-DnsClientNrptRule | Where-Object { $_.Comment -like 'GPConnect:*' } | ForEach-Object {
|
||||
Remove-DnsClientNrptRule -Name $_.Name -Force
|
||||
}
|
||||
}
|
||||
default { throw 'Invalid DNS policy operation' }
|
||||
}
|
||||
Reference in new issue
Block a user