pub struct InboundConfig {Show 22 fields
pub up: i64,
pub down: i64,
pub total: i64,
pub remark: String,
pub sub_sort_index: i32,
pub enable: bool,
pub disable_flow: bool,
pub expiry_time: i64,
pub traffic_reset: TrafficReset,
pub traffic_reset_day: u8,
pub last_traffic_reset_time: i64,
pub client_stats: Vec<ClientTraffic>,
pub listen: String,
pub port: u16,
pub protocol: InboundProtocol,
pub settings: Value,
pub stream_settings: Value,
pub tag: String,
pub sniffing: Value,
pub node_id: Option<i64>,
pub share_addr_strategy: ShareAddressStrategy,
pub share_addr: String,
}Expand description
Complete writable configuration accepted by create, update, and import.
Use InboundConfig::new for safe panel defaults. Convert a fetched
Inbound with Inbound::to_config before replacing it through
InboundsApi::update. The open-ended JSON fields intentionally mirror
Xray’s protocol-specific configuration fragments.
Fields§
§up: i64Uploaded bytes to seed during import.
down: i64Downloaded bytes to seed during import.
total: i64Traffic limit in bytes, or zero when unlimited.
remark: StringHuman-readable label.
sub_sort_index: i32Position in subscription output; negatives are allowed, and zero normalizes to one.
enable: boolWhether the inbound is enabled.
disable_flow: boolDisables client flow values when generating subscription links.
expiry_time: i64Expiration timestamp in milliseconds, or zero when unlimited.
traffic_reset: TrafficResetAutomatic traffic reset schedule.
traffic_reset_day: u8Day of month used by monthly reset schedules.
last_traffic_reset_time: i64Most recent automatic reset timestamp in milliseconds.
client_stats: Vec<ClientTraffic>Per-client traffic rows preserved by imports.
listen: StringLocal listen address, or an empty string for all interfaces.
port: u16Listen port; zero lets compatible server flows choose it.
protocol: InboundProtocolXray inbound protocol.
settings: ValueProtocol-specific Xray settings object.
stream_settings: ValueTransport and security settings object.
tag: StringStable Xray tag; leave empty on create to let 3x-ui generate it.
sniffing: ValueXray sniffing settings object.
node_id: Option<i64>Hosting node identifier, or None for the local panel.
Public share-address selection strategy.
Explicit share address used with the custom strategy.
Implementations§
Source§impl InboundConfig
impl InboundConfig
Sourcepub fn new(protocol: InboundProtocol, port: u16) -> Self
pub fn new(protocol: InboundProtocol, port: u16) -> Self
Creates an enabled configuration with unlimited traffic and safe panel defaults.
Trait Implementations§
Source§impl Clone for InboundConfig
impl Clone for InboundConfig
Source§impl Debug for InboundConfig
impl Debug for InboundConfig
Source§impl<'de> Deserialize<'de> for InboundConfig
impl<'de> Deserialize<'de> for InboundConfig
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>,
Source§impl PartialEq for InboundConfig
impl PartialEq for InboundConfig
Source§impl Serialize for InboundConfig
impl Serialize for InboundConfig
impl StructuralPartialEq for InboundConfig
Auto Trait Implementations§
impl Freeze for InboundConfig
impl RefUnwindSafe for InboundConfig
impl Send for InboundConfig
impl Sync for InboundConfig
impl Unpin for InboundConfig
impl UnsafeUnpin for InboundConfig
impl UnwindSafe for InboundConfig
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<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