{"id":17117857,"url":"https://github.com/anderspitman/fibridge-proxy-js","last_synced_at":"2025-03-24T01:43:33.283Z","repository":{"id":81835800,"uuid":"147737014","full_name":"anderspitman/fibridge-proxy-js","owner":"anderspitman","description":null,"archived":false,"fork":false,"pushed_at":"2019-06-06T13:24:37.000Z","size":59,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-15T07:54:24.788Z","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/anderspitman.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":"2018-09-06T21:42:42.000Z","updated_at":"2024-05-22T12:11:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"65cd5b09-de3f-404b-b690-160c40c2f69b","html_url":"https://github.com/anderspitman/fibridge-proxy-js","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anderspitman%2Ffibridge-proxy-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anderspitman%2Ffibridge-proxy-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anderspitman%2Ffibridge-proxy-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anderspitman%2Ffibridge-proxy-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anderspitman","download_url":"https://codeload.github.com/anderspitman/fibridge-proxy-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245195927,"owners_count":20575936,"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-10-14T17:52:50.056Z","updated_at":"2025-03-24T01:43:33.259Z","avatar_url":"https://github.com/anderspitman.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"The point of this is to allow your browser to \"host\" files which can be\nstreamed over HTTP. This requires a proxy server to handle the HTTP requests\nand forward them to the browser over websockets.\n\nWhy would this be useful? If the user has a very large file (genomic data files\ncan easily be in the 20GB-200GB range), and you want to make\n[ranged requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests)\nto that file (ie only download specific chunks) as though it were hosted on a\nnormal server, this will allow that.\n\nNOTE: This is a very early work in progress and not intended to be used for\nanything production ready at the moment.\n\n# Example usage\n\nFirst start up the proxy server. We'll assume it's publicly available at\nexample.com. It's currently hard-coded to listen for HTTP on port 7000 and\nwebsocket connections on 8081.\n\n```bash\nnode proxy/index.js\n```\n\nCreate a \"server\" object in the browser:\n\n```javascript\nconst host = \"example.com\";\nconst rsServer = new reverserver.Server({ host, port: 8081 });\n```\n\n\"Host\" a couple files in the browser. See `server/dist/index.html` for an\nexample where the user selects a file from their computer.\n\n```javascript\nconst file1 = new File([\"Hi there\"], \"file1.txt\", {\n  type: \"text/plain\",\n});\n\nconst file2 = new File([\"I'm Old Gregg\"], \"file2.txt\", {\n  type: \"text/plain\",\n});\n\nrsServer.hostFile('/file1', file1);\nrsServer.hostFile('/file2', file2);\n```\n\nRetrieve the files using any http client:\n```bash\ncurl example.com:7000/file1\nHi there\ncurl example.com:7000/file2\nI'm Old Gregg\n```\n\nRanged requests work too:\n```bash\ncurl -H \"Range: bytes=0-2\" example.com:7000/file1\nHi\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanderspitman%2Ffibridge-proxy-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanderspitman%2Ffibridge-proxy-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanderspitman%2Ffibridge-proxy-js/lists"}