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
@@ -1162,7 +1162,10 @@ WIN32
|
||||
; ============================================
|
||||
自定义=Benutzerdefiniert
|
||||
请输入CMD命令:=CMD-Befehl eingeben:
|
||||
输入<IP:PORT>地址:=<IP:PORT>-Adresse eingeben:
|
||||
输入<IP:PORT>地址(可加 wss:// 前缀):=<IP:PORT>-Adresse eingeben (optionales tcp:// ws:// wss:// Praefix):
|
||||
地址前缀无法识别,只支持 tcp:// ws:// wss://=Adresspraefix nicht erkannt; nur tcp:// ws:// wss:// werden unterstuetzt
|
||||
地址不能为空=Adresse darf nicht leer sein
|
||||
地址过长,请缩短后重试=Adresse zu lang, bitte kuerzen und erneut versuchen
|
||||
请输入主机备注: =Host-Notiz eingeben:
|
||||
修改备注=Notiz bearbeiten
|
||||
转移主机(到期自动复原)=Host uebertragen (automatische Wiederherstellung bei Ablauf)
|
||||
|
||||
@@ -1166,7 +1166,10 @@ WIN32
|
||||
; ============================================
|
||||
自定义=Custom
|
||||
请输入CMD命令:=Enter CMD command:
|
||||
输入<IP:PORT>地址:=Enter <IP:PORT> address:
|
||||
输入<IP:PORT>地址(可加 wss:// 前缀):=Enter <IP:PORT> address (optional tcp:// ws:// wss:// prefix):
|
||||
地址前缀无法识别,只支持 tcp:// ws:// wss://=Unrecognized address prefix; only tcp:// ws:// wss:// are supported
|
||||
地址不能为空=Address cannot be empty
|
||||
地址过长,请缩短后重试=Address is too long, please shorten it and try again
|
||||
请输入主机备注: =Enter host note:
|
||||
修改备注=Edit Note
|
||||
转移主机(到期自动复原)=Transfer Host (auto-restore on expiry)
|
||||
|
||||
@@ -1164,7 +1164,10 @@ WIN32
|
||||
; ============================================
|
||||
自定义=自訂
|
||||
请输入CMD命令:=請輸入CMD命令:
|
||||
输入<IP:PORT>地址:=輸入<IP:PORT>位址:
|
||||
输入<IP:PORT>地址(可加 wss:// 前缀):=輸入<IP:PORT>位址(可加 tcp:// ws:// wss:// 前綴):
|
||||
地址前缀无法识别,只支持 tcp:// ws:// wss://=無法識別的位址前綴,僅支援 tcp:// ws:// wss://
|
||||
地址不能为空=位址不能為空
|
||||
地址过长,请缩短后重试=位址過長,請縮短後重試
|
||||
请输入主机备注: =請輸入主機備註:
|
||||
修改备注=修改備註
|
||||
转移主机(到期自动复原)=轉移主機(到期自動復原)
|
||||
|
||||
Reference in new issue
Block a user