mirror of
https://github.com/PeernetOfficial/Cmd.git
synced 2026-07-17 02:47:52 +01:00
Update core. Add new firewall flag in output.
This commit is contained in:
@@ -121,6 +121,12 @@ func userCommands(input io.Reader, output io.Writer, terminateSignal chan struct
|
||||
}
|
||||
features += "IPv6"
|
||||
}
|
||||
if featureSupport&(1<<protocol.FeatureFirewall) > 0 {
|
||||
if len(features) > 0 {
|
||||
features += ", "
|
||||
}
|
||||
features += "Firewall Reported"
|
||||
}
|
||||
|
||||
fmt.Fprintf(output, "User Agent: %s\nFeatures: %s\n\n", core.SelfUserAgent(), features)
|
||||
|
||||
@@ -182,6 +188,9 @@ func userCommands(input io.Reader, output io.Writer, terminateSignal chan struct
|
||||
if peer.IsBehindNAT() {
|
||||
flagsA += "N"
|
||||
}
|
||||
if peer.IsFirewallReported() {
|
||||
flagsA += "F"
|
||||
}
|
||||
fmt.Fprintf(output, "%-66s %-8d %-8d %-35s %-6s %-6s\n", hex.EncodeToString(peer.PublicKey.SerializeCompressed()), peer.StatsPacketSent, peer.StatsPacketReceived, addressA, flagsA, rttA)
|
||||
}
|
||||
|
||||
|
||||
2
go.mod
2
go.mod
@@ -3,7 +3,7 @@ module github.com/PeernetOfficial/Cmd
|
||||
go 1.16
|
||||
|
||||
require (
|
||||
github.com/PeernetOfficial/core v0.0.0-20211117163704-446c62bcd9e4
|
||||
github.com/PeernetOfficial/core v0.0.0-20211120032803-f7e8f1821bd3
|
||||
github.com/google/uuid v1.3.0
|
||||
github.com/gorilla/websocket v1.4.3-0.20210424162022-e8629af678b7
|
||||
)
|
||||
|
||||
4
go.sum
4
go.sum
@@ -1,5 +1,5 @@
|
||||
github.com/PeernetOfficial/core v0.0.0-20211117163704-446c62bcd9e4 h1:l+TBEIYpdL1YxT/iQ9BZXYBiogHuhebqtBN1jjayb/c=
|
||||
github.com/PeernetOfficial/core v0.0.0-20211117163704-446c62bcd9e4/go.mod h1:0D/jIDYdV0WXg5WACS+fR5keafLhYB89WUs6ZEE8t4Y=
|
||||
github.com/PeernetOfficial/core v0.0.0-20211120032803-f7e8f1821bd3 h1:4q9FfaBuowPZyyWy04Vg5fAShZ28+kyScXo+8SLMOyA=
|
||||
github.com/PeernetOfficial/core v0.0.0-20211120032803-f7e8f1821bd3/go.mod h1:0D/jIDYdV0WXg5WACS+fR5keafLhYB89WUs6ZEE8t4Y=
|
||||
github.com/akrylysov/pogreb v0.10.1 h1:FqlR8VR7uCbJdfUob916tPM+idpKgeESDXOA1K0DK4w=
|
||||
github.com/akrylysov/pogreb v0.10.1/go.mod h1:pNs6QmpQ1UlTJKDezuRWmaqkgUE2TuU0YTWyqJZ7+lI=
|
||||
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
|
||||
|
||||
Reference in New Issue
Block a user