SteamKit icon indicating copy to clipboard operation
SteamKit copied to clipboard

Add support for Steam realms

Open xPaw opened this issue 4 years ago • 6 comments

There's new realm field in various protos and apis that is worthwhile to support.

GetCMList for example has steamrealm=steamchina

xPaw avatar Jun 11 '20 15:06 xPaw

Notes:

  • We have ESteamRealm already with the correct values.
  • CMsgProtoBufHeader.realm - need to check if/when Steam client sets or expects this.
  • CCloud_ClientBeginFileUpload_Request - need to check if/when Steam sets this.
  • Need to see what happens if you try log in to a Global server with China set in the protos, or vice-versa; or if a CM supports both, then why does GetCMList have it as a parameter?

yaakov-h avatar Jun 13 '20 09:06 yaakov-h

why does GetCMList have it as a parameter?

Likely because SteamCN have their own servers which aren't global like "our" realm. It's indicator which serverlist to return.

JustArchi avatar Jun 13 '20 09:06 JustArchi

then why would steam client ever need it in the proto header?

I need to see what the client actually does, but I wonder if that field is actually designed for server-to-server comms.

yaakov-h avatar Jun 13 '20 09:06 yaakov-h

then why would steam client ever need it in the proto header?

CMList still returns the same CM servers, so server alone isn't able to tell whether it's PW/China only. It only returns special servers if you use Shanghai cell and steamchina realm, but after these servers, normal servers come in the list.

xPaw avatar Jun 15 '20 13:06 xPaw

CM List from CellID 202 on Steam China Client

"CMWebSocketChina"
				{
					"cm4-sgp1.cm.steampowered.com:27022"
					{
						"LastPingTimestamp"		"0"
					}
					"cm1-ct-sha2.cm.wmsjsteam.com:27020"
					{
						"LastPingTimestamp"		"0"
					}
					"cm4-hkg1.cm.steampowered.com:27024"
					{
						"LastPingTimestamp"		"1616331884"
						"LastPingValue"		"121"
						"LastLoadValue"		"85"
					}
					"cm3-cu-sha2.cm.wmsjsteam.com:27021"
					{
						"LastPingTimestamp"		"0"
					}
					"cm4-sgp1.cm.steampowered.com:27024"
					{
						"LastPingTimestamp"		"0"
					}
					"cm2-cu-sha2.cm.wmsjsteam.com:27022"
					{
						"LastPingTimestamp"		"1616331047"
						"LastPingValue"		"69"
						"LastLoadValue"		"56"
					}
					"cm4-sgp1.cm.steampowered.com:443"
					{
						"LastPingTimestamp"		"0"
					}
					"cm1-ct-sha1.cm.wmsjsteam.com:27022"
					{
						"LastPingTimestamp"		"0"
					}
					"cm3-sgp1.cm.steampowered.com:27026"
					{
						"LastPingTimestamp"		"0"
					}
					"cm1-cu-sha2.cm.wmsjsteam.com:27022"
					{
						"LastPingTimestamp"		"0"
					}
					"cm1-ct-sha2.cm.wmsjsteam.com:27023"
					{
						"LastPingTimestamp"		"1616391253"
						"LastPingValue"		"63"
						"LastLoadValue"		"48"
					}
					"cm2-cu-sha2.cm.wmsjsteam.com:443"
					{
						"LastPingTimestamp"		"1616224942"
						"LastPingValue"		"62"
						"LastLoadValue"		"84"
					}
					"cm3-ct-sha2.cm.wmsjsteam.com:27021"
					{
						"LastPingTimestamp"		"1616391253"
						"LastPingValue"		"59"
						"LastLoadValue"		"62"
					}
					"cm2-ct-sha2.cm.wmsjsteam.com:27021"
					{
						"LastPingTimestamp"		"0"
					}
					"cm1-sgp1.cm.steampowered.com:27026"
					{
						"LastPingTimestamp"		"0"
					}
					"cm4-sgp1.cm.steampowered.com:27025"
					{
						"LastPingTimestamp"		"0"
					}
					"cm3-ct-sha1.cm.wmsjsteam.com:27020"
					{
						"LastPingTimestamp"		"0"
					}
					"cm1-hkg1.cm.steampowered.com:27020"
					{
						"LastPingTimestamp"		"0"
					}
					"cm2-ct-sha2.cm.wmsjsteam.com:27022"
					{
						"LastPingTimestamp"		"0"
					}
					"cm1-sgp1.cm.steampowered.com:443"
					{
						"LastPingTimestamp"		"0"
					}
					"cm1-tyo1.cm.steampowered.com:27023"
					{
						"LastPingTimestamp"		"0"
					}
					"cm2-cu-sha2.cm.wmsjsteam.com:27023"
					{
						"LastPingTimestamp"		"1616391253"
						"LastPingValue"		"56"
						"LastLoadValue"		"52"
					}
					"cm2-ct-sha1.cm.wmsjsteam.com:27020"
					{
						"LastPingTimestamp"		"1616391253"
						"LastPingValue"		"59"
						"LastLoadValue"		"49"
					}
					"cm1-ct-sha1.cm.wmsjsteam.com:27021"
					{
						"LastPingTimestamp"		"1616391253"
						"LastPingValue"		"60"
						"LastLoadValue"		"56"
					}
					"cm4-ct-sha1.cm.wmsjsteam.com:443"
					{
						"LastPingTimestamp"		"0"
					}
					"cm4-ct-sha1.cm.wmsjsteam.com:27022"
					{
						"LastPingTimestamp"		"0"
					}
					"cm2-ct-sha1.cm.wmsjsteam.com:27021"
					{
						"LastPingTimestamp"		"0"
					}
					"cm4-sgp1.cm.steampowered.com:27023"
					{
						"LastPingTimestamp"		"0"
					}
					"cm2-sgp1.cm.steampowered.com:443"
					{
						"LastPingTimestamp"		"0"
					}
					"cm1-ct-sha2.cm.wmsjsteam.com:27021"
					{
						"LastPingTimestamp"		"0"
					}
					"cm2-hkg1.cm.steampowered.com:27021"
					{
						"LastPingTimestamp"		"0"
					}
					"cm4-hkg1.cm.steampowered.com:27022"
					{
						"LastPingTimestamp"		"0"
					}
					"cm1-cu-sha2.cm.wmsjsteam.com:27021"
					{
						"LastPingTimestamp"		"0"
					}
					"cm1-hkg1.cm.steampowered.com:27021"
					{
						"LastPingTimestamp"		"0"
					}
					"cm1-ct-sha1.cm.wmsjsteam.com:27020"
					{
						"LastPingTimestamp"		"0"
					}
					"cm2-ct-sha1.cm.wmsjsteam.com:443"
					{
						"LastPingTimestamp"		"0"
					}
					"cm3-hkg1.cm.steampowered.com:443"
					{
						"LastPingTimestamp"		"0"
					}
					"cm2-ct-sha1.cm.wmsjsteam.com:27022"
					{
						"LastPingTimestamp"		"0"
					}
					"cm3-cu-sha2.cm.wmsjsteam.com:27020"
					{
						"LastPingTimestamp"		"0"
					}
					"cm3-ct-sha1.cm.wmsjsteam.com:443"
					{
						"LastPingTimestamp"		"0"
					}
					"cm2-cu-sha2.cm.wmsjsteam.com:27020"
					{
						"LastPingTimestamp"		"0"
					}
					"cm3-sgp1.cm.steampowered.com:27023"
					{
						"LastPingTimestamp"		"0"
					}
					"cm3-cu-sha2.cm.wmsjsteam.com:27022"
					{
						"LastPingTimestamp"		"1616391253"
						"LastPingValue"		"64"
						"LastLoadValue"		"53"
					}
					"cm1-cu-sha2.cm.wmsjsteam.com:27023"
					{
						"LastPingTimestamp"		"1616391253"
						"LastPingValue"		"58"
						"LastLoadValue"		"52"
					}
					"cm3-ct-sha2.cm.wmsjsteam.com:27022"
					{
						"LastPingTimestamp"		"1616391253"
						"LastPingValue"		"56"
						"LastLoadValue"		"49"
					}
					"cm3-ct-sha2.cm.wmsjsteam.com:27023"
					{
						"LastPingTimestamp"		"1616391253"
						"LastPingValue"		"54"
						"LastLoadValue"		"48"
					}
					"cm2-cu-sha2.cm.wmsjsteam.com:27021"
					{
						"LastPingTimestamp"		"1616391253"
						"LastPingValue"		"60"
						"LastLoadValue"		"65"
					}
					"cm3-cu-sha2.cm.wmsjsteam.com:27023"
					{
						"LastPingTimestamp"		"1616331884"
						"LastPingValue"		"62"
						"LastLoadValue"		"56"
					}
					"cm1-ct-sha2.cm.wmsjsteam.com:27022"
					{
						"LastPingTimestamp"		"1616224916"
						"LastPingValue"		"62"
						"LastLoadValue"		"51"
					}
					"cm4-hkg1.cm.steampowered.com:27025"
					{
						"LastPingTimestamp"		"1616224916"
						"LastPingValue"		"122"
						"LastLoadValue"		"76"
					}
					"cm3-hkg1.cm.steampowered.com:27020"
					{
						"LastPingTimestamp"		"0"
					}
					"cm3-ct-sha2.cm.wmsjsteam.com:27020"
					{
						"LastPingTimestamp"		"0"
					}
					"cm1-hkg1.cm.steampowered.com:443"
					{
						"LastPingTimestamp"		"0"
					}
					"cm3-sgp1.cm.steampowered.com:27022"
					{
						"LastPingTimestamp"		"0"
					}
					"cm3-ct-sha2.cm.wmsjsteam.com:443"
					{
						"LastPingTimestamp"		"0"
					}
					"cm1-cu-sha2.cm.wmsjsteam.com:443"
					{
						"LastPingTimestamp"		"0"
					}
					"cm2-ct-sha2.cm.wmsjsteam.com:27020"
					{
						"LastPingTimestamp"		"0"
					}
					"cm1-ct-sha2.cm.wmsjsteam.com:443"
					{
						"LastPingTimestamp"		"0"
					}
					"cm3-hkg1.cm.steampowered.com:27021"
					{
						"LastPingTimestamp"		"0"
					}
					"cm2-ct-sha2.cm.wmsjsteam.com:27023"
					{
						"LastPingTimestamp"		"0"
					}
					"cm2-hkg1.cm.steampowered.com:27020"
					{
						"LastPingTimestamp"		"0"
					}
					"cm2-ct-sha2.cm.wmsjsteam.com:443"
					{
						"LastPingTimestamp"		"0"
					}
					"cm4-hkg1.cm.steampowered.com:27023"
					{
						"LastPingTimestamp"		"0"
					}
					"cm1-sgp1.cm.steampowered.com:27025"
					{
						"LastPingTimestamp"		"0"
					}
					"cm3-ct-sha1.cm.wmsjsteam.com:27021"
					{
						"LastPingTimestamp"		"0"
					}
					"cm1-sgp1.cm.steampowered.com:27024"
					{
						"LastPingTimestamp"		"0"
					}
					"cm3-cu-sha2.cm.wmsjsteam.com:443"
					{
						"LastPingTimestamp"		"0"
					}
					"cm3-sgp1.cm.steampowered.com:443"
					{
						"LastPingTimestamp"		"0"
					}
					"cm4-hkg1.cm.steampowered.com:27026"
					{
						"LastPingTimestamp"		"0"
					}
					"cm3-sgp1.cm.steampowered.com:27025"
					{
						"LastPingTimestamp"		"0"
					}
					"cm2-hkg1.cm.steampowered.com:443"
					{
						"LastPingTimestamp"		"0"
					}
					"cm1-ct-sha1.cm.wmsjsteam.com:443"
					{
						"LastPingTimestamp"		"0"
					}
					"cm4-ct-sha1.cm.wmsjsteam.com:27021"
					{
						"LastPingTimestamp"		"0"
					}
					"cm3-ct-sha1.cm.wmsjsteam.com:27022"
					{
						"LastPingTimestamp"		"0"
					}
					"cm1-cu-sha2.cm.wmsjsteam.com:27020"
					{
						"LastPingTimestamp"		"0"
					}
					"cm4-sgp1.cm.steampowered.com:27026"
					{
						"LastPingTimestamp"		"0"
					}
					"cm4-hkg1.cm.steampowered.com:443"
					{
						"LastPingTimestamp"		"0"
					}
					"cm4-ct-sha1.cm.wmsjsteam.com:27020"
					{
						"LastPingTimestamp"		"0"
					}
					"cm1-sea1.cm.steampowered.com:27022"
					{
						"LastPingTimestamp"		"0"
					}
					"cm1-sgp1.cm.steampowered.com:27023"
					{
						"LastPingTimestamp"		"0"
					}
					"cm2-sgp1.cm.steampowered.com:27024"
					{
						"LastPingTimestamp"		"0"
					}
					"cm3-sgp1.cm.steampowered.com:27024"
					{
						"LastPingTimestamp"		"0"
					}
					"cm2-sgp1.cm.steampowered.com:27022"
					{
						"LastPingTimestamp"		"0"
					}
					"cm1-tyo1.cm.steampowered.com:27025"
					{
						"LastPingTimestamp"		"0"
					}
					"cm1-tyo1.cm.steampowered.com:443"
					{
						"LastPingTimestamp"		"0"
					}
				}

cherinyy avatar Mar 22 '21 05:03 cherinyy

then why would steam client ever need it in the proto header?

I need to see what the client actually does, but I wonder if that field is actually designed for server-to-server comms.

I can provide a test account if you need it.

According to my usage, Steam China's CM servers communicate independently. If I run ArchiSteamFarm and Steam China at the same time, I cannot notify ArchiSteamFarm on Steam China to suspend the game, the message is unreachable. The same is true for friends online status/chat.


But this may be limited on the server side, as far as I know, CS:GO on Steam Global uses -perfectworld to enter the Perfect World server, which still calls Steam Global Client's CM (realm=steamglobal).

So although the CM servers in the Chinese mainland are dedicated to Steam China (on CMList), through tools, we can force the designated CM servers to be used in the Steam Global Client (realm=steamglobal).

cherinyy avatar Feb 09 '22 01:02 cherinyy