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-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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more