Filter Garry'sMod built-in HTTP requests with a lua hook.
require("http_filter")
local deny_rules = {
{ domain = "google.com", method = "GET" },
{ domain = "twitter.com", method = "POST" },
}
hook.Add("OnHTTPRequest", "filter", function(url, method)
for _, rule in pairs(deny_rules) do
if url:match(rule.domain) and method == rule.method then
return true -- deny http request
end
end
end)
- Get premake add it to your
PATH
- Get garrysmod_common (with
git clone https://github.com/danielga/garrysmod_common --recursive --branch=x86-64-support-sourcesdk
) and set an env var calledGARRYSMOD_COMMON
to the path of the local repo - Run
premake5 gmake --gmcommon=$GARRYSMOD_COMMON
in your local copy of this repo - Navigate to the makefile directory (
cd /projects/linux/gmake
orcd /projects/macosx/gmake
) - Run
make config=releasewithsymbols_x86_64
- Get premake add it to your
PATH
- Get garrysmod_common (with
git clone https://github.com/danielga/garrysmod_common --recursive --branch=x86-64-support-sourcesdk
) and set an env var calledGARRYSMOD_COMMON
to the path of the local repo - Run
premake5 vs2019
in your local copy of this repo - Navigate to the project directory
cd /projects/windows/vs2019
- Open the .sln in Visual Studio 2019+
- Select Release, and either x64 or x86
- Build