chore(ci): test protonvpn OpenVPN with port forwarding

This commit is contained in:
Quentin McGaw
2026-05-03 02:20:33 +00:00
parent f8400c1b1c
commit c47cc90181
3 changed files with 35 additions and 3 deletions
+10 -3
View File
@@ -78,7 +78,7 @@ jobs:
github.event_name == 'release' ||
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]')
)
needs: [verify]
needs: [ verify ]
runs-on: ubuntu-latest
environment: secrets
steps:
@@ -95,13 +95,20 @@ jobs:
run: go build -C ./ci -o runner ./cmd/main.go
- name: Run Gluetun container with Mullvad configuration
run: echo -e "${{ secrets.MULLVAD_WIREGUARD_PRIVATE_KEY }}\n${{ secrets.MULLVAD_WIREGUARD_ADDRESS }}" | ./ci/runner mullvad
run: echo -e "${{ secrets.MULLVAD_WIREGUARD_PRIVATE_KEY }}\n${{
secrets.MULLVAD_WIREGUARD_ADDRESS }}" | ./ci/runner mullvad
- name: Run Gluetun container with ProtonVPN Wireguard and port forwarding
configuration
run: echo -e "${{ secrets.PROTONVPN_WIREGUARD_PRIVATE_KEY }}" | ./ci/runner
protonvpn-wireguard-port-forwarding
- name: Run Gluetun container with ProtonVPN OpenVPN and port forwarding
configuration
run: echo -e "${{ secrets.PROTONVPN_OPENVPN_USER }}\n${{
secrets.PROTONVPN_OPENVPN_PASSWORD }}" | ./ci/runner
protonvpn-openvpn-port-forwarding
codeql:
runs-on: ubuntu-latest
permissions:
@@ -127,7 +134,7 @@ jobs:
github.event_name == 'release' ||
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]')
)
needs: [verify, verify-private, codeql]
needs: [ verify, verify-private, codeql ]
permissions:
actions: read
contents: read
+2
View File
@@ -25,6 +25,8 @@ func main() {
err = internal.MullvadTest(ctx, logger)
case "protonvpn-wireguard-port-forwarding":
err = internal.ProtonVPNWireguardPortForwardingTest(ctx, logger)
case "protonvpn-openvpn-port-forwarding":
err = internal.ProtonVPNOpenVPNPortForwardingTest(ctx, logger)
default:
err = fmt.Errorf("unknown command: %s", os.Args[1])
}
+23
View File
@@ -27,3 +27,26 @@ func ProtonVPNWireguardPortForwardingTest(ctx context.Context, logger Logger) er
const timeout = 80 * time.Second
return runContainerTest(ctx, env, []*regexp.Regexp{successRegexp, portForwardingRegexp}, timeout, logger)
}
func ProtonVPNOpenVPNPortForwardingTest(ctx context.Context, logger Logger) error {
expectedSecrets := []string{
"OpenVPN username",
"OpenVPN password",
}
secrets, err := readSecrets(ctx, expectedSecrets, logger)
if err != nil {
return fmt.Errorf("reading secrets: %w", err)
}
env := []string{
"VPN_SERVICE_PROVIDER=protonvpn",
"VPN_TYPE=openvpn",
"LOG_LEVEL=debug",
"SERVER_COUNTRIES=United States",
"OPENVPN_USER=" + secrets[0],
"OPENVPN_PASSWORD=" + secrets[1],
"VPN_PORT_FORWARDING=on",
}
const timeout = 80 * time.Second
return runContainerTest(ctx, env, []*regexp.Regexp{successRegexp, portForwardingRegexp}, timeout, logger)
}