Skip to content

chore: remove "VPN" from setting description #86

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
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Coder Desktop/Coder Desktop/NetworkExtension.swift
Original file line number Diff line number Diff line change
@@ -50,7 +50,7 @@ extension CoderVPNService {
logger.debug("inserting new tunnel")

let tm = NETunnelProviderManager()
tm.localizedDescription = "CoderVPN"
tm.localizedDescription = "Coder"
tm.protocolConfiguration = proto

logger.debug("saving new tunnel")
8 changes: 4 additions & 4 deletions Coder Desktop/Coder Desktop/SystemExtension.swift
Original file line number Diff line number Diff line change
@@ -11,13 +11,13 @@ enum SystemExtensionState: Equatable, Sendable {
var description: String {
switch self {
case .uninstalled:
"VPN SystemExtension is waiting to be activated"
"NE SystemExtension is waiting to be activated"
case .needsUserApproval:
"VPN SystemExtension needs user approval to activate"
"NE SystemExtension needs user approval to activate"
case .installed:
"VPN SystemExtension is installed"
"NE SystemExtension is installed"
case let .failed(error):
"VPN SystemExtension failed with error: \(error)"
"NE SystemExtension failed with error: \(error)"
}
}
}
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ struct GeneralTab: View {
}
Section {
Toggle(isOn: $state.stopVPNOnQuit) {
Text("Stop VPN on Quit")
Text("Stop Coder Connect on Quit")
}
}
}.formStyle(.grouped)
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ struct LiteralHeadersSection<VPN: VPNService>: View {
Toggle(isOn: $state.useLiteralHeaders) {
Text("HTTP Headers")
Text("When enabled, these headers will be included on all outgoing HTTP requests.")
if vpn.state != .disabled { Text("Cannot be modified while Coder VPN is enabled.") }
if vpn.state != .disabled { Text("Cannot be modified while Coder Connect is enabled.") }
}
.controlSize(.large)

2 changes: 1 addition & 1 deletion Coder Desktop/Coder Desktop/Views/VPNMenu.swift
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ struct VPNMenu<VPN: VPNService>: View {
}
}
)) {
Text("CoderVPN")
Text("Coder Connect")
.frame(maxWidth: .infinity, alignment: .leading)
.font(.body.bold())
.foregroundColor(.primary)
6 changes: 3 additions & 3 deletions Coder Desktop/Coder Desktop/Views/VPNState.swift
Original file line number Diff line number Diff line change
@@ -14,18 +14,18 @@ struct VPNState<VPN: VPNService>: View {
.font(.body)
.foregroundStyle(.secondary)
case (_, false):
Text("Sign in to use CoderVPN")
Text("Sign in to use Coder Desktop")
.font(.body)
.foregroundColor(.secondary)
case (.disabled, _):
Text("Enable CoderVPN to see workspaces")
Text("Enable Coder Connect to see workspaces")
.font(.body)
.foregroundStyle(.secondary)
case (.connecting, _), (.disconnecting, _):
HStack {
Spacer()
ProgressView(
vpn.state == .connecting ? "Starting CoderVPN..." : "Stopping CoderVPN..."
vpn.state == .connecting ? "Starting Coder Connect..." : "Stopping Coder Connect..."
).padding()
Spacer()
}
2 changes: 1 addition & 1 deletion Coder Desktop/Coder DesktopTests/VPNMenuTests.swift
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ struct VPNMenuTests {
try await sut.inspection.inspect { view in
let toggle = try view.find(ViewType.Toggle.self)
#expect(toggle.isDisabled())
#expect(throws: Never.self) { try view.find(text: "Sign in to use CoderVPN") }
#expect(throws: Never.self) { try view.find(text: "Sign in to use Coder Desktop") }
#expect(throws: Never.self) { try view.find(button: "Sign in") }
}
}
6 changes: 3 additions & 3 deletions Coder Desktop/Coder DesktopTests/VPNStateTests.swift
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ struct VPNStateTests {
try await ViewHosting.host(view) {
try await sut.inspection.inspect { view in
#expect(throws: Never.self) {
try view.find(text: "Enable CoderVPN to see workspaces")
try view.find(text: "Enable Coder Connect to see workspaces")
}
}
}
@@ -39,7 +39,7 @@ struct VPNStateTests {
try await ViewHosting.host(view) {
try await sut.inspection.inspect { view in
let progressView = try view.find(ViewType.ProgressView.self)
#expect(try progressView.labelView().text().string() == "Starting CoderVPN...")
#expect(try progressView.labelView().text().string() == "Starting Coder Connect...")
}
}
}
@@ -51,7 +51,7 @@ struct VPNStateTests {
try await ViewHosting.host(view) {
try await sut.inspection.inspect { view in
let progressView = try view.find(ViewType.ProgressView.self)
#expect(try progressView.labelView().text().string() == "Stopping CoderVPN...")
#expect(try progressView.labelView().text().string() == "Stopping Coder Connect...")
}
}
}
2 changes: 1 addition & 1 deletion pkgbuild/scripts/postinstall
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ if [ -f "$VPN_MARKER_FILE" ]; then
echo "Restarting CoderVPN..."
echo "Sleeping for 3..."
sleep 3
scutil --nc start "CoderVPN"
scutil --nc start "Coder"
rm "$VPN_MARKER_FILE"
echo "CoderVPN started."
fi
10 changes: 5 additions & 5 deletions pkgbuild/scripts/preinstall
Original file line number Diff line number Diff line change
@@ -10,19 +10,19 @@ if pgrep 'Coder Desktop'; then
fi

echo "Turning off VPN"
if scutil --nc list | grep -q "CoderVPN"; then
if scutil --nc list | grep -q "Coder"; then
echo "CoderVPN found. Stopping..."
if scutil --nc status "CoderVPN" | grep -q "^Connected$"; then
if scutil --nc status "Coder" | grep -q "^Connected$"; then
touch $VPN_MARKER_FILE
fi
scutil --nc stop "CoderVPN"
scutil --nc stop "Coder"

# Wait for VPN to be disconnected
while scutil --nc status "CoderVPN" | grep -q "^Connected$"; do
while scutil --nc status "Coder" | grep -q "^Connected$"; do
echo "Waiting for VPN to disconnect..."
sleep 1
done
while scutil --nc status "CoderVPN" | grep -q "^Disconnecting$"; do
while scutil --nc status "Coder" | grep -q "^Disconnecting$"; do
echo "Waiting for VPN to complete disconnect..."
sleep 1
done