mirror of
https://github.com/C24Be/AS_Network_List.git
synced 2026-01-25 23:35:41 +03:00
Add nftables support with config generator and IP checker (#22)
* Add nftables support with config generator and IP checker - Add generate_nft_blacklist.py for generating nftables configurations - Add check_nft_blacklist.py for verifying IPs against blacklist - Add blacklists_updater_nftables.sh for automated updates - Add blacklists_nftables/ directory with generated configs - Add GitHub Actions workflow for daily nftables updates - Update README.md with nftables usage instructions nftables is a modern replacement for iptables with better performance and lower memory usage, especially for large rulesets. This addition complements the existing iptables and nginx blacklist formats. * Added nftables scripts help
This commit is contained in:
33
.github/workflows/update_nftables.yml
vendored
Normal file
33
.github/workflows/update_nftables.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
name: Update nftables Blacklists
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '30 2 * * *' # Daily at 02:30 UTC
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
update-nftables:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Generate nftables blacklists
|
||||
run: |
|
||||
chmod +x blacklists_updater_nftables.sh
|
||||
./blacklists_updater_nftables.sh
|
||||
|
||||
- name: Commit and push if changed
|
||||
run: |
|
||||
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git add blacklists_nftables/
|
||||
git diff --quiet && git diff --staged --quiet || \
|
||||
(git commit -m "Auto-update nftables blacklists [skip ci]" && git push)
|
||||
|
||||
Reference in New Issue
Block a user