mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-06-01 09:42:41 +00:00
feat: release 0.5.0 (#191)
* feat: add initial crates readmes * feat: add initial CLI readme * fix: some links * feat: fix node badge, split changelogs, fix some other links add docs in cli * feat: feature the gamedig site in the lib * feat: fill in cli package fields * feat: set CLI version to 0.1.0 * feat: update changelogs to set vers * feat: update the release workflow
This commit is contained in:
parent
bcb9ac64c0
commit
275fb7d4cd
8 changed files with 613 additions and 433 deletions
3
.github/workflows/release.yml
vendored
3
.github/workflows/release.yml
vendored
|
|
@ -4,8 +4,11 @@ on:
|
||||||
release:
|
release:
|
||||||
types: [created]
|
types: [created]
|
||||||
|
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
|
if: startsWith(github.event.release.tag_name, 'cli-')
|
||||||
name: Release ${{ matrix.target }}
|
name: Release ${{ matrix.target }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
<img src="https://img.shields.io/crates/d/gamedig?color=purple" alt="Crates.io">
|
<img src="https://img.shields.io/crates/d/gamedig?color=purple" alt="Crates.io">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/gamedig/node-gamedig">
|
<a href="https://github.com/gamedig/node-gamedig">
|
||||||
<img src="./.github/badges/node.svg" alt="Node-GameDig Game Coverage">
|
<img src="https://raw.githubusercontent.com/gamedig/rust-gamedig/main/.github/badges/node.svg" alt="Node-GameDig Game Coverage">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -83,9 +83,13 @@ Response (note that some games have a different structure):
|
||||||
|
|
||||||
Want to see more examples? Checkout the [examples](crates/lib/examples) folder.
|
Want to see more examples? Checkout the [examples](crates/lib/examples) folder.
|
||||||
|
|
||||||
|
## Command Line Interface
|
||||||
|
The library also has an official CLI: [GameDig-CLI](https://crates.io/crates/gamedig-cli).
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
The documentation is available at [docs.rs](https://docs.rs/gamedig/latest/gamedig/).
|
The documentation is available at [docs.rs](https://docs.rs/gamedig/latest/gamedig/).
|
||||||
Curious about the history and what changed between versions? Everything is in the [CHANGELOG](CHANGELOG.md) file.
|
Curious about the history and what changed between versions?
|
||||||
|
Everything is in the changelogs file: [lib](crates/lib/CHANGELOG.md) and [cli](crates/lib/CHANGELOG.md).
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
If you want to see your favorite game/service being supported here, open an issue, and I'll prioritize it (or do a pull request if you want to implement it yourself)!
|
If you want to see your favorite game/service being supported here, open an issue, and I'll prioritize it (or do a pull request if you want to implement it yourself)!
|
||||||
|
|
|
||||||
20
crates/cli/CHANGELOG.md
Normal file
20
crates/cli/CHANGELOG.md
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
|
||||||
|
Who knows what the future holds...
|
||||||
|
|
||||||
|
# 0.X.Y - DD/MM/YYYY
|
||||||
|
Nothing... yet.
|
||||||
|
|
||||||
|
# 0.1.0 - 15/03/2024
|
||||||
|
### Changes:
|
||||||
|
- Added the CLI (by @cainthebest).
|
||||||
|
- Added DNS lookup support (by @Douile).
|
||||||
|
- Added JSON output option (by @Douile).
|
||||||
|
- Added BSON output in hex or base64 (by @cainthebest).
|
||||||
|
- Added XML output option (by @cainthebest).
|
||||||
|
- Added ExtraRequestSettings as CLI arguments (by @Douile).
|
||||||
|
- Added TimeoutSettings as CLI argument (by @Douile).
|
||||||
|
- Added Comprehensive end-user documentation for the CLI interface (by @Douile & @cainthebest).
|
||||||
|
- Tweaked compile-time flags to allow for a more preformant binary (by @cainthebest).
|
||||||
|
- Added client for socket capture, dev tools are not included by default (by @Douile).
|
||||||
|
- Added license information to the CLI (by @cainthebest).
|
||||||
|
- Added source code information to the CLI (by @cainthebest).
|
||||||
|
|
@ -5,11 +5,16 @@ authors = [
|
||||||
]
|
]
|
||||||
description = "A command line interface for gamedig"
|
description = "A command line interface for gamedig"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
version = "0.4.1"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
default-run = "gamedig-cli"
|
default-run = "gamedig-cli"
|
||||||
|
homepage = "https://gamedig.github.io/"
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
documentation = "https://docs.rs/gamedig-cli/latest/gamedig-cli/"
|
||||||
|
repository = "https://github.com/gamedig/rust-gamedig"
|
||||||
|
readme = "README.md"
|
||||||
|
keywords = ["server", "query", "game", "check", "status"]
|
||||||
|
rust-version = "1.65.0"
|
||||||
|
categories = ["parsing", "command-line-interface"]
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["json", "bson", "xml", "browser"]
|
default = ["json", "bson", "xml", "browser"]
|
||||||
|
|
|
||||||
52
crates/cli/README.md
Normal file
52
crates/cli/README.md
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
# rust-GameDig CLI
|
||||||
|
The official [rust-GameDig](https://crates.io/crates/gamedig) Command Line Interface.
|
||||||
|
|
||||||
|
[](https://github.com/gamedig/rust-gamedig/actions) [](https://crates.io/crates/gamedig-cli) [](https://crates.io/crates/gamedig-cli) [](https://github.com/gamedig/rust-gamedig/blob/main/LICENSE.md) [](https://github.com/gamedig/node-gamedig)
|
||||||
|
|
||||||
|
## Community
|
||||||
|
Checkout the GameDig Community Discord Server [here](https://discord.gg/NVCMn3tnxH).
|
||||||
|
Note that it isn't be a replacement for GitHub issues, if you have found a problem
|
||||||
|
within the library or want to request a feature, it's better to do so here rather than
|
||||||
|
on Discord.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
Just by running `gamedig-cli` prints the usage.
|
||||||
|
**Note**: Passing `--help` (or `-h`) shows the usage.
|
||||||
|
|
||||||
|
Here's also a quick rundown of a simple query with the `json-pretty` format:
|
||||||
|
|
||||||
|
Pick a game/service/protocol (check the [GAMES](https://github.com/gamedig/rust-gamedig/blob/main/GAMES.md), [SERVICES](https://github.com/gamedig/rust-gamedig/blob/main/SERVICES.md) and [PROTOCOLS](https://github.com/gamedig/rust-gamedig/blob/main/PROTOCOLS.md) files to see the currently supported ones), provide the ip and the port (be aware that some game servers use a separate port for the info queries, the port can also be optional if the server is running the default ports) then query on it.
|
||||||
|
|
||||||
|
[Team Fortress 2](https://store.steampowered.com/app/440/Team_Fortress_2/) query example:
|
||||||
|
```
|
||||||
|
gamedig-cli query -g teamfortress2 -i 127.0.0.1 -f json-pretty
|
||||||
|
```
|
||||||
|
What we are doing here:
|
||||||
|
* `-g` (or `--game`) specifies the game.
|
||||||
|
* `-i` (or `--ip`) target ip.
|
||||||
|
* `-f` (or `--format`) our preferred format.
|
||||||
|
|
||||||
|
Note: We haven't specified a port (via `-p` or `--port`), so the default one for the game will be used (`27015` in this case).
|
||||||
|
|
||||||
|
Response (note that some games have a different structure):
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"name": "A cool server.",
|
||||||
|
"description": null,
|
||||||
|
"game_mode": "Team Fortress",
|
||||||
|
"game_version": "8690085",
|
||||||
|
"map": "cp_foundry",
|
||||||
|
"players_maximum": 24,
|
||||||
|
"players_online": 0,
|
||||||
|
"players_bots": 0,
|
||||||
|
"has_password": false,
|
||||||
|
"players": []
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
The documentation is available at [docs.rs](https://docs.rs/gamedig/latest/gamedig-cli/).
|
||||||
|
Curious about the history and what changed between versions? Everything is in the [CHANGELOG](https://github.com/gamedig/rust-gamedig/blob/main/crates/cli/CHANGELOG.md) file.
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
Please read [CONTRIBUTING](https://github.com/gamedig/rust-gamedig/blob/main/CONTRIBUTING.md).
|
||||||
|
|
@ -1,426 +1,429 @@
|
||||||
|
|
||||||
Who knows what the future holds...
|
Who knows what the future holds...
|
||||||
|
|
||||||
# 0.X.Y - DD/MM/YYYY
|
# 0.X.Y - DD/MM/YYYY
|
||||||
### Changes:
|
Nothing... yet!
|
||||||
Games:
|
|
||||||
- [Valheim](https://store.steampowered.com/app/892970/Valheim/) support.
|
# 0.5.0 - 15/03/2024
|
||||||
- [The Front](https://store.steampowered.com/app/2285150/The_Front/) support.
|
### Changes:
|
||||||
- [Conan Exiles](https://store.steampowered.com/app/440900/Conan_Exiles/) support.
|
Games:
|
||||||
- [Post Scriptum](https://store.steampowered.com/app/736220/Post_Scriptum/) support.
|
- [Valheim](https://store.steampowered.com/app/892970/Valheim/) support.
|
||||||
- [Squad](https://store.steampowered.com/app/393380/Squad/) support.
|
- [The Front](https://store.steampowered.com/app/2285150/The_Front/) support.
|
||||||
- [Savage 2](https://savage2.net/) support.
|
- [Conan Exiles](https://store.steampowered.com/app/440900/Conan_Exiles/) support.
|
||||||
- [Rising World](https://store.steampowered.com/app/324080/Rising_World/) support.
|
- [Post Scriptum](https://store.steampowered.com/app/736220/Post_Scriptum/) support.
|
||||||
- [ATLAS](https://store.steampowered.com/app/834910/ATLAS/) support.
|
- [Squad](https://store.steampowered.com/app/393380/Squad/) support.
|
||||||
- [America's Army: Proving Grounds](https://store.steampowered.com/app/203290/Americas_Army_Proving_Grounds/) support.
|
- [Savage 2](https://savage2.net/) support.
|
||||||
- [Base Defense](https://store.steampowered.com/app/632730/Base_Defense/) support.
|
- [Rising World](https://store.steampowered.com/app/324080/Rising_World/) support.
|
||||||
- [Zombie Panic: Source](https://store.steampowered.com/app/17500/Zombie_Panic_Source/) support.
|
- [ATLAS](https://store.steampowered.com/app/834910/ATLAS/) support.
|
||||||
- Added a valve protocol query example.
|
- [America's Army: Proving Grounds](https://store.steampowered.com/app/203290/Americas_Army_Proving_Grounds/) support.
|
||||||
- Made all of Just Cause 2: Multiplayer Response and Player fields public.
|
- [Base Defense](https://store.steampowered.com/app/632730/Base_Defense/) support.
|
||||||
- [Mindustry](https://mindustrygame.github.io/) support.
|
- [Zombie Panic: Source](https://store.steampowered.com/app/17500/Zombie_Panic_Source/) support.
|
||||||
- Eco support (by @CosminPerRam).
|
- Added a valve protocol query example.
|
||||||
- [Call Of Duty: Black Ops 3](https://store.steampowered.com/agecheck/app/311210/) support.
|
- Made all of Just Cause 2: Multiplayer Response and Player fields public.
|
||||||
- [Counter-Strike 2](https://store.steampowered.com/app/730/CounterStrike_2/) support.
|
- [Mindustry](https://mindustrygame.github.io/) support.
|
||||||
- [Double Action: Boogaloo](https://store.steampowered.com/app/317360/Double_Action_Boogaloo/) support.
|
- Eco support (by @CosminPerRam).
|
||||||
|
- [Call Of Duty: Black Ops 3](https://store.steampowered.com/agecheck/app/311210/) support.
|
||||||
Crate:
|
- [Counter-Strike 2](https://store.steampowered.com/app/730/CounterStrike_2/) support.
|
||||||
- Changed the serde feature to only enable serde derive for some types: serde and serde_json is now a dependecy by default.
|
- [Double Action: Boogaloo](https://store.steampowered.com/app/317360/Double_Action_Boogaloo/) support.
|
||||||
|
|
||||||
Protocols:
|
Crate:
|
||||||
- Added the unreal2 protocol and its associated games: Darkest Hour, Devastation, Killing Floor, Red Orchestra, Unreal Tournament 2003, Unreal Tournament 2004 (by @Douile).
|
- Changed the serde feature to only enable serde derive for some types: serde and serde_json is now a dependecy by default.
|
||||||
- Added HTTPClient to allow use of HTTP(S) (and JSON) APIs (by @CosminPerRam & @Douile).
|
|
||||||
|
Protocols:
|
||||||
Crate:
|
- Added the unreal2 protocol and its associated games: Darkest Hour, Devastation, Killing Floor, Red Orchestra, Unreal Tournament 2003, Unreal Tournament 2004 (by @Douile).
|
||||||
- Added a `packet_capture` feature to capture the raw packets sent and received by the socket (by @Douile).
|
- Added HTTPClient to allow use of HTTP(S) (and JSON) APIs (by @CosminPerRam & @Douile).
|
||||||
- Added packet emulation and socket retrevial using the `packet_capture` feature (by @Douile).
|
|
||||||
- Added PCAP writing support to the `packet_capture` feature (by @Douile & @cainthebest).
|
Crate:
|
||||||
- Refactored socket to use a custom implementation of socket for packet capture when using the `packet_capture` feature (by @Douile).
|
- Added a `packet_capture` feature to capture the raw packets sent and received by the socket (by @Douile).
|
||||||
|
- Added packet emulation and socket retrevial using the `packet_capture` feature (by @Douile).
|
||||||
CLI:
|
- Added PCAP writing support to the `packet_capture` feature (by @Douile & @cainthebest).
|
||||||
- Added a CLI (by @cainthebest).
|
- Refactored socket to use a custom implementation of socket for packet capture when using the `packet_capture` feature (by @Douile).
|
||||||
- Added DNS lookup support (by @Douile).
|
|
||||||
- Added JSON output option (by @Douile).
|
CLI:
|
||||||
- Added BSON output in hex or base64 (by @cainthebest).
|
- Added a CLI (by @cainthebest).
|
||||||
- Added XML output option (by @cainthebest).
|
- Added DNS lookup support (by @Douile).
|
||||||
- Added ExtraRequestSettings as CLI arguments (by @Douile).
|
- Added JSON output option (by @Douile).
|
||||||
- Added TimeoutSettings as CLI argument (by @Douile).
|
- Added BSON output in hex or base64 (by @cainthebest).
|
||||||
- Added Comprehensive end-user documentation for the CLI interface (by @Douile & @cainthebest).
|
- Added XML output option (by @cainthebest).
|
||||||
- Tweaked compile-time flags to allow for a more preformant binary (by @cainthebest).
|
- Added ExtraRequestSettings as CLI arguments (by @Douile).
|
||||||
- Added client for socket capture, dev tools are not included by default (by @Douile).
|
- Added TimeoutSettings as CLI argument (by @Douile).
|
||||||
- Added license information to the CLI (by @cainthebest).
|
- Added Comprehensive end-user documentation for the CLI interface (by @Douile & @cainthebest).
|
||||||
- Added source code information to the CLI (by @cainthebest).
|
- Tweaked compile-time flags to allow for a more preformant binary (by @cainthebest).
|
||||||
|
- Added client for socket capture, dev tools are not included by default (by @Douile).
|
||||||
### Breaking:
|
- Added license information to the CLI (by @cainthebest).
|
||||||
Game:
|
- Added source code information to the CLI (by @cainthebest).
|
||||||
- Changed identifications of the following games as they weren't properly expecting the naming rules:
|
|
||||||
- - Left 4 Dead: `left4dead` -> `l4d`.
|
### Breaking:
|
||||||
- - 7 Days to Die: `7d2d` in definitions and `sd2d` in game declaration -> `sdtd`.
|
Game:
|
||||||
- - Quake 3 Arena: `quake3arena` -> `q3a`.
|
- Changed identifications of the following games as they weren't properly expecting the naming rules:
|
||||||
- - Unreal tournament 2003: `ut2003` -> `unrealtournament2003`
|
- - Left 4 Dead: `left4dead` -> `l4d`.
|
||||||
- - Unreal tournament 2004: `ut2004` -> `unrealtournament2004`
|
- - 7 Days to Die: `7d2d` in definitions and `sd2d` in game declaration -> `sdtd`.
|
||||||
- - Darkest Hour: Europe '44-'45: `darkesthour` -> `dhe4445`
|
- - Quake 3 Arena: `quake3arena` -> `q3a`.
|
||||||
- Minecraft:
|
- - Unreal tournament 2003: `ut2003` -> `unrealtournament2003`
|
||||||
- - Legacy 1.5 and 1.3 were renamed to 1.4 and beta 1.8 respectively to show the lowest version they support, this change includes Structs, Enum and game id renames, also removed the "v" from the game definition name.
|
- - Unreal tournament 2004: `ut2004` -> `unrealtournament2004`
|
||||||
- - Moved the Minecraft protocol implementation in the games folder as its proprietary.
|
- - Darkest Hour: Europe '44-'45: `darkesthour` -> `dhe4445`
|
||||||
|
- Minecraft:
|
||||||
Protocols:
|
- - Legacy 1.5 and 1.3 were renamed to 1.4 and beta 1.8 respectively to show the lowest version they support, this change includes Structs, Enum and game id renames, also removed the "v" from the game definition name.
|
||||||
- Valve: Removed `SteamApp` due to it not being really useful at all, replaced all instances with `Engine`.
|
- - Moved the Minecraft protocol implementation in the games folder as its proprietary.
|
||||||
|
|
||||||
Query:
|
Protocols:
|
||||||
- Added a connection timeout to TimeoutSettings (at the moment this only applies to TCP)
|
- Valve: Removed `SteamApp` due to it not being really useful at all, replaced all instances with `Engine`.
|
||||||
- Sockets are now expected to apply timeout settings in new()
|
|
||||||
|
Query:
|
||||||
# 0.4.1 - 13/10/2023
|
- Added a connection timeout to TimeoutSettings (at the moment this only applies to TCP)
|
||||||
### Changes:
|
- Sockets are now expected to apply timeout settings in new()
|
||||||
Game:
|
|
||||||
- Added [Barotrauma](https://store.steampowered.com/app/602960/Barotrauma/) support.
|
# 0.4.1 - 13/10/2023
|
||||||
|
### Changes:
|
||||||
Crate:
|
Game:
|
||||||
- Added `Send` and `Sync` on `Error::source` to fix some async issues.
|
- Added [Barotrauma](https://store.steampowered.com/app/602960/Barotrauma/) support.
|
||||||
|
|
||||||
Protocols:
|
Crate:
|
||||||
- Minecraft Java: Add derives to `RequestSettings` and add `new_just_hostname` that creates new settings just by specifying
|
- Added `Send` and `Sync` on `Error::source` to fix some async issues.
|
||||||
the hostname, `protocol_version` defaults to -1.
|
|
||||||
|
Protocols:
|
||||||
Games:
|
- Minecraft Java: Add derives to `RequestSettings` and add `new_just_hostname` that creates new settings just by specifying
|
||||||
- Organised game modules into protocols (when protocol used by other games),
|
the hostname, `protocol_version` defaults to -1.
|
||||||
you can now access a game by its name or by its protocol name:
|
|
||||||
- `use gamedig::games::teamfortress2;`
|
Games:
|
||||||
- `use gamedig::games::valve::teamfortress2;`
|
- Organised game modules into protocols (when protocol used by other games),
|
||||||
|
you can now access a game by its name or by its protocol name:
|
||||||
Generics:
|
- `use gamedig::games::teamfortress2;`
|
||||||
- Added standard derives to `ProprietaryProtocol`, `CommonResponseJson`, `CommonPlayerJson`, `TimeoutSettings` and
|
- `use gamedig::games::valve::teamfortress2;`
|
||||||
`ExtraRequestSettings`.
|
|
||||||
|
Generics:
|
||||||
### Breaking...
|
- Added standard derives to `ProprietaryProtocol`, `CommonResponseJson`, `CommonPlayerJson`, `TimeoutSettings` and
|
||||||
None, yaay!
|
`ExtraRequestSettings`.
|
||||||
|
|
||||||
# 0.4.0 - 07/10/2023
|
### Breaking...
|
||||||
### Changes:
|
None, yaay!
|
||||||
Games:
|
|
||||||
- [Creativerse](https://store.steampowered.com/app/280790/Creativerse/) support.
|
# 0.4.0 - 07/10/2023
|
||||||
|
### Changes:
|
||||||
Protocols:
|
Games:
|
||||||
- Quake 2: Fixed a bug where the version tag wouldn't always be present.
|
- [Creativerse](https://store.steampowered.com/app/280790/Creativerse/) support.
|
||||||
- The Ship: Removed instances of using `unwrap` without handling the panics.
|
|
||||||
|
Protocols:
|
||||||
Crate:
|
- Quake 2: Fixed a bug where the version tag wouldn't always be present.
|
||||||
- Updated [byteorder](https://crates.io/crates/byteorder) dependency from 1.4 to 1.5.
|
- The Ship: Removed instances of using `unwrap` without handling the panics.
|
||||||
- Rich errors, capturing backtrace is done on `RUST_BACKTRACE=1`. (by @Douile)
|
|
||||||
- Applied some nursery Clippy lints.
|
Crate:
|
||||||
- The `retries` field was added to `TimeoutSettings` that specifies the number of times to retry a failed request (request being individual send, receive sequence, some protocols can include multiple requests in a single query). (by @Douile)
|
- Updated [byteorder](https://crates.io/crates/byteorder) dependency from 1.4 to 1.5.
|
||||||
- By default `retries` is set to `0`, meaning no retries will be attempted
|
- Rich errors, capturing backtrace is done on `RUST_BACKTRACE=1`. (by @Douile)
|
||||||
|
- Applied some nursery Clippy lints.
|
||||||
Generics:
|
- The `retries` field was added to `TimeoutSettings` that specifies the number of times to retry a failed request (request being individual send, receive sequence, some protocols can include multiple requests in a single query). (by @Douile)
|
||||||
- Added `ExtraRequestSettings` containing all possible extra request settings. (by @Douile)
|
- By default `retries` is set to `0`, meaning no retries will be attempted
|
||||||
- Added `query_with_timeout_and_extra_settings()` to allow generic queries with extra settings. (by @Douile)
|
|
||||||
|
Generics:
|
||||||
### Breaking...
|
- Added `ExtraRequestSettings` containing all possible extra request settings. (by @Douile)
|
||||||
Crate:
|
- Added `query_with_timeout_and_extra_settings()` to allow generic queries with extra settings. (by @Douile)
|
||||||
- The enum used for errors, `GDError` has been renamed to `GDErrorKind`.
|
|
||||||
- `GDError` is now a struct that holds its kind, the source and a backtrace.
|
### Breaking...
|
||||||
- The `Socket::apply_timeout` method now borrows `TimeoutSettings` (`&Option<TimeoutSettings>`)
|
Crate:
|
||||||
- To make this easier to work with a new method was added to `TimeoutSettings`: `TimeoutSettings::get_read_and_write_or_defaults` this takes a borrowed optional `TimeoutSettings` and returns the contained read and write durations or the default read and write durations.
|
- The enum used for errors, `GDError` has been renamed to `GDErrorKind`.
|
||||||
|
- `GDError` is now a struct that holds its kind, the source and a backtrace.
|
||||||
Generics:
|
- The `Socket::apply_timeout` method now borrows `TimeoutSettings` (`&Option<TimeoutSettings>`)
|
||||||
- Renamed `CommonResponseJson`'s `game` field (and the function) to `game_mode`.
|
- To make this easier to work with a new method was added to `TimeoutSettings`: `TimeoutSettings::get_read_and_write_or_defaults` this takes a borrowed optional `TimeoutSettings` and returns the contained read and write durations or the default read and write durations.
|
||||||
- Changed `players_maximum` and `players_online` (and their functions) types from `u64` to `u32`.
|
|
||||||
- Changed `score` type (and the function) of player from `u32` to `i32`.
|
Generics:
|
||||||
|
- Renamed `CommonResponseJson`'s `game` field (and the function) to `game_mode`.
|
||||||
Games:
|
- Changed `players_maximum` and `players_online` (and their functions) types from `u64` to `u32`.
|
||||||
- Rename some game definitions and implementations to follow a stable ID naming system.
|
- Changed `score` type (and the function) of player from `u32` to `i32`.
|
||||||
|
|
||||||
Protocols:
|
Games:
|
||||||
- Valve:
|
- Rename some game definitions and implementations to follow a stable ID naming system.
|
||||||
1. Renamed `protocol` to `protocol_version`.
|
|
||||||
2. Renamed `version` to `game_version`.
|
Protocols:
|
||||||
3. Renamed `game` to `game_mode`.
|
- Valve:
|
||||||
4. Fixed `player`'s `score` field being `u32` when it needed to be `i32`, as specified in the protocol.
|
1. Renamed `protocol` to `protocol_version`.
|
||||||
5. Added the field `check_app_id` to `GatherSettings` which controls if the app id specified to the request and
|
2. Renamed `version` to `game_version`.
|
||||||
reported by the server are the same, errors if not, enabled by default. (by @Douile)
|
3. Renamed `game` to `game_mode`.
|
||||||
6. Valve: Renamed SteamApp enum variants to match new definition names
|
4. Fixed `player`'s `score` field being `u32` when it needed to be `i32`, as specified in the protocol.
|
||||||
|
5. Added the field `check_app_id` to `GatherSettings` which controls if the app id specified to the request and
|
||||||
- GameSpy (1, 2, 3):
|
reported by the server are the same, errors if not, enabled by default. (by @Douile)
|
||||||
1. Renamed `version` to `game_version`.
|
6. Valve: Renamed SteamApp enum variants to match new definition names
|
||||||
2. Changed `players_maximum` and `players_online` (and their functions) types from `usize` to `u32`.
|
|
||||||
|
- GameSpy (1, 2, 3):
|
||||||
- GameSpy 1:
|
1. Renamed `version` to `game_version`.
|
||||||
1. Renamed the player's `frags` to `score` and type from `u32` to `i32`.
|
2. Changed `players_maximum` and `players_online` (and their functions) types from `usize` to `u32`.
|
||||||
2. Made `Option` the following response fields `team`, `face`, `skin`, `mesh` and `secret` to fix missing fields issues. (by @Douile)
|
|
||||||
|
- GameSpy 1:
|
||||||
- Quake (1, 2):
|
1. Renamed the player's `frags` to `score` and type from `u32` to `i32`.
|
||||||
1. Renamed `game_type` to `game_mode`.
|
2. Made `Option` the following response fields `team`, `face`, `skin`, `mesh` and `secret` to fix missing fields issues. (by @Douile)
|
||||||
2. Changed `version` type from `String`to `Option<String>`.
|
|
||||||
|
- Quake (1, 2):
|
||||||
- Minecraft Java
|
1. Renamed `game_type` to `game_mode`.
|
||||||
1. Renamed `version_protocol` to `protocol_version`.
|
2. Changed `version` type from `String`to `Option<String>`.
|
||||||
2. Renamed `version_name` to `game_version`.
|
|
||||||
3. Renamed `players_sample` to `players`.
|
- Minecraft Java
|
||||||
4. Added an optional parameter, `RequestSettings`, which contains fields that are used when creating the handshake
|
1. Renamed `version_protocol` to `protocol_version`.
|
||||||
packet (this solves some servers not responding to the query). (by @Douile)
|
2. Renamed `version_name` to `game_version`.
|
||||||
5. Legacy versions naming has been changed to represent up to what version they can query, `LegacyBV1_8` (Beta 1.8 to
|
3. Renamed `players_sample` to `players`.
|
||||||
1.3) -> `LegacyV1_3` and `LegacyV1_4` (1.4 to 1.5) -> `LegacyV1_5` (and their enums accordingly).
|
4. Added an optional parameter, `RequestSettings`, which contains fields that are used when creating the handshake
|
||||||
|
packet (this solves some servers not responding to the query). (by @Douile)
|
||||||
- Minecraft Bedrock
|
5. Legacy versions naming has been changed to represent up to what version they can query, `LegacyBV1_8` (Beta 1.8 to
|
||||||
1. Renamed `version_protocol` to `protocol_version`.
|
1.3) -> `LegacyV1_3` and `LegacyV1_4` (1.4 to 1.5) -> `LegacyV1_5` (and their enums accordingly).
|
||||||
|
|
||||||
- Minecraft:
|
- Minecraft Bedrock
|
||||||
1. Added an optional parameter, `request_settings` parameter to `query`.
|
1. Renamed `version_protocol` to `protocol_version`.
|
||||||
|
|
||||||
- The Ship:
|
- Minecraft:
|
||||||
1. Renamed `protocol` to `protocol_version`.
|
1. Added an optional parameter, `request_settings` parameter to `query`.
|
||||||
2. Renamed `max_players` to `players_maximum` and changed its type from `u64` to `u32`.
|
|
||||||
3. Renamed `bots` to `players_bots`. and changed its type from `u64` to `u32`.
|
- The Ship:
|
||||||
4. Renamed `players` to `players_online`.
|
1. Renamed `protocol` to `protocol_version`.
|
||||||
5. Renamed `players_details` to `players`.
|
2. Renamed `max_players` to `players_maximum` and changed its type from `u64` to `u32`.
|
||||||
6. Renamed `game` to `game_mode`.
|
3. Renamed `bots` to `players_bots`. and changed its type from `u64` to `u32`.
|
||||||
7. Added field `game_version`.
|
4. Renamed `players` to `players_online`.
|
||||||
8. Changed `players_bots` type from `Option<u64>` to `Option<u32>`.
|
5. Renamed `players_details` to `players`.
|
||||||
9. Changed `score` type of player from `u32` to `i32`.
|
6. Renamed `game` to `game_mode`.
|
||||||
|
7. Added field `game_version`.
|
||||||
- Frontlines: Fuel of War:
|
8. Changed `players_bots` type from `Option<u64>` to `Option<u32>`.
|
||||||
1. Renamed `game_mode` to `game`.
|
9. Changed `score` type of player from `u32` to `i32`.
|
||||||
2. Renamed `version` to `game_version`.
|
|
||||||
3. Renamed `protocol` to `protocol_version`.
|
- Frontlines: Fuel of War:
|
||||||
4. Renamed `game` to `game_mode`.
|
1. Renamed `game_mode` to `game`.
|
||||||
5. Changed `players_maximum` and `players_minimum` types from `usize` to `u32`.
|
2. Renamed `version` to `game_version`.
|
||||||
|
3. Renamed `protocol` to `protocol_version`.
|
||||||
- Just Cause 2: Multiplayer:
|
4. Renamed `game` to `game_mode`.
|
||||||
1. Renamed `version` to `game_version`.
|
5. Changed `players_maximum` and `players_minimum` types from `usize` to `u32`.
|
||||||
2. Changed `players_maximum` and `players_minimum` types from `usize` to `u32`.
|
|
||||||
|
- Just Cause 2: Multiplayer:
|
||||||
# 0.3.0 - 18/07/2023
|
1. Renamed `version` to `game_version`.
|
||||||
### Changes:
|
2. Changed `players_maximum` and `players_minimum` types from `usize` to `u32`.
|
||||||
Protocols:
|
|
||||||
- GameSpy 2 support.
|
# 0.3.0 - 18/07/2023
|
||||||
- Quake 2: Added Optional address field to Player.
|
### Changes:
|
||||||
|
Protocols:
|
||||||
Generic query:
|
- GameSpy 2 support.
|
||||||
- Added generic queries (by [@Douile](https://github.com/Douile)) which come with a common struct for the response fields.
|
- Quake 2: Added Optional address field to Player.
|
||||||
- The supported games list is available programmatically.
|
|
||||||
|
Generic query:
|
||||||
Games:
|
- Added generic queries (by [@Douile](https://github.com/Douile)) which come with a common struct for the response fields.
|
||||||
- [Halo: Combat Evolved](https://en.wikipedia.org/wiki/Halo:_Combat_Evolved) support.
|
- The supported games list is available programmatically.
|
||||||
- [Just Cause 2: Multiplayer](https://store.steampowered.com/app/259080/Just_Cause_2_Multiplayer_Mod/) support.
|
|
||||||
- [Warsow](https://warsow.net/) support.
|
Games:
|
||||||
|
- [Halo: Combat Evolved](https://en.wikipedia.org/wiki/Halo:_Combat_Evolved) support.
|
||||||
Internal:
|
- [Just Cause 2: Multiplayer](https://store.steampowered.com/app/259080/Just_Cause_2_Multiplayer_Mod/) support.
|
||||||
- Buffer reader rewrite, resulting in more data checks and better code quality (thanks [@cainthebest](https://github.com/cainthebest)).
|
- [Warsow](https://warsow.net/) support.
|
||||||
- Better CI to never break accidentally MSRV again (thanks [@Douile](https://github.com/Douile)).
|
|
||||||
|
Internal:
|
||||||
### Breaking...
|
- Buffer reader rewrite, resulting in more data checks and better code quality (thanks [@cainthebest](https://github.com/cainthebest)).
|
||||||
Protocols:
|
- Better CI to never break accidentally MSRV again (thanks [@Douile](https://github.com/Douile)).
|
||||||
- Quake 2: Renamed the players `frags` field to `score` to be more inline with the other protocols.
|
|
||||||
|
### Breaking...
|
||||||
Crate:
|
Protocols:
|
||||||
- `no_games` and `no_services` have been changed to `games` and `services`, this better represents that they are present by default (by [@Douile](https://github.com/Douile)).
|
- Quake 2: Renamed the players `frags` field to `score` to be more inline with the other protocols.
|
||||||
- Fixed crate's `rust-version`, it is now `1.60.0` (was `1.56.1`)
|
|
||||||
|
Crate:
|
||||||
# 0.2.3 - 02/06/2023
|
- `no_games` and `no_services` have been changed to `games` and `services`, this better represents that they are present by default (by [@Douile](https://github.com/Douile)).
|
||||||
### Changes:
|
- Fixed crate's `rust-version`, it is now `1.60.0` (was `1.56.1`)
|
||||||
Protocols:
|
|
||||||
- Valve:
|
# 0.2.3 - 02/06/2023
|
||||||
1. Added standard and serde derives to `GatheringSettings`.
|
### Changes:
|
||||||
- Quake 1, 2 and 3 support.
|
Protocols:
|
||||||
|
- Valve:
|
||||||
Games:
|
1. Added standard and serde derives to `GatheringSettings`.
|
||||||
- [Quake 2](https://store.steampowered.com/app/2320/Quake_II/) support.
|
- Quake 1, 2 and 3 support.
|
||||||
- [Quake 1](https://store.steampowered.com/app/2310/Quake/) support.
|
|
||||||
- [Quake 3: Arena](https://store.steampowered.com/app/2200/Quake_III_Arena/) support.
|
Games:
|
||||||
- [Hell Let Loose](https://store.steampowered.com/app/686810/Hell_Let_Loose/) support.
|
- [Quake 2](https://store.steampowered.com/app/2320/Quake_II/) support.
|
||||||
- [Soldier of Fortune 2](https://www.gog.com/en/game/soldier_of_fortune_ii_double_helix_gold_edition) support.
|
- [Quake 1](https://store.steampowered.com/app/2310/Quake/) support.
|
||||||
|
- [Quake 3: Arena](https://store.steampowered.com/app/2200/Quake_III_Arena/) support.
|
||||||
### Breaking:
|
- [Hell Let Loose](https://store.steampowered.com/app/686810/Hell_Let_Loose/) support.
|
||||||
- Every function that used `&str` for the address has been changed to `&IpAddr` (thanks [@Douile](https://github.com/Douile) for the re-re-write).
|
- [Soldier of Fortune 2](https://www.gog.com/en/game/soldier_of_fortune_ii_double_helix_gold_edition) support.
|
||||||
- Protocols now use `&SocketAddr` instead of `address: &str, port: u16`.
|
|
||||||
|
### Breaking:
|
||||||
Services:
|
- Every function that used `&str` for the address has been changed to `&IpAddr` (thanks [@Douile](https://github.com/Douile) for the re-re-write).
|
||||||
- Valve Master Query:
|
- Protocols now use `&SocketAddr` instead of `address: &str, port: u16`.
|
||||||
1. Removed Filter and SearchFilters lifetimes and changed `&'a str` to `String` and `&'a [&'a str]` to `Vec<String>`
|
|
||||||
|
Services:
|
||||||
# 0.2.2 - 01/05/2023
|
- Valve Master Query:
|
||||||
### Changes:
|
1. Removed Filter and SearchFilters lifetimes and changed `&'a str` to `String` and `&'a [&'a str]` to `Vec<String>`
|
||||||
Crate:
|
|
||||||
- General optimizations thanks to [cargo clippy](https://github.com/rust-lang/rust-clippy) and [@cainthebest](https://github.com/cainthebest).
|
# 0.2.2 - 01/05/2023
|
||||||
- Added feature `serde` which enables json serialization/deserialization for all types (by [@cainthebest](https://github.com/cainthebest)).
|
### Changes:
|
||||||
- Documentation improvements.
|
Crate:
|
||||||
|
- General optimizations thanks to [cargo clippy](https://github.com/rust-lang/rust-clippy) and [@cainthebest](https://github.com/cainthebest).
|
||||||
Protocols:
|
- Added feature `serde` which enables json serialization/deserialization for all types (by [@cainthebest](https://github.com/cainthebest)).
|
||||||
- GameSpy 1: Add key `admin` as a possible variable for `admin_name`.
|
- Documentation improvements.
|
||||||
- GameSpy 3 support.
|
|
||||||
|
Protocols:
|
||||||
Games:
|
- GameSpy 1: Add key `admin` as a possible variable for `admin_name`.
|
||||||
- [Serious Sam](https://www.gog.com/game/serious_sam_the_first_encounter) support.
|
- GameSpy 3 support.
|
||||||
- [Frontlines: Fuel of War](https://store.steampowered.com/app/9460/Frontlines_Fuel_of_War/) support.
|
|
||||||
- [Crysis Wars](https://steamcommunity.com/app/17340) support.
|
Games:
|
||||||
|
- [Serious Sam](https://www.gog.com/game/serious_sam_the_first_encounter) support.
|
||||||
Services:
|
- [Frontlines: Fuel of War](https://store.steampowered.com/app/9460/Frontlines_Fuel_of_War/) support.
|
||||||
- [Valve Master Server Query](https://developer.valvesoftware.com/wiki/Master_Server_Query_Protocol) support.
|
- [Crysis Wars](https://steamcommunity.com/app/17340) support.
|
||||||
- Added feature `no_services` which disables the supported services.
|
|
||||||
|
Services:
|
||||||
### Breaking:
|
- [Valve Master Server Query](https://developer.valvesoftware.com/wiki/Master_Server_Query_Protocol) support.
|
||||||
Protocols:
|
- Added feature `no_services` which disables the supported services.
|
||||||
- Valve: Request type enums have been renamed from all caps to starting-only uppercase, ex: `INFO` to `Info`
|
|
||||||
- GameSpy 1: `players_minimum` is now an `Option<u8>` instead of an `u8`
|
### Breaking:
|
||||||
- GameSpy 1: Is now under `protocols::gamespy::one` instead of `protocols::gamespy`
|
Protocols:
|
||||||
|
- Valve: Request type enums have been renamed from all caps to starting-only uppercase, ex: `INFO` to `Info`
|
||||||
# 0.2.1 - 03/03/2023
|
- GameSpy 1: `players_minimum` is now an `Option<u8>` instead of an `u8`
|
||||||
### Changes:
|
- GameSpy 1: Is now under `protocols::gamespy::one` instead of `protocols::gamespy`
|
||||||
Crate:
|
|
||||||
- Added feature `no_games` which disables the supported games (useful when only the
|
# 0.2.1 - 03/03/2023
|
||||||
protocols/services are needed, also saves storage space).
|
### Changes:
|
||||||
|
Crate:
|
||||||
Games:
|
- Added feature `no_games` which disables the supported games (useful when only the
|
||||||
- [V Rising](https://store.steampowered.com/app/1604030/V_Rising/) support.
|
protocols/services are needed, also saves storage space).
|
||||||
- [Unreal Tournament](https://en.wikipedia.org/wiki/Unreal_Tournament) support.
|
|
||||||
- [Battlefield 1942](https://www.ea.com/games/battlefield/battlefield-1942) support.
|
Games:
|
||||||
|
- [V Rising](https://store.steampowered.com/app/1604030/V_Rising/) support.
|
||||||
Protocols:
|
- [Unreal Tournament](https://en.wikipedia.org/wiki/Unreal_Tournament) support.
|
||||||
- Valve:
|
- [Battlefield 1942](https://www.ea.com/games/battlefield/battlefield-1942) support.
|
||||||
1. Reversed (from `0.1.0`) "Players with no name are no more added to the `players_details` field.", also added a note in the [protocols](PROTOCOLS.md) file regarding this.
|
|
||||||
2. Fixed querying while multiple challenge responses might happen.
|
Protocols:
|
||||||
- GameSpy 1 support.
|
- Valve:
|
||||||
|
1. Reversed (from `0.1.0`) "Players with no name are no more added to the `players_details` field.", also added a note in the [protocols](PROTOCOLS.md) file regarding this.
|
||||||
### Breaking:
|
2. Fixed querying while multiple challenge responses might happen.
|
||||||
None.
|
- GameSpy 1 support.
|
||||||
|
|
||||||
# 0.2.0 - 18/02/2023
|
### Breaking:
|
||||||
### Changes:
|
None.
|
||||||
Games:
|
|
||||||
- [Don't Starve Together](https://store.steampowered.com/app/322330/Dont_Starve_Together/) support.
|
# 0.2.0 - 18/02/2023
|
||||||
- [Colony Survival](https://store.steampowered.com/app/366090/Colony_Survival/) support.
|
### Changes:
|
||||||
- [Onset](https://store.steampowered.com/app/1105810/Onset/) support.
|
Games:
|
||||||
- [Codename CURE](https://store.steampowered.com/app/355180/Codename_CURE/) support.
|
- [Don't Starve Together](https://store.steampowered.com/app/322330/Dont_Starve_Together/) support.
|
||||||
- [Ballistic Overkill](https://store.steampowered.com/app/296300/Ballistic_Overkill/) support.
|
- [Colony Survival](https://store.steampowered.com/app/366090/Colony_Survival/) support.
|
||||||
- [BrainBread 2](https://store.steampowered.com/app/346330/BrainBread_2/) support.
|
- [Onset](https://store.steampowered.com/app/1105810/Onset/) support.
|
||||||
- [Avorion](https://store.steampowered.com/app/445220/Avorion/) support.
|
- [Codename CURE](https://store.steampowered.com/app/355180/Codename_CURE/) support.
|
||||||
- [Operation: Harsh Doorstop](https://store.steampowered.com/app/736590/Operation_Harsh_Doorstop/) support.
|
- [Ballistic Overkill](https://store.steampowered.com/app/296300/Ballistic_Overkill/) support.
|
||||||
|
- [BrainBread 2](https://store.steampowered.com/app/346330/BrainBread_2/) support.
|
||||||
Protocols:
|
- [Avorion](https://store.steampowered.com/app/445220/Avorion/) support.
|
||||||
- Valve:
|
- [Operation: Harsh Doorstop](https://store.steampowered.com/app/736590/Operation_Harsh_Doorstop/) support.
|
||||||
1. `appid` is now a field in the `Response` struct.
|
|
||||||
|
Protocols:
|
||||||
### Breaking:
|
- Valve:
|
||||||
Protocols:
|
1. `appid` is now a field in the `Response` struct.
|
||||||
- Valve:
|
|
||||||
due to some games being able to host a server from within the game AND from a dedicated server,
|
### Breaking:
|
||||||
if you were to query one of them, the query would fail for the other one, as the `SteamID` enum
|
Protocols:
|
||||||
for that game could specify only one id.
|
- Valve:
|
||||||
1. `SteamID` is now `SteamApp`, was an u32 enum, and now it's a simple enum.
|
due to some games being able to host a server from within the game AND from a dedicated server,
|
||||||
2. `App` is now `Engine`, the `Source` enum's structure has been changed from `Option<u32>` to
|
if you were to query one of them, the query would fail for the other one, as the `SteamID` enum
|
||||||
`Option<u32, Option<u32>>`, where the first parameter is the game app id and the second is
|
for that game could specify only one id.
|
||||||
the dedicated server app id (if there is one).
|
1. `SteamID` is now `SteamApp`, was an u32 enum, and now it's a simple enum.
|
||||||
|
2. `App` is now `Engine`, the `Source` enum's structure has been changed from `Option<u32>` to
|
||||||
# 0.1.0 - 17/01/2023
|
`Option<u32, Option<u32>>`, where the first parameter is the game app id and the second is
|
||||||
### Changes:
|
the dedicated server app id (if there is one).
|
||||||
Games:
|
|
||||||
- [Risk of Rain 2](https://store.steampowered.com/app/632360/Risk_of_Rain_2/) support.
|
# 0.1.0 - 17/01/2023
|
||||||
- [Battalion 1944](https://store.steampowered.com/app/489940/BATTALION_Legacy/) support.
|
### Changes:
|
||||||
- [Black Mesa](https://store.steampowered.com/app/362890/Black_Mesa/) support.
|
Games:
|
||||||
- [Project Zomboid](https://store.steampowered.com/app/108600/Project_Zomboid/) support.
|
- [Risk of Rain 2](https://store.steampowered.com/app/632360/Risk_of_Rain_2/) support.
|
||||||
- [Age of Chivalry](https://store.steampowered.com/app/17510/Age_of_Chivalry/) support.
|
- [Battalion 1944](https://store.steampowered.com/app/489940/BATTALION_Legacy/) support.
|
||||||
|
- [Black Mesa](https://store.steampowered.com/app/362890/Black_Mesa/) support.
|
||||||
Protocols:
|
- [Project Zomboid](https://store.steampowered.com/app/108600/Project_Zomboid/) support.
|
||||||
- Valve: Players with no name are no more added to the `players_details` field.
|
- [Age of Chivalry](https://store.steampowered.com/app/17510/Age_of_Chivalry/) support.
|
||||||
- Valve: Split packets are now appending in the correct order.
|
|
||||||
|
Protocols:
|
||||||
Crate:
|
- Valve: Players with no name are no more added to the `players_details` field.
|
||||||
- `MSRV` is now `1.56.1` (was `1.58.1`)
|
- Valve: Split packets are now appending in the correct order.
|
||||||
|
|
||||||
### Breaking:
|
Crate:
|
||||||
Protocols:
|
- `MSRV` is now `1.56.1` (was `1.58.1`)
|
||||||
- Valve: The rules field is now a `HashMap<String, String>` instead of a `Vec<ServerRule>` (where the `ServerRule` structure had a name and a value fields).
|
|
||||||
- Valve: Structs that contained the `players`, `max_players` and `bots` fields have been renamed to `players_online`, `players_maximum` and `players_bots` respectively.
|
### Breaking:
|
||||||
- Minecraft: Structs that contained the `online_players`, `max_players` and `sample_players` fields have been renamed to `players_online`, `players_maximum` and `players_sample` respectively.
|
Protocols:
|
||||||
- Minecraft: The Java query response struct named `Response` has been renamed to `JavaResponse`.
|
- Valve: The rules field is now a `HashMap<String, String>` instead of a `Vec<ServerRule>` (where the `ServerRule` structure had a name and a value fields).
|
||||||
|
- Valve: Structs that contained the `players`, `max_players` and `bots` fields have been renamed to `players_online`, `players_maximum` and `players_bots` respectively.
|
||||||
Errors:
|
- Minecraft: Structs that contained the `online_players`, `max_players` and `sample_players` fields have been renamed to `players_online`, `players_maximum` and `players_sample` respectively.
|
||||||
- Besides the `BadGame` error, now no other errors returns details about what happened (as it was quite pointless).
|
- Minecraft: The Java query response struct named `Response` has been renamed to `JavaResponse`.
|
||||||
|
|
||||||
Crate:
|
Errors:
|
||||||
- `package.metadata.msrv` has been replaced with `package.rust-version`
|
- Besides the `BadGame` error, now no other errors returns details about what happened (as it was quite pointless).
|
||||||
|
|
||||||
# 0.0.7 - 03/01/2023
|
Crate:
|
||||||
### Changes:
|
- `package.metadata.msrv` has been replaced with `package.rust-version`
|
||||||
[Minecraft](https://www.minecraft.com) bedrock edition support.
|
|
||||||
Fix Minecraft legacy v1.6 max/online players count being reversed.
|
# 0.0.7 - 03/01/2023
|
||||||
Added `query_legacy_specific` method to the Minecraft protocol.
|
### Changes:
|
||||||
|
[Minecraft](https://www.minecraft.com) bedrock edition support.
|
||||||
### Breaking:
|
Fix Minecraft legacy v1.6 max/online players count being reversed.
|
||||||
Removed `query_specific` from the mc protocol in favor of `query_java`, `query_legacy` and `query_legacy_specific`.
|
Added `query_legacy_specific` method to the Minecraft protocol.
|
||||||
Some public functions that are meant to be used only internally were made private.
|
|
||||||
|
### Breaking:
|
||||||
# 0.0.6 - 28/11/2022
|
Removed `query_specific` from the mc protocol in favor of `query_java`, `query_legacy` and `query_legacy_specific`.
|
||||||
[Minecraft](https://www.minecraft.com) support (bedrock not supported yet).
|
Some public functions that are meant to be used only internally were made private.
|
||||||
[7 Days To Die](https://store.steampowered.com/app/251570/7_Days_to_Die/) support.
|
|
||||||
[ARK: Survival Evolved](https://store.steampowered.com/app/346110/ARK_Survival_Evolved/) support.
|
# 0.0.6 - 28/11/2022
|
||||||
[Unturned](https://store.steampowered.com/app/304930/Unturned/) support.
|
[Minecraft](https://www.minecraft.com) support (bedrock not supported yet).
|
||||||
[The Forest](https://store.steampowered.com/app/242760/The_Forest/) support.
|
[7 Days To Die](https://store.steampowered.com/app/251570/7_Days_to_Die/) support.
|
||||||
[Team Fortress Classic](https://store.steampowered.com/app/20/Team_Fortress_Classic/) support.
|
[ARK: Survival Evolved](https://store.steampowered.com/app/346110/ARK_Survival_Evolved/) support.
|
||||||
[Sven Co-op](https://store.steampowered.com/app/225840/Sven_Coop/) support.
|
[Unturned](https://store.steampowered.com/app/304930/Unturned/) support.
|
||||||
[Rust](https://store.steampowered.com/app/252490/Rust/) support.
|
[The Forest](https://store.steampowered.com/app/242760/The_Forest/) support.
|
||||||
[Counter-Strike](https://store.steampowered.com/app/10/CounterStrike/) support.
|
[Team Fortress Classic](https://store.steampowered.com/app/20/Team_Fortress_Classic/) support.
|
||||||
[Arma 2: Operation Arrowhead](https://store.steampowered.com/app/33930/Arma_2_Operation_Arrowhead/) support.
|
[Sven Co-op](https://store.steampowered.com/app/225840/Sven_Coop/) support.
|
||||||
[Day of Infamy](https://store.steampowered.com/app/447820/Day_of_Infamy/) support.
|
[Rust](https://store.steampowered.com/app/252490/Rust/) support.
|
||||||
[Half-Life Deathmatch: Source](https://store.steampowered.com/app/360/HalfLife_Deathmatch_Source/) support.
|
[Counter-Strike](https://store.steampowered.com/app/10/CounterStrike/) support.
|
||||||
Successfully tested `Alien Swarm` and `Insurgency: Modern Infantry Combat`.
|
[Arma 2: Operation Arrowhead](https://store.steampowered.com/app/33930/Arma_2_Operation_Arrowhead/) support.
|
||||||
Restored rules response for `Counter-Strike: Global Offensive` (note: for a full player list response, the cvar `host_players_show` must be set to `2`).
|
[Day of Infamy](https://store.steampowered.com/app/447820/Day_of_Infamy/) support.
|
||||||
Increased Valve Protocol `PACKET_SIZE` from 1400 to 6144 (because some games send larger packets than the specified protocol size).
|
[Half-Life Deathmatch: Source](https://store.steampowered.com/app/360/HalfLife_Deathmatch_Source/) support.
|
||||||
Removed DNS resolving as it was not needed.
|
Successfully tested `Alien Swarm` and `Insurgency: Modern Infantry Combat`.
|
||||||
Valve Protocol minor optimizations.
|
Restored rules response for `Counter-Strike: Global Offensive` (note: for a full player list response, the cvar `host_players_show` must be set to `2`).
|
||||||
|
Increased Valve Protocol `PACKET_SIZE` from 1400 to 6144 (because some games send larger packets than the specified protocol size).
|
||||||
# 0.0.5 - 15/11/2022
|
Removed DNS resolving as it was not needed.
|
||||||
Added `SocketBind` error, regarding failing to bind a socket.
|
Valve Protocol minor optimizations.
|
||||||
Socket custom timeout capability (with an error if provided durations are zero).
|
|
||||||
Because of this, a parameter similar to GatherSettings has been added on the Valve Protocol Query.
|
# 0.0.5 - 15/11/2022
|
||||||
Support for GoldSrc split packets and obsolete A2S_INFO response.
|
Added `SocketBind` error, regarding failing to bind a socket.
|
||||||
Changed the Valve Protocol app parameter to represent the engine responses.
|
Socket custom timeout capability (with an error if provided durations are zero).
|
||||||
It is now an enum of:
|
Because of this, a parameter similar to GatherSettings has been added on the Valve Protocol Query.
|
||||||
- `Source(Option<u32>)` - A Source response with optionally, the id (if the id is present and the response id is not the same, the query fails), if it isn't provided, find it.
|
Support for GoldSrc split packets and obsolete A2S_INFO response.
|
||||||
- `GoldSrc(bool)` - A GoldSrc response with the option to enforce the obsolete A2S_INFO response.
|
Changed the Valve Protocol app parameter to represent the engine responses.
|
||||||
|
It is now an enum of:
|
||||||
Fixed Source multi-packet response crash due to when a certain app with a certain protocol doesn't have the Size field.
|
- `Source(Option<u32>)` - A Source response with optionally, the id (if the id is present and the response id is not the same, the query fails), if it isn't provided, find it.
|
||||||
Reduced Valve Protocol `PACKET_SIZE` to be as specified from 2048 to 1400.
|
- `GoldSrc(bool)` - A GoldSrc response with the option to enforce the obsolete A2S_INFO response.
|
||||||
[Counter-Strike: Condition Zero](https://store.steampowered.com/app/80/CounterStrike_Condition_Zero/) implementation.
|
|
||||||
[Day of Defeat](https://store.steampowered.com/app/30/Day_of_Defeat/) implementation.
|
Fixed Source multi-packet response crash due to when a certain app with a certain protocol doesn't have the Size field.
|
||||||
Games besides CSGO and TS now have the same response structure.
|
Reduced Valve Protocol `PACKET_SIZE` to be as specified from 2048 to 1400.
|
||||||
|
[Counter-Strike: Condition Zero](https://store.steampowered.com/app/80/CounterStrike_Condition_Zero/) implementation.
|
||||||
# 0.0.4 - 23/10/2022
|
[Day of Defeat](https://store.steampowered.com/app/30/Day_of_Defeat/) implementation.
|
||||||
Queries now support DNS resolve.
|
Games besides CSGO and TS now have the same response structure.
|
||||||
Changed uses a bit, example: from `use gamedig::valve::ValveProtocol::query` to `use gamedig::protocols::valve::query`.
|
|
||||||
Changed Valve Protocol Query parameters to (ip, port, app, gather_settings), changes include:
|
# 0.0.4 - 23/10/2022
|
||||||
- the app is now optional, being None means to anonymously query the server.
|
Queries now support DNS resolve.
|
||||||
- gather_settings is now also an optional, being None means all query settings.
|
Changed uses a bit, example: from `use gamedig::valve::ValveProtocol::query` to `use gamedig::protocols::valve::query`.
|
||||||
|
Changed Valve Protocol Query parameters to (ip, port, app, gather_settings), changes include:
|
||||||
Valve Protocol now supports querying anonymous apps (see previous lines).
|
- the app is now optional, being None means to anonymously query the server.
|
||||||
Better bad game error.
|
- gather_settings is now also an optional, being None means all query settings.
|
||||||
[Alien Swarm](https://store.steampowered.com/app/630/Alien_Swarm/) implementation (not tested).
|
|
||||||
[Alien Swarm: Reactive Drop](https://store.steampowered.com/app/563560/Alien_Swarm_Reactive_Drop/) implementation.
|
Valve Protocol now supports querying anonymous apps (see previous lines).
|
||||||
[Insurgency](https://store.steampowered.com/app/222880/Insurgency/) implementation.
|
Better bad game error.
|
||||||
[Insurgency: Sandstorm](https://store.steampowered.com/app/581320/Insurgency_Sandstorm/) implementation.
|
[Alien Swarm](https://store.steampowered.com/app/630/Alien_Swarm/) implementation (not tested).
|
||||||
[Insurgency: Modern Infantry Combat](https://store.steampowered.com/app/17700/INSURGENCY_Modern_Infantry_Combat/) implementation (not tested).
|
[Alien Swarm: Reactive Drop](https://store.steampowered.com/app/563560/Alien_Swarm_Reactive_Drop/) implementation.
|
||||||
|
[Insurgency](https://store.steampowered.com/app/222880/Insurgency/) implementation.
|
||||||
# 0.0.3 - 22/10/2022
|
[Insurgency: Sandstorm](https://store.steampowered.com/app/581320/Insurgency_Sandstorm/) implementation.
|
||||||
Valve protocol now properly supports multi-packet responses (compressed ones not tested).
|
[Insurgency: Modern Infantry Combat](https://store.steampowered.com/app/17700/INSURGENCY_Modern_Infantry_Combat/) implementation (not tested).
|
||||||
CSGO, TF2 and TS now have independent Responses, if you want a generic one, query the protocol.
|
|
||||||
[Counter Strike: Source](https://store.steampowered.com/app/240/CounterStrike_Source/) implementation (if protocol is 7, queries with multi-packet responses will crash).
|
# 0.0.3 - 22/10/2022
|
||||||
[Day of Defeat: Source](https://store.steampowered.com/app/300/Day_of_Defeat_Source/) implementation.
|
Valve protocol now properly supports multi-packet responses (compressed ones not tested).
|
||||||
[Garry's Mod](https://store.steampowered.com/app/4000/Garrys_Mod/) implementation.
|
CSGO, TF2 and TS now have independent Responses, if you want a generic one, query the protocol.
|
||||||
[Half-Life 2 Deathmatch](https://store.steampowered.com/app/320/HalfLife_2_Deathmatch/) implementation.
|
[Counter Strike: Source](https://store.steampowered.com/app/240/CounterStrike_Source/) implementation (if protocol is 7, queries with multi-packet responses will crash).
|
||||||
[Left 4 Dead](https://store.steampowered.com/app/500/Left_4_Dead/) implementation.
|
[Day of Defeat: Source](https://store.steampowered.com/app/300/Day_of_Defeat_Source/) implementation.
|
||||||
[Left 4 Dead 2](https://store.steampowered.com/app/550/Left_4_Dead_2/) implementation.
|
[Garry's Mod](https://store.steampowered.com/app/4000/Garrys_Mod/) implementation.
|
||||||
|
[Half-Life 2 Deathmatch](https://store.steampowered.com/app/320/HalfLife_2_Deathmatch/) implementation.
|
||||||
# 0.0.2 - 20/10/2022
|
[Left 4 Dead](https://store.steampowered.com/app/500/Left_4_Dead/) implementation.
|
||||||
Further implementation of the Valve protocol (PLAYERS and RULES queries).
|
[Left 4 Dead 2](https://store.steampowered.com/app/550/Left_4_Dead_2/) implementation.
|
||||||
[Counter Strike: Global Offensive](https://store.steampowered.com/app/730/CounterStrike_Global_Offensive/) implementation.
|
|
||||||
[The Ship](https://developer.valvesoftware.com/wiki/The_Ship) implementation.
|
# 0.0.2 - 20/10/2022
|
||||||
The library now has error handling.
|
Further implementation of the Valve protocol (PLAYERS and RULES queries).
|
||||||
|
[Counter Strike: Global Offensive](https://store.steampowered.com/app/730/CounterStrike_Global_Offensive/) implementation.
|
||||||
# 0.0.1 - 16/10/2022
|
[The Ship](https://developer.valvesoftware.com/wiki/The_Ship) implementation.
|
||||||
The first usable version of the crate, yay!
|
The library now has error handling.
|
||||||
It brings:
|
|
||||||
Initial implementation of the [Valve server query protocol](https://developer.valvesoftware.com/wiki/Server_queries).
|
# 0.0.1 - 16/10/2022
|
||||||
Initial [Team Fortress 2](https://en.wikipedia.org/wiki/Team_Fortress_2) support.
|
The first usable version of the crate, yay!
|
||||||
|
It brings:
|
||||||
# 0.0.0 - 15/10/2022
|
Initial implementation of the [Valve server query protocol](https://developer.valvesoftware.com/wiki/Server_queries).
|
||||||
The first *markdown*, the crate is unusable as it doesn't contain anything helpful.
|
Initial [Team Fortress 2](https://en.wikipedia.org/wiki/Team_Fortress_2) support.
|
||||||
|
|
||||||
|
# 0.0.0 - 15/10/2022
|
||||||
|
The first *markdown*, the crate is unusable as it doesn't contain anything helpful.
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "gamedig"
|
name = "gamedig"
|
||||||
version = "0.4.1"
|
version = "0.5.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = [
|
authors = [
|
||||||
"rust-GameDig contributors [https://github.com/gamedig/rust-gamedig/contributors]",
|
"rust-GameDig contributors [https://github.com/gamedig/rust-gamedig/contributors]",
|
||||||
|
|
@ -8,7 +8,7 @@ authors = [
|
||||||
]
|
]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
description = "Query game servers and not only."
|
description = "Query game servers and not only."
|
||||||
homepage = "https://github.com/gamedig/rust-gamedig"
|
homepage = "https://gamedig.github.io/"
|
||||||
documentation = "https://docs.rs/gamedig/latest/gamedig/"
|
documentation = "https://docs.rs/gamedig/latest/gamedig/"
|
||||||
repository = "https://github.com/gamedig/rust-gamedig"
|
repository = "https://github.com/gamedig/rust-gamedig"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
|
||||||
93
crates/lib/README.md
Normal file
93
crates/lib/README.md
Normal file
|
|
@ -0,0 +1,93 @@
|
||||||
|
<h1 align="center">rust-GameDig</h1>
|
||||||
|
|
||||||
|
<h5 align="center">The fast library for querying game servers/services.</h5>
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
<a href="https://github.com/gamedig/rust-gamedig/actions">
|
||||||
|
<img src="https://github.com/gamedig/rust-gamedig/actions/workflows/ci.yml/badge.svg" alt="CI">
|
||||||
|
</a>
|
||||||
|
<a href="https://crates.io/crates/gamedig">
|
||||||
|
<img src="https://img.shields.io/crates/v/gamedig.svg?color=yellow" alt="Latest Version">
|
||||||
|
</a>
|
||||||
|
<a href="https://crates.io/crates/gamedig">
|
||||||
|
<img src="https://img.shields.io/crates/d/gamedig?color=purple" alt="Crates.io">
|
||||||
|
</a>
|
||||||
|
<a href="https://github.com/gamedig/node-gamedig">
|
||||||
|
<img src="https://raw.githubusercontent.com/gamedig/rust-gamedig/main/.github/badges/node.svg" alt="Node-GameDig Game Coverage">
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h5 align="center">
|
||||||
|
This library brings what
|
||||||
|
<a href="https://github.com/gamedig/node-gamedig">
|
||||||
|
node-GameDig
|
||||||
|
</a>
|
||||||
|
does (and not only), to pure Rust!
|
||||||
|
</h5>
|
||||||
|
|
||||||
|
**Warning**: This project goes through frequent API breaking changes and hasn't been thoroughly tested.
|
||||||
|
|
||||||
|
## Community
|
||||||
|
Checkout the GameDig Community Discord Server [here](https://discord.gg/NVCMn3tnxH).
|
||||||
|
Note that it isn't be a replacement for GitHub issues, if you have found a problem
|
||||||
|
within the library or want to request a feature, it's better to do so here rather than
|
||||||
|
on Discord.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
Minimum Supported Rust Version is `1.65.0` and the code is cross-platform.
|
||||||
|
|
||||||
|
Pick a game/service/protocol (check the [GAMES](https://github.com/gamedig/rust-gamedig/blob/main/GAMES.md), [SERVICES](https://github.com/gamedig/rust-gamedig/blob/main/SERVICES.md) and [PROTOCOLS](https://github.com/gamedig/rust-gamedig/blob/main/PROTOCOLS.md) files to see the currently supported ones), provide the ip and the port (be aware that some game servers use a separate port for the info queries, the port can also be optional if the server is running the default ports) then query on it.
|
||||||
|
|
||||||
|
[Team Fortress 2](https://store.steampowered.com/app/440/Team_Fortress_2/) query example:
|
||||||
|
```rust
|
||||||
|
use gamedig::games::teamfortress2;
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
let response = teamfortress2::query(&"127.0.0.1".parse().unwrap(), None);
|
||||||
|
// None is the default port (which is 27015), could also be Some(27015)
|
||||||
|
|
||||||
|
match response { // Result type, must check what it is...
|
||||||
|
Err(error) => println!("Couldn't query, error: {}", error),
|
||||||
|
Ok(r) => println!("{:#?}", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
Response (note that some games have a different structure):
|
||||||
|
```json5
|
||||||
|
{
|
||||||
|
protocol: 17,
|
||||||
|
name: "Team Fortress 2 Dedicated Server.",
|
||||||
|
map: "ctf_turbine",
|
||||||
|
game: "tf2",
|
||||||
|
appid: 440,
|
||||||
|
players_online: 0,
|
||||||
|
players_details: [],
|
||||||
|
players_maximum: 69,
|
||||||
|
players_bots: 0,
|
||||||
|
server_type: Dedicated,
|
||||||
|
has_password: false,
|
||||||
|
vac_secured: true,
|
||||||
|
version: "7638371",
|
||||||
|
port: Some(27015),
|
||||||
|
steam_id: Some(69753253289735296),
|
||||||
|
tv_port: None,
|
||||||
|
tv_name: None,
|
||||||
|
keywords: Some("alltalk,nocrits"),
|
||||||
|
rules: [
|
||||||
|
"mp_autoteambalance": "1",
|
||||||
|
"mp_maxrounds": "5",
|
||||||
|
//....
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Want to see more examples? Checkout the [examples](https://github.com/gamedig/rust-gamedig/tree/main/crates/lib/examples) folder.
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
The documentation is available at [docs.rs](https://docs.rs/gamedig/latest/gamedig/).
|
||||||
|
Curious about the history and what changed between versions? Everything is in the [CHANGELOG](https://github.com/gamedig/rust-gamedig/blob/main/crates/lib/CHANGELOG.md) file.
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
If you want to see your favorite game/service being supported here, open an issue, and I'll prioritize it (or do a pull request if you want to implement it yourself)!
|
||||||
|
|
||||||
|
Before contributing please read [CONTRIBUTING](https://github.com/gamedig/rust-gamedig/blob/main/CONTRIBUTING.md).
|
||||||
Loading…
Add table
Add a link
Reference in a new issue