{"id":14235794,"url":"https://github.com/hkbakke/tc-gen","last_synced_at":"2025-08-11T00:32:49.937Z","repository":{"id":50514863,"uuid":"72431099","full_name":"hkbakke/tc-gen","owner":"hkbakke","description":"linux traffic shaping with fq_codel made easy","archived":false,"fork":false,"pushed_at":"2022-11-06T14:47:17.000Z","size":39,"stargazers_count":27,"open_issues_count":0,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-08-21T21:27:37.625Z","etag":null,"topics":["linux","networking","traffic-shaping"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/hkbakke.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-31T11:41:30.000Z","updated_at":"2024-06-14T14:24:58.000Z","dependencies_parsed_at":"2022-09-05T03:10:16.995Z","dependency_job_id":null,"html_url":"https://github.com/hkbakke/tc-gen","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hkbakke%2Ftc-gen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hkbakke%2Ftc-gen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hkbakke%2Ftc-gen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hkbakke%2Ftc-gen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hkbakke","download_url":"https://codeload.github.com/hkbakke/tc-gen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229478733,"owners_count":18079373,"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":["linux","networking","traffic-shaping"],"created_at":"2024-08-20T21:02:21.779Z","updated_at":"2024-12-13T01:30:44.525Z","avatar_url":"https://github.com/hkbakke.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# DEPRECATED\nThe functionality in this script is targeted towards fq_codel/htb. However, \ntime has passed and today the simpler to use `tc-cake` is the better\nalternative in most cases.\n\nThis script will probably still work for a long time, but will not receive any\nupdates.\n\n# tc-gen\ntc-gen is a wrapper around all the complexity of modern traffic shaping and\npolicing on linux. It tries to use best practices whenever possible while still\nbeing generic and easy to use. The script is using HTB with fq_codel to do\nthe heavy lifting.\n\nRun tc-gen without parameters to see more details.\n\n## Examples of common use\nShape egress to 25 mbit/s\n\n    tc-gen -i eth0 -u 25\nShape egress to 5 mbit/s and ingress to 10 mbit/s using IFB-interface\n\n    tc-gen -i eth0 -u 5 -d 10 -f ifb0\nShape egress to 1500 kbit/s and police ingress to 20 mbit/s\n\n    tc-gen -i eth0 -u 1500k -d 20M\nDisplay current configuration\n\n    tc-gen -i eth0\nRemove configuration\n\n    tc-gen -i eth0 -x\n\n## /etc/network/interfaces examples\n    # Simple DHCP WAN config\n    allow-auto eth1\n    iface eth1 inet dhcp\n        up /usr/local/bin/tc-gen -i ${IFACE} -u 10 -d 100 -f ifb0\n\n    # More advanced example with an additional tc filter exclude for\n    # UDP-encapsulated IPsec ESP-traffic to avoid double counting IPsec data on\n    # ingress\n    allow-auto bond0.12\n    iface bond0.12 inet dhcp\n        up /usr/local/bin/tc-gen -i ${IFACE} -u 10 -d 100 -f ifb0\n\n    # Add additional rules to the post-commands file (location can be overridden by -p)\n    echo '${TC} filter add dev ${IF_NAME} parent ffff: protocol ip prio 1 u32 match ip protocol 17 0xff match ip dport 4500 0xffff action pass' \u003e\u003e /etc/tc-gen/post-commands.bond0.12\n\n    # Example with egress shaping on gre-tunnel\n    allow-auto gre2\n    iface gre2 inet tunnel\n        address 10.0.1.0\n        netmask 255.255.255.254\n        local 10.0.2.2\n        endpoint 10.1.2.2\n        mode gre\n        mtu 1400\n        up /usr/local/bin/tc-gen -i ${IFACE} -u 25\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhkbakke%2Ftc-gen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhkbakke%2Ftc-gen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhkbakke%2Ftc-gen/lists"}