XMPP 使用哪个端口?

发布于 2024-09-13 13:19:56 字数 108 浏览 1 评论 0 原文

我搜索过但没有找到 XMPP 使用哪些端口。 我需要实现XMPP服务器和客户端并使用XML传输、文件传输和流媒体。 他们使用不同的端口吗?有没有办法让它们都一样使用,这样我就不需要打扰网络管理员? 谢谢

I´ve searched and didnt find which ports does XMPP uses.
I need to implement XMPP server and client and use XML transfer, file transfer and streaming.
Do they use different ports?? Is there a way I can make them use all the same, so I dont need to bother the network admin?
Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

孤独难免 2024-09-20 13:19:57

您的 XMPP 服务器和任何 XMPP 客户端所需的端口将有所不同。大多数“现代”XMPP 服务器遵循服务器到服务器 5269 和客户端到服务器 5222 定义的 IANA 端口。任何其他端口取决于您在服务器上启用的功能,即,如果您提供 BOSH,那么您可能需要打开端口 80。

文件传输高度依赖于您使用的客户端和服务器将使用哪个端口,但大多数客户端也会通过现有的 XMPP 客户端到服务器链接协商连接,因此所需的端口打开将作为客户端(或通过端口 80 代理。)

The ports required will be different for your XMPP Server and any XMPP Clients. Most "modern" XMPP Servers follow the defined IANA Ports for Server-to-Server 5269 and for Client-to-Server 5222. Any additional ports depends on what features you enable on the Server, i.e. if you offer BOSH then you may need to open port 80.

File Transfer is highly dependent on both the Clients you use and the Server as to what port it will use, but most of them also negotiate the connect via your existing XMPP Client-to-Server link so the required port opening will be client side (or proxied via port 80.)

年少掌心 2024-09-20 13:19:57

RFC 中列出了官方端口(TCP:5222 和 TCP:5269) 6120. 与之前的答案的说法相反,XEP-0174 不指定端口。因此 TCP:5298 可能是链路本地 XMPP 的惯例,但不是官方的。

不过,您可以使用保留端口以外的其他端口:您可以使 DNS SRV 记录指向您喜欢的任何计算机和端口。

文件传输 (XEP-0234) 现在使用 Jingle (XEP-0166)RTP 会话 (XEP-0167) 也是如此。不过,它们没有指定端口,因为 Jingle 协商 XMPP 客户端之间数据流的创建,但实际数据随后通过该流以其他方式(例如 RTP)传输(即通常不通过 XMPP 服务器,即使带内传输是可能的)。请注意,Jingle 由多个 XEP 组成,因此请务必查看 XMPP 扩展 的完整列表。

The official ports (TCP:5222 and TCP:5269) are listed in RFC 6120. Contrary to the claims of a previous answer, XEP-0174 does not specify a port. Thus TCP:5298 might be customary for Link-Local XMPP, but is not official.

You can use other ports than the reserved ones, though: You can make your DNS SRV record point to any machine and port you like.

File transfers (XEP-0234) are these days handled using Jingle (XEP-0166). The same goes for RTP sessions (XEP-0167). They do not specify ports, though, since Jingle negotiates the creation of the data stream between the XMPP clients, but the actual data is then transferred by other means (e.g. RTP) through that stream (i.e. not usually through the XMPP server, even though in-band transfers are possible). Beware that Jingle is comprised of several XEPs, so make sure to have a look at the whole list of XMPP extensions.

吹梦到西洲 2024-09-20 13:19:56

根据 Wikipedia

5222 TCP     XMPP client connection (RFC 6120)        Official  
5223 TCP     XMPP client connection over SSL          Unofficial
5269 TCP     XMPP server connection (RFC 6120)        Official
5298 TCP UDP XMPP JEP-0174: Link-Local Messaging /    Official
             XEP-0174: Serverless Messaging
8010 TCP     XMPP File transfers                      Unofficial    

端口号在 RFC 6120 § 14.7。

According to Wikipedia:

5222 TCP     XMPP client connection (RFC 6120)        Official  
5223 TCP     XMPP client connection over SSL          Unofficial
5269 TCP     XMPP server connection (RFC 6120)        Official
5298 TCP UDP XMPP JEP-0174: Link-Local Messaging /    Official
             XEP-0174: Serverless Messaging
8010 TCP     XMPP File transfers                      Unofficial    

The port numbers are defined in RFC 6120 § 14.7.

违心° 2024-09-20 13:19:56

根据可扩展消息传递和状态协议 (Wikipedia),服务器的标准 TCP 端口是 5222。

客户端可能会使用与消息传递协议相同的端口,但也可以使用 http(端口 80)和 https(端口 443)进行消息传递。这些的优点是可以为防火墙后面的用户工作,因此您的网络管理员不需要参与其中。

According to Extensible Messaging and Presence Protocol (Wikipedia), the standard TCP port for the server is 5222.

The client would presumably use the same ports as the messaging protocol, but can also use http (port 80) and https (port 443) for message delivery. These have the advantage of working for users behind firewalls, so your network admin should not need to get involved.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文