{"id":18739919,"url":"https://github.com/withlin/tcp_toa","last_synced_at":"2025-04-12T20:04:01.491Z","repository":{"id":167156415,"uuid":"642731041","full_name":"withlin/tcp_toa","owner":"withlin","description":"a sample ebpf TCP Options Address (TOA)","archived":false,"fork":false,"pushed_at":"2023-05-19T08:13:44.000Z","size":4,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-12T20:03:52.851Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/withlin.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-05-19T08:11:30.000Z","updated_at":"2024-11-24T14:09:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"9bf5c883-d02f-4c91-a6c5-19582830a113","html_url":"https://github.com/withlin/tcp_toa","commit_stats":null,"previous_names":["withlin/tcp_toa"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/withlin%2Ftcp_toa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/withlin%2Ftcp_toa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/withlin%2Ftcp_toa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/withlin%2Ftcp_toa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/withlin","download_url":"https://codeload.github.com/withlin/tcp_toa/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248625493,"owners_count":21135513,"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":[],"created_at":"2024-11-07T15:37:52.519Z","updated_at":"2025-04-12T20:04:01.468Z","avatar_url":"https://github.com/withlin.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tcp_toa\na sample ebpf TCP Options Address (TOA)\n\n\nTOA (TCP Option Address) 是一种 TCP 选项，用于在 TCP 报文中传输源 IP 地址和目标 IP 地址。下面是使用 eBPF 和 Golang 实现一个 TOA 的基本步骤：\n\n1. 了解 eBPF：eBPF（Extended Berkeley Packet Filter）是一种内核扩展机制，可以在内核空间中运行自定义的程序，用于实现网络过滤、性能分析等功能。\n\n2. 编写 eBPF 程序：使用 eBPF 工具链编写一个 eBPF 程序，用于截获 TCP 报文并提取 TOA 选项中的源 IP 地址和目标 IP 地址。\n\n3. 加载 eBPF 程序：使用 Golang 编写一个程序，用于加载 eBPF 程序到内核中，并将截获的 TCP 报文传递给 eBPF 程序进行处理。\n\n4. 解析 TOA 选项：在 eBPF 程序中解析 TOA 选项，并将源 IP 地址和目标 IP 地址传递给 Golang 程序进行处理。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwithlin%2Ftcp_toa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwithlin%2Ftcp_toa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwithlin%2Ftcp_toa/lists"}