mirror of
https://github.com/netbirdio/netbird.git
synced 2026-05-13 20:29:55 +00:00
Merge branch 'main' of github.com:netbirdio/netbird into feat/local-user-totp
This commit is contained in:
@@ -937,8 +937,22 @@ func infoToMetaData(info *system.Info) *proto.PeerSystemMeta {
|
||||
DisableFirewall: info.DisableFirewall,
|
||||
BlockLANAccess: info.BlockLANAccess,
|
||||
BlockInbound: info.BlockInbound,
|
||||
DisableIPv6: info.DisableIPv6,
|
||||
|
||||
LazyConnectionEnabled: info.LazyConnectionEnabled,
|
||||
},
|
||||
|
||||
Capabilities: peerCapabilities(*info),
|
||||
}
|
||||
}
|
||||
|
||||
// peerCapabilities returns the capabilities this client supports.
|
||||
func peerCapabilities(info system.Info) []proto.PeerCapability {
|
||||
caps := []proto.PeerCapability{
|
||||
proto.PeerCapability_PeerCapabilitySourcePrefixes,
|
||||
}
|
||||
if !info.DisableIPv6 {
|
||||
caps = append(caps, proto.PeerCapability_PeerCapabilityIPv6Overlay)
|
||||
}
|
||||
return caps
|
||||
}
|
||||
|
||||
@@ -341,7 +341,11 @@ components:
|
||||
description: Allows to define a custom network range for the account in CIDR format
|
||||
type: string
|
||||
format: cidr
|
||||
example: 100.64.0.0/16
|
||||
network_range_v6:
|
||||
description: Allows to define a custom IPv6 network range for the account in CIDR format.
|
||||
type: string
|
||||
format: cidr
|
||||
example: fd00:1234:5678::/64
|
||||
peer_expose_enabled:
|
||||
description: Enables or disables peer expose. If enabled, peers can expose local services through the reverse proxy using the CLI.
|
||||
type: boolean
|
||||
@@ -381,6 +385,12 @@ components:
|
||||
description: Enables or disables TOTP multi-factor authentication for local users. Only applicable when the embedded identity provider is enabled.
|
||||
type: boolean
|
||||
example: false
|
||||
ipv6_enabled_groups:
|
||||
description: List of group IDs whose peers receive IPv6 overlay addresses. Peers not in any of these groups will not be allocated an IPv6 address. New accounts default to the All group.
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
example: ["ch8i4ug6lnn4g9hqv7m0"]
|
||||
required:
|
||||
- peer_login_expiration_enabled
|
||||
- peer_login_expiration
|
||||
@@ -780,6 +790,11 @@ components:
|
||||
type: string
|
||||
format: ipv4
|
||||
example: 100.64.0.15
|
||||
ipv6:
|
||||
description: Peer's IPv6 overlay address. Omitted if IPv6 is not enabled for the account.
|
||||
type: string
|
||||
format: ipv6
|
||||
example: "fd00:4e42:ab12::1"
|
||||
required:
|
||||
- name
|
||||
- ssh_enabled
|
||||
@@ -799,6 +814,11 @@ components:
|
||||
description: Peer's IP address
|
||||
type: string
|
||||
example: 10.64.0.1
|
||||
ipv6:
|
||||
description: Peer's IPv6 overlay address
|
||||
type: string
|
||||
format: ipv6
|
||||
example: "fd00:4e42:ab12::1"
|
||||
connection_ip:
|
||||
description: Peer's public connection IP address
|
||||
type: string
|
||||
@@ -1017,6 +1037,10 @@ components:
|
||||
description: Peer's IP address
|
||||
type: string
|
||||
example: 10.64.0.1
|
||||
ipv6:
|
||||
description: Peer's IPv6 overlay address
|
||||
type: string
|
||||
example: "fd00:4e42:ab12::1"
|
||||
dns_label:
|
||||
description: Peer's DNS label is the parsed peer name for domain resolution. It is used to form an FQDN by appending the account's domain to the peer label. e.g. peer-dns-label.netbird.cloud
|
||||
type: string
|
||||
|
||||
@@ -1381,6 +1381,9 @@ type AccessiblePeer struct {
|
||||
// Ip Peer's IP address
|
||||
Ip string `json:"ip"`
|
||||
|
||||
// Ipv6 Peer's IPv6 overlay address
|
||||
Ipv6 *string `json:"ipv6,omitempty"`
|
||||
|
||||
// LastSeen Last time peer connected to Netbird's management service
|
||||
LastSeen time.Time `json:"last_seen"`
|
||||
|
||||
@@ -1465,6 +1468,9 @@ type AccountSettings struct {
|
||||
// GroupsPropagationEnabled Allows propagate the new user auto groups to peers that belongs to the user
|
||||
GroupsPropagationEnabled *bool `json:"groups_propagation_enabled,omitempty"`
|
||||
|
||||
// Ipv6EnabledGroups List of group IDs whose peers receive IPv6 overlay addresses. Peers not in any of these groups will not be allocated an IPv6 address. New accounts default to the All group.
|
||||
Ipv6EnabledGroups *[]string `json:"ipv6_enabled_groups,omitempty"`
|
||||
|
||||
// JwtAllowGroups List of groups to which users are allowed access
|
||||
JwtAllowGroups *[]string `json:"jwt_allow_groups,omitempty"`
|
||||
|
||||
@@ -1486,6 +1492,9 @@ type AccountSettings struct {
|
||||
// NetworkRange Allows to define a custom network range for the account in CIDR format
|
||||
NetworkRange *string `json:"network_range,omitempty"`
|
||||
|
||||
// NetworkRangeV6 Allows to define a custom IPv6 network range for the account in CIDR format.
|
||||
NetworkRangeV6 *string `json:"network_range_v6,omitempty"`
|
||||
|
||||
// PeerExposeEnabled Enables or disables peer expose. If enabled, peers can expose local services through the reverse proxy using the CLI.
|
||||
PeerExposeEnabled bool `json:"peer_expose_enabled"`
|
||||
|
||||
@@ -3144,6 +3153,9 @@ type Peer struct {
|
||||
// Ip Peer's IP address
|
||||
Ip string `json:"ip"`
|
||||
|
||||
// Ipv6 Peer's IPv6 overlay address
|
||||
Ipv6 *string `json:"ipv6,omitempty"`
|
||||
|
||||
// KernelVersion Peer's operating system kernel version
|
||||
KernelVersion string `json:"kernel_version"`
|
||||
|
||||
@@ -3235,6 +3247,9 @@ type PeerBatch struct {
|
||||
// Ip Peer's IP address
|
||||
Ip string `json:"ip"`
|
||||
|
||||
// Ipv6 Peer's IPv6 overlay address
|
||||
Ipv6 *string `json:"ipv6,omitempty"`
|
||||
|
||||
// KernelVersion Peer's operating system kernel version
|
||||
KernelVersion string `json:"kernel_version"`
|
||||
|
||||
@@ -3334,7 +3349,10 @@ type PeerRequest struct {
|
||||
InactivityExpirationEnabled bool `json:"inactivity_expiration_enabled"`
|
||||
|
||||
// Ip Peer's IP address
|
||||
Ip *string `json:"ip,omitempty"`
|
||||
Ip *string `json:"ip,omitempty"`
|
||||
|
||||
// Ipv6 Peer's IPv6 overlay address. Omitted if IPv6 is not enabled for the account.
|
||||
Ipv6 *string `json:"ipv6,omitempty"`
|
||||
LoginExpirationEnabled bool `json:"login_expiration_enabled"`
|
||||
Name string `json:"name"`
|
||||
SshEnabled bool `json:"ssh_enabled"`
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -200,6 +200,18 @@ message Flags {
|
||||
bool enableSSHLocalPortForwarding = 13;
|
||||
bool enableSSHRemotePortForwarding = 14;
|
||||
bool disableSSHAuth = 15;
|
||||
|
||||
bool disableIPv6 = 16;
|
||||
}
|
||||
|
||||
// PeerCapability represents a feature the client binary supports.
|
||||
// Reported in PeerSystemMeta.capabilities on every login/sync.
|
||||
enum PeerCapability {
|
||||
PeerCapabilityUnknown = 0;
|
||||
// Client reads SourcePrefixes instead of the deprecated PeerIP string.
|
||||
PeerCapabilitySourcePrefixes = 1;
|
||||
// Client handles IPv6 overlay addresses and firewall rules.
|
||||
PeerCapabilityIPv6Overlay = 2;
|
||||
}
|
||||
|
||||
// PeerSystemMeta is machine meta data like OS and version.
|
||||
@@ -221,6 +233,8 @@ message PeerSystemMeta {
|
||||
Environment environment = 15;
|
||||
repeated File files = 16;
|
||||
Flags flags = 17;
|
||||
|
||||
repeated PeerCapability capabilities = 18;
|
||||
}
|
||||
|
||||
message LoginResponse {
|
||||
@@ -335,6 +349,9 @@ message PeerConfig {
|
||||
|
||||
// Auto-update config
|
||||
AutoUpdateSettings autoUpdate = 8;
|
||||
|
||||
// IPv6 overlay address as compact bytes: 16 bytes IP + 1 byte prefix length.
|
||||
bytes address_v6 = 9;
|
||||
}
|
||||
|
||||
message AutoUpdateSettings {
|
||||
@@ -567,7 +584,8 @@ enum RuleAction {
|
||||
|
||||
// FirewallRule represents a firewall rule
|
||||
message FirewallRule {
|
||||
string PeerIP = 1;
|
||||
// Use sourcePrefixes instead.
|
||||
string PeerIP = 1 [deprecated = true];
|
||||
RuleDirection Direction = 2;
|
||||
RuleAction Action = 3;
|
||||
RuleProtocol Protocol = 4;
|
||||
@@ -576,6 +594,13 @@ message FirewallRule {
|
||||
|
||||
// PolicyID is the ID of the policy that this rule belongs to
|
||||
bytes PolicyID = 7;
|
||||
|
||||
// CustomProtocol is a custom protocol ID when Protocol is CUSTOM.
|
||||
uint32 customProtocol = 8;
|
||||
|
||||
// Compact source IP prefixes for this rule, supersedes PeerIP.
|
||||
// Each entry is 5 bytes (v4) or 17 bytes (v6): [IP bytes][1 byte prefix_len].
|
||||
repeated bytes sourcePrefixes = 9;
|
||||
}
|
||||
|
||||
message NetworkAddress {
|
||||
|
||||
Reference in New Issue
Block a user