{"id":13436276,"url":"https://github.com/darrint/device-blocker","last_synced_at":"2025-03-18T20:31:09.972Z","repository":{"id":144745391,"uuid":"79506373","full_name":"darrint/device-blocker","owner":"darrint","description":"Limit screen time to children's various mobile devices by blocking internet access on the family Wifi router.","archived":false,"fork":false,"pushed_at":"2018-03-18T01:09:07.000Z","size":52,"stargazers_count":38,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-27T20:18:56.650Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","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/darrint.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-01-19T23:42:28.000Z","updated_at":"2024-02-01T07:28:03.000Z","dependencies_parsed_at":"2024-01-21T00:12:28.508Z","dependency_job_id":"51d11313-12bb-473b-80bc-8b1cafa2d053","html_url":"https://github.com/darrint/device-blocker","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/darrint%2Fdevice-blocker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darrint%2Fdevice-blocker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darrint%2Fdevice-blocker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darrint%2Fdevice-blocker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/darrint","download_url":"https://codeload.github.com/darrint/device-blocker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244301392,"owners_count":20430936,"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-07-31T03:00:46.150Z","updated_at":"2025-03-18T20:31:09.630Z","avatar_url":"https://github.com/darrint.png","language":"Rust","funding_links":[],"categories":["Applications","应用","应用 Applications"],"sub_categories":["贡献"],"readme":"Device Blocker\n==============\n\nLimit screen time to children's various mobile devices by blocking internet\naccess on the family Wifi router.\n\nThis is the server which runs on the WiFi router. It has an API which lists\ndevices, opens and closes internet access for devices, and discovers new\ndevices on the router.\n\nI run this on Lede 17.01.\n\nIt has a companion UI project:\n[device-blocker-ui](https://github.com/darrint/device-blocker-ui)\n\nBuild/Installation\n==================\n\nInstall Lede on a router and also download the correct Lede SDK for your\nrouter.\n\nAdd the SDK to your path. For example:\n\n`PATH=~/Downloads/lede-sdk-17.01.2-x86-64_gcc-5.4.0_musl-1.1.16.Linux-x86_64/staging_dir/toolchain-x86_64_gcc-5.4.0_musl-1.1.16/bin:$PATH`\n\nBuild the companion UI project:\n[device-blocker-ui](https://github.com/darrint/device-blocker-ui)\n\n```\n# ... in the device-blocker-ui directory\nnpm install -g yarn\nyarn\nwebpack --optimize-minimize --define process.env.NODE_ENV=\"'production'\"\n```\n\nNext copy the resulting bundle.js and index.html files to this project's `src`\ndirectory.\n\nUse rustup to install a stable compiler for the architecture appropriate for\nyour router.\n\n`cargo build --target x86_64-unknown-linux-musl --release`\n\nEdit and copy some files from this project to your router:\n\n* Edit and copy `known_devices.json` to `/etc/`\n* Edit and copy `device_blocker.procd` to `/etc/init.d/device_blocker`\n* Copy `target/x86_64-unknown-linux-musl/release/device-blocker` to `/root/`\n* Make sure both `/root/device-blocker` and `/etc/init.d/device_blocker` are executable.\n\nUse the LuCi interface to enable and start the service:\n\n* Go to System -\u003e Startup.\n* Find device-blocker.\n* Enable the service.\n* Start the service.\n\nToDo\n====\n* Write files atomically.\n* Figure out how to build this project with Xargo and deploy to mips and other router architecture.\n* Security? Require a login similar to OpenWRT's LuCi\n\nLicense\n=======\n\nMIT License\n\nCopyright (c) 2017 Darrin Thompson\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarrint%2Fdevice-blocker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarrint%2Fdevice-blocker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarrint%2Fdevice-blocker/lists"}