* buffer: Add UTF8LengthPrefixed string decoder
* games: Use expression for default port
This allows us to refer to constants for the default ports if we want to
(literals will still work).
* games: Add support for mindustry
* fix: ID tests not in correct directory
* refactor: Move game-id test logic into its own crate
* id-tests: Add CLI that reads JSON input
* id-tests: Update crate docs
* Remove node ID test
* id-tests: Don't try to parse unneeded info
* id-tests: Enable cli feature by default
* tidy: Move TimeoutSettings out of protocol types
* tidy: Move game type to a types file
* tidy: Move generic query functions to own file
* tidy: Move ExtraRequestSettings to game types
* tidy: Move generic query functions into games module
* Revert "tidy: Move ExtraRequestSettings to game types"
This reverts commit aa0d23fc2acc12d68f03265a9caff6f98bf25054.
* Revert "tidy: Move TimeoutSettings out of protocol types"
This reverts commit 7ee10711ed11f17cc06565d4cc9102040d53a319.
* tidy: Re-export types needed for query at the root
* Add/Update badge
---------
Co-authored-by: GitHub Action <action@github.com>
* [Test] Add best effort test to validate game ID rules
An attempt to implement the rules specified in #108 as a programmatic
test.
* [Test] Refactor ID rules to check if a mod exists after - in game name
This allows fivem to pass the check following rule 8, but could also
cause a false pass in some cases.
* [Test] Add unit tests for ID rule checker
Adds unit tests based on the examples in CONTRIBUTING.md to confirm in
those cases we would allow ID to pass. However these tests don't check
any error cases.
* test/id: Correctly extract protocol names
* games/defs: Fix unreal tournament IDs
* tests: Require game definitions to run ID tests
* tests: Improve comments on ID tests
* tests/id: Combine - seperated numbers
* games/defs: Fix darkest hour ID
* Add/Update badge
---------
Co-authored-by: GitHub Action <action@github.com>
* feat: savage 2 support
* fix: add savage 2 to definitions
* chore: run rustfmt
* fix: config serde use
* fix: remove needless borrow
* docs: add savage 2 to protocols.md
* cli: Do DNS lookup if host is not an IP address
* cli: Add option to output as JSON
* cli: Pass hostname to ExtraRequestSettings if it isn't an IP
* cli: Add help docs to all arguments
* cli: Add options for all extra request settings
* cli: Use a CLI only error for DNS
* cli: Add option to set timeout settings
* docs: Update CHANGELOG
* cli: Add default values to TimeoutSettings
* cli: Refactor finding game definition into its own function
Co-Authored-By: Cain <75994858+cainthebest@users.noreply.github.com>
* cli: Refactor IP resolution into its own set of functions
Co-Authored-By: Cain <75994858+cainthebest@users.noreply.github.com>
* cli: Refactor output formatting into its own functions
Co-Authored-By: Cain <75994858+cainthebest@users.noreply.github.com>
* cli: Improve doc comments for CLI args and derive Debug
Co-Authored-By: Cain <75994858+cainthebest@users.noreply.github.com>
* protocols: Derive Serialize for versioned generic responses
This allows for serializing the output of as_original(). We cannot also
derive Deserialize here because the enums use references to the inner
types, which is unavoidable in the current implementation because
as_original() takes a reference to self.
* cli: Add the output mode options
This allows selected whether to use CommonResponse or the original
response struct when outputting.
* cli: Fix ExtraRequestSettings docs showing up in help output
* cli: Add help headings for timeouts and extra request settings
---------
Co-authored-by: Cain <75994858+cainthebest@users.noreply.github.com>
* protocols: Fix building without the "games" feature
* crate/lib: Add required features for examples
This prevents cargo from running the examples if the required features
aren't enabled.
* ci: Run if ANY Cargo.toml files are changed
* ci: Make sure to run unit tests
* ci: Separate checks for library and CLI
* ci: Add slightly better comments
* ci: Only run deeper tests for CLI or LIB when their files were changed
* ci: Improve act arguments for testing actions locally
* ci: Fix pre-commit not running tests
* ci: Only update shared cache after the initial build
* ci: Make sure that rustup downloads get cached
* tidy: Clean up file formatting
* ci: Fix issue with audit
Because TcpSocket connects in Socket::new TimeoutSettings are now
required for Socket::new. Since we already have TimeoutSettings there
Sockets are now expected to apply timeout settings in Socket::new.
* chore: initial move and refactor of minecraft
* fix: glob re-exports
* fix: failing example sample
* docs: update changelog to note the mc protocol implementation to games
* docs: add back the reference query standard reference
* fix: minecraft id naming inconsistencies
* fix: minecraft legacy beta 1.8 being wrongly id named in definitions
* docs: Update CHANGELOG to document minecraft legacy renames
* docs: Update CHANGELOG to note removal of legacy versions game names being prefixed with 'v'
* feat: add initial password checking
* feat: add password string check and made the field a bool
* chore: fix formatting
* feat: add password to has_password common response