{"id":22287396,"url":"https://github.com/fooker/netns-proxy","last_synced_at":"2025-07-28T22:32:07.769Z","repository":{"id":51796380,"uuid":"369519786","full_name":"fooker/netns-proxy","owner":"fooker","description":"A simple and slim proxy to forward ports from and into linux network namespaces","archived":false,"fork":false,"pushed_at":"2025-07-26T21:33:39.000Z","size":61,"stargazers_count":15,"open_issues_count":6,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-27T01:20:59.862Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/fooker.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2021-05-21T11:56:11.000Z","updated_at":"2025-07-26T21:33:24.000Z","dependencies_parsed_at":"2025-05-19T20:22:51.545Z","dependency_job_id":"58affdc3-5047-4683-b949-d8cb6e220319","html_url":"https://github.com/fooker/netns-proxy","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/fooker/netns-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fooker%2Fnetns-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fooker%2Fnetns-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fooker%2Fnetns-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fooker%2Fnetns-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fooker","download_url":"https://codeload.github.com/fooker/netns-proxy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fooker%2Fnetns-proxy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267304502,"owners_count":24066756,"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","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-12-03T16:59:55.367Z","updated_at":"2025-07-28T22:32:07.757Z","avatar_url":"https://github.com/fooker.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# netns-proxy\n\nA simple and slim proxy to forward ports from and into linux network\nnamespaces.\n\n\n## Overview\n\n`netns-proxy` is a plain and simple proxy for TCP, UDP and SCTP that allows to\naccept connections in one network namespace and forwards them into another.\n\nThis allows to expose ports that are only accessible in one namespace to a\nsecond one. This provides a lightweight alternative to connecting namespace with\n`veth` interfaces which require address management and firewall rules for\nforwarding.\n\n`netns-proxy` does its job by opening a socket when it is started and switches\nto the target namespace before opening connections to the exposed server. This\nallows the accepting socket to exist in the original namespace while forwarded\nconnection happen in the specified namespace.\n\n\n## Installation\n\nYou can install the latest released version directly from [crates.io]:\n\n```bash\ncargo install netns-proxy\n```\n\n\n## How to Build\n\n### Prerequisites\n\n* Rust toolchain (rustc ≥ 1.60, cargo)\n* Linux with setns(2) support (kernel ≥ 3.0)\n* (Optional) Nix if you prefer reproducible builds\n\n### From Source\n\n```bash\n# Clone the source\ngit clone https://github.com/fooker/netns-proxy.git\ncd netns-proxy\n\ncargo build --release\n```\n\nThe binary will be in `target/release/netns-proxy`.\n\n### With nix\n\nRequires [nix](https://nixos.org/).\n\n```bash\n# Clone the source\ngit clone https://github.com/fooker/netns-proxy.git\ncd netns-proxy\n\nnix-build\n```\n\n\n## Usage\n\n```\nnetns-proxy [OPTIONS] \u003cnetns\u003e \u003ctarget\u003e\n```\n\n* `\u003cnetns\u003e` is the name of the network namespace from which forwarded connections\nare created.\n* `\u003ctarget\u003e` the target host and port to forward connections to.\n\nSee `netns-proxy --help` for full details and options.\n\n\n## Getting Help\n\nFeel free to open an [Issue](https://github.com/fooker/netns-proxy/issues) or\nwrite me a [Mail](mailto:fooker@lab.sh).\n\n\n## Contributing\n\n:+1: Thanks for your help to improve the project! Pleas don't hesitate to\ncreate an [Issue](https://github.com/fooker/netns-proxy/issues) if you find\nsomething is off or even consider creating a patch and propose a Pull-Request.\n\n\n## License\n\nThe project is licensed under the [MIT license](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffooker%2Fnetns-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffooker%2Fnetns-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffooker%2Fnetns-proxy/lists"}