Skip to content

chore: reconfigure VPN on reinstall #84

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 3, 2025

Conversation

ethanndickson
Copy link
Member

@ethanndickson ethanndickson commented Feb 28, 2025

Improvement over the change in #76 - reconfigures on launch if the VPN is unconfigured, but an existing session is present in UserDefaults & Keychain.

Additionally:

  • Changes the waiting for connectivity timeout on the dylib download from 7 days to 15 seconds.
  • Sets the icon to the 'off' opacity on startup. Previously it was only set to 'off' on startup if the VPN was configured. If the VPN is connected on startup, it'll immediately go back to the 'on' opacity.

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ethanndickson ethanndickson force-pushed the ethan/reconfigure-on-reinstall branch from be8e02f to 194f4bb Compare February 28, 2025 08:03
@ethanndickson ethanndickson marked this pull request as ready for review February 28, 2025 08:05
@@ -122,7 +122,7 @@ struct LoginForm: View {
).disabled(true)
}
Section {
SecureField("Session Token", text: $sessionToken, prompt: Text("●●●●●●●●"))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also removed the prompt because it was a lil confusing, and also the dots were way too big with no way to change it.

Comment on lines 33 to 36
// URLSession's waiting for connectivity sometimes hangs even when
// the network is up so this is deliberately short (15s) to avoid a
// poor UX where it appears stuck.
sessionConfig.timeoutIntervalForResource = 15
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a super weird bug, the VPN was stuck connecting after waking my laptop. However, when I cut my network connection, I saw a download failed error, which would suggest that's where it was stuck.

@@ -38,7 +38,7 @@ struct LoginForm: View {
.animation(.easeInOut, value: currentPage)
.onAppear {
baseAccessURL = state.baseAccessURL?.absoluteString ?? baseAccessURL
sessionToken = ""
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We clear the Keychain password on Sign out - so I don't think this does anything, actually.

@ethanndickson ethanndickson force-pushed the ethan/reconfigure-on-reinstall branch from 194f4bb to 36fa256 Compare February 28, 2025 08:17
@ethanndickson ethanndickson merged commit a906e98 into main Mar 3, 2025
4 checks passed
@deansheather deansheather deleted the ethan/reconfigure-on-reinstall branch March 7, 2025 07:38
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.

2 participants