mirror of
https://github.com/netbirdio/netbird.git
synced 2026-08-28 18:41:30 +02:00
Carry netbird-vnc policies over the component network map
This commit is contained in:
@@ -307,6 +307,8 @@ func decodePolicyCompact(pc *proto.PolicyCompact, policyID string, peerIDByIndex
|
||||
Destinations: pc.DestinationGroupIds,
|
||||
AuthorizedUser: pc.AuthorizedUser,
|
||||
AuthorizedGroups: authorizedGroupsFromProto(pc.AuthorizedGroups),
|
||||
SessionPubKey: pc.SessionPubKey,
|
||||
SessionDisplayName: pc.SessionDisplayName,
|
||||
SourceResource: resourceFromProto(pc.SourceResource, peerIDByIndex),
|
||||
DestinationResource: resourceFromProto(pc.DestinationResource, peerIDByIndex),
|
||||
}
|
||||
@@ -496,6 +498,8 @@ func protocolFromProto(p proto.RuleProtocol) types.PolicyRuleProtocolType {
|
||||
return types.PolicyRuleProtocolALL
|
||||
case proto.RuleProtocol_NETBIRD_SSH:
|
||||
return types.PolicyRuleProtocolNetbirdSSH
|
||||
case proto.RuleProtocol_NETBIRD_VNC:
|
||||
return types.PolicyRuleProtocolNetbirdVNC
|
||||
default:
|
||||
return types.PolicyRuleProtocolALL
|
||||
}
|
||||
|
||||
@@ -144,6 +144,8 @@ func GetProtoProtocol(protocol string) proto.RuleProtocol {
|
||||
return proto.RuleProtocol_ICMP
|
||||
case types.PolicyRuleProtocolNetbirdSSH:
|
||||
return proto.RuleProtocol_NETBIRD_SSH
|
||||
case types.PolicyRuleProtocolNetbirdVNC:
|
||||
return proto.RuleProtocol_NETBIRD_VNC
|
||||
default:
|
||||
return proto.RuleProtocol_UNKNOWN
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user