{"id":16931880,"url":"https://github.com/leodido/traffico","last_synced_at":"2025-03-17T07:32:07.805Z","repository":{"id":54503817,"uuid":"495841253","full_name":"leodido/traffico","owner":"leodido","description":"Shape your traffic the BPF way","archived":false,"fork":false,"pushed_at":"2023-07-14T23:06:46.000Z","size":99,"stargazers_count":79,"open_issues_count":9,"forks_count":3,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-02-27T20:24:50.989Z","etag":null,"topics":["bpf","ebpf","isolation","network","tc"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leodido.png","metadata":{"files":{"readme":"README.txt","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":"2022-05-24T13:43:02.000Z","updated_at":"2024-12-27T08:36:52.000Z","dependencies_parsed_at":"2024-10-27T12:17:03.668Z","dependency_job_id":"55e5ff26-c321-4e91-882f-12932aa09fe8","html_url":"https://github.com/leodido/traffico","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leodido%2Ftraffico","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leodido%2Ftraffico/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leodido%2Ftraffico/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leodido%2Ftraffico/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leodido","download_url":"https://codeload.github.com/leodido/traffico/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243852438,"owners_count":20358270,"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":["bpf","ebpf","isolation","network","tc"],"created_at":"2024-10-13T20:44:54.915Z","updated_at":"2025-03-17T07:32:07.535Z","avatar_url":"https://github.com/leodido.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"                  _   _\n                 | | | | o\n _|_  ,_    __,  | | | |     __   __\n  |  /  |  /  |  |/  |/  |  /    /  \\_\n  |_/   |_/\\_/|_/|__/|__/|_/\\___/\\__/\n                 |\\  |\\\n                 |/  |/\n\nREADME\n\n    traffico is a collection of tools to shape traffic on a network using traffic control tc(8).\n    It can be used via a CLI tool (traffico) or as a CNI plugin (traffico-cni).\n    For a list of the available programs and what they do see the BUILT-IN PROGRAMS section.\n\n    The BUILT-IN PROGRAMS are very opinionated and made for the needs of the authors but the framework\n    is flexible enough to be used for other purposes. You can add programs to the bpf/ directory\n    to extend it to other use cases.\n\nCONTACT\n\n    If you have problems, question, ideas or suggestions, please contact us by\n    posting to https://github.com/leodido/traffico/issues.\n\nDOWNLOAD\n\n    To download the very latest source do this:\n\n    git clone https://github.com/leodido/traffico.git\n\nAUTHORS\n\n    Leonardo Di Donato\n    Lorenzo Fontana\n\nUSAGE\n\n    Traffico can be either used standalone or as a CNI plugin.\n\n    traffico\n        traffico is a CLI tool that can be used to load and unload the programs.\n        You can choose an interface and choose whether the program will be loaded in\n        \"INGRESS\" or \"EGRESS\".\n\n        Example usage:\n            traffico --ifname=eth0 --at=INGRESS block_private_ipv4\n\n    traffico-cni\n        traffico-cni is a meta CNI plugin that allows the traffico programs to be used in CNI.\n\n        Meta means that traffic-cni does not create any interface for you,\n        it is intended to be used as a chained CNI plugin.\n\n        The plugin block to use traffico-cni is very similar to how traffico is\n        used as a CLI tool.\n\n        {\n            \"type\": \"traffico-cni\",\n            \"program\": \"block_private_ipv4\",\n            \"attachPoint\": \"ingress\"\n        }\n\n        Here's an example CNI config file featuring traffico-cni.\n\n        {\n            \"name\": \"mynetwork\",\n            \"cniVersion\": \"0.4.0\",\n            \"plugins\": [\n                {\n                    \"type\": \"ptp\",\n                    \"ipMasq\": true,\n                    \"ipam\": {\n                        \"type\": \"host-local\",\n                        \"subnet\": \"10.10.10.0/24\",\n                        \"resolvConf\": \"/etc/resolv.conf\",\n                        \"routes\": [\n                            { \"dst\": \"0.0.0.0/0\" }\n                        ]\n                    },\n                    \"dns\": {\n                        \"nameservers\": [\"1.1.1.1\", \"1.0.0.1\"]\n                    }\n                },\n                {\n                    \"type\": \"firewall\"\n                },\n                {\n                    \"type\": \"traffico-cni\",\n                    \"program\": \"block_private_ipv4\",\n                    \"attachPoint\": \"ingress\"\n                },\n                {\n                    \"type\": \"tc-redirect-tap\"\n                }\n            ]\n        }\n\nBUILT-IN PROGRAMS\n\n    block_private_ipv4\n        block_private_ipv4 is a program that can be used to block\n        private IPv4 addresses subnets allowing only SSH access on port 22.\n\n    block_ip\n        block_ip is a program that drops packets with destination equal to the\n        input IPv4 address.\n\n    block_port\n        block_port is a program that drops packets with the destination port\n        equal to the input port number.\n\n    nop\n        nop is a simple program that does nothing.\n\nBUILD\n\n    To compile traffico from source you either provide your `vmlinux.h` in the\n    `vmlinux/` directory (default option) or you configure the project to\n    generate one from your current Linux kernel:\n\n    xmake f --generate-vmlinux=y\n\n    Now you will be able to build traffico from source by running:\n\n    xmake\n\n    In case you only want to compile the BPF programs you can do this:\n\n    xmake -b bpf\n\nTEST\n\n    To run the test suite you can do this:\n\n    xmake -b test\n    xmake run test\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleodido%2Ftraffico","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleodido%2Ftraffico","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleodido%2Ftraffico/lists"}