Closed frkami123 closed 7 years ago
The game do not send encrypted packets until the RC4 handshake is done , so MOST call send_crypto_packet
, only the shiplist send/reply are unencrypted
it is on the transport, so the packet data is a on a WAITING list to send out back once the server program go back to the reactor loop
I don't think the issue relate to encrypting or packet's synchronization but more likely about packet order. For example, client will disconnect itself from proxy if it receive a chat packet (0x19, 0x01) when it expect damage packet (0x04, 0x52) to come next (like i have pointed out in last comment).
I mean proxy shouldn't insert its customized packet between packets sequence that client is expecting. I tried to send chat packet every 100ms to global chat in my proxy implementation (C++, phantasy proxy) and this issue occur.
That's my conclusion, not 100% sure but i think it exists. I will investigate to find more evidences.
this is embarrass, i try again and everything seem normal, maybe because something was wrong with my encoding. i guess we can just insert chat packet whenever we want. sorry :D
as far as i know that if proxy send chat packet (system) before damage packet (and few other types) it will make client disconnect from proxy. i haven't seen this issue on cyberkitsune proxy (but can reproduce with plugin) but i still wondering if it exists and randomly disconnect clients with gchat enabled since send_crypto_packet direct call transport without any concern. https://github.com/alama/PSO2Proxy/blob/public/proxy/ShipProxy.py#L58-L63
pseudo plugin code to reproduce the issue