We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parentec78f54 commita551aa5Copy full SHA for a551aa5
cli/speedtest.go
@@ -39,6 +39,10 @@ func (r *RootCmd) speedtest() *serpent.Command {
39
ctx,cancel:=context.WithCancel(inv.Context())
40
defercancel()
41
42
+ifdirect&&r.disableDirect {
43
+returnxerrors.Errorf("--direct (-d) is incompatible with --%s",varDisableDirect)
44
+}
45
+
46
_,workspaceAgent,err:=getWorkspaceAndAgent(ctx,inv,client,false,inv.Args[0])
47
iferr!=nil {
48
returnerr
@@ -57,12 +61,13 @@ func (r *RootCmd) speedtest() *serpent.Command {
57
61
logger=logger.Leveled(slog.LevelDebug)
58
62
}
59
63
60
-ifr.disableDirect {
-_,_=fmt.Fprintln(inv.Stderr,"Direct connections disabled.")
-}
64
opts:=&workspacesdk.DialAgentOptions{
65
Logger:logger,
66
67
+ifr.disableDirect {
68
+_,_=fmt.Fprintln(inv.Stderr,"Direct connections disabled.")
69
+opts.BlockEndpoints=true
70
71
ifpcapFile!="" {
72
s:=capture.New()
73
opts.CaptureHook=s.LogPacket