{"id":21296938,"url":"https://github.com/reddec/http2tcp","last_synced_at":"2025-10-30T06:21:21.285Z","repository":{"id":81702510,"uuid":"71069673","full_name":"reddec/http2tcp","owner":"reddec","description":"Expose your TCP application to WEB","archived":false,"fork":false,"pushed_at":"2016-10-17T19:24:35.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-12T05:05:42.981Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reddec.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-16T18:41:31.000Z","updated_at":"2022-05-30T10:25:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"08d21f57-c89b-403d-8220-bc6b3d8e0753","html_url":"https://github.com/reddec/http2tcp","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/reddec/http2tcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddec%2Fhttp2tcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddec%2Fhttp2tcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddec%2Fhttp2tcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddec%2Fhttp2tcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reddec","download_url":"https://codeload.github.com/reddec/http2tcp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddec%2Fhttp2tcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281756954,"owners_count":26556276,"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-10-30T02:00:06.501Z","response_time":61,"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-11-21T14:31:11.488Z","updated_at":"2025-10-30T06:21:21.269Z","avatar_url":"https://github.com/reddec.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Expose your TCP application to WEB\n\nYou (and maybe only you) can do it right now: expose your fancy application over \nhttp CONNECT tunnel.\n\nThis utility has very simple idea: it brings up http server and route CONNECT requests\nto backend over TCP connection\n\nLet me show you possible benefit:\n\nFor example we want to connect to our SSH over internet, but we can only do it through \nhttp connection. \n\nSolution:\n\n```\n\n+----------+                                    +----------+\n|          |         Http proxy                 |          |            +------+\n| Client   | -- CONNECT server:22 HTTP/1.1 --\u003e  | http2tcp | -- TCP --\u003e | SSHD |\n|          |                                    |          |            +------+\n+----------+                                    +----------+\n\n```\n\n\nYou have to ask me: why do this if we have Squid? Answer is simple: because it's much\nsimple to configure and control access. Remote client can connect only to specified\naddress\n\n### Installation\n\nJust as always\n\n`go install github.com/reddec/http2tcp`\n\nSometimes I put binary releases into Releases tab in github, but they maybe outdated\n\n### Usage:\n\n`http2tcp [-b binding] \u003cconfiguration files...\u003e`\n\n### Library:\n\n[See godoc](https://godoc.org/github.com/reddec/http2tcp)\n\n### Configuration:\n\n\n```\n# Yes, this is comment\n\n\n# ... empty line are allowed ....\n\n# serviceName:port      targetIp:targetPort\n# port for service is required (you may set to 80). In fact, this is just Request URI (RFC 2616, Section 5.1) =))\n\n# Example\n\nmyssh:22 127.0.0.1:22\n\n# oops, I forget: you can use environment variables as GoLang template keys\n# for example, if you have env HOSTNAME, you can use it like this (dummy example)\n\n{{.HOSTNAME}}:22 127.0.0.1:22\n\n# and the last - all powerfull of golang template are here (for-loops, if-else end e.t.c)\n```\n\n### API\n\nOfcourse, sometimes files are too bore. We have a HTTP Rest-like API (can be disable by --no-api flag)\n\n#### Add/update\n\nURL: `POST /api/` \nBody: JSON/XML/Form\nFields:\n\n* service\n* target\n\n#### Get all items\n\nURL: `GET /api/` \nResponse: json-map, where key - service, and value is target address\n\n#### Remove one\n\nURL: `DELETE /api/:service`\nNo response (201)\n\n#### Remove all\n\nURL: `DELETE /api/`\nNo response (201)\n\n### Docker\n\nYep, docker exists [here](https://hub.docker.com/r/reddec/http2tcp/)\n\nGoooooooood luck!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freddec%2Fhttp2tcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freddec%2Fhttp2tcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freddec%2Fhttp2tcp/lists"}