Thank you for your interest in contributing to eBPF Firewall! This guide will help you get started with the contribution process.
- Fork the eBPF Firewall repository
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/ebpf-firewall.git
cd ebpf-firewall
- Install dependencies:
apt update && apt upgrade
apt install llvm clang libbpf-dev build-essential linux-headers-$(uname -r)
# If asm/types.h reference error occurs:
ln -s /usr/include/x86_64-linux-gnu/asm /usr/include/asm
- Build frontend:
cd web
npm install
npm run build
- Generate eBPF object files:
cd ../internal/ebpf
go generate
Create a new branch for your contribution:
git checkout -b your-branch-name
- Go code should follow the standard Go style guidelines
- TypeScript code should follow the project's ESLint configuration
- C code (eBPF) should follow the Linux kernel coding style
type(scope): body
Must be one of the following:
feat
: A new feature (minor version bump)fix
: A bug fix (patch version bump)perf
: A code change that improves performancerefactor
: A code change that neither fixes a bug nor adds a featuretest
: Adding missing tests or correcting existing testsdocs
: Documentation only changeschore
: Changes to the build process or auxiliary toolsbuild
: Changes that affect the build system or external dependenciesci
: Changes to CI configuration files and scriptsrevert
: Reverts a previous commitimprovement
: Improvements to existing features
Note: Adding BREAKING CHANGE:
in commit body will trigger a major version bump.
Must be one of the following:
ebpf
: Changes to eBPF programsusercomm
: Changes to user space communicationdataproc
: Changes to data processing logicfrontend
: Changes to frontend componentsui
: Changes to UI/UXdocs
: Changes to documentationbuild
: Changes to build configurationsdeploy
: Changes to deployment processother
: Other changes
Keep your fork up to date:
git remote add upstream https://github.com/danger-dream/ebpf-firewall.git
git fetch upstream
git merge upstream/main
- Push your changes to your fork
- Go to the original repository and create a Pull Request
- Follow the Pull Request template
- Wait for review and address any feedback
- All PRs should target the
dev
branch - Include tests for new features
- Update documentation when necessary
- Ensure all tests pass before submitting