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

Add netcontrol #28

Merged
merged 25 commits into from
Nov 21, 2024
Merged

Add netcontrol #28

merged 25 commits into from
Nov 21, 2024

Conversation

pixup1
Copy link
Member

@pixup1 pixup1 commented Oct 16, 2024

Description

This PR adds full (or near-full) netcontrol functionnality, for managing device connections via nftables. It concerns both netcontrol itself and the components inside the backend needed to interface with it (that doesn't mean the entire Langate pipeline is working, just that the backend and netcontrol can communicate).

This also adds all the necessary documentation about netcontrol, the way it works, and the way it interfaces with the backend.

Related Issues

A number of issues need to be adressed before submitting this PR for review :
#16 #17 #18 #19 #20 #21 #22 #29

And probably some more that have not been opened yet.

Checklist

  • I have tested the changes locally and they work as expected.
  • I have tested the responsiveness of the changes and they work as expected.
  • I have assigned the pull request to the appropriate reviewer(s).
  • I have added labels to the pull request, if necessary.

@pixup1 pixup1 added enhancement New feature or request priority: emergency Netcontrol Netcontrol thing Back backend thing labels Oct 16, 2024
@KwikKill KwikKill marked this pull request as ready for review November 21, 2024 21:20
SkytAsul and others added 21 commits November 21, 2024 22:25
* Added connect_user, delete_user and set_mark methods

* Handled deleting non existent device exception + added logging

* Add nftables documentation

* Remove mark checking in backend + raise errors properly

* Change add device HTTP error to 500

* Add set for backwards compatibility with nftables v1.0.6

* Fix and clean up a few things

* Fix set_mark

* Add ip range match

* Update doc
* First attempt at limiting acces to fastapi

* Swith to bash

* Change to a nft rule

* Fix nft rule

* Clean netcontrol access rule

---------

Co-authored-by: Ecnama <[email protected]>
Co-authored-by: Claptrap <[email protected]>
@KwikKill KwikKill merged commit 8590c58 into dev Nov 21, 2024
4 checks passed
@KwikKill KwikKill deleted the netcontrol branch November 21, 2024 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Back backend thing enhancement New feature or request Netcontrol Netcontrol thing priority: emergency
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants