WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[management] Add native ssh port rule on 22 (#4810)
Implements feature-aware firewall rule expansion: derives peer-supported features (native SSH, portRanges) from peer version, prefers explicit Ports over PortRanges when expanding, conditionally appends a native SSH (22022) rule when policy and peer support allow, and adds helpers plus tests for SSH expansion behavior.
Copy file name to clipboardExpand all lines: management/server/types/account.go
+74-14Lines changed: 74 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -40,8 +40,20 @@ const (
40
40
41
41
// firewallRuleMinPortRangesVer defines the minimum peer version that supports port range rules.
42
42
firewallRuleMinPortRangesVer="0.48.0"
43
+
// firewallRuleMinNativeSSHVer defines the minimum peer version that supports native SSH features in the firewall rules.
44
+
firewallRuleMinNativeSSHVer="0.60.0"
45
+
46
+
// nativeSSHPortString defines the default port number as a string used for native SSH connections; this port is used by clients when hijacking ssh connections.
47
+
nativeSSHPortString="22022"
48
+
// defaultSSHPortString defines the standard SSH port number as a string, commonly used for default SSH connections.
49
+
defaultSSHPortString="22"
43
50
)
44
51
52
+
typesupportedFeaturesstruct {
53
+
nativeSSHbool
54
+
portRangesbool
55
+
}
56
+
45
57
typeLookupMapmap[string]struct{}
46
58
47
59
// AccountMeta is a struct that contains a stripped down version of the Account object.
0 commit comments