- Home /
how to use proxy serve in multiplayer game
i need proxy server to connect host and client in different network
i start a proxy server with ip xxx:10746
i start host server with proxy server enabled, and connect to the proxy server 10746, everything goes well
and the host server be given a new port 50110 by the proxy server
i start a client without proxy server enabled,
client connect the proxy server with port 50110, and then connected to the host, it all works well
client player and see host player , host can see client also
but they can't see the movement between each other
i have debuged many times
and it seems that when client connect to host, the proxy server can relay the correct message ID: ID_REQUEST_CLIENT_INIT also host can reply a correct msg : ID_CLIENT_INIT by proxy server but when client move, the proxy server relay a message with ID unknown : 0; but relay to right host server address and when server move, the proxy server relay a message with ID unknow : 5; even relay to wrong client address
any one can help me??? thanks a lot
have i missed somewhere?
Answer by Zhang Kun · Nov 10, 2011 at 06:13 AM
My place after client and server "connected", the ProxyServer will crash. There is some error in Unity script reference for Network.useProxy, client side should not enable useProxy. Has Unity tested this?!
function ConnectToServerWithProxy() { [Wrong]Network.useProxy = true;[Wrong] Network.Connect(serverIP, serverPort); }
Your answer
Follow this Question
Related Questions
Proxy Server Load Balancing / Scaling 2 Answers
How to set up a proxy server for network multiuplayer with Unity? 0 Answers
Unity networking tutorial? 6 Answers
MUltiplayer 5 Answers
Multiplayer for iPhone and iPad 1 Answer