pub struct ClientConfig {Show 32 fields
pub protocol_id: String,
pub security: String,
pub password: String,
pub flow: String,
pub reverse: Option<ClientReverse>,
pub auth: String,
pub private_key: String,
pub public_key: String,
pub allowed_ips: Vec<String>,
pub allowed_ips_by_inbound: HashMap<i64, Vec<String>>,
pub pre_shared_key: String,
pub keep_alive: Option<i32>,
pub forwarded_ports: String,
pub secret: String,
pub ad_tag: String,
pub email: String,
pub limit_ip: i32,
pub limit_hwid: i32,
pub total_gb: i64,
pub expiry_time: i64,
pub enable: bool,
pub tg_id: i64,
pub sub_id: String,
pub group: String,
pub comment: String,
pub reset: i32,
pub reset_day: i32,
pub reset_max: i32,
pub traffic_reset: Option<TrafficReset>,
pub traffic_reset_day: i32,
pub created_at: i64,
pub updated_at: i64,
}Expand description
Complete writable client configuration accepted by 3x-ui.
Protocol-specific credentials may be left empty on create; 3x-ui generates
the appropriate UUID, password, auth value, or MTProto secret from the
target inbound. Use ClientRecord::to_config before replacement updates.
Fields§
§protocol_id: StringVMess/VLESS UUID.
security: StringProtocol security method.
password: StringTrojan or Shadowsocks password/key.
flow: StringXTLS flow value.
reverse: Option<ClientReverse>VLESS reverse-proxy settings.
auth: StringHysteria authentication value.
private_key: StringWireGuard private key.
public_key: StringWireGuard public key.
allowed_ips: Vec<String>WireGuard allowed networks.
allowed_ips_by_inbound: HashMap<i64, Vec<String>>Per-inbound WireGuard/AmneziaWG allowed-network overrides.
WireGuard pre-shared key.
keep_alive: Option<i32>WireGuard keepalive seconds: None preserves the stored value; Some(0) disables it.
forwarded_ports: StringAmneziaWG per-client port-forwarding specification.
secret: StringMTProto client secret.
ad_tag: StringMTProto advertisement tag.
email: StringUnique client email/name.
limit_ip: i32Maximum concurrent source IP count.
limit_hwid: i32Maximum registered subscription devices; zero disables HWID limiting.
total_gb: i64Traffic quota in bytes, despite the historical totalGB wire name.
expiry_time: i64Expiration timestamp in milliseconds; zero means unlimited.
enable: boolWhether the client is enabled.
tg_id: i64Telegram user identifier for notifications.
sub_id: StringSubscription identifier.
group: StringOptional logical group label.
comment: StringOperator comment.
reset: i32Automatic reset period encoded by 3x-ui.
reset_day: i32Calendar renewal day; zero keeps interval-based renewal.
reset_max: i32Maximum automatic renewals; zero is unlimited.
traffic_reset: Option<TrafficReset>Independent per-client traffic reset cycle.
traffic_reset_day: i32Day of month used by the per-client monthly reset cycle.
created_at: i64Creation timestamp in milliseconds used by import/export.
updated_at: i64Update timestamp in milliseconds used by import/export.
Implementations§
Trait Implementations§
Source§impl Clone for ClientConfig
impl Clone for ClientConfig
Source§impl Debug for ClientConfig
impl Debug for ClientConfig
Source§impl Default for ClientConfig
impl Default for ClientConfig
Source§impl<'de> Deserialize<'de> for ClientConfigwhere
ClientConfig: Default,
impl<'de> Deserialize<'de> for ClientConfigwhere
ClientConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ClientConfig
Source§impl PartialEq for ClientConfig
impl PartialEq for ClientConfig
Source§impl Serialize for ClientConfig
impl Serialize for ClientConfig
impl StructuralPartialEq for ClientConfig
Auto Trait Implementations§
impl Freeze for ClientConfig
impl RefUnwindSafe for ClientConfig
impl Send for ClientConfig
impl Sync for ClientConfig
impl Unpin for ClientConfig
impl UnsafeUnpin for ClientConfig
impl UnwindSafe for ClientConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more