This project is read-only.

Third-party MasterServer

Jun 6, 2015 at 6:46 PM
Edited Jun 6, 2015 at 6:52 PM
How can I use a third-party master server.
For example: Not work
MasterServer server = MasterQuery.GetMasterServerInstance(EngineType.GoldSource, "95.211.211.141", 27010);
Jun 9, 2015 at 2:05 PM
Edited Jun 9, 2015 at 2:05 PM
Can you please elaborate on that?
Do you wish that a constructor with above signature gets added?
Or did you add such a constructor to the MasterServer source code and it doesn't work?

If you don't want to modify the source code, you can use reflection to instantiate the MasterServer class directly for a given IPEndPoint:
  var ctor = typeof (MasterServer).GetConstructor(BindingFlags.Instance | BindingFlags.NonPublic, null, new [] {typeof (IPEndPoint)}, null);
  var master = (MasterServer)ctor.Invoke(new object[] { new IPEndPoint(IPAddress.Parse("95.211.211.141"), 27010) });

Jun 9, 2015 at 2:37 PM
Edited Jun 9, 2015 at 2:38 PM
Thanks!
I modify method GetMasterServerInstance in MasterQuery.cs to:
public static MasterServer GetMasterServerInstance(string address, int port)
{
    return new MasterServer(new IPEndPoint(Dns.GetHostAddresses(address)[0], port));
}
And use
MasterServer master = MasterQuery.GetMasterServerInstance("222.222.222.222", 27010);
Jun 9, 2015 at 3:31 PM
I also just updated my SteamServerBrowser to Version 1.3 so you can use your custom master server: http://i.imgur.com/jWB1ieZ.png
You can download it here: https://github.com/PredatH0r/SteamServerBrowser/releases
Jun 9, 2015 at 3:37 PM
Thanks for program I waited a long time a similar program.
But, where in the master server IP - 95.211.211.141:27010?
Jun 9, 2015 at 4:02 PM
Edited Jun 9, 2015 at 4:03 PM
If you click on "Show more Options" you will see the Master Server combo box where you can also enter any custom addresses. For your particular master server the selected "Game" doesn't matter. This master server doesn't seem to perform any server-side filtering.
Jun 9, 2015 at 4:22 PM
I mean where did the master server 95.211.211.141:27010 in the list, If I did not enter it manually
http://i.imgur.com/G6uRwK0.png?1
Jun 9, 2015 at 4:48 PM
Edited Jun 9, 2015 at 4:49 PM
There are so many players on those servers returned by that master server, that I thought it makes sense to add it in the source code as one of the default options.
If you want me to remove it again, I'll do so.
Jun 9, 2015 at 5:10 PM
Edited Jun 9, 2015 at 8:03 PM
Here so big list of MasterServers (Spoiler Вариант 1 => server.cfg): http://counter-strike.com.ua/admin/204-ne-vidno-server-cs-1.6-v-internete.html
I am using list of masterservers http://hlmaster.info/