Compare commits

...

14 Commits

Author SHA1 Message Date
s1lentq
95d3e935d8 fixed compat with reunion2015 version
Some checks failed
C/C++ CI / Publish (push) Has been cancelled
C/C++ CI / Windows (push) Has been cancelled
C/C++ CI / Linux (push) Has been cancelled
authdata->steamId should be always hash of full ticket
2025-04-13 00:54:58 +07:00
s1lentq
58e894ef25 fixed compat of steamid generation with reunion2015 version, when authkey was shortest
Some checks failed
C/C++ CI / Windows (push) Has been cancelled
C/C++ CI / Linux (push) Has been cancelled
C/C++ CI / Publish (push) Has been cancelled
2025-04-12 03:31:24 +07:00
Dmitry Novikov
568b1a2b3b
Update build.yml
Some checks failed
C/C++ CI / Windows (push) Has been cancelled
C/C++ CI / Linux (push) Has been cancelled
C/C++ CI / Publish (push) Has been cancelled
2025-03-27 16:26:33 +07:00
Dmitry Novikov
308e010beb
Update reunion.cfg 2025-03-27 16:20:52 +07:00
Dmitry Novikov
5214d418ae
Fix default value for enable query limiter option 2025-03-27 16:11:35 +07:00
s1lentq
232c7ab1df Fix linux build (missing deps)
Some checks failed
C/C++ CI / Windows (push) Has been cancelled
C/C++ CI / Linux (push) Has been cancelled
C/C++ CI / Publish (push) Has been cancelled
2024-11-27 00:40:31 +07:00
s1lentq
bdb3a06efb Fix linux build 2024-11-27 00:36:30 +07:00
s1lentq
16c8b2621b Allow to disable salt for SteamIDs hashing >= reunion2018 (this is always required by default) 2024-11-27 00:29:33 +07:00
s1lentq
ed4d145219 Fixed salt steamid for reunion2015 auth version 2024-11-27 00:04:55 +07:00
c625203188
LICENSE.md -> LICENSE, re -> Re
Some checks failed
C/C++ CI / Windows (push) Has been cancelled
C/C++ CI / Linux (push) Has been cancelled
C/C++ CI / Publish (push) Has been cancelled
2024-11-15 18:02:12 +03:00
1927408f8a
Merge pull request #3 from rehlds/feature/meta-improvements
Some checks failed
C/C++ CI / Windows (push) Has been cancelled
C/C++ CI / Linux (push) Has been cancelled
C/C++ CI / Publish (push) Has been cancelled
added changelog
2024-11-06 13:39:37 +03:00
3eae86647c
added changelog + updated readme 2024-11-03 19:58:01 +03:00
s1lentq
12ea01409b fix build 2024-08-23 04:14:18 +07:00
s1lentq
38eeb46f39 Disable caching of g_ISteamGameServer, listen server may reassign instance after each map change 2024-08-23 03:58:30 +07:00
8 changed files with 179 additions and 23 deletions

View File

@ -41,15 +41,14 @@ jobs:
move msvc\${{ env.buildRelease }}\reunion_mm.dll publish\bin\Windows\reunion_mm.dll
- name: Deploy artifacts
uses: actions/upload-artifact@v3.1.1
uses: actions/upload-artifact@v4
with:
name: win32
path: publish/*
linux:
name: 'Linux'
runs-on: ubuntu-latest
container: s1lentq/linux86buildtools:latest
runs-on: ubuntu-20.04
outputs:
app-version: ${{ steps.app-version.outputs.version }}
@ -59,9 +58,15 @@ jobs:
with:
fetch-depth: 0
- name: Build using Intel C++ Compiler 19.0
- name: Check dependencies
run: |
rm -rf build && CC=icc CXX=icpc cmake -B build && cmake --build build -j8
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y gcc-multilib g++-multilib
- name: Build
run: |
rm -rf build && CC=gcc CXX=g++ cmake -B build && cmake --build build -j8
- name: Reading appversion.h
id: app-version
@ -98,7 +103,7 @@ jobs:
shell: bash
- name: Deploy artifacts
uses: actions/upload-artifact@v3.1.1
uses: actions/upload-artifact@v4
id: upload-job
with:
name: linux32
@ -111,12 +116,12 @@ jobs:
steps:
- name: Deploying linux artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: linux32
- name: Deploying windows artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: win32
@ -126,7 +131,7 @@ jobs:
7z a -tzip reunion-${{ needs.linux.outputs.app-version }}.zip .
- name: Publish artifacts
uses: actions/upload-artifact@v3.1.1
uses: actions/upload-artifact@v4
with:
name: reunion-${{ needs.linux.outputs.app-version }}
path: |

132
CHANGELOG.md Normal file
View File

@ -0,0 +1,132 @@
# [ReUnion](https://github.com/rehlds/reUnion) Changelog
---
## [`0.2.0.13`](https://github.com/rehlds/ReUnion/releases/tag/0.2.0.13) - 2024-06-30
### Added
- Added `reunion2018` prefixes for SteamID as an authkey type for compatibility with dev version of Reunion `AuthVersion >= 3`
### Fixed
* Fixed collisions of `SteamIDs` with `AuthVersion >= 3`, due to truncation of authkey to 31 chars (Thanks for report, Alexs)
* Fixed collisions of `SteamIDs` issued to non-unique serial numbers `0000_0000_0000_0000_0000_0100_0000_0000`
(for clients with bad `HDDsn`, SteamID will be based on VALVE_ by IP)
> [!WARNING]
> CONFIG UPDATED
**Full Changelog**: [0.2.0.6...0.2.0.13](https://github.com/rehlds/ReUnion/compare/0.2.0.6...0.2.0.13)
## [`0.2.0.6`](https://github.com/rehlds/ReUnion/releases/tag/0.2.0.6) - 2014-06-21
### Added
- Added game tags using CVar `sv_tags`.
- Added new option `IDClientsLimit` for sets max number of clients from single steamid (Useful for debugging with multiple instances clients).
### Fixed
- Fixed `*sid` from userinfo.
- Fixed can't connect to game server when server is paused.
> [!WARNING]
> CONFIG UPDATED
> DO NOT UPDATE `.SO` WITHOUT CONFIG UPDATE
> [!CAUTION]
> IN THIS VERSION THE LENGTH OF `SteamIdHashSalt` MUST EXCEED `31` CHARACTERS
**Full Changelog**: [0.2.0.6](https://github.com/rehlds/ReUnion/compare/legacy-archive...0.2.0.6)
---
# Legacy Beta-releases
## [`0.1.0.137`](https://github.com/rehlds/ReUnion/releases/tag/legacy-archive) - 2023-01-20
### Changed
- Major refactoring of `QueryLimiter`
## [`0.1.0.135`](https://github.com/rehlds/ReUnion/releases/tag/legacy-archive) - 2019-10-26
### Changed
- `API` expanded.
### Added
- Added IP Whitelist for `QueryLimiterExceptIP` setting.
## [`0.1.0.133`](https://github.com/rehlds/ReUnion/releases/tag/legacy-archive) - 2018-11-05
### Changed
- Improved protection against attacks. Requires latest `ReHlds`.
### Fixed
- Fixed buggy client freeze fix not working.
## [`0.1.0.130`](https://github.com/rehlds/ReUnion/releases/tag/legacy-archive) - 2018-11-05
### Fixed
- Fixed display of avatars
## [`0.1.0.129`](https://github.com/rehlds/ReUnion/releases/tag/legacy-archive) - 2018-11-05
### Fixed
- Fixed a bug in processing `query requests` (thx `BombermaG`). Most likely it has nothing to do with the `TAB problem`, but just in case.
## [`0.1.0.127`](https://github.com/rehlds/ReUnion/releases/tag/legacy-archive) - 2018-11-05
### Fixed
- Fixed beta errors.
### Added
- Now it runs HLTV and can separately filter requests from several ports of one IP (the number is specified in the config).
> [!WARNING]
> Don't forget to install hash salt.
## [`0.1.0.125`](https://github.com/rehlds/ReUnion/releases/tag/legacy-archive) - 2018-11-05
### Added
- Backported old `API` support.
## [`0.1.0.123`](https://github.com/rehlds/ReUnion/releases/tag/legacy-archive) - 2018-11-05
### Added
- New auth
## [`0.1.0.113`](https://github.com/rehlds/ReUnion/releases/tag/legacy-archive) - 2018-11-04
### Fixed
- Fixed bug with sending empty list of players when `QueryFloodBanTime` = `0` (thanks to `HUNTERsp4x`). Those who don't have `0` can stay on `112`.
## [`0.1.0.112`](https://github.com/rehlds/ReUnion/releases/tag/legacy-archive) - 2018-11-04
### Changed
- Some code refactoring
## [`0.1.0.92d`](https://github.com/rehlds/ReUnion/releases/tag/legacy-archive) - 2021-01-04
### Added
- Added config option QueryFloodBanLevel
### Fixed
- Fixed SmartSteamEmu authorization on linux servers
## [`0.1.0.92c`](https://github.com/rehlds/ReUnion/releases/tag/legacy-archive) - 2019-10-26
### Added
- Added some security checks.
### Changed
- Extended `API`.
## [`0.1.0.92`](https://github.com/rehlds/ReUnion/releases/tag/legacy-archive) - 2018-02-11
### Added
- Added `EnableQueryLimiter` option
### Changed
- `QueryFloodBanTime` can be set to 0 to block flood without ban
## [`0.1.0.89`](https://github.com/rehlds/ReUnion/releases/tag/legacy-archive) - 2018-01-07
### Fixed
- `Hotfix`: Requires `ReHLDS API` not lower than `3.4.X.X`.

View File

@ -1,4 +1,5 @@
# Reunion [![C/C++ CI](https://github.com/s1lentq/reunion/actions/workflows/build.yml/badge.svg)](https://github.com/s1lentq/reunion/actions/workflows/build.yml) [![GitHub release (by tag)](https://img.shields.io/github/downloads/s1lentq/reunion/latest/total)](https://github.com/s1lentq/reunion/releases/latest) ![GitHub all releases](https://img.shields.io/github/downloads/s1lentq/reunion/total) [![Percentage of issues still open](http://isitmaintained.com/badge/open/s1lentq/reunion.svg)](http://isitmaintained.com/project/s1lentq/reunion "Percentage of issues still open") [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
# ReUnion [![C/C++ CI](https://github.com/rehlds/ReUnion/actions/workflows/build.yml/badge.svg)](https://github.com/rehlds/ReUnion/actions/workflows/build.yml) [![GitHub release (by tag)](https://img.shields.io/github/downloads/rehlds/ReUnion/latest/total)](https://github.com/rehlds/ReUnion/releases/latest) ![GitHub all releases](https://img.shields.io/github/downloads/rehlds/ReUnion/total) [![Percentage of issues still open](http://isitmaintained.com/badge/open/rehlds/reunion.svg)](http://isitmaintained.com/project/rehlds/reunion "Percentage of issues still open") [![GitHub license](https://img.shields.io/github/license/rehlds/reunion.svg?longCache=true&style=flat-square)](https://github.com/rehlds/ReUnion/blob/master/LICENSE) [![GitHub issues](https://img.shields.io/github/issues/rehlds/reunion.svg?longCache=true&style=flat-square)](https://github.com/rehlds/ReUnion/issues) [![GitHub forks](https://img.shields.io/github/forks/rehlds/reunion.svg?longCache=true&style=flat-square)](https://github.com/rehlds/ReUnion/network) [![GitHub stars](https://img.shields.io/github/stars/rehlds/reunion.svg?longCache=true&style=flat-square)](https://github.com/rehlds/ReUnion/stargazers)
Metamod plugin that allows protocol 47 and 48 non-steam clients to connect to ReHLDS servers.<br/>
Reunion is a continuation of the DProto project adapted for ReHLDS.<br/>
@ -6,8 +7,8 @@ Reunion is a continuation of the DProto project adapted for ReHLDS.<br/>
You can try playing on one of many servers that are using Reunion: [Game Tracker](http://www.gametracker.com/search/?search_by=server_variable&search_by2=reu_version)
## Downloads
* [Release builds](https://github.com/s1lentq/reunion/releases)
* [Dev builds](https://github.com/s1lentq/reunion/actions/workflows/build.yml)
* [Release builds](https://github.com/rehlds/ReUnion/releases)
* [Dev builds](https://github.com/rehlds/ReUnion/actions/workflows/build.yml)
## Environment requirement
* ReHLDS API >= `3.10`

View File

@ -93,8 +93,9 @@ AuthVersion = 3
# Should be more than or equal to 16 chars length.
# AuthVersion < 3: If string is empty, hashing is not applied
# AuthVersion >= 3: If string is empty, init will be failed
# Recommended length is more than 31 chars
SteamIdHashSalt =
# Recommended length is 32 chars or more
# Specify 0 to explicitly disable hashing (not recommended)
SteamIdHashSalt =
# SC2009_RevCompatMode (0 / 1)
# Enable fix to make steamids generated for SC2009 compatible with revEmu. Can't be disabled with AuthVersion >= 3.

View File

@ -64,7 +64,7 @@ void SaltSteamId(authdata_t* authdata) {
if (g_ReunionConfig->getAuthVersion() < av_reunion2018)
szbuf.WriteLong(authdata->steamId);
if (g_ReunionConfig->getAuthVersion() > av_dproto)
szbuf.Write(authdata->authKey, authdata->authKeyLen);
szbuf.Write(authdata->authKey, Reunion_AuthKeyMaxLen(authdata));
szbuf.Write(g_ReunionConfig->getSteamIdSalt(), g_ReunionConfig->getSteamIdSaltLen());
@ -256,11 +256,9 @@ void SV_ConnectClient_hook(IRehldsHook_SV_ConnectClient* chain) {
}
#endif
g_ISteamGameServer = g_RehldsApi->GetServerData()->GetSteamGameServer();
client_auth_context_t ctx;
if (!g_ISteamGameServer)
g_ISteamGameServer = g_RehldsApi->GetServerData()->GetSteamGameServer();
g_CurrentAuthContext = &ctx;
chain->callNext();
g_CurrentAuthContext = nullptr;

View File

@ -37,17 +37,27 @@ int g_NumClientAuthorizers = 0;
const char *g_RevEmuCryptKey = "_YOU_SERIOUSLY_NEED_TO_GET_LAID_";
const uint32_t g_SteamEmuHashKey = 0xC9710266;
static uint32_t revHash(const char* str)
static uint32_t revHash(const char* str, int n = -1)
{
uint32_t hash = 0x4E67C6A7;
for (int cc = *str; cc; cc = *++str) {
for (int cc = *str; cc && n != 0; cc = *++str, --n) {
hash ^= (hash >> 2) + cc + 32 * hash;
}
return hash;
}
// deprecated auth version reunion2015 has a truncated ticket buffer
size_t Reunion_AuthKeyMaxLen(authdata_t* authdata)
{
const uint32_t MAX_RAWAUTHDATA_TRUNCATED = 16;
uint32_t authKeyMaxLen = (g_ReunionConfig->getAuthVersion() == av_reunion2015)
? min(authdata->authKeyLen, MAX_RAWAUTHDATA_TRUNCATED) : authdata->authKeyLen;
return authKeyMaxLen;
}
void RevEmuFinishAuthorization(authdata_t* authdata, const char* authStr, size_t authKeyMaxLen, bool stripSpecialChars)
{
uint32_t volumeId;

View File

@ -85,3 +85,4 @@ class CNoSteam48Authorizer : public IClientAuthorizer {
extern void Reunion_Init_Authorizers();
extern client_auth_kind Reunion_Authorize_Client(authdata_t* authdata);
extern const char* Reunion_GetAuthorizerName(client_auth_kind authKind);
extern size_t Reunion_AuthKeyMaxLen(authdata_t* authdata);

View File

@ -138,6 +138,7 @@ CReunionConfig* CReunionConfig::createDefault()
cfg->m_bFixBuggedQuery = true;
cfg->m_HLTVExceptIP = 0;
cfg->m_bEnableQueryLimiter = true;
cfg->m_queriesBanLevel = 400;
cfg->m_floodBanTime = QUERY_FLOOD_DEFAULT_BANTIME;
cfg->m_allowSplitPackets = false;
@ -319,8 +320,15 @@ bool CReunionConfig::parseCfgParam()
if (m_AuthVersion == av_dproto)
m_bEnableGenPrefix2 = false;
if (m_AuthVersion >= av_reunion2018) {
if (m_SteamIdHashSaltLen < 16) {
if (m_AuthVersion >= av_reunion2018)
{
// check logical negation value to disable salt hashing
bool bSteamIdNoHashSalt = (m_SteamIdHashSalt[0] == '0'
|| !Q_stricmp(m_SteamIdHashSalt, "no")
|| !Q_stricmp(m_SteamIdHashSalt, "false"));
if (!bSteamIdNoHashSalt && m_SteamIdHashSaltLen < 16)
{
LCPrintf(true, "SteamIdHashSalt is not set or too short\n");
return false;
}