Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit55cda77

Browse files
committed
add back hyphens
1 parent99e64b4 commit55cda77

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
iflen(client)>0 {
375375
_,_=fmt.Fprint(w,"Possible client-side issues with direct connection:\n\n")
376376
for_,msg:=rangeclient {
377-
_,_=fmt.Fprintf(w," %s\n\n",msg)
377+
_,_=fmt.Fprintf(w,"- %s\n\n",msg)
378378
}
379379
}
380380
iflen(agent)>0 {
381381
_,_=fmt.Fprint(w,"Possible agent-side issues with direct connections:\n\n")
382382
for_,msg:=rangeagent {
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
}elseifd.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
ifd.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
ifd.AgentNetcheck!=nil&&d.AgentNetcheck.NetInfo!=nil {
436436
ifd.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-
ifd.ClientIPIsAWS {
445-
client=append(client,"Client IP address is within an AWS range (AWS uses hard NAT)")
444+
iftrue {
445+
client=append(client,"Client IP address is within an AWS range (AWS uses hard NAT)")
446446
}
447447

448-
ifd.AgentIPIsAWS {
449-
agent=append(agent,"Agent IP address is within an AWS range (AWS uses hard NAT)")
448+
iftrue {
449+
agent=append(agent,"Agent IP address is within an AWS range (AWS uses hard NAT)")
450450
}
451451
returngeneral,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-
returnfmt.Sprintf("%s, which may degrade the quality of direct connections",out)
460+
returnfmt.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)

[8]ページ先頭

©2009-2025 Movatter.jp