{"id":22353992,"url":"https://github.com/movableink/socketproxy","last_synced_at":"2025-03-26T12:28:29.695Z","repository":{"id":30719986,"uuid":"125805036","full_name":"movableink/socketproxy","owner":"movableink","description":"Expose a local node http handler via a remote URL","archived":false,"fork":false,"pushed_at":"2022-12-10T17:08:37.000Z","size":426,"stargazers_count":1,"open_issues_count":9,"forks_count":0,"subscribers_count":33,"default_branch":"master","last_synced_at":"2025-03-05T07:43:56.912Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/movableink.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-19T05:19:14.000Z","updated_at":"2020-06-10T12:55:21.000Z","dependencies_parsed_at":"2023-01-14T17:32:53.782Z","dependency_job_id":null,"html_url":"https://github.com/movableink/socketproxy","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/movableink%2Fsocketproxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/movableink%2Fsocketproxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/movableink%2Fsocketproxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/movableink%2Fsocketproxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/movableink","download_url":"https://codeload.github.com/movableink/socketproxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245652994,"owners_count":20650611,"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-12-04T13:10:43.622Z","updated_at":"2025-03-26T12:28:29.666Z","avatar_url":"https://github.com/movableink.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SocketProxy\n\nExpose a local node http server via a remote URL.\n\nMotivation: you run a local http-based node app that you want to expose to the world, and you also have the ability to run a public node app elsewhere.\n\nSocketProxy comes in two parts:\n\n* The SocketProxy client connects to the SocketProxy server via websockets and receives a public subdomain URL.\n* The SocketProxy server listens on an http/https port, maps the request subdomain to a SocketProxy client, and then proxies the http/https request to the SocketProxy client over websockets.\n\n## Usage\n\nThe server works out of the box, the client will need to be customized for your app. Starting the server:\n\n```bash\nbin/server --port=8080\n```\n\nSee `bin/server --help` for all options.\n\nAn example client can be found at `bin/example-client`.\n\n```javascript\nconst SocketProxy = require('socketproxy');\n\nconst app = express();\napp.use(...)\n\nconst proxy = new SocketProxy({\n  url: 'ws://socketproxy-server:8080',\n  app: app\n});\n\nproxy.connect().then((p) =\u003e {\n  console.log(\"Connected\", p.uri);\n});\n```\n\nReplace `socketproxy-server` above with the hostname of your SocketProxy server.\n\n## Alternatives\n\n`localtunnel` is a popular alternative for some similar use cases. Notable differences are that it is actually a full TCP tunnel while the SocketProxy client connects directly to an express/connect handler, so doesn't generate any extra connections on the client machine. SocketProxy was developed because `localtunnel` isn't able to encrypt TCP traffic, and requires the use of all of the server's ports. For high-throughput uses, `localtunnel` is likely quite a bit faster since it will use many TCP connections rather than a single multiplexed-via-json websockets connection.\n\n## License\n\nSee LICENSE.txt\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmovableink%2Fsocketproxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmovableink%2Fsocketproxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmovableink%2Fsocketproxy/lists"}