{"id":17537633,"url":"https://github.com/zenhack/powerbox-http-proxy","last_synced_at":"2025-09-13T13:29:54.991Z","repository":{"id":48671994,"uuid":"284556714","full_name":"zenhack/powerbox-http-proxy","owner":"zenhack","description":null,"archived":false,"fork":false,"pushed_at":"2023-03-03T19:51:04.000Z","size":45,"stargazers_count":4,"open_issues_count":2,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-23T21:06:47.252Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zenhack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"license.txt","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},"funding":{"github":"zenhack"}},"created_at":"2020-08-02T23:00:33.000Z","updated_at":"2024-01-01T19:39:26.000Z","dependencies_parsed_at":"2025-03-06T16:42:40.022Z","dependency_job_id":null,"html_url":"https://github.com/zenhack/powerbox-http-proxy","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/zenhack%2Fpowerbox-http-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenhack%2Fpowerbox-http-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenhack%2Fpowerbox-http-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenhack%2Fpowerbox-http-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zenhack","download_url":"https://codeload.github.com/zenhack/powerbox-http-proxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250514782,"owners_count":21443209,"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-20T20:42:21.119Z","updated_at":"2025-04-23T21:06:52.887Z","avatar_url":"https://github.com/zenhack.png","language":"Go","funding_links":["https://github.com/sponsors/zenhack"],"categories":[],"sub_categories":[],"readme":"`powerbox-http-proxy` is a daemon that is sometimes helpful for\nporting legacy applications that want HTTP access to [Sandstorm][1]. It\nacts as an HTTP proxy, and makes powerbox requests on-demand for domains\nthat the legacy application tries to access. It is used by the [Tiny\nTiny RSS Port](https://github.com/zenhack/ttrss-sandstorm)\n\n# Building\n\nInstall a recent Go toolchain and run:\n\n```\ngo build\n```\n\nThis will create an executable `powerbox-http-proxy`.\n\n# Configuration\n\nTo use `powerbox-http-proxy` with your application, you need to do the\nfollowing:\n\n- Build the daemon, per the above instructions.\n- Add a `\u003cscript\u003e` tag to your pages which includes\n  `powerbox-http-proxy.js` (from the root of this repository).\n- Arrange for the url `/_sandstorm/websocket` to be served by the\n  daemon; see below.\n- Arrange for your application to trust a root TLS cert generated by\n  the daemon; this is necessary to proxy HTTPS requests.\n\nThe daemon is mainly configured through environment variables:\n\n- `POWERBOX_PROXY_PORT` specifies the port that the daemon should listen\n  on for proxy requests; you should configure your application to use\n  `http://localhost:$POWERBOX_PROXY_PORT` as its proxy for both http\n  and https. Many applications will observe the variables `http_proxy`\n  and `https_proxy`, so you can often make this happen by just defining\n  those variables.\n- `POWERBOX_WEBSOCKET_PORT` specifies the port to listen on for connections\n  from the JavaScript helper. You will want to configure your web server\n  to point requests to `/_sandstorm/websocket` to this port. For example,\n  for nginx, assuming `POWERBOX_WEBSOCKET_PORT` is `3000`, you can use:\n\n        location /_sandstorm/websocket {\n          proxy_pass http://127.0.0.1:3000;\n          proxy_http_version 1.1;\n          proxy_set_header Upgrade $http_upgrade;\n          proxy_set_header Connection \"Upgrade\";\n          proxy_set_header Host $host;\n        }\n\n- `CA_CERT_PATH` is the path to which the daemon should write its root\n  certificate. Configure your application to trust the cert written\n  to this location.\n- `DB_TYPE`: The type of the database to use. Supported values are:\n   - `mysql` for MySQL/MariaDB\n   - `sqlite3` for SQLite.\n- `DB_URI`: The location of a mysql database in which to store the\n  daemon's private data. The format depends on the value of DB_TYPE.\n  - For SQLite, this should be the path to the database file.\n  - For MySQL, see\n    \u003chttps://github.com/go-sql-driver/mysql#dsn-data-source-name\u003e for\n    a description of the format.\n\n[1]: https://sandstorm.io\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzenhack%2Fpowerbox-http-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzenhack%2Fpowerbox-http-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzenhack%2Fpowerbox-http-proxy/lists"}