I want to simulate logging in to a game server, the normal login request I grabbed from game client through Fiddler like these:
GET https://gateway-xxx.com/gateway HTTP/1.1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.96.36.199 Safari/537.36
Accept-Encoding: gzip, deflate, br
Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits
After that, the communication between the game client and the server is based on websocket.
I found that tokio-tungstenite might be what I need, but the official examples all directly establish the ws connection, I don't know how to connect to that https server first and then upgrade the connect to websocket and use the upgraded connection.
Any help is appreciated，thanks.