{"id":479185,"date":"2023-08-09T10:31:59","date_gmt":"2023-08-09T10:31:59","guid":{"rendered":""},"modified":"2023-09-05T11:18:21","modified_gmt":"2023-09-05T11:18:21","slug":"stun","status":"publish","type":"wiki","link":"https:\/\/oneproxy.pro\/cn\/wiki\/stun\/","title":{"rendered":"\u7729\u6655"},"content":{"rendered":"<p>STUN\u7b80\u4ecb<\/p>\n<p>STUN\uff08NAT \u4f1a\u8bdd\u904d\u5386\u5b9e\u7528\u7a0b\u5e8f\uff09\u662f\u4e00\u79cd\u534f\u8bae\uff0c\u53ef\u5e2e\u52a9\u53d1\u73b0\u7f51\u7edc\u5730\u5740\u8f6c\u6362\u5668 (NAT) \u5206\u914d\u7ed9\u8bbe\u5907\u7684\u516c\u5171 IP \u5730\u5740\u548c\u7aef\u53e3\u3002\u5b83\u88ab\u5e7f\u6cdb\u7528\u4e8e\u5141\u8bb8\u672c\u5730\u7f51\u7edc\u4e0a\u7684\u8bbe\u5907\u8fde\u63a5\u5230\u8fdc\u7a0b\u7f51\u7edc\uff08\u4f8b\u5982\u4e92\u8054\u7f51\uff09\uff0c\u7279\u522b\u662f\u7528\u4e8e VoIP\u3001\u89c6\u9891\u6d41\u548c\u5728\u7ebf\u6e38\u620f\u7b49\u5e94\u7528\u3002<\/p>\n<h2>STUN \u7684\u8d77\u6e90\u5386\u53f2\u53ca\u5176\u9996\u6b21\u63d0\u53ca<\/h2>\n<p>STUN \u6700\u521d\u662f\u5728 21 \u4e16\u7eaa\u521d\u8bbe\u8ba1\u7684\uff0c\u7528\u4e8e\u89e3\u51b3\u4f7f\u7528 NAT \u8bbe\u5907\u65f6\u51fa\u73b0\u7684\u95ee\u9898\u3002STUN \u7684\u7b2c\u4e00\u4e2a\u5b98\u65b9\u89c4\u8303\u4e8e 2003 \u5e74 10 \u6708\u53d1\u5e03\uff0c\u5373 RFC 3489\u3002\u968f\u540e\uff0c\u5b83\u4e8e 2008 \u5e74\u8fdb\u884c\u4e86\u4fee\u8ba2\uff0c\u5373 RFC 5389\uff0c\u63d0\u9ad8\u4e86\u5b89\u5168\u6027\u548c\u529f\u80fd\u6027\u3002<\/p>\n<h2>\u5173\u4e8eSTUN\u7684\u8be6\u7ec6\u4fe1\u606f\u3002\u6269\u5c55STUN\u4e3b\u9898<\/h2>\n<p>STUN \u7528\u4f5c\u5ba2\u6237\u7aef-\u670d\u52a1\u5668\u534f\u8bae\uff0c\u5ba2\u6237\u7aef\u5411 STUN \u670d\u52a1\u5668\u53d1\u9001\u8bf7\u6c42\u3002\u7136\u540e\uff0c\u670d\u52a1\u5668\u4f7f\u7528\u4e0e\u5ba2\u6237\u7aef\u672c\u5730\u79c1\u6709\u5730\u5740\u76f8\u5bf9\u5e94\u7684\u516c\u5171 IP \u5730\u5740\u548c\u7aef\u53e3\u53f7\u8fdb\u884c\u54cd\u5e94\u3002\u6b64\u4fe1\u606f\u53ef\u7528\u4e8e\u901a\u8fc7 NAT \u5b9e\u73b0\u5bf9\u7b49\u901a\u4fe1\u3002<\/p>\n<p>STUN \u901a\u5e38\u4e0e\u5176\u4ed6\u534f\u8bae\uff08\u5982 TURN\uff08\u4f7f\u7528\u4e2d\u7ee7\u7ed5\u8fc7 NAT\uff09\u548c ICE\uff08\u4ea4\u4e92\u5f0f\u8fde\u63a5\u5efa\u7acb\uff09\uff09\u7ed3\u5408\u4f7f\u7528\uff0c\u4ee5\u786e\u4fdd\u5404\u79cd\u7f51\u7edc\u914d\u7f6e\u4e2d\u7684\u53ef\u9760\u8fde\u63a5\u3002<\/p>\n<h2>STUN \u7684\u5185\u90e8\u7ed3\u6784\u3002STUN \u7684\u5de5\u4f5c\u539f\u7406<\/h2>\n<p>STUN \u901a\u8fc7\u5ba2\u6237\u7aef\u548c STUN \u670d\u52a1\u5668\u4e4b\u95f4\u7684\u4e00\u7cfb\u5217\u8bf7\u6c42\u548c\u54cd\u5e94\u8fdb\u884c\u64cd\u4f5c\u3002\u5176\u4e00\u822c\u5de5\u4f5c\u539f\u7406\u5982\u4e0b\uff1a<\/p>\n<ol>\n<li><strong>\u8981\u6c42<\/strong>\uff1a\u5ba2\u6237\u7aef\u5411STUN\u670d\u52a1\u5668\u53d1\u9001\u7ed1\u5b9a\u8bf7\u6c42\u3002<\/li>\n<li><strong>\u56de\u590d<\/strong>\uff1a\u670d\u52a1\u5668\u68c0\u67e5\u8bf7\u6c42\u5e76\u786e\u5b9a\u5ba2\u6237\u7aef\u7684\u516c\u5171 IP \u548c\u7aef\u53e3\u3002<\/li>\n<li><strong>\u6210\u529f\u54cd\u5e94<\/strong>\uff1a\u670d\u52a1\u5668\u8fd4\u56de\u5e26\u6709\u516c\u7f51 IP \u548c\u7aef\u53e3\u7684\u54cd\u5e94\u3002<\/li>\n<li><strong>\u9519\u8bef\u54cd\u5e94<\/strong>\uff1a\u82e5\u6709\u9519\u8bef\uff0c\u5219\u53d1\u56de\u9519\u8bef\u54cd\u5e94\u3002<\/li>\n<\/ol>\n<h2>STUN\u4e3b\u8981\u7279\u6027\u5206\u6790<\/h2>\n<p>STUN \u63d0\u4f9b\u4e86\u51e0\u4e2a\u4e3b\u8981\u529f\u80fd\uff1a<\/p>\n<ul>\n<li><strong>NAT \u53d1\u73b0<\/strong>\uff1a\u6807\u8bc6\u6b63\u5728\u4f7f\u7528\u7684 NAT \u7c7b\u578b\u3002<\/li>\n<li><strong>\u516c\u5171\u5e7f\u64ad\u53d1\u73b0<\/strong>\uff1a\u68c0\u7d22\u516c\u5171IP\u548c\u7aef\u53e3\u3002<\/li>\n<li><strong>\u5b9e\u65bd\u7b80\u5355<\/strong>\uff1a\u76f8\u5bf9\u6765\u8bf4\u6bd4\u8f83\u5bb9\u6613\u5b9e\u73b0\u3002<\/li>\n<li><strong>\u517c\u5bb9\u6027<\/strong>\uff1a\u53ef\u4e0e\u5404\u79cd\u5e94\u7528\u7a0b\u5e8f\u548c\u8bbe\u5907\u914d\u5408\u4f7f\u7528\u3002<\/li>\n<\/ul>\n<h2>\u5199\u51fa\u6709\u54ea\u4e9b\u7c7b\u578b\u7684 STUN\u3002\u4f7f\u7528\u8868\u683c\u548c\u5217\u8868\u6765\u5199<\/h2>\n<p>\u5b9e\u73b0 STUN \u6709\u4e0d\u540c\u7684\u65b9\u6cd5\u548c\u6280\u672f\u3002\u4e0b\u8868\u603b\u7ed3\u4e86\u5176\u4e2d\u4e00\u4e9b\u65b9\u6cd5\u548c\u6280\u672f\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th>\u7c7b\u578b<\/th>\n<th>\u63cf\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u7ecf\u5178STUN<\/td>\n<td>RFC 3489 \u4e2d\u63cf\u8ff0\u7684\u539f\u59cb\u534f\u8bae\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u5b8c\u5168\u7729\u6655<\/td>\n<td>\u66f4\u65b0\u7248\u672c\uff0c\u5728 RFC 5389 \u4e2d\u63cf\u8ff0\uff0c\u6dfb\u52a0\u4e86\u529f\u80fd\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u79fb\u52a8\u7248 STUN<\/td>\n<td>\u9488\u5bf9\u79fb\u52a8\u7f51\u7edc\u8fdb\u884c\u4e86\u4f18\u5316\uff0c\u4ee5\u51cf\u5c11\u5ef6\u8fdf\u5e76\u8282\u7701\u7535\u6c60\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>STUN \u7684\u4f7f\u7528\u65b9\u6cd5\u3001\u4f7f\u7528\u4e2d\u9047\u5230\u7684\u95ee\u9898\u53ca\u89e3\u51b3\u65b9\u6cd5<\/h2>\n<p>STUN \u4e3b\u8981\u7528\u4e8e VoIP\u3001\u89c6\u9891\u4f1a\u8bae\u548c\u70b9\u5bf9\u70b9\u901a\u4fe1\u3002\u4f46\u662f\uff0c\u53ef\u80fd\u4f1a\u5b58\u5728\u4ee5\u4e0b\u95ee\u9898\uff1a<\/p>\n<ul>\n<li><strong>\u5b89\u5168\u95ee\u9898<\/strong>\uff1a\u5982\u679c\u6ca1\u6709\u9002\u5f53\u7684\u52a0\u5bc6\uff0c\u4fe1\u606f\u53ef\u80fd\u4f1a\u88ab\u622a\u53d6\u3002<\/li>\n<li><strong>\u517c\u5bb9\u6027\u95ee\u9898<\/strong>\uff1a\u5e76\u975e\u6240\u6709 NAT \u8bbe\u5907\u90fd\u652f\u6301 STUN \u7684\u6240\u6709\u529f\u80fd\u3002<\/li>\n<\/ul>\n<p>\u89e3\u51b3\u65b9\u6848\u5305\u62ec\u4f7f\u7528\u52a0\u5bc6\uff08\u4f8b\u5982 TLS\uff09\u3001\u5c06 STUN \u4e0e TURN \u7b49\u5176\u4ed6\u534f\u8bae\u76f8\u7ed3\u5408\u4ee5\u53ca\u4fdd\u6301\u7cfb\u7edf\u66f4\u65b0\u3002<\/p>\n<h2>\u4e3b\u8981\u7279\u70b9\u53ca\u5176\u4ed6\u4e0e\u540c\u7c7b\u4ea7\u54c1\u7684\u6bd4\u8f83<\/h2>\n<table>\n<thead>\n<tr>\n<th>\u7279\u5f81<\/th>\n<th>\u7729\u6655<\/th>\n<th>\u8f6c\u52a8<\/th>\n<th>\u51b0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>NAT \u904d\u5386<\/td>\n<td>\u662f\u7684<\/td>\n<td>\u662f\u7684<\/td>\n<td>\u662f\u7684<\/td>\n<\/tr>\n<tr>\n<td>\u590d\u6742<\/td>\n<td>\u7f13\u548c<\/td>\n<td>\u66f4\u590d\u6742<\/td>\n<td>\u6700\u590d\u6742<\/td>\n<\/tr>\n<tr>\n<td>\u4e0e\u9632\u706b\u5899\u4e00\u8d77\u4f7f\u7528<\/td>\n<td>\u6709\u9650\u7684<\/td>\n<td>\u66f4\u517c\u5bb9<\/td>\n<td>\u9ad8\u5ea6\u517c\u5bb9<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>\u4e0e STUN \u76f8\u5173\u7684\u672a\u6765\u89c2\u70b9\u548c\u6280\u672f<\/h2>\n<p>\u968f\u7740\u901a\u4fe1\u6280\u672f\u7684\u53d1\u5c55\uff0cSTUN \u7684\u5b89\u5168\u6027\u548c\u6548\u7387\u4ee5\u53ca\u4e0e 5G\u3001\u7269\u8054\u7f51\u548c\u4eba\u5de5\u667a\u80fd\u9a71\u52a8\u7f51\u7edc\u7b49\u65b0\u5174\u6280\u672f\u7684\u96c6\u6210\u5c06\u5f97\u5230\u589e\u5f3a\u3002<\/p>\n<h2>\u5982\u4f55\u4f7f\u7528\u4ee3\u7406\u670d\u52a1\u5668\u6216\u5c06\u5176\u4e0e STUN \u5173\u8054<\/h2>\n<p>STUN \u548c\u4ee3\u7406\u670d\u52a1\u5668\u901a\u5e38\u5728\u7f51\u7edc\u914d\u7f6e\u4e2d\u534f\u540c\u5de5\u4f5c\u3002\u4ee3\u7406\u670d\u52a1\u5668\u5145\u5f53\u4e2d\u4ecb\uff0c\u5728\u5ba2\u6237\u7aef\u548c\u670d\u52a1\u5668\u4e4b\u95f4\u8f6c\u53d1\u8bf7\u6c42\u548c\u54cd\u5e94\uff0c\u800c STUN \u5219\u6709\u52a9\u4e8e NAT \u904d\u5386\u3002OneProxy \u63d0\u4f9b\u7684\u4ee3\u7406\u670d\u52a1\u5668\u53ef\u4ee5\u589e\u5f3a\u4f7f\u7528 STUN \u7684\u5e94\u7528\u7a0b\u5e8f\u7684\u6548\u7387\u3001\u5b89\u5168\u6027\u548c\u529f\u80fd\u3002<\/p>\n<h2>\u76f8\u5173\u94fe\u63a5<\/h2>\n<ol>\n<li><a href=\"https:\/\/tools.ietf.org\/html\/rfc3489\" target=\"_new\" rel=\"noopener nofollow\">RFC 3489 \u2013 \u539f\u59cb STUN \u89c4\u8303<\/a><\/li>\n<li><a href=\"https:\/\/tools.ietf.org\/html\/rfc5389\" target=\"_new\" rel=\"noopener nofollow\">RFC 5389 \u2013 \u66f4\u65b0\u7684 STUN \u89c4\u8303<\/a><\/li>\n<li><a href=\"https:\/\/oneproxy.pro\/cn\/\" target=\"_new\" rel=\"noopener\">OneProxy\u7f51\u7ad9<\/a> \u2013 \u6709\u5173\u53ef\u4e0e STUN \u7ed3\u5408\u4f7f\u7528\u7684\u4ee3\u7406\u670d\u52a1\u5668\u7684\u4fe1\u606f\u3002<\/li>\n<\/ol>","protected":false},"featured_media":479186,"menu_order":0,"template":"","meta":{"_acf_changed":false,"content-type":"","inline_featured_image":false,"footnotes":""},"class_list":["post-479185","wiki","type-wiki","status-publish","has-post-thumbnail","hentry"],"acf":{"faq_title":"Frequently Asked Questions about <mark>STUN (Session Traversal Utilities for NAT)<\/mark>","faq_items":[{"question":"What is STUN (Session Traversal Utilities for NAT)?","answer":"<p>STUN, or Session Traversal Utilities for NAT, is a protocol that helps in determining the public IP address and port assigned to a device by a Network Address Translator (NAT). It is used for applications such as VoIP, video streaming, and online gaming to enable devices on a local network to connect to remote networks.<\/p>"},{"question":"How does STUN work?","answer":"<p>STUN operates through a client-server mechanism. The client sends a binding request to a STUN server, and the server responds with the public IP address and port number that correspond to the client's local private address. This information can be used to enable peer-to-peer communication through NAT.<\/p>"},{"question":"What are the key features of STUN?","answer":"<p>The key features of STUN include NAT discovery, public address discovery, simplicity in implementation, and compatibility with various applications and devices.<\/p>"},{"question":"What are the different types of STUN?","answer":"<p>There are different types of STUN, such as Classic STUN (original protocol), Full STUN (updated version with added features), and STUN for Mobile (optimized for mobile networks to reduce latency and conserve battery).<\/p>"},{"question":"What are some common problems with STUN, and how can they be resolved?","answer":"<p>Common problems with STUN include security concerns and compatibility issues with some NAT devices. Solutions include using encryption, combining STUN with other protocols like TURN, and keeping systems up to date.<\/p>"},{"question":"How does STUN compare with similar terms like TURN and ICE?","answer":"<p>STUN is a protocol for NAT traversal, similar to TURN and ICE. While STUN has moderate complexity and limited compatibility with firewalls, TURN is more complex and compatible, and ICE is the most complex but also highly compatible.<\/p>"},{"question":"What are the future perspectives of STUN?","answer":"<p>STUN is likely to see enhancements in the future in areas such as security, efficiency, and integration with emerging technologies like 5G, IoT, and AI-driven networks.<\/p>"},{"question":"How can proxy servers like those from OneProxy be associated with STUN?","answer":"<p>Proxy servers like those provided by OneProxy can work in conjunction with STUN. They act as intermediaries, forwarding requests and responses between clients and servers, while STUN facilitates NAT traversal. This enhances the efficiency, security, and functionality of applications using STUN.<\/p>"}]},"_links":{"self":[{"href":"https:\/\/oneproxy.pro\/cn\/wp-json\/wp\/v2\/wiki\/479185","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oneproxy.pro\/cn\/wp-json\/wp\/v2\/wiki"}],"about":[{"href":"https:\/\/oneproxy.pro\/cn\/wp-json\/wp\/v2\/types\/wiki"}],"version-history":[{"count":0,"href":"https:\/\/oneproxy.pro\/cn\/wp-json\/wp\/v2\/wiki\/479185\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/oneproxy.pro\/cn\/wp-json\/wp\/v2\/media\/479186"}],"wp:attachment":[{"href":"https:\/\/oneproxy.pro\/cn\/wp-json\/wp\/v2\/media?parent=479185"}],"curies":[{"name":"\u53ef\u6e7f\u6027\u7c89\u5242","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}