{"id":29251690,"url":"https://github.com/macrat/hpipe","last_synced_at":"2025-07-04T01:08:12.396Z","repository":{"id":53577613,"uuid":"514785149","full_name":"macrat/hpipe","owner":"macrat","description":"A simple tool for piping TCP connection over HTTP.","archived":false,"fork":false,"pushed_at":"2023-02-25T01:52:29.000Z","size":19,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-06-21T16:57:00.203Z","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/macrat.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":"2022-07-17T08:15:57.000Z","updated_at":"2024-04-13T20:52:51.000Z","dependencies_parsed_at":"2024-06-21T15:31:12.660Z","dependency_job_id":"9cc5ed55-1920-45b3-ba5f-670ba20948ea","html_url":"https://github.com/macrat/hpipe","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/macrat/hpipe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macrat%2Fhpipe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macrat%2Fhpipe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macrat%2Fhpipe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macrat%2Fhpipe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/macrat","download_url":"https://codeload.github.com/macrat/hpipe/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macrat%2Fhpipe/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263427316,"owners_count":23464845,"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":"2025-07-04T01:08:10.865Z","updated_at":"2025-07-04T01:08:12.351Z","avatar_url":"https://github.com/macrat.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"hpipe\n=====\n\nA simple tool for piping TCP connection over HTTP.\n\nThis program can use WebSocket or pure TCP connection using [Upgrade header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Upgrade).\nThe pure TCP has smaller overhead than WebSocket, but it does not work well in some environments.\nThe WebSocket is more compatible to most environments such as behind of a fire-wall or proxies.\n\n## Usage\n### server: HTTP -\u003e TCP\n\n``` bash\n$ hpipe -l :8080 example.com:22\n```\n\n```\n+----------+        +----------------+       +------------------+\n|          |  HTTP  |                |  TCP  |                  |\n|  client -----------\u003e    hpipe     ----------\u003e     server      |\n|          |        | (0.0.0.0:8080) |       | (example.com:22) |\n+----------+        +----------------+       +------------------+\n```\n\n### client: TCP -\u003e HTTP\n\n``` bash\n$ hpipe -l :1234 http://example.com:8080  # pure TCP mode\n$ hpipe -l :1234 ws://example.com:8080    # WebSocket mode\n```\n\n```\n+----------+       +----------------+        +--------------------+\n|          |  TCP  |                |  HTTP  |                    |\n|  client ----------\u003e    hpipe     -----------\u003e       hpipe       |\n|          |       | (0.0.0.0:1234) |        | (example.com:8080) |\n+----------+       +----------------+        +--------------------+\n```\n\n### client: stdio -\u003e HTTP\n\n``` bash\n$ hpipe http://example.com:8080  # pure TCP mode\n$ hpipe ws://example.com:8080    # WebSocket mode\n```\n\n```\n          +-----------------+        +--------------------+\nstdin -----\u003e                |  HTTP  |                    |\n          |      hpipe     -----------\u003e       hpipe       |\nstdout \u003c----                |        | (example.com:8080) |\n          +-----------------+        +--------------------+\n```\n\n\n## Connect SSH over HTTP proxy\n\n__NOTE__: This function is still work in progress.\n\n```\n                            HTTP Proxy\nclient                          +-+      server\n+------------------------+      | |      +-------------------------+\n|                        |      | |      |                         |\n| +----------+   +-----+ |      | |      |  +-----+   +----------+ |\n| |SSH client|--\u003e|hpipe|--------| |--------\u003e|hpipe|--\u003e|SSH server| |\n| +----------+   +-----+ |      | |      |  +-----+   +----------+ |\n|                        |      | |      |                         |\n+------------------------+      | |      +-------------------------+\n                                +-+\n```\n\n### Server\n\nStart Hpipe on your server.\n\n``` shell\n$ hpipe -l :8022 localhost:22\n```\n\n### Client\n\nSetup ssh-config and HTTP proxy address.\n\n``` shell\n$ cat ~/.ssh/config\nHost your-server.example.com\n\tPort 8022\n\tProxyCommand hpipe http://%h:%p\n\t#ProxyCommand hpipe ws://%h:%p\n\n$ echo 'export HTTP_PROXY=http://your-proxy.example.com' \u003e\u003e ~/.bashrc\n```\n\nConnect SSH.\n\n``` shell\n$ ssh your-server.example.com\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacrat%2Fhpipe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmacrat%2Fhpipe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacrat%2Fhpipe/lists"}