pub struct CommonConfigSnapshot {
pub source: CommConfigSource,
pub generation: u64,
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§
§source: CommConfigSource当前完整 snapshot 的来源;不得再用某个 typed map 是否为空推断成功。
generation: u64每次完整 document 发布时递增;0 只用于启动 empty snapshot。
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-275FTLogin/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: AuthGuaranteedDomainMapC++ FTAuthImpl::GetRetryDomain() 使用的动态鉴权兜底域名表。
key 是原始鉴权域名(如 authority.us.moomoo.com),value 是
WebTCP/HTTP 失败后的 retry-domain 阶段使用的域名。没有服务端下发
时,broker_auth 只使用 C++ 本地 HK fallback。
auth_guaranteed_domains_configured: boolauth_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
impl Clone for CommonConfigSnapshot
Source§fn clone(&self) -> CommonConfigSnapshot
fn clone(&self) -> CommonConfigSnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for CommonConfigSnapshot
impl RefUnwindSafe for CommonConfigSnapshot
impl Send for CommonConfigSnapshot
impl Sync for CommonConfigSnapshot
impl Unpin for CommonConfigSnapshot
impl UnsafeUnpin for CommonConfigSnapshot
impl UnwindSafe for CommonConfigSnapshot
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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