![]() Now that we have decided on the protocol and servers, it remains to find somewhere a STUN client that is easy to integrate into your program. Below is a list of public STUN servers known to us. And all are standard, and there is no need for each of them to have a “special approach” in decoding the answer. We are aware of several hundred such servers, which is significantly more than public web-servers of a similar purpose. Fortunately, there are such servers, each self-respecting VOIP company holds one. Now we need a STUN server to which your program will send requests. So, it turns out that there is an easy and standard protocol. But the advanced features of STUN are beyond the scope of this article about getting an IP address, so let's focus on the main thing. Compared to In fact, STUN allows you to not only determine the external IP, but also to investigate the behavior of the current NAT barrier, which can consist of several consecutive NAT devices. The This is a lightweight protocol based on UDP, and when using it, obtaining an external IP via STUN does not require establishing a TCP connection, etc. ![]() In general, you can use it, but the resource overrun of both the computer and the network is obvious.īased on the foregoing, it becomes clear that we need a lightweight and standardized protocol for obtaining an external IP, so as not to depend on the voluntarism of the owner of a site, and generally use the resources efficiently. The http that you are advised to use is based on tcp, that is, the protocol is relatively heavyweight, requiring a connection and so on.With the same implications for your network. When using an external server, you introduce the dependence of your system both on its operability and on the response format, which is not standardized at all, and which the server owner can change at any time.In the event of its failure, or forced domain revocation, your entire p2p network fails. When using your own server, you need to keep and maintain it somewhere, at the same time with the corresponding domain name.Although this method of solving the problem is workable, it nevertheless has a number of disadvantages: Often there is a temptation to go the easy way and use external WEB services, which via http return you an IP, or deploy it yourself. When writing various programs for working with the network, especially p2p systems, from time to time it becomes necessary to find out the external IP of your computer from the program (the address at which your computer is accessible from the Big Internet).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |