Skip to content

tarpit feature #8

@kirinrastogi

Description

@kirinrastogi

Add a nonblocking tarpit. A tarpit is a way to slow down requests responses to stop bots from sending requests so frequently, it cannot consume extra capacity by sleeping.

The challenge here is to not close the sockets after they go out of scope in the epoll iteration loop. I need to figure out rust lifetimes to borrow them in the tarpit data structure until they are removed & responded to.

The drop fn that gets called at the end of the TcpStream lifetime calls close on the socket's file descriptor, so I need to use lifetime specifiers to prevent this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions