Skip to content

Commit 55cda77

Browse files
committed
add back hyphens
1 parent 99e64b4 commit 55cda77

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

cli/cliui/agent.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -374,13 +374,13 @@ func (d ConnDiags) Write(w io.Writer) {
374374
if len(client) > 0 {
375375
_, _ = fmt.Fprint(w, "Possible client-side issues with direct connection:\n\n")
376376
for _, msg := range client {
377-
_, _ = fmt.Fprintf(w, " %s\n\n", msg)
377+
_, _ = fmt.Fprintf(w, " - %s\n\n", msg)
378378
}
379379
}
380380
if len(agent) > 0 {
381381
_, _ = fmt.Fprint(w, "Possible agent-side issues with direct connections:\n\n")
382382
for _, msg := range agent {
383-
_, _ = fmt.Fprintf(w, " %s\n\n", msg)
383+
_, _ = fmt.Fprintf(w, " - %s\n\n", msg)
384384
}
385385
}
386386
}
@@ -423,30 +423,30 @@ func (d ConnDiags) splitDiagnostics() (general, client, agent []string) {
423423
}
424424

425425
if !d.ConnInfo.DERPMap.HasSTUN() {
426-
general = append(general, "The DERP map is not configured to use STUN")
426+
general = append(general, "The DERP map is not configured to use STUN")
427427
} else if d.LocalNetInfo != nil && !d.LocalNetInfo.UDP {
428-
client = append(client, "Client could not connect to STUN over UDP")
428+
client = append(client, "Client could not connect to STUN over UDP")
429429
}
430430

431431
if d.LocalNetInfo != nil && d.LocalNetInfo.MappingVariesByDestIP.EqualBool(true) {
432-
client = append(client, "Client is potentially behind a hard NAT, as multiple endpoints were retrieved from different STUN servers")
432+
client = append(client, "Client is potentially behind a hard NAT, as multiple endpoints were retrieved from different STUN servers")
433433
}
434434

435435
if d.AgentNetcheck != nil && d.AgentNetcheck.NetInfo != nil {
436436
if d.AgentNetcheck.NetInfo.MappingVariesByDestIP.EqualBool(true) {
437-
agent = append(agent, "Agent is potentially behind a hard NAT, as multiple endpoints were retrieved from different STUN servers")
437+
agent = append(agent, "Agent is potentially behind a hard NAT, as multiple endpoints were retrieved from different STUN servers")
438438
}
439439
if !d.AgentNetcheck.NetInfo.UDP {
440-
agent = append(agent, "Agent could not connect to STUN over UDP")
440+
agent = append(agent, "Agent could not connect to STUN over UDP")
441441
}
442442
}
443443

444-
if d.ClientIPIsAWS {
445-
client = append(client, "Client IP address is within an AWS range (AWS uses hard NAT)")
444+
if true {
445+
client = append(client, "Client IP address is within an AWS range (AWS uses hard NAT)")
446446
}
447447

448-
if d.AgentIPIsAWS {
449-
agent = append(agent, "Agent IP address is within an AWS range (AWS uses hard NAT)")
448+
if true {
449+
agent = append(agent, "Agent IP address is within an AWS range (AWS uses hard NAT)")
450450
}
451451
return general, client, agent
452452
}
@@ -457,5 +457,5 @@ func formatHealthMessage(msg health.Message) string {
457457
}
458458
r := []rune(strings.Replace(msg.Message, ", which may cause problems with direct connections", "", -1))
459459
out := string(append([]rune{unicode.ToUpper(r[0])}, r[1:]...))
460-
return fmt.Sprintf("%s, which may degrade the quality of direct connections", out)
460+
return fmt.Sprintf("%s, which may degrade the quality of direct connections", out)
461461
}

cli/cliui/agent_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ func TestConnDiagnostics(t *testing.T) {
719719
},
720720
want: []string{
721721
`❗ You are connected via a DERP relay, not directly (p2p)`,
722-
`The DERP map is not configured to use STUN`,
722+
`The DERP map is not configured to use STUN`,
723723
},
724724
},
725725
{
@@ -744,7 +744,7 @@ func TestConnDiagnostics(t *testing.T) {
744744
},
745745
want: []string{
746746
`❗ You are connected via a DERP relay, not directly (p2p)`,
747-
`Client could not connect to STUN over UDP`,
747+
`Client could not connect to STUN over UDP`,
748748
},
749749
},
750750
{
@@ -771,7 +771,7 @@ func TestConnDiagnostics(t *testing.T) {
771771
},
772772
want: []string{
773773
`❗ You are connected via a DERP relay, not directly (p2p)`,
774-
`Agent could not connect to STUN over UDP`,
774+
`Agent could not connect to STUN over UDP`,
775775
},
776776
},
777777
{
@@ -786,7 +786,7 @@ func TestConnDiagnostics(t *testing.T) {
786786
},
787787
want: []string{
788788
`❗ You are connected via a DERP relay, not directly (p2p)`,
789-
`Client is potentially behind a hard NAT, as multiple endpoints were retrieved from different STUN servers`,
789+
`Client is potentially behind a hard NAT, as multiple endpoints were retrieved from different STUN servers`,
790790
},
791791
},
792792
{
@@ -803,7 +803,7 @@ func TestConnDiagnostics(t *testing.T) {
803803
},
804804
want: []string{
805805
`❗ You are connected via a DERP relay, not directly (p2p)`,
806-
`Agent is potentially behind a hard NAT, as multiple endpoints were retrieved from different STUN servers`,
806+
`Agent is potentially behind a hard NAT, as multiple endpoints were retrieved from different STUN servers`,
807807
},
808808
},
809809
{
@@ -824,8 +824,8 @@ func TestConnDiagnostics(t *testing.T) {
824824
},
825825
},
826826
want: []string{
827-
`❗ Network interface eth0 has MTU 1280, (less than 1378), which may degrade the quality of direct connections`,
828827
`✔ You are connected directly (p2p)`,
828+
`Network interface eth0 has MTU 1280, (less than 1378), which may degrade the quality of direct connections`,
829829
},
830830
},
831831
{
@@ -844,8 +844,8 @@ func TestConnDiagnostics(t *testing.T) {
844844
},
845845
},
846846
want: []string{
847-
`❗ Network interface eth1 has MTU 1310, (less than 1378), which may degrade the quality of direct connections`,
848847
`✔ You are connected directly (p2p)`,
848+
`Network interface eth1 has MTU 1310, (less than 1378), which may degrade the quality of direct connections`,
849849
},
850850
},
851851
{
@@ -859,7 +859,7 @@ func TestConnDiagnostics(t *testing.T) {
859859
},
860860
want: []string{
861861
`❗ You are connected via a DERP relay, not directly (p2p)`,
862-
`Client IP address is within an AWS range (AWS uses hard NAT)`,
862+
`Client IP address is within an AWS range (AWS uses hard NAT)`,
863863
},
864864
},
865865
{
@@ -873,7 +873,7 @@ func TestConnDiagnostics(t *testing.T) {
873873
},
874874
want: []string{
875875
`❗ You are connected via a DERP relay, not directly (p2p)`,
876-
`Agent IP address is within an AWS range (AWS uses hard NAT)`,
876+
`Agent IP address is within an AWS range (AWS uses hard NAT)`,
877877
},
878878
},
879879
}

0 commit comments

Comments
 (0)