Skip to content

feat: Implement real connection flow in Controller (#79)#80

Open
gonfva wants to merge 1 commit into
masterfrom
feature/79-real-connection-flow
Open

feat: Implement real connection flow in Controller (#79)#80
gonfva wants to merge 1 commit into
masterfrom
feature/79-real-connection-flow

Conversation

@gonfva

@gonfva gonfva commented Jan 18, 2026

Copy link
Copy Markdown
Owner

Replace the stub implementation in Controller with real functionality that:

  • Validates configuration and credentials before connecting
  • Provisions cloud infrastructure using AWS or Hetzner provider
  • Establishes a WireGuard tunnel to the provisioned server
  • Properly tears down resources on disconnect

Key changes:

  • Add ControllerDeps struct for dependency injection
  • Add ProviderFactory function type for creating providers
  • Implement real doConnect() with config validation, provider creation, credential validation, key pair generation, and WireGuard connection
  • Implement real doDisconnect() and cleanup() for proper resource teardown
  • Wire up dependencies in main.go including credential storage on settings save
  • Add comprehensive tests with mock implementations

Description

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Testing

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have added tests that prove my fix/feature works
  • New and existing unit tests pass locally
  • I have updated documentation if needed

Replace the stub implementation in Controller with real functionality that:
- Validates configuration and credentials before connecting
- Provisions cloud infrastructure using AWS or Hetzner provider
- Establishes a WireGuard tunnel to the provisioned server
- Properly tears down resources on disconnect

Key changes:
- Add ControllerDeps struct for dependency injection
- Add ProviderFactory function type for creating providers
- Implement real doConnect() with config validation, provider creation,
  credential validation, key pair generation, and WireGuard connection
- Implement real doDisconnect() and cleanup() for proper resource teardown
- Wire up dependencies in main.go including credential storage on settings save
- Add comprehensive tests with mock implementations

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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