{"id":17134379,"url":"https://github.com/brianium/patroclus","last_synced_at":"2025-04-13T08:55:25.387Z","repository":{"id":51520172,"uuid":"235623566","full_name":"brianium/patroclus","owner":"brianium","description":":two_men_holding_hands: Is that a spy!?!? No! It's Patroclus!","archived":false,"fork":false,"pushed_at":"2021-05-11T12:19:38.000Z","size":2721,"stargazers_count":31,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T22:46:54.011Z","etag":null,"topics":["clojure","clojurescript","electron","macos","packet-capture"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brianium.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-22T17:12:35.000Z","updated_at":"2024-08-14T13:10:12.000Z","dependencies_parsed_at":"2022-08-02T23:15:53.785Z","dependency_job_id":null,"html_url":"https://github.com/brianium/patroclus","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianium%2Fpatroclus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianium%2Fpatroclus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianium%2Fpatroclus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianium%2Fpatroclus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brianium","download_url":"https://codeload.github.com/brianium/patroclus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248688544,"owners_count":21145763,"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":["clojure","clojurescript","electron","macos","packet-capture"],"created_at":"2024-10-14T19:44:44.559Z","updated_at":"2025-04-13T08:55:25.356Z","avatar_url":"https://github.com/brianium.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"patroclus.gif\" /\u003e\n\t\u003cbr /\u003e\n\t\u003cimg src=\"patroclus.png\" /\u003e\n\u003c/p\u003e\n\n\u003e Even though twenty such as you (probably referring to distracting things on the internet) had come in against me, they would all have been broken beneath my spear\n\n## Why?\n\nThe internet can be a beautiful place. It can be a place where knowledge and information are exchanged openly and freely. It allows us to instantly communicate with fellow humans the world across. We can form communities without physical borders!\n\nSadly, there is always a meme site, a game, or a thrilling conversation taking place to distract you from the objective task at hand. Sometimes you want to work, but you are too weak to abstain from the allure of gifs and depressing news.\n\nPatroclus watches your internet traffic and gives you a friendly nudge to stay on task. He never prevents, interferes, or tattles. He just sticks by your side to motivate you.\n\n## What?\n\nThis is what you get:\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"notification.png\" /\u003e\n\u003c/p\u003e\n\n\nThats right! Friendly notifications from a dear friend concerned about the time you waste on the internet!\n\n## Usage\n\n*Note: Patroclus has been built solely for macOS*\n\nPer the note on permissions below, the first thing Patroclus will do is ask to open permissions up on the Berkley Packet Filter.\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"sudo-prompt.png\" /\u003e\n\u003c/p\u003e\n\nMost of Patroclus' life will be spent in the tray on startup.\n\n\u003cp\u003e\n\t\u003cimg src=\"tray.png\" /\u003e\n\u003c/p\u003e\n\n### Options\n\nPatroclus is focused on one thing: giving you a pep talk when you visit a website you would rather not be visiting.\n\nBy clicking the tray menu option `Configure domains`, you will be greeted by the following screen:\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"configure-domains.png\" /\u003e\n\u003c/p\u003e\n\nWhen `Save` is clicked, IP addresses for the given domains will be resolved and Patroclus\nwill begin keeping a watchful eye on visits to these addresses.\n\n### Permissions\n\nPermission is necessary to monitor network traffic. In order for Patroclus to keep a watchful eye\non your internet activities, he will need permission - much like a real friend!\n\nWhen Patroclus starts up, he will ask for permission to make the following change:\n\n```\n$ sudo chmod o+r /dev/bpf*\n```\n\nThis will allow reading of the [Berkley Packet Filter](https://en.wikipedia.org/wiki/Berkeley_Packet_Filter), and is just\nwhat Patroclus needs.\n\n### Gotchas\n\nPatroclus is useless without notifications. If you have notifications disabled or \"Do Not Disturb\" turned on, then Patroclus' hands will be tied.\n\nPatroclus will wait for a period of 10 min before notifying about a domain that he has already notified you about. Since he is informed by sniffing packets, you may be surprised when you are notified (maybe by a background process or another site embedding a tracking pixel from Facebook?).\n\nIf these problems become annoying for me, I will certainly fix them. Otherwise pull requests are welcome :)\n\n## Building\n\nInstall Node dependencies:\n\n    npm install\n\n### Development\n\n    clojure -A:dev\n\t\nIf you are using [CIDER](https://github.com/clojure-emacs/cider) for development, you should be able to leverage `cider-jack-in-clojurescript` as normal. The included `.dir-locals.el` should be configured to allow things to just work.\n\n### Release\n\n    clojure -A:main\n    clojure -A:renderer\n    npm run package\n\n### Run tests from command line\n\n    clojure -A:test\n\n\n## Retrospective\n\nClojure(Script) continues to be a joy to work with.\n\nI used [core.async](https://github.com/clojure/core.async) for message passing and it couldn't have been more delightful. Organizing packets as a stream of network events was a GOOD TIME.\n\n[Electron](https://www.electronjs.org/) made things dumb easy in exchange for a rather large filesize. Trade-offs amirite?\n\nI couldn't really find a gui notification library for Java/Clojure that seemed like what I was after. Most of the Java based packet sniffing libraries looked cumbersome to work with, and the nodejs lib [cap](https://www.npmjs.com/package/cap) was easy to use and bundle with the finished product (including native deps).\n\nI built this for me, and I may use it for a while. If someone else finds it fun and useful then I will raise my glass to that!\n\nThis silly little app was made on top a bunch of very useful libraries made by people who are much smarter than me. Paul Butcher's [electron-app](https://github.com/paulbutcher/electron-app) clj template allowed me to just focus on writing ClojureScript. It is an excellent starting point for ClojureScript based electron apps.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianium%2Fpatroclus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrianium%2Fpatroclus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianium%2Fpatroclus/lists"}