Query port rust что это

от admin

Direct Connect to a Gameserver

The game server offers several ports to connect to. In most cases, you can differ between Game Port and (Steam) Query Port. If Steam is used to connect, often the Steam Query Port needs to be used. If the connection is made within the game itself, the Game Port is used.

Difference between Game Port and Query Port

The Game Port primary is used to play on the server. The Query Port just reports some information about the Gameservers status. Depending on the connection type it appears, that the Query Port is used for connection as well. In some cases, there is no difference between Game Port and Query Port. Unless there is no specific port defined on the Web interface they should be the same.

Game Port

The Gameserver itself is running on the Game Port. So after connecting to any Gameserver, the traffic is using this port. For attempting to direct connect this port is usually used to connect.

Query Port

The Query Port delivers some information about the current Gameservers state. It delivers information like the current player count, the servers name, and some other information. Steam is using this port for filling the server list for example. If you try to add this Gameserver to the Steam favorites this port needs to be used here.

Rust: Query порт

Итак, разработчики Раста подарили нам квери-порт со всеми прилагающимися приключениями. Самое частое, что мы слышали за эти дни — это то, что сервер пропал из поиска и избранного в игре, из магазина и мониторинга. Пробуем разобраться.

Если у вас сервер с нашей панелью управления, то ничего делать не нужно, квери-порт уже добавился автоматически. Если вы ещё не обновили сервер, обновите.
По квери сервер передаёт информацию о себе, которая нужна, например, мониторингу. Раньше квери-порт был таким же, как игровой. Поэтому мониторинги и магазины вас сейчас потеряли. Нужно прописать им новый квери-порт. Найти его можно в панели управления.

Если у вас выделенный сервер или VDS, вам нужно в батнике прописать дополнительный параметр:
+server.queryport 35010 ^
(номер порта выставляете сами, здесь он — игровой +10)
Если вы хотите, чтобы ваш сервер остался в избранном у игроков и в мониторингах/магазинах, то назначьте квери-порт такой, каким был игровой, а игровой выставьте, например, на 10 больше (в рамках диапазона для постановки сервера под защиту от DDoS: 35000-36000).
Пример.
Было:
+server.port 35000 ^
Стало:
+server.port 35010 ^
+server.queryport 35000 ^

Почему сервер пропал из поиска в игре?
Это самый частый вопрос за несколько дней после обновления 2-го февраля. Поиск в Расте сейчас очень странно работает, многие серверы не видны. Проблема массовая, разработчики её признают и обещают исправить.

Master Server Query Protocol

English Русский

EnglishEnglish
Català Català
Čeština Čeština
Deutsch Deutsch
Español Español
Eestlane Eesti
Français Français
Magyar Magyar
Italiano Italiano
Nederlands Nederlands
Norsk Norsk
Polski Polski
Português Português
Português-Brasileiro Português do Brasil
РусскийРусский
Українська Українська
Svenska Svenska
Türkçe Türkçe
日本語 日本語
简体中文 中文
正體中文 中文(台灣)‎
한국어 한국어
ქართული ენა ქართული
עִברִית עברית
Edit
Page history
Purge this page
Move

This page documents the legacy Steam master server query protocol. The legacy master is still used by older games and mods, but all current games and mods query the master server through Steam directly.

Contents

Client to master server

Send the following UDP query to a master server to get a list of Source host servers.

Format

Type Field Value
Byte Message Type 0x31 — the character «1»
Byte Region Code See below
String Zero IP:Port See below
String Zero Filter See below
Region codes

The region of the world that you wish to find servers in.

Byte Description
0x00 US East coast
0x01 US West coast
0x02 South America
0x03 Europe
0x04 Asia
0x05 Australia
0x06 Middle East
0x07 Africa
0xFF Rest of the world
IP:Port

The first IP:Port you should send is «0.0.0.0:0»

From then on, IP:Port becomes the last IP:Port received in the master servers reply. This allows steam to then grab another list of more servers.

Terminate this with 0x00

Note that whenever you open a new socket (and thus get a new random client port), the Master Server will always send you the first batch of IPs even if you pass a valid game server IP. Do not close your socket between packets.

Filter

Allows you to restrict the results to servers running a certain game, map, etc. Insert \ in between filter parameters

Filter code What the filter returns
0x00 (NULL, empty string) All servers
\nor\[x] A special filter, specifies that servers matching any of the following [x] conditions should not be returned
\nand\[x] A special filter, specifies that servers matching all of the following [x] conditions should not be returned
\dedicated\1 Servers running dedicated
\secure\1 Servers using anti-cheat technology (VAC, but potentially others as well)
\gamedir\[mod] Servers running the specified modification (ex. cstrike)
\map\[map] Servers running the specified map (ex. cs_italy)
\linux\1 Servers running on a Linux platform
\password\0 Servers that are not password protected
\empty\1 Servers that are not empty
\full\1 Servers that are not full
\proxy\1 Servers that are spectator proxies
\appid\[appid] Servers that are running game [appid]
\napp\[appid] Servers that are NOT running game [appid] (This was introduced to block Left 4 Dead games from the Steam Server Browser)
\noplayers\1 Servers that are empty
\white\1 Servers that are whitelisted
\gametype\[tag. ] Servers with all of the given tag(s) in sv_tags
\gamedata\[tag. ] Servers with all of the given tag(s) in their ‘hidden’ tags (L4D2)
\gamedataor\[tag. ] Servers with any of the given tag(s) in their ‘hidden’ tags (L4D2)
\name_match\[hostname] Servers with their hostname matching [hostname] (can use * as a wildcard)
\version_match\[version] Servers running version [version] (can use * as a wildcard)
\collapse_addr_hash\1 Return only one server for each unique IP address matched
\gameaddr\[ip] Return only servers on the specified IP address (port supported and optional)

Sample query

To get all servers everywhere:

This is the default Steam Server Browser query to the Source Master Server. It uses the napp filter to filter out Left 4 Dead games (which are meant to be joined using the matchmaking feature).

Читать:
Как сделать разрез в автокаде на чертеже

Master servers

Current master servers are:

GoldSrc Currently hl1master.steampowered.com [1] and MasterServer2.vdf contain the old outdated IPs for querying HL1 master servers (although heartbeat may work). The new IPs (for querying) as reported by an old HLDS version: «208.64.200.117», «208.64.200.118». The new HLDS version supposedly reports «none». [2]

Note.png Note:  The port numbers used by hl1master.steampowered.com can be anything between 27010 and 27013.

If you can, get your application to check the file Steam\config\MasterServer2.vdf to get the latest list of master servers.

Reply format

The reply always starts with FF FF FF FF 66 0A .

The format is then a series of these server address blocks:

Type Data
Byte First octet of IP address
Byte Second octet of IP address
Byte Third octet of IP address
Byte Fourth octet of IP address
Unsigned Short Port number — usually 27015 ( 69 87 ) — this is network ordered, which is unlike every other Steam protocol.

Some of the servers may be unreachable, so query each server directly to find out. Note also that this list is not exhaustive, so if you’re looking for a particular type of server make sure that you specify a filter with the query, rather than filtering client side.

End of IP address list

The full requested IP list may not fit in 1 x packet. Subsequent packets must be requested by using the last received IP address and Port as the ‘seed’ in the next request.

The end of the IP list is indicated by a received IP address of 0.0.0.0 Port:0.

Implementations

    A Java based Asynchronous Game Query Library powered by Netty — a multi-language library for querying the Steam Community, Source and GoldSrc game servers as well as the Steam master servers. Currently it is implemented in Java, PHP and Ruby. — an example code for parsing the packet (presumably Visual Basic). — a code example for querying a Half-Life master server using the PHP language. C# library Javascript (Node.js) module which implements the Master Server Query Protocol and Game Server Queries Node.js implementation for querying master servers Rust library implementation for querying master servers Server, Master Server and RCON protocols implementation for Node.js

Game server to master server

Shortly after a game server has been initialized, it picks two master servers to «join.» In order for clients to see a particular game server when they click on the «Internet» tab, the game server must be present in the Steam master servers’ records.

The game server sends each master server «q» ( 71 ).

The master servers each respond by sending FF FF FF FF 73 0A followed by a (relatively) unique 4-byte «challenge» number. If you send the master servers an invalid challenge, you will get another challenge as a response.

Challenge response

After receiving the challenge packet, the game server then sends its challenge information in the following format:

Goldsource

The challenge number is simply the challenge sent by the master server converted to an int.

Source

The challenge number is simply the challenge sent by the master server converted to an int.

Orangebox

The challenge number is simply the challenge sent by the master server converted to an int.

Differences

The field order is a bit different with Source than with Goldsource.

Goldsource protocol challenge players max bots gamedir map type password os secure lan version region product
Source protocol challenge players max bots gamedir map password os lan region type secure version product

Heartbeat

A «heartbeat» occurs every five minutes in order to let the master servers know that a game server is still «alive». The game server simply goes through the process of «joining» the master server list again.

Steam web API as alternative to querying a master server

There are two «GetServerList» methods for the Steam web API. One requires a «publisher API key». [3] The other one works with any (personal) Steam web API key, but is undocumented. [4]

Query порт

Создание такого сервера приравнивается к созданию "зеркала".
"Зеркала" — банят.
Если не успокоится, то и основной сервер тоже в бан отлетит.

Практическую целесообразность проксирования трафика сервера через среду Интернета — я не вижу и вникать в это особого смысла не вижу.

theklimot

Создание такого сервера приравнивается к созданию "зеркала".
"Зеркала" — банят.
Если не успокоится, то и основной сервер тоже в бан отлетит.

Практическую целесообразность проксирования трафика сервера через среду Интернета — я не вижу и вникать в это особого смысла не вижу.

Создание такого сервера приравнивается к созданию "зеркала".
"Зеркала" — банят.
Если не успокоится, то и основной сервер тоже в бан отлетит.

Практическую целесообразность проксирования трафика сервера через среду Интернета — я не вижу и вникать в это особого смысла не вижу.

rostov114

support.facepunchstudios.com — пишешь сюда адрес зеркала и с большой долей вероятности "зеркало" отлетает.
Как бы я не исключаю что без жалоб "зеркало" может существовать продолжительное время.
Но несколько жалоб заставит эти ленивые жопы FP, задвигаться и заблокировать "зеркало".

Как бы, используйте "зеркала" на свой страх и риск.

theklimot

support.facepunchstudios.com — пишешь сюда адрес зеркала и с большой долей вероятности "зеркало" отлетает.
Как бы я не исключаю что без жалоб "зеркало" может существовать продолжительное время.
Но несколько жалоб заставит эти ленивые жопы FP, задвигаться и заблокировать "зеркало".

Как бы, используйте "зеркала" на свой страх и риск.

rostov114
theklimot
theklimot
rostov114
theklimot
rostov114

Ну так подними туннель между VDS и сервером на серой адресации. В рамках этого тоннеля все делай.
Т.е. например: 8.8.8.8:28015 -> NAT -> PPTP ( адресация 10.0.0.0/30 ) -> Твой сервер дома ( например с адресом 10.0.0.2 ).
В NAT таблице ты указываешь что трафик с порта 28015 отправлять на 10.0.0.2:28015.
Сервер дома настраиваешь так что бы у него маршрутом по умолчанию была VDS`ка.

Т.е. в Интернет твой сервер будет ходить через VDS по средством туннелирования.

Похожие статьи