Compare commits

..
Author SHA1 Message Date
jenz 420a56c8c4 adding extra logging messages as a delay mechanism so nosteamers netaddress have enough time to be ready 2026-08-28 11:07:43 +01:00
jenz 5e262c573a copy pasting the password from the forward back to the connect extension so that the webclient can have it be used 2026-07-24 10:01:37 +01:00
jenz df4b1b0aa7 did not need this any more 2026-07-23 15:00:35 +01:00
jenz dfc25da57a moved webclient name generation over to the connect extension. fixed pending steam ID. name is tracked with cvar value. name also sets the steamID 2026-07-23 14:58:45 +01:00
jenz 4c7ec14d52 finally removed the logging and removed the duplicate case from begin auth session hook. probably fine 2026-06-25 14:32:41 +01:00
jenz 0aab8e0bd6 adding support for switching steamID for the nosteam webclients 2026-06-05 23:54:25 +01:00
jenz 86c714fb1b updated gamedata and updated extension to kick dead left over sessions that would be caused by being blocked by ISP on first connect to to server and then on second connect using a VPN instead. also changes how nosteamers attempting to spoof are handled so that a nosteamer could change IP address on a reconnect and still be allowed in 2026-03-19 15:38:02 +00:00
jenz 3a126db081 re-applying beginauthsession and endauthsession 2026-02-16 14:14:42 +00:00
jenz 0b5306f689 i am still keeping the log messages enabled for now. this extra begin auth session check should still work for nosteamers while being able to re-authenticate steam players with steam 2026-02-15 18:37:52 +00:00
jenz 00c4ee1521 to hell with it, committing the log messages 2026-01-27 23:27:50 +00:00
jenz aa115c645e adding a few infos in readme 2026-01-26 13:42:57 +00:00
jenz 723d6e07b9 actual changes applied 2026-01-26 07:54:21 +00:00
9 changed files with 927 additions and 349 deletions
+1
View File
@@ -3,3 +3,4 @@ Containerfile
.venv .venv
safetyhook safetyhook
.env .env
secret.h
+11
View File
@@ -31,3 +31,14 @@ Note that this function is called before the client has a client index on the se
# [Builds](https://builds.limetech.io/?project=connect) # [Builds](https://builds.limetech.io/?project=connect)
# helpful commands for building on the unloze machine
## the environment
export PATH=":/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:/usr/X11/bin:/home/gameservers/.local/bin":/sbin:/bin:
export SOURCEMOD=/home/gameservers/automate/sourcemod_1.13.0.7207
export MMSOURCE=/home/gameservers/automate/mmsource-1.13
## building
rm -r -f build; mkdir build; cd build; python ../configure.py --sdks css --targets=x86 --enable-optimize; ambuild; cd ..
+2 -2
View File
@@ -40,8 +40,8 @@ for cxx_task in Extension.extensions:
pdblog.write(cxx_task.debug.path + '\n') pdblog.write(cxx_task.debug.path + '\n')
pdblog.close() pdblog.close()
CopyFiles('connect.games.txt', folders['addons/sourcemod/gamedata']) CopyFiles('connect2.games.txt', folders['addons/sourcemod/gamedata'])
CopyFiles('connect.inc', folders['addons/sourcemod/scripting/include']) CopyFiles('connect.inc', folders['addons/sourcemod/scripting/include'])
CopyFiles('connect.sp', folders['addons/sourcemod/scripting']) CopyFiles('connect.sp', folders['addons/sourcemod/scripting'])
debug_info = [] debug_info = []
+10
View File
@@ -4,7 +4,17 @@
#define _connect_included #define _connect_included
enum EConnect
{
k_OnClientPreConnectEx_Reject = 0,
k_OnClientPreConnectEx_Accept = 1,
k_OnClientPreConnectEx_Async = -1
};
forward bool OnClientPreConnectEx(const char[] name, char password[255], const char[] ip, const char[] steamID, char rejectReason[255]); forward bool OnClientPreConnectEx(const char[] name, char password[255], const char[] ip, const char[] steamID, char rejectReason[255]);
native bool ClientPreConnectEx(const char[] sSteam32ID, EConnect RetVal, char sRejectReason[255]);
native bool SteamClientAuthenticated(const char[] sSteam32ID);
public Extension __ext_Connect = public Extension __ext_Connect =
{ {
+85 -87
View File
@@ -1,87 +1,85 @@
"Games" "Games"
{ {
"#default" "#default"
{ {
"#supported" "#supported"
{ {
"engine" "dods" "engine" "dods"
"engine" "css" "engine" "css"
"engine" "hl2dm" "engine" "hl2dm"
"engine" "tf2" "engine" "tf2"
} }
"Offsets" "Offsets"
{ {
"ISteamGameServer__BeginAuthSession" "ISteamGameServer__BeginAuthSession"
{ {
"linux" "26" "linux" "26"
"linux64" "26" "linux64" "26"
"windows" "26" "windows" "26"
"windows64" "26" "windows64" "26"
} }
"ISteamGameServer__EndAuthSession" "ISteamGameServer__EndAuthSession"
{ {
"linux" "27" "linux" "27"
"linux64" "27" "linux64" "27"
"windows" "27" "windows" "27"
"windows64" "27" "windows64" "27"
} }
"CheckMasterServerRequestRestart_Steam3ServerFuncOffset" "CheckMasterServerRequestRestart_Steam3ServerFuncOffset"
{ {
"windows" "240" "windows" "240"
"windows64" "299" "windows64" "299"
} }
} }
"Signatures" "Signatures"
{ {
"Steam3Server" "Steam3Server"
{ {
"library" "engine" "library" "engine"
"linux" "@_Z12Steam3Serverv" "linux" "@_Z12Steam3Serverv"
"linux64" "@_Z12Steam3Serverv" "linux64" "@_Z12Steam3Serverv"
} }
"CBaseServer__ConnectClient" "CBaseServer__ConnectClient"
{ {
"library" "engine" "library" "engine"
"linux" "@_ZN11CBaseServer13ConnectClientER8netadr_siiiiPKcS3_S3_i" "linux" "@_ZN11CBaseServer13ConnectClientER8netadr_siiiiPKcS3_S3_i"
"linux64" "@_ZN11CBaseServer13ConnectClientER8netadr_siiiiPKcS3_S3_i" "linux64" "@_ZN11CBaseServer13ConnectClientER8netadr_siiiiPKcS3_S3_i"
"windows" "\x55\x8B\xEC\x81\xEC\x24\x05\x00\x00\x53\x56\x57\x68\x2A\x2A\x2A\x2A" "windows" "\x55\x8B\xEC\x81\xEC\x24\x05\x00\x00\x53\x56\x57\x68\x2A\x2A\x2A\x2A"
"windows64" "\x48\x89\x5C\x24\x2A\x44\x89\x4C\x24\x2A\x55\x56\x57\x41\x54\x41\x55\x41\x56\x41\x57\x48\x81\xEC\x80\x05\x00\x00" "windows64" "\x48\x89\x5C\x24\x2A\x44\x89\x4C\x24\x2A\x55\x56\x57\x41\x54\x41\x55\x41\x56\x41\x57\x48\x81\xEC\x80\x05\x00\x00"
} }
"CBaseServer__RejectConnection" "CBaseServer__RejectConnection"
{ {
"library" "engine" "library" "engine"
"linux" "@_ZN11CBaseServer16RejectConnectionERK8netadr_siPKc" "linux" "@_ZN11CBaseServer16RejectConnectionERK8netadr_siPKc"
"linux64" "@_ZN11CBaseServer16RejectConnectionERK8netadr_siPKc" "linux64" "@_ZN11CBaseServer16RejectConnectionERK8netadr_siPKc"
"windows" "\x55\x8B\xEC\x81\xEC\x04\x05\x00\x00\x57" "windows" "\x55\x8B\xEC\x81\xEC\x04\x05\x00\x00\x57"
"windows64" "\x48\x89\x5C\x24\x2A\x48\x89\x6C\x24\x2A\x48\x89\x74\x24\x2A\x57\x48\x81\xEC\x50\x05\x00\x00" "windows64" "\x48\x89\x5C\x24\x2A\x48\x89\x6C\x24\x2A\x48\x89\x74\x24\x2A\x57\x48\x81\xEC\x50\x05\x00\x00"
} }
"CBaseServer__CheckMasterServerRequestRestart" "CBaseServer__CheckMasterServerRequestRestart"
{ {
// "%cMasterRequestRestart" "library" "engine"
"library" "engine" "windows" "\x55\x8B\xEC\x83\xEC\x1C\x53\x57\x33\xD2"
"windows" "\x55\x8B\xEC\x83\xEC\x1C\x53\x57\x33\xD2" "windows64" "\x4C\x8B\xDC\x49\x89\x5B\x2A\x49\x89\x6B\x2A\x56\x57\x41\x54\x41\x56\x41\x57\x48\x83\xEC\x60\x48\x8B\x05\x2A\x2A\x2A\x2A\x48\x8D\x1D"
"windows64" "\x4C\x8B\xDC\x49\x89\x5B\x2A\x49\x89\x6B\x2A\x56\x57\x41\x54\x41\x56\x41\x57\x48\x83\xEC\x60\x48\x8B\x05\x2A\x2A\x2A\x2A\x48\x8D\x1D" }
}
} "CSteam3Server__OnValidateAuthTicketResponse"
} {
"tf" "library" "engine"
{ "linux" "@_ZN13CSteam3Server28OnValidateAuthTicketResponseEP28ValidateAuthTicketResponse_t"
"Signatures" }
{
"CBaseServer__CheckMasterServerRequestRestart" "CBaseClient__SetSteamID"
{ {
"library" "engine" "library" "engine"
// "%cMasterRequestRestart" "linux" "@_ZN11CBaseClient10SetSteamIDERK8CSteamID"
"windows" "\x55\x8B\xEC\x83\xEC\x18\x53\x57\x33\xD2\x8B\xF9\x8B\x0D\x2A\x2A\x2A\x2A\x89\x55\xE8\x89\x55\xEC\x89\x55\xF4\x8B\x41\x08" }
"windows64" "\x4C\x8B\xDC\x49\x89\x5B\x10\x49\x89\x6B\x18\x56\x57\x41\x54\x41\x56\x41\x57\x48\x83\xEC\x60\x48\x8B\x05\x2A\x83\x20\x00" }
} }
} }
}
}
+802 -258
View File
File diff suppressed because it is too large Load Diff
+12
View File
@@ -55,6 +55,13 @@ public:
*/ */
//virtual void SDK_OnPauseChange(bool paused); //virtual void SDK_OnPauseChange(bool paused);
/**
* @brief This is called once all known extensions have been loaded.
* Note: It is is a good idea to add natives here, if any are provided.
*/
virtual void SDK_OnAllLoaded();
/** /**
* @brief this is called when Core wants to know if your extension is working. * @brief this is called when Core wants to know if your extension is working.
* *
@@ -110,6 +117,11 @@ public: \
ret (name##Class::* name##Class::name##_Actual)(p1type, p2type, p3type, p4type, p5type, p6type, p7type, p8type, p9type) = NULL; \ ret (name##Class::* name##Class::name##_Actual)(p1type, p2type, p3type, p4type, p5type, p6type, p7type, p8type, p9type) = NULL; \
ret name##Class::name(p1type p1name, p2type p2name, p3type p3name, p4type p4name, p5type p5name, p6type p6name, p7type p7name, p8type p8name, p9type p9name) ret name##Class::name(p1type p1name, p2type p2name, p3type p3name, p4type p4name, p5type p5name, p6type p6name, p7type p7name, p8type p8name, p9type p9name)
#define DETOUR_MEMBER_MCALL_CALLBACK(name, classptr) \
((name##Class *)classptr->*(&name##Class::name))
#define DETOUR_MEMBER_MCALL_ORIGINAL(name, classptr) \
((name##Class *)classptr->*(name##Class::name##_Actual))
struct mfpDetails { struct mfpDetails {
void *addr; void *addr;
intptr_t adjustor; intptr_t adjustor;
+2
View File
@@ -0,0 +1,2 @@
#pragma once
#define NAME_SALT "your-salt-here"
+2 -2
View File
@@ -40,8 +40,8 @@
#define SMEXT_CONF_NAME "Connect" #define SMEXT_CONF_NAME "Connect"
#define SMEXT_CONF_DESCRIPTION "Forward for early connection" #define SMEXT_CONF_DESCRIPTION "Forward for early connection"
#define SMEXT_CONF_VERSION SM_FULL_VERSION #define SMEXT_CONF_VERSION SM_FULL_VERSION
#define SMEXT_CONF_AUTHOR "Asher \"asherkin\" Baker" #define SMEXT_CONF_AUTHOR "Asher \"asherkin\" Baker + jenz + zacade"
#define SMEXT_CONF_URL "http://limetech.org/" #define SMEXT_CONF_URL "https://git.unloze.com/UNLOZE/sm-ext-connect"
#define SMEXT_CONF_LOGTAG "CONNECT" #define SMEXT_CONF_LOGTAG "CONNECT"
#define SMEXT_CONF_LICENSE "GPL" #define SMEXT_CONF_LICENSE "GPL"
#define SMEXT_CONF_DATESTRING __DATE__ #define SMEXT_CONF_DATESTRING __DATE__