{"id":15745409,"url":"https://github.com/terassyi/seccamp-xdp","last_synced_at":"2025-05-08T07:42:52.723Z","repository":{"id":190139659,"uuid":"667116708","full_name":"terassyi/seccamp-xdp","owner":"terassyi","description":"hands-on to implement simple network load balancer using XDP","archived":false,"fork":false,"pushed_at":"2023-11-29T02:03:41.000Z","size":1494,"stargazers_count":26,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T17:25:41.811Z","etag":null,"topics":["ebpf","load-balancer","tutorial","xdp"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/terassyi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-16T17:34:14.000Z","updated_at":"2025-01-23T02:36:14.000Z","dependencies_parsed_at":"2024-06-21T15:26:04.671Z","dependency_job_id":"524d7200-3cb0-4fd9-9936-8b2a52ee7ad8","html_url":"https://github.com/terassyi/seccamp-xdp","commit_stats":null,"previous_names":["terassyi/seccamp-xdp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terassyi%2Fseccamp-xdp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terassyi%2Fseccamp-xdp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terassyi%2Fseccamp-xdp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terassyi%2Fseccamp-xdp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/terassyi","download_url":"https://codeload.github.com/terassyi/seccamp-xdp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253025327,"owners_count":21842409,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ebpf","load-balancer","tutorial","xdp"],"created_at":"2024-10-04T04:03:27.223Z","updated_at":"2025-05-08T07:42:52.705Z","avatar_url":"https://github.com/terassyi.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Seccamp-XDP\n\nこのリポジトリは 「XDP 入門」の講義資料及びサンプルコードです．\n\n\u003e **Note**\n\u003e 以下の資料は [SECCON Workshop Fukuoka](https://www.seccon.jp/2023/seccon_workshop/xdp.html) で使用したものです．\n\u003e この資料は XDP 入門の資料をアップデートしたものとなっています．\n\n[スライド - XDP で作って学ぶファイアウォールとロードバランサー](https://docs.google.com/presentation/d/1EUC4c68r0T36sDWz6M6zGk4WFGEKqZ6Q6F_peICAZng/edit?usp=sharing)\n\n---\n\n## 想定対象者\n\n- eBPF/XDP に興味がある方\n- ネットワークロードバランサーやファイアウォールの実装に興味がある方\n- とりあえず eBPF/XDP で動くものを作ってみたい方\n\n## 進め方\n\n\u003e **Warning**\n\u003e XDP プログラムを動作させるためには Linux 環境が必要です．\n\u003e Docker, WSL 環境では動作しません．\n\n本資料を使ったハンズオンは基礎編と実践編の二つのパートで構成されています．\nXDP の知識が少ない方は基礎編，実践編の順に進めることをお勧めします．\nXDP のコードを書いたことのある方は実践編のみでよいです．\n\n基礎編では `hello world` を出力するだけの簡単なプログラムからパケットカウンタの XDP プログラムを実装，動作させることで XDP プログラムの書き方や動かし方を学びます．\n\n実践編では最終的にシンプルなネットワークロードバランサーである `scmlb` を実装して動かすことをゴールとしています．\n`scmlb` は以下の機能を有します．\n\n- パケットカウンタ\n- ファイアウォール\n- 非常に単純な DoS 攻撃防御機能\n- ラウンドロビンによるロードバランサー\n\nデータプレーンは XDP で実装し，コントロールプレーンには Go 言語を利用しています．\n\n詳しくは [scmlb/README.md](https://github.com/terassyi/seccamp-xdp/tree/main/scmlb)を参照してください．\n\n\n## 構成\n\nディレクトリ構成は以下のようになっています．\n\n- app\n\t- ハンズオンで利用するテスト用アプリケーションのコード及びビルドスクリプト\n- scmlb\n\t- ハンズオンの実践編で利用するネットワークロードバランサーの実装\n\t- 詳しくは [scmlb/README.md](https://github.com/terassyi/seccamp-xdp/tree/main/scmlb)を参照してください．\n- topology\n\t- ハンズオンで利用するネットワークを作成するためのスクリプト群\n- tutorial\n\t- ハンズオンの基礎編で利用する XDP 関連コード\n\n## セットアップ\n\n必要なツールをセットアップします．\n\nセットアップは各々の環境によって異なるので必要に応じて実行してください．\n\n### ビルド/ネットワーク操作関連ツール\n\n```console\n$ make setup\n```\n\n### Go 言語\n\n本リポジトリで実装するロードバランサー(scmlb) のコントロールプレーンに Go 言語を利用しています．\n動作させるために バージョン `1.20` 以上の Go 言語が必要です．\nインストールには以下のコマンドを実行してください．\n\n```console\n$ make setup-golang\n```\n\n任意のバージョンを指定してインストールしたい場合は以下のように実行してください．\n\n```console\n$ make GO_VERSION=\u003cインストールしたいバージョン\u003e setup-golang\n```\n\n### bpftool\n\nbpftool は eBPF プログラムやマップを操作するためのコマンドです．\n以下のコマンドでインストールできます．\n\n```console\n$ make bpftool\n```\n\n### gRPC 関連\n\n本リポジトリで実装するロードバランサー(scmlb) でデーモンプログラム(scmlbd) と CLIプログラム(scmlb) の通信を gRPC を利用して実装しています．\n以下のコマンドで gRPC 関連のツールのセットアップができます．\n\n```console\n$ make -C scmlb setup\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterassyi%2Fseccamp-xdp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fterassyi%2Fseccamp-xdp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterassyi%2Fseccamp-xdp/lists"}