Skip to content

feat(wg-config): integrate shared validator into TunnelConfig + import flows#14

Merged
CallMeTechie merged 5 commits into
mainfrom
feat/wg-config-validator
May 31, 2026
Merged

feat(wg-config): integrate shared validator into TunnelConfig + import flows#14
CallMeTechie merged 5 commits into
mainfrom
feat/wg-config-validator

Conversation

@CallMeTechie
Copy link
Copy Markdown
Owner

Integrates the WgConfigValidator (1:1 Kotlin port of shared validateWgConfig) into the Android client:

  • TunnelConfig.parse: fail-closed via WgConfigValidator.validate before parsing
  • SetupViewModel.importConfig + SettingsViewModel.importConfigFromUri: replace naive [Interface] check with full validator, log rejects, surface i18n error
  • new setup_invalid_config string (de + en)
  • update TunnelConfigTest fixtures to keys that pass the stricter validation

Part of the cross-repo wg-config-validator rollout.

…t flows

- TunnelConfig.parse: fail-closed via WgConfigValidator.validate before parsing
- SetupViewModel.importConfig + SettingsViewModel.importConfigFromUri:
  replace naive [Interface] check with full validator, log rejects, i18n error
- add setup_invalid_config string (de + en)
- update TunnelConfigTest fixtures to keys that pass stricter validation
importConfig now runs WgConfigValidator (strict), so the old PrivateKey=abc/
PublicKey=xyz dummy config is rejected and the success path never fires.
Swap to a fixture with valid 43+pad base64 keys (same as TunnelConfigTest).
@CallMeTechie CallMeTechie merged commit 2a308ef into main May 31, 2026
3 checks passed
@CallMeTechie CallMeTechie deleted the feat/wg-config-validator branch May 31, 2026 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant