Master Server Query Protocol: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
Line 100: Line 100:
| [[Byte]] || Second octet of IP address
| [[Byte]] || Second octet of IP address
|-
|-
| [[Byte]] || Third octect of IP address
| [[Byte]] || Third octet of IP address
|-
|-
| [[Byte]] || Fourth octet of IP address
| [[Byte]] || Fourth octet of IP address

Revision as of 13:32, 12 June 2006

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 Steam sends is "0.0.0.0:0".

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

Filter

Allows you to restrict the results to servers running a certain game, map, etc.

Send an empty string (0x00) to recieve a list of all types of servers.

Insert \ in between filter parameters

  • \type\d
Servers running dedicated
  • \secure\1
Servers using anti-cheat technology (VAC)
  • \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
  • \empty\1
Servers that are not empty
  • \full\1
Servers that are not full
  • \proxy\1
Servers that are spectator proxies

Master Servers

Current master servers are

Goldsource:

  • 69.28.151.162:27010
  • 207.173.177.11:27010
  • 68.142.72.250:27010

Source:

  • 68.142.72.250:27011
  • 69.28.151.162:27011

Rag Doll Kung Fu:

  • 207.173.177.12:27012
  • 207.173.177.11:27012

SiN 1 Multiplayer:

  • 69.28.151.162:27010

If you can, get your application to check the file Steam\config\masterservers.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.

See Also