Skip to main content

CommonConfigSnapshot

Struct CommonConfigSnapshot 

Source
pub struct CommonConfigSnapshot {
    pub guaranteed_ip: GuaranteedIpMap,
    pub guaranteed_ip_broker: GuaranteedBrokerIpMap,
    pub guaranteed_ip_web: GuaranteedWebIpMap,
    pub web_conn_identity: Option<u32>,
    pub auth_guaranteed_domains: AuthGuaranteedDomainMap,
    pub auth_guaranteed_domains_configured: bool,
    pub forced_ip: ForcedIpMap,
    pub next_refresh_ts: i64,
}
Expand description

CommConfig 协议返回的完整快照(含过期时间)。

Fields§

§guaranteed_ip: GuaranteedIpMap

按 attribution 分组的 Platform guaranteed IP 池(identity 1-6)。

§guaranteed_ip_broker: GuaranteedBrokerIpMap

按 broker_id 分组的 Broker 通道 guaranteed IP 池(identity 1001/1007/1008/1009/1012/1017/1019)。v1.4.26 起对齐 C++ ChannelAddressManager::guaranteed_ip_map_ 完整收集 —— broker CMD 1001 登录必须连对 IP,不然服务端按 customer_id 返错 broker 的 账户列表(2026-04-17 实测:broker 1001 连到 Platform US IP 时 返回的是 broker 1007 的账户)。

§guaranteed_ip_web: GuaranteedWebIpMap

按 web conn_identity 分组的 WebTCP-short guaranteed IP 池 (identity 10100..10107)。broker_auth 在 C++ 中先走 WebTCP-short, 这里保留服务端下发 IP,避免走系统 DNS。

§web_conn_identity: Option<u32>

C++ WebRequestManager 使用的全局 WebTCP-short identity。

Ref:

  • FTLogin/Src/ftlogin/channel/impl/web_request_mgr.cpp:251-275
  • FTLogin/Src/ftlogin/channel/impl/web_request_mgr.cpp:635-656

这是整个客户端的 Web 通道 identity,不是按 broker_id 选择。broker auth 虽然请求的是 authority.us.moomoo.com / authority.sg.moomoo.com 等 broker 域名,WebTCP-short 连接目标仍由这个全局 identity 决定。

§auth_guaranteed_domains: AuthGuaranteedDomainMap

C++ FTAuthImpl::GetRetryDomain() 使用的动态鉴权兜底域名表。

key 是原始鉴权域名(如 authority.us.moomoo.com),value 是 WebTCP/HTTP 失败后的 retry-domain 阶段使用的域名。没有服务端下发 时,broker_auth 只使用 C++ 本地 HK fallback。

§auth_guaranteed_domains_configured: bool

auth_guaranteed_domain_list 是否以有效 JSON object 形式下发过。

C++ 在配置可解析但缺少当前域名 key 时返回空 retry-domain,不再使用 本地 HK fallback;只有配置缺失或解析失败时才走本地 fallback。

§forced_ip: ForcedIpMap

按 attribution 分组的 forced IP(优先级最高,未过期时绕过所有 fallback 直接用这个 IP,对齐 C++ GetStrategyAddressInfo 的 “if (forced_ip && !expired) return forced_ip;”)。

§next_refresh_ts: i64

下次整体刷新的 Unix 时间戳(秒)。limit_time 累加当前时间。

Trait Implementations§

Source§

impl Clone for CommonConfigSnapshot

Source§

fn clone(&self) -> CommonConfigSnapshot

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CommonConfigSnapshot

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more