Skip to content

Commit

Permalink
modules/m_listen: Skip client limits for localhost. matrix-construct#189
Browse files Browse the repository at this point in the history
  • Loading branch information
jevolk committed Feb 24, 2023
1 parent 7ffb847 commit 99f6289
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion modules/m_listen.cc
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,14 @@ _listener_proffer(net::listener &listener,
return false;
}

if(client::count(ipport) >= size_t(client::settings::max_client_per_peer))
// Trapdoor for reverse-proxies
const bool local
{
//TODO: lan cidr
net::is_loop(ipport)
};

if(!local && client::count(ipport) >= size_t(client::settings::max_client_per_peer))
{
log::dwarning
{
Expand Down

0 comments on commit 99f6289

Please sign in to comment.