Commit graph

79 commits

Author SHA1 Message Date
CosminPerRam
c3e2d948e8
[Game] Add JC2MP support. (#54)
* [Game] Add JC2MP support.

* [Game] Add game to changelog and games

* [Games] Add generic support to JC2MP.

* [Game] Add players_maximum and players_online
2023-06-19 22:10:49 +03:00
CosminPerRam
e44a680a59 [Example] Add pretty print of receiving struct. 2023-06-13 22:01:51 +03:00
Tom
d853189e06
[Games] Programmatic games by storing information as data (#45)
* Define games as structs

* Create table of response types

* Ensure serde is always included

* Remove server_ prefix in GenericResponse

* Make players online/max non-optional in generic response

* Use already existing minecraft server enum

* Implement ExtraResponses to prevent cloning when creating generic

* Add game definitions

* Add doc comments to generic types

* Include players in gamespy extra responses

* Add custom response types for TheShip and FFOW

* Cargo format differing files

* Final cleanup
2023-06-13 21:49:58 +03: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
Tom
b95b2abe0f
[Crate] Enforce formatting in CI (#46)
* [CI] Check formatting

* Format all files
2023-06-10 18:15:12 +03:00
CosminPerRam
e0830bdae5
[Protocol] Replace IpAddr with SocketAddr in protocols (#44)
* [Crate] Replace IpAddr with SocketAddr in protocols

* [Crate] Remove usage of address.to_string in socket

* [Crate] Update CHANGELOG.md
2023-06-02 01:06:24 +03:00
CosminPerRam
a0681f4259 [Games] Add Soldier of Fortune 2 support. 2023-05-30 18:53:23 +03:00
CosminPerRam
b3ba7df6d9 [Games] Add Hell Let Loose support. 2023-05-30 16:48:19 +03:00
CosminPerRam
06a2ceeda9 [Games] Add Quake 3 support and change players frags from u16 to i16 2023-05-30 16:23:37 +03:00
CosminPerRam
af5e0d1fbf [Games] Add Quake 1 support. 2023-05-30 16:18:04 +03:00
CosminPerRam
f79f2ea2de [Games] Add Quake 2 support. 2023-05-30 15:57:17 +03:00
CosminPerRam
0ceb31bf86 [Crate] Apply cargo clippy fixes 2023-05-30 15:49:35 +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
Tom
3f654e0dfd
[Protocol] Enable the use of Ipv6 addresses (#41)
Replace usages of Ipv4Addr with IpAddr which allows the use of either Ipv4 or Ipv6.

This patch essentially consists of running:
"sed -i 's/Ipv4Addr/IpAddr/g' src/**/*.rs examples/*"
and fixing the errors.
2023-05-29 11:10:21 +03:00
CosminPerRam
e620398615 [Crate] Changed all address &str to &Ipv4Addr 2023-05-27 00:41:41 +03:00
CosminPerRam
a69896f737 [Service] Fix tests 2023-05-08 15:34:59 +03:00
CosminPerRam
33e8f43cb8 [Games] Add Crysis Wars support. 2023-04-30 01:26:12 +03:00
CosminPerRam
4122d34cfa
[Service] Add valve master server query service (#34)
* [Service] Add initial files

* [Service] Add initial request packet

* [Service] Add filters

* [Service] Some clippy improvements

* [Service] Make query a vector of ipv4addr and port

* [Service] Add complete and singular query

* [Crate] Update md files

* [Service] Add docs and clippy adjustments

* [Service] Add hasTags and fix filters

* [Service] Use let some instead of match

* [Service] Add other filters

* [Service] Add nor and nand filters

* [Service] Remove 0.0.0.0:0 from query

* [Service] Remove dev testing test

* [Service] Add valve_master_server_query example
2023-04-28 18:00:04 +03:00
CosminPerRam
348147b415
[Game] Add Frontlines: Fuel of War support. (#31)
* [Game] Add initial files

* [Game] Initial support

* [Game] Add response struct

* [Game] Add query_with_timeout

* [Game] FFOW: Added some doc comments
2023-04-22 20:03:30 +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
Cain
1b13d39856
[Crate] Add formatting (#22)
* chore: add standard for formatting

* chore: manually tidy up imports and format

* chore: remove vscode and add to gitignore

* chore: alphabetically order and fix

* chore: format

* chore: fix format issue with payload

* chore: format as merge had unformatted code

* [format] Fix comments, change max width and binop operator

---------

Co-authored-by: CosminPerRam <cosmin.p@live.com>
2023-03-14 10:31:37 +02:00
CosminPerRam
14c5edc1be [Games] Serious Sam support. 2023-03-04 21:36:01 +02: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
cd4cbc09db [Games] V Rising support. 2023-02-19 18:37:10 +02:00
CosminPerRam
150bc1762e [Protocol] Valve: support app and dedicated app id 2023-02-18 21:44:17 +02:00
CosminPerRam
fe46359e47 Games: Operation Harsh Doorstop support. 2023-02-18 19:00:54 +02:00
CosminPerRam
719ae9d591 Games: Avorion support. 2023-02-18 18:37:02 +02:00
CosminPerRam
e16efee488 Games: BrainBread 2 support. 2023-02-18 18:25:17 +02:00
CosminPerRam
eca9757421 Ballistic Overkill support. 2023-02-18 18:17:19 +02:00
CosminPerRam
df9005cc9f Games: Codename CURE support. 2023-02-18 18:09:20 +02:00
CosminPerRam
649dfd81ed Games: Onset support. 2023-01-18 18:13:50 +02:00
CosminPerRam
2312ba9114 Games: Colony Survival support. 2023-01-18 18:06:08 +02:00
CosminPerRam
bbd2dd7d97 Games: Don't Starve Together support. 2023-01-18 17:57:19 +02:00
CosminPerRam
e2f42008b2 Games: Age of Chivalry support. 2023-01-16 23:10:16 +02:00
CosminPerRam
f03a1de035 Games: Add Project Zomboid support. 2023-01-16 22:03:28 +02:00
CosminPerRam
328de37b2d Games: Add Black Mesa support. 2023-01-16 21:33:28 +02:00
CosminPerRam
4a7eb400db Games: Add Battalion 1944 from-rules server information's 2023-01-13 23:52:45 +02:00
CosminPerRam
9bcbfbc198 Games: Add Battalion 1944 support. 2023-01-13 23:08:09 +02:00
CosminPerRam
824c4d34c0 Add proper MSRV to Cargo.toml 2023-01-13 01:31:57 +02:00
CosminPerRam
ededf93b38 Add Risk of Rain 2 support. 2023-01-09 19:02:31 +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
7828bb9433 Minecraft rework and some docs 2022-11-28 22:08:28 +02:00
CosminPerRam
d671bb0310 Half-Life Deathmatch: Source support. 2022-11-28 21:33:09 +02:00
CosminPerRam
663fb6a66e Modified the master_querant example 2022-11-28 21:20:24 +02:00
CosminPerRam
1c173b76ca Day of Infamy support. 2022-11-28 20:53:12 +02:00
CosminPerRam
9f861df96b Arma 2: Operation Arrowhead support. 2022-11-26 18:08:32 +02:00
CosminPerRam
aec145a847 Counter-Strike support. 2022-11-26 17:17:09 +02:00
CosminPerRam
3f58e99c28 Rust support. 2022-11-26 16:27:03 +02:00
CosminPerRam
de3ac9aad5 Sven Co-op support. 2022-11-26 16:21:58 +02:00
CosminPerRam
d086d49cdc Team Fortress Classic support. 2022-11-26 16:15:01 +02:00