(() => loadTask);
+
+ // The load should complete with the new valid credentials
+ var result = await loadTask;
+ Assert.That(result.State, Is.EqualTo(CredentialState.Valid));
+ Assert.That(result.CoderUrl?.ToString(), Is.EqualTo(TestServerUrl));
}
}
diff --git a/Vpn.Proto/vpn.proto b/Vpn.Proto/vpn.proto
index bace7e0..11a481c 100644
--- a/Vpn.Proto/vpn.proto
+++ b/Vpn.Proto/vpn.proto
@@ -3,6 +3,7 @@ option go_package = "github.com/coder/coder/v2/vpn";
option csharp_namespace = "Coder.Desktop.Vpn.Proto";
import "google/protobuf/timestamp.proto";
+import "google/protobuf/duration.proto";
package vpn;
@@ -48,10 +49,10 @@ message TunnelMessage {
message ClientMessage {
RPC rpc = 1;
oneof msg {
- StartRequest start = 2;
- StopRequest stop = 3;
- StatusRequest status = 4;
- }
+ StartRequest start = 2;
+ StopRequest stop = 3;
+ StatusRequest status = 4;
+ }
}
// ServiceMessage is a message from the service (to the client). Windows only.
@@ -131,6 +132,21 @@ message Agent {
// last_handshake is the primary indicator of whether we are connected to a peer. Zero value or
// anything longer than 5 minutes ago means there is a problem.
google.protobuf.Timestamp last_handshake = 6;
+ // If unset, a successful ping has not yet been made.
+ optional LastPing last_ping = 7;
+}
+
+message LastPing {
+ // latency is the RTT of the ping to the agent.
+ google.protobuf.Duration latency = 1;
+ // did_p2p indicates whether the ping was sent P2P, or over DERP.
+ bool did_p2p = 2;
+ // preferred_derp is the human readable name of the preferred DERP region,
+ // or the region used for the last ping, if it was sent over DERP.
+ string preferred_derp = 3;
+ // preferred_derp_latency is the last known latency to the preferred DERP
+ // region. Unset if the region does not appear in the DERP map.
+ optional google.protobuf.Duration preferred_derp_latency = 4;
}
// NetworkSettingsRequest is based on
diff --git a/Vpn.Service/Manager.cs b/Vpn.Service/Manager.cs
index fdb62af..027a882 100644
--- a/Vpn.Service/Manager.cs
+++ b/Vpn.Service/Manager.cs
@@ -172,6 +172,10 @@ await _tunnelSupervisor.StartAsync(_config.TunnelBinaryPath, HandleTunnelRpcMess
if (reply.MsgCase != TunnelMessage.MsgOneofCase.Start)
throw new InvalidOperationException("Tunnel did not reply with a Start response");
+ // If the tunnel failed to start, stop the subprocess.
+ if (!reply.Start.Success)
+ await _tunnelSupervisor.StopAsync(ct);
+
await BroadcastStatus(reply.Start.Success ? TunnelStatus.Started : TunnelStatus.Stopped, ct);
return reply.Start;
}
diff --git a/Vpn.Service/coder.ico b/Vpn.Service/coder.ico
index e13ad3b..b80bdc2 100644
Binary files a/Vpn.Service/coder.ico and b/Vpn.Service/coder.ico differ
diff --git a/scripts/files/logo.png b/scripts/files/logo.png
index 7d87306..bdb8b9b 100644
Binary files a/scripts/files/logo.png and b/scripts/files/logo.png differ
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy