The definitive open-source tool for connecting to Source Engine servers
GitHub RepoImpressions103

The definitive open-source tool for connecting to Source Engine servers

@githubprojectsPost Author

Project Description

View on GitHub

Source.NET: The Definitive Tool for Connecting to Source Engine Servers

If you've ever wanted to build a tool that interacts with a Counter-Strike, Team Fortress 2, or any other Source Engine game server, you know the initial hurdle: the protocol. Parsing server info, player lists, and rules directly from a game server's A2S protocol isn't trivial. That's where Source.NET comes in.

This open-source library cuts through the complexity. It's a clean, modern .NET implementation that handles the gritty details of communicating with Source servers, so you can focus on building your dashboard, server browser, or admin tool.

What It Does

Source.NET is a .NET library that provides a straightforward API for querying Source Engine game servers. It handles the low-level network communication and data parsing for the A2S (Authoritative Server) queries defined by Valve. With just a server's IP and port, you can easily retrieve:

  • Server Info: Map, player count, server name, and game mode.
  • Player Details: A list of current players and their scores.
  • Server Rules: A key-value list of the server's configuration (sv_tags, etc.).

It abstracts the socket management, byte order handling, and challenge response flow into simple, awaitable methods.

Why It's Cool

The clever part is in its design. Instead of being a monolithic application, it's a focused library. This makes it incredibly easy to drop into any .NET project—be it a console app, a web backend, or a desktop utility. The API is intuitive; getting server info is essentially a one-liner.

It's also a great example of a library doing one thing and doing it well. It doesn't try to be a full RCON client or a server manager. It excels at querying public server data, which is the foundation for so many other tools. For developers, it's a massive time-saver. You don't have to re-implement the protocol or wrestle with binary readers; you just get structured data back.

How to Try It

Getting started is standard .NET fare. You can add it to your project via NuGet.

dotnet add package SourceQuery

Or, if you prefer to browse the code and see how it's built (it's a great learning resource for network programming), clone the repository:

git clone https://github.com/marchc1/Source.NET.git

Here's a minimal example of what your code might look like:

using SourceQuery;

var info = await SourceServer.GetInfoAsync("127.0.0.1", 27015);
Console.WriteLine($"Server: {info.Name}");
Console.WriteLine($"Map: {info.Map}");
Console.WriteLine($"Players: {info.Players}/{info.MaxPlayers}");

Final Thoughts

As a developer, I appreciate tools that remove boilerplate and let me build on a solid foundation. Source.NET is exactly that for the Source Engine ecosystem. Whether you're creating a community server status page, a data aggregator, or just a fun personal project to monitor your favorite servers, this library handles the hard part. It's a robust, no-nonsense piece of infrastructure that just works.

Check out the repository, star it if you find it useful, and maybe build something cool with it.


Follow us for more interesting projects: @githubprojects

Back to Projects
Project ID: cc59dda0-590e-4a2f-abc5-e34c8fa406d3Last updated: March 18, 2026 at 05:34 AM