Skip to content
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

feat: add rate limiter #201

Merged
merged 30 commits into from
Feb 2, 2024
Merged

feat: add rate limiter #201

merged 30 commits into from
Feb 2, 2024

Conversation

haveachin
Copy link
Owner

@haveachin haveachin commented Dec 28, 2023

This PR adds a filter feature to Infrared that allows Infrared to filter connections they are processed. In this PR a rate limiter filter is added to limit the amount of connections an IP can make per second.

This PR also brings linting, CI and build automation.

Blocked by #194

@haveachin haveachin self-assigned this Dec 28, 2023
@haveachin haveachin changed the base branch from master to revise December 28, 2023 23:57
@haveachin haveachin merged commit a981ca1 into revise Feb 2, 2024
5 checks passed
@haveachin haveachin deleted the feature/add-rate-limiter branch February 2, 2024 04:18
haveachin added a commit that referenced this pull request Feb 2, 2024
* revise: codebase

* fix: remove old .vscode and .github dir

* feat: cache status response packet

* add scripts folder with a simple test script inside of it

* simplefy `RespondeToServerRequest` a little

* improve readability hash implemetation of status cache

* Implement sending proxy protocol header to backend server for login requests.

* remove redundant test script

* remove pk.WriteTo(hash) statement and remove redundant Sum64 call of hash

* don't expose cacheResponse method for now

* refactor: one port to bind them all (#197)

* refactor: listener to only one

* refactor: into methods

* feat: add config file loading (#194)

* feat: add rate limiter (#201)

* feat: add server addresses

* feat: add config file loading

* fix: proxy protocol

Signed-off-by: haveachin <[email protected]>

* feat: add rate limiter

Signed-off-by: haveachin <[email protected]>

* refactor: middleware to filter

Signed-off-by: haveachin <[email protected]>

* refactor: more testability

* refactor: listener to only one

* refactor: config files

* feat: add config file loading

* refactor: filter for only one listener

* feat: add docs

* docs: add config docs

* refactor: file loading

* refactor: remove unnecessary mutex

* docs: clean up readme

* feat: add linting, ci and release automation

* docs: add rate limiter

* fix: linting errors

* fix: linting errors

* fix: linting errors

* chore: clean up

* refactor: ServerRequester

* feat: add zerolog

* chore: clean up

---------

Signed-off-by: haveachin <[email protected]>

---------

Signed-off-by: haveachin <[email protected]>
Co-authored-by: realDragonium <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant