Editing XEP-0065: SOCKS5 Bytestreams
From JaWiki (Jabber/XMPP wiki)
Warning: The database has been locked for maintenance, so you will not be able to save your edits right now. You may wish to copy and paste your text into a text file and save it for later.
The administrator who locked it offered this explanation: MediaWiki upgrading
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 121: | Line 121: | ||
# Инициатор и Цель могут начать пересылку данных. | # Инициатор и Цель могут начать пересылку данных. | ||
− | === | + | === Mediated Connection === |
− | + | Mediated connection is slightly more complicated. In this situation, the StreamHost is not the Initiator but a Proxy, which means that the Initiator must discover the network address of the StreamHost before sending the initial IQ-set, must negotiate a connection with the StreamHost in the same way that the Target does, and must request that the StreamHost activate the bytestream before it can be used. The process for establishing bytestreams in this case is as follows: | |
− | + | Optionally, Initiator discovers the network address of StreamHost in-band. | |
− | + | ||
− | + | Initiator sends IQ-set to Target specifying the full JID and network address of StreamHost as well as the StreamID (SID) of the proposed bytestream. | |
− | + | ||
− | + | Target opens a TCP socket to the selected StreamHost. | |
− | + | ||
− | + | Target establishes connection via SOCKS5, with the DST.ADDR and DST.PORT parameters set to the values defined below. | |
− | + | ||
− | + | StreamHost sends acknowledgement of successful connection to Target via SOCKS5. | |
− | + | ||
− | + | Target sends IQ-result to Initiator, preserving the 'id' of the initial IQ-set. | |
− | + | ||
− | + | Initiator opens a TCP socket at the StreamHost. | |
+ | |||
+ | Initiator establishes connection via SOCKS5, with the DST.ADDR and DST.PORT parameters set to the values defined below. | ||
+ | |||
+ | StreamHost sends acknowledgement of successful connection to Initiator via SOCKS5. | ||
+ | |||
+ | Initiator sends IQ-set to StreamHost requesting that StreamHost activate the bytestream associated with the StreamID. | ||
+ | |||
+ | StreamHost activates the bytestream. (Data is now relayed between the two SOCKS5 connections by the proxy.) | ||
+ | |||
+ | StreamHost sends IQ-result to Initiator acknowledging that the bytestream has been activated (or specifying an error). | ||
+ | |||
+ | Initiator and Target may begin using the bytestream. | ||
== Протокол == | == Протокол == |