1 registered members (AndrewAMD),
1,403
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: [Anet] and port forwarding workarounds
[Re: Carlos3DGS]
#378858
07/27/11 08:35
07/27/11 08:35
|
Joined: Jul 2005
Posts: 1,930 Austria
Dark_samurai
Serious User
|
Serious User
Joined: Jul 2005
Posts: 1,930
Austria
|
It is already implemented and seems to work well. A small "pre beta" of the new ANet version was released a few days ago. If you want you can join? There are not all functions for the new version implemented yet (the voip feature isn't finished yet and also some changes on the entity system have to be done). After that a public Beta will be released. Edit: Had a lot of fun on my vacation, thanks
Last edited by Dark_samurai; 07/27/11 08:37.
ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)! get free version
|
|
|
Re: [Anet] and port forwarding workarounds
[Re: SchokoKeks]
#385752
10/23/11 13:45
10/23/11 13:45
|
Joined: Jul 2005
Posts: 1,930 Austria
Dark_samurai
Serious User
|
Serious User
Joined: Jul 2005
Posts: 1,930
Austria
|
You only have to forward the VoIP server port. A technic called NAT punsh-through is used to determine the client ports outside the router. Thus no portforwarding is needed for the clients.
ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)! get free version
|
|
|
Re: [Anet] and port forwarding workarounds
[Re: Zwiebli]
#385759
10/23/11 14:56
10/23/11 14:56
|
Joined: Jul 2005
Posts: 1,930 Austria
Dark_samurai
Serious User
|
Serious User
Joined: Jul 2005
Posts: 1,930
Austria
|
Yes that would be possible. Shematic network example:
[client1]----[router1]---------------------------[router3]----------[server]
Port 2300 Port 8947 | Port 2300 Port 2300
|
[client2]----[router2]----------------
Port 2300 Port 38495
The problem is, that the routers change the port number of client 1 and 2 because of NAT/PAT as you can see in the example above. Thus if the server wants to send a packet to client1 and uses port 2300 it won't work. Solution (NAT punsh-through): The server is reachable through port 2300 because port forwarding was done here. Now all clients contact the server by sending a packet. Thus the server can store the destination ports of the packets (which are 8947 and 38495). If the server then sends a packet to these ports, the clients will receive the packet. And that's it. It's very simple.
ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)! get free version
|
|
|
Re: [Anet] and port forwarding workarounds
[Re: Dark_samurai]
#385769
10/23/11 17:40
10/23/11 17:40
|
Joined: Jul 2010
Posts: 12 Germany
Zwiebli
Newbie
|
Newbie
Joined: Jul 2010
Posts: 12
Germany
|
1. Thx for quick and nice reply 2. Does this mean if i know which ports the clients routers are using client1 can also send a package directly to client 2 using the port 38495? 3. So this means if I don`t manually do portforwarding and tell the router which port it has to use it just gonna choose a random port that is usable if i send package from a pc behind a router, to the server. 4. Now I think the header of every package contains the port it was sent from but how can the server find out the port? Is there a function to find it out? 5. Thx for your great help
|
|
|
Re: [Anet] and port forwarding workarounds
[Re: Zwiebli]
#385773
10/23/11 18:30
10/23/11 18:30
|
Joined: Jul 2005
Posts: 1,930 Austria
Dark_samurai
Serious User
|
Serious User
Joined: Jul 2005
Posts: 1,930
Austria
|
1. No problem 2. Yes. The server should store all ports of the clients in a table. If a new client connects, you could send the whole table to all participants for example. 3. Yes, that's basicly what NAT/PAT is doing. This technic allows you to access the internet through more than one pc at the same time, although you only have one internet ip address. You can find more informations about that in wikipedia. 4. Every packet contains the source and destination port. You are right, this is currently not possible because the sock_recv() function doesn't return the destination port. This will be changed!
ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)! get free version
|
|
|
Re: [Anet] and port forwarding workarounds
[Re: Dark_samurai]
#385778
10/23/11 18:41
10/23/11 18:41
|
Joined: Jul 2010
Posts: 12 Germany
Zwiebli
Newbie
|
Newbie
Joined: Jul 2010
Posts: 12
Germany
|
I was reading stuff about udp, portforwarding... all day but wasn`t quite sure if i understood all the stuff correctly. So thx for the extra explanations. 4. Awesome can`t wait Is it realistic that this feature will be avaiable in ANet v1.5 allready? I think this would be a better port forwarding workaround than using upnp Thx again
Last edited by Zwiebli; 10/23/11 18:42.
|
|
|
|