{"id":21048012,"url":"https://github.com/yc/unix2tcp","last_synced_at":"2026-04-21T20:03:09.475Z","repository":{"id":74707854,"uuid":"434186806","full_name":"YC/unix2tcp","owner":"YC","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-06T10:19:59.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-20T18:11:33.573Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/YC.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":"2021-12-02T11:05:02.000Z","updated_at":"2024-06-06T10:20:02.000Z","dependencies_parsed_at":"2023-12-15T23:55:38.635Z","dependency_job_id":"dc44f377-653f-455c-aeb6-2ad9a85ca508","html_url":"https://github.com/YC/unix2tcp","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YC%2Funix2tcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YC%2Funix2tcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YC%2Funix2tcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YC%2Funix2tcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YC","download_url":"https://codeload.github.com/YC/unix2tcp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243495489,"owners_count":20299921,"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-19T14:41:35.793Z","updated_at":"2026-04-21T20:03:09.435Z","avatar_url":"https://github.com/YC.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# unix2tcp\nThis Docker image relays data between a Unix Domain Socket source and an address (hostname:port) destination.\n\n## Example\nCreate and accept connections on /tmp/http.sock and relay them to 127.0.0.1 port 80:\n```\n./unix2tcp.sh /run/sock/http.sock 127.0.0.1:80 [\u003coptions\u003e]\n```\n\nThis is a wrapper around the following socat command:\n```\nsocat UNIX-LISTEN:/tmp/http.sock,fork,\u003coptions\u003e TCP-CONNECT:127.0.0.1:80\n```\n\nWhere `\u003coptions\u003e` may include specification of `user`, `group`, `mode` etc.\n\n## Why?\nSome applications only support listening over IP ports, and it may be non-trivial to add support for Unix Domain Sockets.\n\nMy use case:\n- Application and unix2tcp/socat are in Docker containers, on same network\n- Application listens over port, unix2tcp/socat listens over unix domain socket and relays data\n- Result: port is not exposed to host\n\n### Downsides/Issues of this approach\n- Source IPs are not retained\n- Not as clean as ip2unix\n\n## Notable projects in this area\n- ip2unix\n- https://hub.docker.com/r/alpine/socat\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyc%2Funix2tcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyc%2Funix2tcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyc%2Funix2tcp/lists"}