2025-10-30 03:44:31 +01:00
|
|
|
package internal
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"context"
|
|
|
|
|
"fmt"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func MullvadTest(ctx context.Context) error {
|
2025-11-18 22:08:25 +00:00
|
|
|
expectedSecrets := []string{
|
|
|
|
|
"Wireguard private key",
|
|
|
|
|
"Wireguard address",
|
2025-10-30 03:44:31 +01:00
|
|
|
}
|
2025-11-18 22:08:25 +00:00
|
|
|
secrets, err := readSecrets(ctx, expectedSecrets)
|
2025-10-30 03:44:31 +01:00
|
|
|
if err != nil {
|
2025-11-18 22:08:25 +00:00
|
|
|
return fmt.Errorf("reading secrets: %w", err)
|
2025-10-30 03:44:31 +01:00
|
|
|
}
|
|
|
|
|
|
2025-11-18 22:08:25 +00:00
|
|
|
env := []string{
|
|
|
|
|
"VPN_SERVICE_PROVIDER=mullvad",
|
|
|
|
|
"VPN_TYPE=wireguard",
|
|
|
|
|
"LOG_LEVEL=debug",
|
|
|
|
|
"SERVER_COUNTRIES=USA",
|
|
|
|
|
"WIREGUARD_PRIVATE_KEY=" + secrets[0],
|
|
|
|
|
"WIREGUARD_ADDRESSES=" + secrets[1],
|
2025-10-30 03:44:31 +01:00
|
|
|
}
|
2025-11-18 22:08:25 +00:00
|
|
|
return simpleTest(ctx, env)
|
2025-10-30 03:44:31 +01:00
|
|
|
}
|