{"id":21110071,"url":"https://github.com/gandlafbtc/proxnut","last_synced_at":"2025-12-30T07:52:13.437Z","repository":{"id":170878888,"uuid":"646755469","full_name":"gandlafbtc/proxnut","owner":"gandlafbtc","description":"ProxNut is a Cashu proxy designed to protect or monetize web resources. Seamlessly integrate with a Cashu ecash wallet, allowing users to access protected resources using tokens.","archived":false,"fork":false,"pushed_at":"2023-09-27T10:53:19.000Z","size":818,"stargazers_count":24,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-06T00:01:53.769Z","etag":null,"topics":["bitcoin","cashu","lightning","privacy","proxy"],"latest_commit_sha":null,"homepage":"https://proxnut.com","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/gandlafbtc.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":"2023-05-29T09:12:45.000Z","updated_at":"2025-05-19T00:54:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"60d62f99-0453-4c1a-92ad-22b12cef7f48","html_url":"https://github.com/gandlafbtc/proxnut","commit_stats":{"total_commits":50,"total_committers":3,"mean_commits":"16.666666666666668","dds":0.26,"last_synced_commit":"d227cff29b0555c79b657cd2896cef9942e82ab2"},"previous_names":["gandlafbtc/proxnut"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gandlafbtc/proxnut","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gandlafbtc%2Fproxnut","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gandlafbtc%2Fproxnut/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gandlafbtc%2Fproxnut/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gandlafbtc%2Fproxnut/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gandlafbtc","download_url":"https://codeload.github.com/gandlafbtc/proxnut/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gandlafbtc%2Fproxnut/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260256221,"owners_count":22981804,"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":["bitcoin","cashu","lightning","privacy","proxy"],"created_at":"2024-11-20T00:57:43.960Z","updated_at":"2025-12-30T07:52:13.397Z","avatar_url":"https://github.com/gandlafbtc.png","language":"JavaScript","funding_links":[],"categories":["Projects"],"sub_categories":["X-Cashu"],"readme":"# Proxnut: a cashu proxy that asks for nuts to get right of passage\n\n⚠️This is a work in progress. Please do not use in production. Only test with small amounts.⚠️\n\n![logo](docs/PROXNUT_avatar.png)\n\n`Protect or monetize web resources with a Cashu ecash proxy.`\n\n---\n\n# ProxNut: Cashu Proxy for Web Requests\n\n**ProxNut** is a Cashu proxy designed to protect or monetize web resources. Seamlessly integrate with a Cashu ecash wallet, allowing users to access protected resources using tokens.\n\n## 🌟 Features\n\n- **Ecash Wallet Integration**: Seamlessly top up and spend tokens.\n- **Resource Protection**: Protect and monetize your web resources with ease.\n- **Privacy by default**: No accounts and no tracking. Leveraging ecash privacy.\n- **Open-Source**: Join our community and contribute to the project.\n\n## 🛠 Installation\n\nWhile the project is still in progress, you can test it using the code in the `bun` folder. For a comprehensive installation guide, including using Docker Compose and manual setup, refer to our [technical documentation](https://github.com/gandlafbtc/proxnut/wiki/).\n\n## 🔄 How It Works\n\nProxNut forwards requests only if they have a valid Cashu token attached to the X-Cashu header. Configuration options include mapping hosts, routes, setting fees, and specifying allowed mints.\n\n![setup](./docs/setup.png)\n\n## ⚙ Configuration\n\nThis proxy forwards requests only if they have a valid cashu token attached to the X-Cashu header. Configuration on mapping routes and how expensive routes are, can be made in the `dashboard`. You can also configure the allowed mints there.\n\n- **Route Mapping**: Define how requests are routed and the associated fees.\n- **Mints**: Add mints you run. Note: Currently, you can only use mints you run yourself due to the absence of a swap-out function for the proxy.\n\nFor detailed configuration instructions, check the [technical documentation](https://github.com/gandlafbtc/proxnut/wiki/).\n\n## 🚀 Usage\n\nRun the entire stack with Docker Compose or manually. The provided demo backend offers both unprotected and protected resources for testing.\n\n\n### How to run\n\nThe whole stack can be run with docker compose: \n\n1. `docker-compose up --build` \n\nthis will run the applications on the following ports:\n\n1. `frontend` on port `8080`\n1. `proxnut` on port `3003`\n1. `backend` on port `4444`\n\n\nor you can use the manual setup:\n\n1. install bun: \n```curl -fsSL https://bun.sh/install | bash```\n1. run the proxy: ```bun run start```\n1. if you haven't configured a backend yourself in the chapters above, there is a simple test server in the deno folder that is pre-configured. to run it, install deno: `curl -fsSL https://deno.land/x/install/install.sh | sh` - and then run the demo backend:  `deno run --allow-net --watch deno/server.ts`\n\n\nOn the demo backend, there is a unprotected resources, that routes freely (`/`) and there is a protected resource (`/test`) that asks for 1 satoshi per request.\n\n### Adding protected resources\n\nAccess the dashboard at: http://localhost:5515 . Here you can add a route that the proxy should forward. Make sure to include the local network host in the route you wish to route to!\n\n\u003e from: `/some/route` ---\u003e to: `http://localhost:4444/1` | fee: 1\n\n\n### Adding mints\nFinally, you can add the mints that you allow. \n\nTo add a mint, head to the dashboard at http://localhost:5515 and add a mint.\n\n### Integrate into frontend\n\nhere is an example on how to integrate proxnut into your frontend with the proxnut-wallet web component:\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\u003chead\u003e\n    \u003cmeta charset='utf-8'\u003e\n    \u003cmeta http-equiv='X-UA-Compatible' content='IE=edge'\u003e\n    \u003ctitle\u003ePROXNUT dummy\u003c/title\u003e\n    \u003cmeta name='viewport' content='width=device-width, initial-scale=1'\u003e\n    \u003c!-- 1. Import all necessary components --\u003e\n    \u003cscript type=\"module\" src=\"https://cdn.jsdelivr.net/npm/@proxnut/wallet-comp@0.2.0/dist/lib/@proxnut/wallet-comp.js\"\u003e\u003c/script\u003e\n  \u003cscript src=\"https://cdn.jsdelivr.net/npm/@proxnut/cashu-request@0.1.6/cashuRequest.js\"\u003e\u003c/script\u003e\n  \u003cscript src=\"https://cdn.jsdelivr.net/npm/@proxnut/cashu-request@0.1.6/cashuGoto.js\"\u003e\u003c/script\u003e\n\n\u003c/head\u003e\n\u003cbody\u003e\n    \u003cdiv style=\"position: absolute; right: 10px;\"\u003e\n        \u003cproxnut-wallet minturl=\"https://8333.space:3338\"\u003e\u003c/proxnut-wallet\u003e\n    \u003c/div\u003e\n    \u003c!-- 2. Add call the functions from your html interactive --\u003e\n    \u003cbutton onclick=\"goto()\" style=\"color: black; cursor: pointer;\"\u003e\n        follow link\n    \u003c/button\u003e\n    \u003cbutton onclick=\"request()\" style=\"color: black; cursor: pointer;\"\u003e\n        make an async request\n    \u003c/button\u003e\n\u003cscript\u003e\n// 3. Add required logic\n\n const successUnlock = async (response, e) =\u003e {\n    const contents = await response.text();\n    const data = await response.json();\n    alert(data)\n }\n\nconst goto = () =\u003e{\n    // cashuGoto will redirect to a new page, with cashu tokens attached as a query param\n    cashuGoto(1, 'localhost:3003/protected',()=\u003e{alert('no nuts!')})\n    \n}\nconst request = () =\u003e {\n    // cashuRequest will send an async request with the cashu token in the X-cashu header. \n    cashuRequest(1, 'localhost:3003/api/protected', successUnlock, ()=\u003e{alert('no nuts!')});\n}\n\u003c/script\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n\n\n```\n\n\n\n## 🤝 Contributing\n\nWe welcome contributions! If you'd like to contribute to ProxNut, please fork the repository and submit a pull request. For major changes, please open an issue first to discuss the proposed change.\n\n## 📜 License\n\nProxNut is licensed under the MIT License. See the `LICENSE` file for more details.\n\n\n---\n\nFor support, inquiries, or feedback, visit [ProxNut.com](https://proxnut.com), send us a message on [Telegram](https://t.me/+RqnidzaUl-tkMDRl) or open an [issue](https://github.com/gandlafbtc/proxnut/issues/new) on our GitHub Repository.\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgandlafbtc%2Fproxnut","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgandlafbtc%2Fproxnut","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgandlafbtc%2Fproxnut/lists"}