{"id":20388216,"url":"https://github.com/libp2p/go-netroute","last_synced_at":"2025-05-15T15:07:36.299Z","repository":{"id":42470374,"uuid":"245915809","full_name":"libp2p/go-netroute","owner":"libp2p","description":"Routing table abstraction library","archived":false,"fork":false,"pushed_at":"2025-04-23T18:09:57.000Z","size":122,"stargazers_count":57,"open_issues_count":3,"forks_count":24,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-04-23T19:25:06.536Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","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/libp2p.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,"zenodo":null}},"created_at":"2020-03-09T01:11:46.000Z","updated_at":"2025-04-23T18:08:56.000Z","dependencies_parsed_at":"2024-08-26T12:26:28.654Z","dependency_job_id":"5cf36a78-be00-4ab6-80f8-8118539f5d56","html_url":"https://github.com/libp2p/go-netroute","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/libp2p%2Fgo-netroute","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libp2p%2Fgo-netroute/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libp2p%2Fgo-netroute/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libp2p%2Fgo-netroute/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/libp2p","download_url":"https://codeload.github.com/libp2p/go-netroute/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254364270,"owners_count":22058878,"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-15T03:07:58.161Z","updated_at":"2025-05-15T15:07:31.285Z","avatar_url":"https://github.com/libp2p.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Go Netroute\n===\n\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)\n[![](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://github.com/libp2p/libp2p)\n[![Build Status](https://travis-ci.com/libp2p/go-netroute.svg?branch=master)](https://travis-ci.com/libp2p/go-netroute)\n\nA cross-platform implementation of the [`gopacket/routing.Router`](https://godoc.org/github.com/google/gopacket/routing#Router) interface.\n\nThis library is derived from `gopacket` for linux, `x/net/route` for mac, and `iphlpapi.dll` for windows.\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Documentation](#documentation)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```\ngo get github.com/libp2p/go-netroute\n```\n\n## Usage\n\nTo be used for querying the local OS routing table.\n\n```go\nimport (\n    netroute \"github.com/libp2p/go-netroute\"\n)\n\nfunc main() {\n    r, err := netroute.New()\n    if err != nil {\n        panic(err)\n    }\n    iface, gw, src, err := r.Route(net.IPv4(127, 0, 0, 1))\n    fmt.Printf(\"%v, %v, %v, %v\\n\", iface, gw, src, err)\n}\n```\n\n## Documentation\n\nSee the [gopacket](https://github.com/google/gopacket/blob/master/routing/) interface for thoughts on design,\nand [godoc](https://godoc.org/github.com/libp2p/go-netroute) for API documentation.\n\n## Contribute\n\nContributions welcome. Please check out [the issues](https://github.com/libp2p/go-netroute/issues).\n\nCheck out our [contributing document](https://github.com/libp2p/community/blob/master/contributing.md) for more information on how we work, and about contributing in general. Please be aware that all interactions related to multiformats are subject to the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md).\n\nSmall note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.\n\n## License\n\n[BSD](LICENSE) © Will Scott, and the Gopacket authors (i.e. Google)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibp2p%2Fgo-netroute","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibp2p%2Fgo-netroute","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibp2p%2Fgo-netroute/lists"}