fix(share): carry the transport in the share and assign payloads
The share payload was host:port:shine and carried no transport at all, so a
shared client fell back to its baked-in protoType. Share instances also skip
ApplyProtoSwitch (ClientDll.cpp:810), so a client upgraded to WSS was shared
to a TLS front end as raw TCP and looped on HTTP/1.1 400.
Extend both payloads with an optional trailing transport field:
share : host:port:shine[:transport]
assign : host:port:days:shine[:transport]
The field is omitted when the source protocol is not TCP/WS/WSS, so HTTP/UDP/
KCP hosts keep their previous behaviour instead of being silently downgraded
to plain TCP.
- server: add SelectedShareTransport(), share it between OnOnlineShare and
OnOnlineAssignTo, and accept a tcp:// ws:// wss:// prefix in the address.
- client: parse the field on both paths and persist the assigned value to
settings/master_transport, clearing it when the field is absent.
- share_list: dedup on host:port instead of the whole record, so re-sharing
a host with a different transport replaces the stale entry.
- assign: guard bToken[_MAX_PATH] against the longer payload.
- lang: translate the reworded prompt and the three new messages in en_US,
zh_TW and de_DE.
Transport is pinned at share time and does not follow a later protocol switch
on the master link; the m_bShared gate stays as-is on purpose.
This commit is contained in:
1 parent
951b4072e5
commit
454d25d37f
10 files changed
+266
-22
No files matched your search
@@ -562,6 +562,10 @@ public:
|
||||
afx_msg void OnProtoSwitchWs();
|
||||
afx_msg void OnProtoSwitchWss();
|
||||
VOID SwitchSelectedProtocol(UINT nID);
|
||||
// 选中主机当前的真实传输(PROTO_TCP / PROTO_WS / PROTO_WSS)。多选取第一个可识别的;
|
||||
// 一个都没有(HTTP 伪装 / UDP / KCP / 没选中主机)返回 -1。分享与转移都用它给新建
|
||||
// 链路定传输:-1 表示「不下发」,让对端沿用出包时烘焙的值。
|
||||
int SelectedShareTransport();
|
||||
afx_msg void OnOnlineDelete();
|
||||
afx_msg void OnOnlineUpdate();
|
||||
afx_msg void OnAbout();
|
||||
|
||||
Reference in new issue
Block a user