Skip to content

Commit 77118e8

Browse files
authored
NYM-915: Used signed Split Tunnel Driver. (#5053)
* NYM-915: Continue Microsoft signing of ST Driver. - Adjust structure of the `.cab` file so the driver files are not in the root of the archive. * Fix Sign CAB input path. * More work on `.cab` internal structure. * Yes more `.cab` file structure shinanigans. * Use the signed driver files.
1 parent 8703539 commit 77118e8

6 files changed

Lines changed: 76 additions & 31 deletions

File tree

.github/workflows/build-nym-vpn-core-windows.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ env:
1919
CARGO_TERM_COLOR: always
2020
LIBS_PATH: build/lib/x86_64-pc-windows-msvc
2121
WINFW_PATH: build/winfw/x64-Release
22-
STDRIVER_PATH: build/st-driver/x64-Release
22+
STDRIVER_PATH: nym-vpn-windows/split-tunnel-driver/signed
2323
WINTUN_DIST_DIR: wintun-dist
2424
UPLOAD_DIR_WINDOWS: windows_artifacts
2525

@@ -30,13 +30,9 @@ jobs:
3030
build-winfw-windows:
3131
uses: ./.github/workflows/build-winfw-windows.yml
3232

33-
build-st-driver-windows:
34-
uses: ./.github/workflows/build-st-driver-windows.yml
35-
3633
build-windows:
3734
if: github.actor != 'dependabot[bot]'
38-
needs:
39-
[build-wireguard-go-windows, build-winfw-windows, build-st-driver-windows]
35+
needs: [build-wireguard-go-windows, build-winfw-windows]
4036
runs-on: custom-windows-11
4137
outputs:
4238
UPLOAD_DIR_WINDOWS: ${{ env.UPLOAD_DIR_WINDOWS }}
@@ -94,12 +90,6 @@ jobs:
9490
name: winfw
9591
path: ${{ env.WINFW_PATH }}
9692

97-
- name: Download st-driver artifacts
98-
uses: actions/download-artifact@v8
99-
with:
100-
name: st-driver
101-
path: ${{ env.STDRIVER_PATH }}
102-
10393
- name: Download wintun
10494
shell: vsdevenv x64 pwsh {0}
10595
working-directory: nym-vpn-core

.github/workflows/sign-st-driver-windows.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,12 @@ jobs:
5454
$lines = @(
5555
'.OPTION EXPLICIT',
5656
'.Set CabinetNameTemplate=nymvpn-split-tunnel.cab',
57-
'.Set DiskDirectoryTemplate=.',
57+
'.Set DiskDirectory1=.',
5858
'.Set CompressionType=MSZIP',
59-
'"st-driver\nymvpn-split-tunnel.sys"',
60-
'"st-driver\nymvpn-split-tunnel.cat"',
61-
'"st-driver\nymvpn-split-tunnel.inf"'
59+
'.Set DestinationDir=driver',
60+
'"st-driver\nymvpn-split-tunnel.sys" "nymvpn-split-tunnel.sys"',
61+
'"st-driver\nymvpn-split-tunnel.cat" "nymvpn-split-tunnel.cat"',
62+
'"st-driver\nymvpn-split-tunnel.inf" "nymvpn-split-tunnel.inf"'
6263
)
6364
$lines | Set-Content -Path nymvpn-split-tunnel.ddf
6465
makecab /F nymvpn-split-tunnel.ddf
@@ -89,7 +90,7 @@ jobs:
8990
-password="$SSL_COM_PASSWORD" \
9091
-totp_secret="$SSL_COM_TOTP_SECRET" \
9192
-credential_id="$SSL_COM_CREDENTIAL_ID" \
92-
-input_file_path=nymvpn-split-tunnel.cab \
93+
-input_file_path="nymvpn-split-tunnel.cab" \
9394
-output_dir_path=signed
9495
9596
- name: Move things around to prepare for upload

nym-vpn-app/src-tauri/scripts/sign.sh

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
#!/bin/bash
22
#
3-
# This custom code signing script is used to sign more than just the Tauri app (NymVPN.exe),
4-
# but when it is used to sign that, it will also sign the daemon and the split-tunnel driver
5-
# artifacts, ready for bundling.
6-
#
73
# This assumes the cwd is src-tauri/.
84
#
95

@@ -38,15 +34,6 @@ function sign {
3834
fi
3935
}
4036

41-
exe=$1
42-
43-
# If we are signing the Tauri app, then also sign the daemon and split-tunnel driver.
44-
if [[ "$exe" == *NymVPN.exe ]]; then
45-
for additonal in "nym-vpnd.exe" "nymvpn-split-tunnel.sys" "nymvpn-split-tunnel.cat"; do
46-
sign "$additonal"
47-
done
48-
fi
49-
50-
sign "$exe"
37+
sign "$1"
5138

5239
exit 0
Binary file not shown.
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
;
2+
; nymvpn-split-tunnel.inf
3+
;
4+
5+
[Version]
6+
Signature="$WINDOWS NT$"
7+
Class=WFPCALLOUTS
8+
ClassGuid={57465043-616C-6C6F-7574-5F636C617373}
9+
Provider=%ManufacturerName%
10+
CatalogFile=nymvpn-split-tunnel.cat
11+
PnpLockdown=1
12+
DriverVer = 04/07/2026,14.22.37.860
13+
14+
[DestinationDirs]
15+
DefaultDestDir = 12
16+
17+
; ================= Class section =====================
18+
19+
[ClassInstall32]
20+
AddReg=SplitTunnelClassReg
21+
22+
[SplitTunnelClassReg]
23+
HKR,,,0,%ClassName%
24+
HKR,,Icon,,-5
25+
26+
[SourceDisksNames]
27+
1 = %DiskName%,,,""
28+
29+
[SourceDisksFiles]
30+
nymvpn-split-tunnel.sys = 1,,
31+
32+
;*****************************************
33+
; Install Section
34+
;*****************************************
35+
36+
[Manufacturer]
37+
%ManufacturerName%=Standard,NTamd64.10.0
38+
39+
[Standard.NTamd64.10.0]
40+
%nymvpn-split-tunnel.DeviceDesc%=nymvpn-split-tunnel_Device, Root\nymvpn-split-tunnel
41+
42+
[nymvpn-split-tunnel_Device.NT]
43+
CopyFiles=Drivers_Dir
44+
45+
[Drivers_Dir]
46+
nymvpn-split-tunnel.sys
47+
48+
;-------------- Service installation
49+
[nymvpn-split-tunnel_Device.NT.Services]
50+
AddService = nymvpn-split-tunnel,%SPSVCINST_ASSOCSERVICE%, nymvpn-split-tunnel_Service_Inst
51+
52+
; -------------- nymvpn-split-tunnel driver install sections
53+
[nymvpn-split-tunnel_Service_Inst]
54+
DisplayName = %nymvpn-split-tunnel.SVCDESC%
55+
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
56+
StartType = 3 ; SERVICE_DEMAND_START
57+
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
58+
ServiceBinary = %12%\nymvpn-split-tunnel.sys
59+
60+
[Strings]
61+
SPSVCINST_ASSOCSERVICE= 0x00000002
62+
ManufacturerName="Nym Technologies SA"
63+
ClassName="Nym VPN Split Tunnel"
64+
DiskName = "Nym VPN Split Tunnel Installation Disk"
65+
nymvpn-split-tunnel.DeviceDesc = "Nym VPN Split Tunnel Device"
66+
nymvpn-split-tunnel.SVCDESC = "Nym VPN Split Tunnel Service"
67+
Binary file not shown.

0 commit comments

Comments
 (0)