pub struct ClientIdentity {
pub uuid: Uuid,
pub id_type: String,
pub identify: String,
pub name: Option<String>,
pub user_id: Uuid,
pub enabled: bool,
pub suspended: bool,
pub owner_suspended: bool,
pub created_at: i64,
pub updated_at: i64,
}Expand description
A client that Relay recognises (by source IP, DoT hostname or DoH path), so that sinkhole lists can be linked to it.
Fields§
§uuid: UuidIdentity id.
id_type: StringIP, Hostname, Path or None (kept as a string for forward compatibility);
see ClientIdentityType and ClientIdentity::kind.
identify: StringThe identifying value, unique across the whole platform: the client’s IP address
for IP/None; for Hostname/Path a value Core generated (16 characters of
a-z2-7), the DoT hostname label or DoH path part the client is configured with.
name: Option<String>The owner’s label for the identity, 1–64 characters; Core only, Relay never sees it. Not unique.
user_id: UuidOwning user.
enabled: boolThe owner’s switch; a disabled identity is not recognised by Relay.
suspended: boolSuspended by an Admin. The owner can still read and delete it, but changes and
new sinkhole links answer ErrorCode::Suspended.
owner_suspended: boolThe owning user is suspended; the identity then behaves as suspended too.
created_at: i64Unix seconds.
updated_at: i64Unix seconds.
Implementations§
Source§impl ClientIdentity
impl ClientIdentity
Sourcepub fn kind(&self) -> Option<ClientIdentityType>
pub fn kind(&self) -> Option<ClientIdentityType>
id_type in its typed form, if this SDK version knows it.
Sourcepub fn is_suspended(&self) -> bool
pub fn is_suspended(&self) -> bool
Whether Core refuses changes to the identity: suspended itself or through its owner.
Trait Implementations§
Source§impl Clone for ClientIdentity
impl Clone for ClientIdentity
Source§fn clone(&self) -> ClientIdentity
fn clone(&self) -> ClientIdentity
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more