Commit graph

18 commits

Author SHA1 Message Date
CosminPerRam
3c9f109942 chore: reformat markdown files 2024-04-14 23:08:11 +03:00
CosminPerRam
55f498d45a fix: add jc2m in protocols.md 2023-12-10 19:43:32 +02:00
CosminPerRam
dd204936f0 chore: fix unreal 2 entry in protocols.md 2023-12-10 19:41:28 +02:00
CosminPerRam
af8e1e9b1a
feat: add savage 2 support (#169)
* 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
2023-12-10 19:39:26 +02:00
Tom
529abe9d76
feat: Add the unreal2 protocol (#124)
* WIP: Add unreal2 protocol

* Add/Update badge

* protocols/unreal2: Update doc comments and TODOs

* protocols/unreal2: Don't pre-allocate as many bot players

* protocols/unreal2: Use "encoding-rs" for decoding unreal2 strings

* Add/Update badge

* protocols/unreal2: Add constants for player pre-allocation.

Also improve some doc comments and update PACKET_SIZE.

* protocols/unreal2: Early break when enough players have been parsed

Add a fast-path to avoid waiting for packet timeout when we have parsed
as many players as specified in the server info packet.

* protocols/unreal2: Use HashSet to store mutators

* protocols/unreal2: Handle server sending multiple values for a rule

* protocols/unreal2: Add GatheringSettings to control what to query

GatheringSettings allows skipping querying rules and/or players which
can make the query return much faster. This also required moving each
individual query into its own helper.

* protocols/unreal2: Add more derives to types

* protocols/unreal2: Simplify ServerInfo::parse()

Co-Authored-By: CosminPerRam <cosmin.p@live.com>

* Docs: Add unreal2 protocol documentation

I used a website to generate the markdown RESPONSES table, the save file
from this website is included to make updating the table easier in the
future.

https://www.tablesgenerator.com/markdown_tables

* Add/Update badge

* protocols/unreal2: Use the correct encoding for UCS2 strings

* Docs: Remove unnecessary TGN file

---------

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: CosminPerRam <cosmin.p@live.com>
2023-10-30 13:37:15 +02:00
CosminPerRam
26ad1f5d19
[Protocol] Add GameSpy 2 support. (#47)
* [Protocol] Add initial files

* [Protocol] Add test to test the request

* [Protocol] Add initial query response type

* [Protocol] Parse teams

* [Protocol] Add players parse and add nice macro

* [Protocol] Add proper derives to structs

* [Protocol] Change to get all informations from one request

* [Protocol] Add Halo: CE support and update CHANGELOG.md

* [Protocol] Remove a .clone usage

* [Protocol] Add todo comment regarding code performance

* [Protocol] Use iterator instead of index range
2023-06-12 19:38:34 +03:00
CosminPerRam
d302d1173f
[Protocol] Add quake protocols. (#35)
* [Protocol] Initial packet receive implementation

* [Protocol] Add key extraction

* [Protocol] Fix new Ipv4Addr query address and get string with unended

* [Protocol] Properly parse the received data

* [Protocol] Add parse players

* [Protocol] Add bots

* [Protocol] Extract into functions

* [Protocol] Remove quotes from player name

* [Protocol] Add two and three files

* [Protocol] Make quake queries very modular

* [Protocol] Remove the need of a client instance

* [Protocol] Revesed if statement

* [Protocol] Apply clippy fixes and replace String by &str in get send header

* [Protocol] Add one and three implementations

* [Protocol] Add quake2 and quake3 to master_querant

* [Protocol] Fix Q2 implementation

* [Protocol] Change from Ipv4Addr to IpAddr

* [Protocol] Fix Q3 response header

* [Protocol] Fix Q3 response

* [Crate] Add Q1, 2 and 3 to changelog and protocols

* [Protocol] Extract client into separate file and add some docs
2023-05-30 15:33:41 +03:00
CosminPerRam
786da81ea5
[Protocol] Add GameSpy 3 support. (#25)
* [Protocol] Gamespy3 initial code

* [Protocol] Add rest of challenge solving

* [Protocol] Remove unused stuff

* [Protocol] Remove adding unused bytes

* [Protocol] Clean up code

* [Protocol] Make gs3 a struct

* [Protocol] Add initial key-value parsing

* [Protocol] Manage multiple packets

* [Protocol] Split server vars and other vars

* Revert "[Protocol] Split server vars and other vars"

This reverts commit 9a930aeb68802fcf3d0908a2e031dfea054d37d0.

* [Protocol] Proper packet management and initial response struct

* [Protocol] Fix players_minimum

* [Protocol] Fix server vars to parse only the first packet

* [Protocol] Update CHANGELOG.md

* [Protocol] Initial player parsing

* [Protocol] Split GS one and three

* [Protocol] Add common code file

* [Protocol] Change static to const

* [Protocol] Fix players_online and break on data to map on empty key

* [Protocol] Remove unused types and printlns

* [Protocol] Add teams parsing

* [Protocol] Split key_values and parsing data

* [Crate] Update PROTOCOLS.md
2023-04-17 15:10:51 +03:00
CosminPerRam
950c08c18e
[Protocol] GameSpy 1 support with the games Unreal Tournament and Battlefield 1942. (#9)
* Initial files + unreal tournament

* Fix master_querant

* Split by delimiter and collect into hashmap

* Furter port to accept more packets

* Improve getting the server's values

* Some initial players parsing

* Players parsing

* Add error handling

* Add some more fields

* Add Battlefield 1942 support.

* Add query_vars and some docs
2023-03-03 17:45:18 +02:00
CosminPerRam
99c87557c2 [Protocol] Valve: Reverse: No name players not being added to the list 2023-02-19 16:43:55 +02:00
CosminPerRam
91f8bbb9fe
Minecraft bedrock support (#7)
* Added needed ground stuff

* Minecraft bedrock support!

* Documentation acknowledgements!

* Added utf8_le_undended test, some docs and modified master_querant

* Modified query function to comply with the others

Before: game query -> protocol query (get port or default port)
After: game query (get port or default port) -> protocol query

* Modified md files
2022-12-05 18:47:35 +02:00
CosminPerRam
e709cb3ce5 Edited GAMES.md, PROTOCOLS.md and changed 'verify' keyword to 'query' in Cargo.toml 2022-11-28 00:23:19 +02:00
CosminPerRam
ee0223a7a3
Minecraft implementation (#6)
* Initial minecraft support

* Made previews_chat an option

* Better error handling and removed version structure

* Minecraft Server types

* Fixed compilation and renamed stuff

* 'extract till you drop!' extracted sockets

* extracted java version and fixed socket udp receive

* Legacy 1.4 and 1.6 implementation (incomplete)

* Furter implementation

* Implementations work

* Protocol beta v1.8+ implemented

* Removed bedrock support

* Added auto query

* Renamed minecraft to mc and added to md's

* Docs, renames and small optimization changes

* Changed java version to be able to return None on players sample
2022-11-24 22:52:54 +02:00
CosminPerRam
d3a1dba3c1
Restructured app format, goldsrc full support and added implementation for Day of Defeat and Counter-Strike: Condition Zero (#5)
* [valve_app_restructure] Initial change

* [valve_app_restructure] Some GoldSrc split packet changes

* [valve_app_restructure] Counter-Strike: Condition Zero implementation.

* [valve_app_restructure] Docs changes

* [valve_app_restructure] Added obsolete gold src response

* [valve_app_restructure] Day of Defeat implementation.
2022-10-27 01:01:11 +03:00
cosminperram
8e2d76ecfb Insurgency: Modern Infantry Combat implementation. 2022-10-23 12:39:23 +03:00
cosminperram
a5bdd05c24 Added Alien Swarm and Alien Swamr: Reactive Drop support 2022-10-22 17:03:14 +03:00
cosminperram
3b4dd9d9e4 Decompression support 2022-10-22 02:27:11 +03:00
CosminPerRam
aac3a483c0 Added PROTOCOLS.md, modified README and updated GAMES 2022-10-20 14:41:17 +03:00