Файл:Imbox deletion.png Внимание! Начат процесс обновления Wiki до версии игры 10.x. Если у Вас есть желание принять участие, то Вы можете найти больше информации в нашем ECO Contribution Wiki Discord.

Редактирование: RCON

Материал из Eco - Русская Wiki
Перейти к:навигация, поиск

Сделанные вами изменения будут показаны читателям после того, как их утвердит уполномоченный участник (подробнее).

Внимание: Вы не вошли в систему. Ваш IP-адрес будет общедоступен, если вы запишете какие-либо изменения. Если вы войдёте или создадите учётную запись, её имя будет использоваться вместо IP-адреса, наряду с другими преимуществами.

Правка может быть отменена. Пожалуйста, просмотрите сравнение версий ниже, чтобы убедиться, что это нужная вам правка, и запишите страницу ниже, чтобы отменить правку.

Текущая версия Ваш текст
Строка 15: Строка 15:


'''Инструменты'''
'''Инструменты'''
*https://github.com/n0la/rcon (RCON утилита командной строки)
*https://github.com/n0la/rcon (RCON command line tool)
*https://github.com/Tiiffi/mcrcon (RCON клиент командной строки)
*https://github.com/Tiiffi/mcrcon (RCON command line client)


Все команды отправленные через RCON выполняются как от Администратора сервера с соответствующим уровнем доступа.
Не рекомендуется передавать информацию для RCON подключения не проверенным пользователям или программам для доступа к серверу.


== Руководство Разработчика==
All command requests sent through RCON are executed with server admin permissions. For best practice its advised you keep your RCON information secure and only let trusted users or trusted programs access your RCON server.
===Установление соединения===
== Developer Documentation==
===Establishing a Connection===
To establish a TCP connection to an Eco RCON server you need to know the server's configured RCON port and the server's configured password and connect via a standard TCP client. Once connected you must authenticate your selves by sending a '''SERVERDATA_AUTH''' packet. Failure to do so will result in no response. If your authentication request was successful you should receive back a '''SERVERDATA_AUTH_RESPONSE''' packet with a matching id of the authentication request packet. Receiving an packet id of -1 means the authentication request has failed. An authentication request can fail if the password is incorrect, misconfigured, or if there is already an active RCON client connection.
To establish a TCP connection to an Eco RCON server you need to know the server's configured RCON port and the server's configured password and connect via a standard TCP client. Once connected you must authenticate your selves by sending a '''SERVERDATA_AUTH''' packet. Failure to do so will result in no response. If your authentication request was successful you should receive back a '''SERVERDATA_AUTH_RESPONSE''' packet with a matching id of the authentication request packet. Receiving an packet id of -1 means the authentication request has failed. An authentication request can fail if the password is incorrect, misconfigured, or if there is already an active RCON client connection.
===Структура пакета===
===Packet Structure===
==== Basic Packet Structure====
==== Basic Packet Structure====
All Eco RCON packets payloads follow this basic structure and are sent over a TCP socket
All Eco RCON packets payloads follow this basic structure and are sent over a TCP socket
{| class="wikitable standard-table"
{| class="wikitable standard-table"
!Field||Тип|||Значение
!Field||Type|||Value
|-
|-
|Size||32-bit little-endian Signed Integer||Varies, see below.
|Size||32-bit [[wiki:Endianness|little-endian]] Signed [[Integer]]||Varies, see below.
|-
|-
|ID||32-bit little-endian Signed Integer||Varies, see below.
|ID||32-bit [[wiki:Endianness|little-endian]] Signed [[Integer]]||Varies, see below.
|-
|-
|Type||32-bit little-endian Signed Integer||Varies, see below.
|Type||32-bit [[wiki:Endianness|little-endian]] Signed [[Integer]]||Varies, see below.
|-
|-
|Body||Null-terminated ASCII String||Varies, see below.
|Body||[[wiki:Null-terminated string|Null-terminated]] [[wiki:ASCII|ASCII]] [[String]]||Varies, see below.
|-
|-
|Empty String||Null-terminated ASCII String||0x00
|Empty String||[[wiki:Null-terminated string|Null-terminated]] [[wiki:ASCII|ASCII]] [[String]]||0x00
|-
|-
|}
|}
====Размер пакета====
====Packet Size====
The RCON packet size field is represented by a 32-bit little endian integer, It represents the total length of the request in bytes. Note that the '''packet size''' field itself is '''not''' included when determining the size of the packet, so the value of this field is always 4 less than the packet's actual length. The minimum possible value for '''packet size''' is 14.
The RCON packet size field is represented by a 32-bit little endian integer, It represents the total length of the request in bytes. Note that the '''packet size''' field itself is '''not''' included when determining the size of the packet, so the value of this field is always 4 less than the packet's actual length. The minimum possible value for '''packet size''' is 14.
{| class="wikitable standard-table"
{| class="wikitable standard-table"
!Size||Containing
!Size||Containing
|-
|-
|4 Bytes||ID Field
|4 [[Byte|Bytes]]||ID Field
|-
|-
|4 Bytes||Type Field
|4 [[Byte|Bytes]]||Type Field
|-
|-
|At least 1 Byte||Packet body (potentially empty)
|At least 1 [[Byte]]||Packet body (potentially empty)
|-
|-
|1 Byte||Empty string terminator
|1 [[Byte|Bytes]]||Empty string terminator
|}
|}
====ID пакета====
====Packet ID====
The packet id field is a 32-bit little endian integer which is specified by the requesting client for each request. Its value can be any positive integer. When the server responds to a client request it will send back the same packet id it received for that command request allowing you match the original request to the server response.  
The packet id field is a 32-bit little endian integer which is specified by the requesting client for each request. Its value can be any positive integer. When the server responds to a client request it will send back the same packet id it received for that command request allowing you match the original request to the server response.  
====Тип пакета====
====Packet Type ====
The packet type field is represented by a 32-bit little endian integer. It the intended purpose of the packet.
The packet type field is represented by a 32-bit little endian integer. It the intended purpose of the packet.
{| class="wikitable standard-table"
{| class="wikitable standard-table"
Строка 69: Строка 68:
|0||SERVERDATA_RESPONSE_VALUE
|0||SERVERDATA_RESPONSE_VALUE
|}
|}
====Тело пакета ====
====Packet Body ====
The packet body field is a null-terminated ASCII encoded string. The contents of the packet body vary by the executed request.
The packet body field is a null-terminated ASCII encoded string. The contents of the packet body vary by the executed request.
=== Типы пакетов ====
====Packet Types====
====='''SERVERDATA_AUTH'''=====
====='''SERVERDATA_AUTH'''=====
'''SERVERDATA_AUTH''' is the first packet to be sent by a newly connected client. It is used to authenticate with the RCON server and gain access to the '''SERVERDATA_EXECCOMMAND''' request. The values of this packet type's fields are as follows:
'''SERVERDATA_AUTH''' is the first packet to be sent by a newly connected client. It is used to authenticate with the RCON server and gain access to the '''SERVERDATA_EXECCOMMAND''' request. The values of this packet type's fields are as follows:
Обратите внимание, что все изменения в Eco - Русская Wiki рассматриваются как выпущенные на условиях лицензии CC BY-NC-SA 4.0 (см. Eco:Авторские права). Если вы не хотите, чтобы ваши тексты свободно распространялись и редактировались любым желающим, не помещайте их сюда.
Вы также подтверждаете, что являетесь автором вносимых дополнений или скопировали их из источника в общественном достоянии или под совместимой лицензией. Не размещайте без разрешения материалы, защищённые авторским правом!

В целях защиты вики от автоматического спама мы просим вас решить следующую капчу:

Отменить Справка по редактированию (в новом окне)
Источник — https://wiki.play.eco/ru/RCON