-
Notifications
You must be signed in to change notification settings - Fork 238
central defense by ASN or IP4 mask #3592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Thanks!
I'd prefer not to hardcode services. |
ann0see
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very interesting! Thank you.
I believe that we'll have a long discussion here...
| emit updated(m_blockedAsns.size(), m_blockedCidrs.size()); | ||
| } | ||
|
|
||
| bool CentralDefense::tryParseIpv4CidrLine(const QString& line, Ipv4Cidr& outCidr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should write the code generic such that it supports ipv6 too
|
I’m concerned about moving network defense into an audio application, especially via a centralized blocklist. Beyond the performance overhead, this creates a central point of failure and raises privacy issues by sending client IPs to external APIs (once again). These 'wrecking ball' blocks (ASN/CIDR) risk significant collateral damage and are more precisely managed at the firewall level. Furthermore, the governance of a central 'bad actor' list is an unsolvable problem for a decentralized project—it creates a gatekeeper role that doesn't belong in the Jamulus audio engine. |
I would agree. While anyone is free to create their own fork with modifications to support their use case, I'm not convinced this kind of functionality belongs within Jamulus itself. |
|
|
||
|
|
||
| // --- Central Defense Integration --- | ||
| m_centralDefense = new CentralDefense(QUrl("https://jamulus.live/asn-ip-client-blocks.txt"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.

feat(server): Add CentralDefense for ASN/CIDR blocking
This introduces the
CentralDefensemodule, a server-side security mechanism designed to reject connections from specific Autonomous Systems (ASNs) and IP ranges (CIDRs). This allows a central service to filter out traffic from known abuse sources.Key Implementation Details:
synchronous "Bouncer" Logic:
CServer::OnNewConnectionimmediately after the mutex lock.Qt::DirectConnectionto ensure the block check completes synchronously.API Protection & Throttling:
ip-api.comfor ASN lookups but implements aggressive protection for the API provider.Configuration:
Checklist