{"id":20355777,"url":"https://github.com/zackproser/procrastiproxy","last_synced_at":"2025-04-12T02:50:50.901Z","repository":{"id":40047623,"uuid":"451291208","full_name":"zackproser/procrastiproxy","owner":"zackproser","description":"A simple configurable proxy that blocks distracting hosts","archived":false,"fork":false,"pushed_at":"2022-07-05T13:08:31.000Z","size":6471,"stargazers_count":12,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-25T22:35:12.084Z","etag":null,"topics":["distraction-blocker","focus","golang","productivity","proxy"],"latest_commit_sha":null,"homepage":"","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/zackproser.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}},"created_at":"2022-01-24T02:31:26.000Z","updated_at":"2024-10-28T06:37:45.000Z","dependencies_parsed_at":"2022-06-26T12:31:39.496Z","dependency_job_id":null,"html_url":"https://github.com/zackproser/procrastiproxy","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zackproser%2Fprocrastiproxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zackproser%2Fprocrastiproxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zackproser%2Fprocrastiproxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zackproser%2Fprocrastiproxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zackproser","download_url":"https://codeload.github.com/zackproser/procrastiproxy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248509197,"owners_count":21115960,"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":["distraction-blocker","focus","golang","productivity","proxy"],"created_at":"2024-11-14T23:14:04.108Z","updated_at":"2025-04-12T02:50:50.878Z","avatar_url":"https://github.com/zackproser.png","language":"Go","readme":"# Overview\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/zackproser/procrastiproxy)](https://goreportcard.com/report/github.com/zackproser/procrastiproxy)\n[![CircleCI](https://circleci.com/gh/zackproser/procrastiproxy.svg?style=shield)](https://circleci.com/gh/zackproser/procrastiproxy)\n\n![Procrastiproxy Open-Source reverse proxy](./docs/cover.png)\n\nProcrastiproxy is a simple, configurable proxy that helps you focus by blocking distracting websites.\n\n```\ncurl https://raw.githubusercontent.com/zackproser/procrastiproxy/main/install.sh | bash\n```\n\nExample: block reddit and twitter during work hours\n\n```\nprocrastiproxy --block reddit.com,twitter.com\n```\n\nProcrastiproxy implements an in-memory, mutable list for tracking hosts that should be blocked. This in-memory list allows for fast (`O(1)` or \"constant time\") look-ups of blocked hosts.\n\n```mermaid\ngraph TD\nA[User] --\u003e|Itches to browse something distracting| B(GET reddit.com/)\nB --\u003e C(Procrastiproxy)\nC --\u003e D{Should this request be allowed?}\nD --\u003e|It's not working hours| E(Allow Request)\nD --\u003e|It's time to work!| F(Access denied!)\n```\n\n# Getting started\n\n**Install with one command**\n\nTo install procrastiproxy as a command-line interface (CLI) tool, you can execute the install script:\n\n```\ncurl https://raw.githubusercontent.com/zackproser/procrastiproxy/main/install.sh | bash\n```\n\n**Install as a library**\n\nYou can import procrastiproxy into your own project:\n\n```golang\nimport github.com/zackproser/procrastiproxy\n```\n\n**Install via Go**\n\nYou can install and use procrastiproxy as a command line interface (CLI) tool:\n\n```bash\ngo install github.com/zackproser/procrastiproxy\n```\n\n**Build from source and run locally**\n\n`go build -o procrastiproxy ./cmd`\n\n`./procrastiproxy --port 8001`\n\n# Features\n\n## Configurable and dynamic block list\n\nThe block list is kept in-memory and is implemented as a map for fast lookups. You can set your baseline block list in `.procrastiproxy.yaml`. It can be modified at runtime via the admin control endpoints described below.\n\n## Admin control\n\nMake a request to the `\u003cserver-root\u003e/admin/` path, passing either `block` or `unblock` followed by a host, like so:\n\n### Add a new host to the block list\n\n`curl http://localhost:8001/admin/block/reddit.com`\n\n### Remove a host from the block list\n\n`curl http://localhost:8001/admin/unblock/reddit.com`\n\n## Office hours\n\nIf a request is made to procrastiproxy within the configured office hours, the request will be examined and blocked if its host is on the block list. If a request is made to procrastiproxy outside of the configured office hours, it will be allowed.\n\n# Running tests\n\nProcrastiproxy comes complete with tests to verify its functionality.\n\n`go test`\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzackproser%2Fprocrastiproxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzackproser%2Fprocrastiproxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzackproser%2Fprocrastiproxy/lists"}