Editing XEP-0065: SOCKS5 Bytestreams

From JaWiki (Jabber/XMPP wiki)
Jump to: navigation, search

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 330: Line 330:
 
  </iq>
 
  </iq>
  
=== Цель устанавливает соединение SOCKS5 с ВедущимУзлом ===
+
=== Target Establishes SOCKS5 Connection with StreamHost ===
  
Если Цель согласна принять поток данных, она ДОЛЖНА попытаться открыть стандартный сокет TCP на сетевом интерфейсе ВедущегоУзла, соединённого с Инициатором. Если Инициатором было предложено несколько ВедущихУзлов, Цели СЛЕДУЕТ попытаться соединиться с ними в том порядке, в котором они указаны.
+
If the Target is willing to accept the bytestream, it MUST attempt to open a standard TCP socket on the network address of the StreamHost communicated by the Initiator. If the Initiator provides more than one StreamHost, the Target SHOULD try to connect to them in the order they occur.
  
Если Цель пытается, но не может соединиться ни с каким из ВедущихУзлов и не желает пытаться установить соединение со своей стороны {{todo|сомневаюсь в правильности перевода: it does not wish to attempt a connection from its side}}, она ДОЛЖНА вернуть Инициатору ошибку <tt>&lt;item-not-found/&gt;</tt> («элемент не найдён»).
+
If the Target tries but is unable to connect to any of the StreamHosts and it does not wish to attempt a connection from its side, it MUST return a <item-not-found/> error to the Initiator.
  
<b id="Example_13">Пример 13. Цель не может соединиться ни с каким из ВедущихУзлов и желает завершить транзакцию.</b>
+
Example 13. Target Is Unable to Connect to Any StreamHost and Wishes to End Transaction
<iq     type='error'  
+
<iq type='error'  
        from='target@host2/bar'  
+
    from='target@host2/bar'  
        to='initiator@host1/foo'  
+
    to='initiator@host1/foo'  
        id='initiate'>
+
    id='initiate'>
    <error code='404' type='cancel'>
+
  <error code='404' type='cancel'>
        <item-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
+
    <item-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
    </error>
+
  </error>
</iq>
+
</iq>
 +
   
  
Если Цель может открыть сокет TCP на ВедущемУзле, она ДОЛЖНА использовать протокол SOCKS5, описанный в RFC 1982 для установления соединения с ВедущимУзлом. В соответствии с RFC по SOCKS5, у Цели МОЖЕТ быть затребован пароль для доступа к прокси-серверу. Тем не менее, всё, что касается аутентификации, находится за пределами этого документа.
+
If the Target is able to open a TCP socket on a StreamHost, it MUST utilize the SOCKS5 protocol specified in RFC 1928 [7] to establish the connection with the StreamHost. In accordance with the SOCKS5 RFC, the Target MAY have to authenticate in order to use the proxy. However, any authentication required is beyond the scope of this document.
  
Когда Цель будет успешно аутентифицирована на Посреднике (даже анонимно), ей СЛЕДУЕТ послать запрос CONNECT соответствующему узлу, чтобы продолжить процесс установления соединения. При этом применяются следующие правила:
+
Once the Target has successfully authenticated with the Proxy (even anonymously), it SHOULD send a CONNECT request to the appropriate host in order to continue the negotiation. The following rules apply:
 +
The hostname MUST be SHA1(SID + Initiator JID + Target JID) where the definition of the SHA1 hashing algorithm is as specified by RFC 3174 [8] and the output is hexadecimal-encoded (not binary).
 +
The port MUST be 0 (zero).
 +
The JIDs provided MUST be the JIDs used for the IQ exchange, which MAY be full JIDs (<node@domain.tld/resource>) or bare JIDs (<node@domain.tld>).
 +
The appropriate stringprep profiles (as specified in XMPP Core [9]) MUST be applied to the JIDs before application of the SHA1 hashing algorithm.
  
# Имя узла (hostname) должно быть SHA1(ИдПередачи + JID Инициатора + JID Цели), где [[w:Хэширование|хэш-функция]] [[w:SHA-1|SHA-1]] определена согласно RFC 3174 и её выход записывается в [[w:Шестнадцатеричная система счисления|шестнадцатеричной системе счисления]] (не двоичным кодом).
+
Example 14. Target Connects to StreamHost
# Порт (port) ДОЛЖЕН быть 0 (ноль).
+
CMD = X'01'
# Указанные Jabber-идентификаторы ДОЛЖНЫ быть идентификаторами, использующимися для обмена IQ-стансами, которые могут быть полными JID (<tt>node@domain.tld/resource</tt>) или голыми JID (<tt>node@domain.tld</tt>).
+
ATYP = X'03'
# Перед применением алгоритма хэширования SHA-1 к Jabber-идентификаторам ДОЛЖНЫ быть применены соответствующие профили [[stringprep]] (как указано в «[[Основы XMPP|Основах XMPP]]»).
+
DST.ADDR = SHA1 Hash of: (SID + Initiator JID + Target JID)
 +
DST.PORT = 0
 +
   
  
<b id="Example_14">Пример 14. Цель соединяется с ВедущимУзлом</b>
+
Example 15. StreamHost Acknowledges Connection
CMD = X'01'
+
STATUS = X'00'
ATYP = X'03'
+
   
DST.ADDR = SHA1 Hash of: (SID + Initiator JID + Target JID)
+
DST.PORT = 0
+
  
<b id="Example_14">Пример 15. ВедущийУзел принимает соединение</b>
+
When replying to the client in accordance with Section 6 of RFC 1928, the StreamHost SHOULD set the BND.ADDR and BND.PORT to the values provided by the client in the connection request.
STATUS = X'00'
+
 
+
При ответе клиенту, в соответствии с разделом 6 RFC 1928, ВедущемуУзлу СЛЕДУЕТ выставить параметры BND.ADDR и BND.PORT в значения, предоставленные клиентом в запросе соединения.
+
  
 
=== Цель подтверждает соединение SOCKS5 ===
 
=== Цель подтверждает соединение SOCKS5 ===

Please note that all contributions to JaWiki (Jabber/XMPP wiki) may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see JaWiki (Jabber/XMPP wiki):Copyrights for details). Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)