Limit screen time to children's various mobile devices by blocking internet access on the family Wifi router.

Overview

Device Blocker

Limit screen time to children's various mobile devices by blocking internet access on the family Wifi router.

This is the server which runs on the WiFi router. It has an API which lists devices, opens and closes internet access for devices, and discovers new devices on the router.

I run this on Lede 17.01.

It has a companion UI project: device-blocker-ui

Build/Installation

Install Lede on a router and also download the correct Lede SDK for your router.

Add the SDK to your path. For example:

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

Build the companion UI project: device-blocker-ui

# ... in the device-blocker-ui directory
npm install -g yarn
yarn
webpack --optimize-minimize --define process.env.NODE_ENV="'production'"

Next copy the resulting bundle.js and index.html files to this project's src directory.

Use rustup to install a stable compiler for the architecture appropriate for your router.

cargo build --target x86_64-unknown-linux-musl --release

Edit and copy some files from this project to your router:

  • Edit and copy known_devices.json to /etc/
  • Edit and copy device_blocker.procd to /etc/init.d/device_blocker
  • Copy target/x86_64-unknown-linux-musl/release/device-blocker to /root/
  • Make sure both /root/device-blocker and /etc/init.d/device_blocker are executable.

Use the LuCi interface to enable and start the service:

  • Go to System -> Startup.
  • Find device-blocker.
  • Enable the service.
  • Start the service.

ToDo

  • Write files atomically.
  • Figure out how to build this project with Xargo and deploy to mips and other router architecture.
  • Security? Require a login similar to OpenWRT's LuCi

License

MIT License

Copyright (c) 2017 Darrin Thompson

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

You might also like...
Small MQTT router. Allows creating multiple inputs/outputs and run action when input triggers.

MQRT Small MQTT router. Allows creating multiple inputs/outputs and run action when input triggers. Features multi-(input/output) multiple actions tie

Rust implementation of the i2p client/server/router protocols

ri2p Rust implementation of the i2p client/server/router protocols Status Common Commands cargo build: Builds the ri2p binary cargo run: Runs the ri2p

A fork of yew-router

Yew Router (fork) This is fork of version 0.15 of the yew-router. Motivation The main motivation behind the fork is the lack of nested router support

A radix tree implementation for router, and provides CRUD operations.

radixtree A radix tree implementation for router, and provides CRUD operations. Radixtree is part of treemux, on top of which updates and removes are

WIP / POC for using the BL602 wifi blob from Rust

BL602 Wifi Rust This is work in progress and currently more a proof of concept. The code is awfully hacked together - just enough to make it work. It

WIP / POC for using the ESP32C3 wifi drivers in bare-metal Rust

Wifi on ESP32C3 (on bare-metal Rust) About This is experimental and work-in-progress! You are welcome to contribute but probably shouldn't use this fo

WIP / POC for using the ESP32C3 and ESP32 wifi drivers in bare-metal Rust

Wifi on ESP32C3 and ESP32 (on bare-metal Rust) About This is experimental and work-in-progress! You are welcome to experiment with it and contribute b

A no-std esp32 Wifi Lamp
A no-std esp32 Wifi Lamp

Nostd-wifi-lamp A Wi-Fi controllable lamp written in Rust for the ESP32 using esp-hal. This was created for a blog post you can read here. Usage Sadly

⌚ A command-line tool (and library) for the rusty Swatch Internet Time.

⌚ A command-line tool (and library) for the rusty Swatch Internet Time. Comes with XBar/Swiftbar support.

Building a better screen reader for the Linux desktop, one step at a time.

Building a better screen reader for the Linux desktop, one step at a time.

A crate to convert bytes to something more useable and the other way around in a way Compatible with the Confluent Schema Registry. Supporting Avro, Protobuf, Json schema, and both async and blocking.
A crate to convert bytes to something more useable and the other way around in a way Compatible with the Confluent Schema Registry. Supporting Avro, Protobuf, Json schema, and both async and blocking.

#schema_registry_converter This library provides a way of using the Confluent Schema Registry in a way that is compliant with the Java client. The rel

Cassette A simple, single-future, non-blocking executor intended for building state machines.

Cassette A simple, single-future, non-blocking executor intended for building state machines. Designed to be no-std and embedded friendly. This execut

An API for getting questions from http://either.io implemented fully in Rust, using reqwest and some regex magic. Provides asynchronous and blocking clients respectively.

eithers_rust An API for getting questions from http://either.io implemented fully in Rust, using reqwest and some regex magic. Provides asynchronous a

High-level non-blocking Deno bindings to the rust-bert machine learning crate.

bertml High-level non-blocking Deno bindings to the rust-bert machine learning crate. Guide Introduction The ModelManager class manages the FFI bindin

Rust Hardware Abstraction Layer (HAL) crate for the Vorago VA108xx family of MCUs

HAL for the Vorago VA108xx MCU family This repository contains the Hardware Abstraction Layer (HAL), which is an additional hardware abstraction on to

Multithreaded, non-blocking Linux server framework in Rust

hydrogen Documentation hydrogen is a non-blocking socket server framework built atop epoll. It takes care of the tedious connection and I/O marshaling

Tiny-lsm - super simple in-memory blocking LSM for constant-size keys and values

tiny-lsm Super simple in-memory blocking LSM for constant-size keys and values. Despite being single-threaded and blocking, this is still capable of o

A complicated eso-lang written in Rust that doesn't limit your creativity!

Documentation for mott Introduction mott (from french "mot" = word) is (maybe) the first programming language, that doesn't limit your creativity to p

The system for remote workers to prevent their family members from interrupting conference calls
The system for remote workers to prevent their family members from interrupting conference calls

onair The system for remote workers to prevent their family members from interrupting conference calls. The system is designed to automatically detect

Owner
null
Easy WiFi setup for Linux devices from your mobile phone or laptop

Easy WiFi setup for Linux devices from your mobile phone or laptop WiFi Connect is a utility for dynamically setting the WiFi configuration on a Linux

balenaOS 1.1k Dec 31, 2022
Rate limit guard - Lazy rate limit semaphore implementation to control your asynchronous code frequency execution

Lazy rate limit semaphore (a.k.a fixed window algorithm without queueing) implementation to control your asynchronous code frequency execution

Yan Kurbatov 4 Aug 1, 2022
Private payments for mobile devices.

MobileCoin Fog This is the README file for MobileCoin Fog. Note to Developers MobileCoin Fog is a prototype. Expect substantial changes before and aft

MobileCoin Foundation 36 May 6, 2022
Private payments for mobile devices.

Testing your first payment Please see TESTNET.md for instructions on participating in the TestNet! Sending your first payment Please see MAINNET.md fo

MobileCoin Foundation 1.1k Dec 30, 2022
Cross-platform file sharig application for desktop and mobile devices

Skylite Description Getting Started Dependencies Installing Executing program License Acknowledgments Description Cross platform file sharing applicat

Adeoye Adefemi 5 Nov 16, 2023
Dank - The Internet Computer Decentralized Bank - A collection of Open Internet Services - Including the Cycles Token (XTC)

Dank - The Internet Computer Decentralized Bank Dank is a collection of Open Internet Services for users and developers on the Internet Computer. In t

Psychedelic 56 Nov 12, 2022
Open Internet Service to store transaction history for NFTs/Tokens on the Internet Computer

CAP - Certified Asset Provenance Transaction history & asset provenance for NFT’s & Tokens on the Internet Computer CAP is an open internet service pr

Psychedelic 42 Nov 10, 2022
Cover is an open internet service for canister code verification on the Internet Computer

Cover Cover (short for Code Verification) is an open internet service that helps verify the code of canisters on the Internet Computer. Visit our webs

Psychedelic 14 Oct 31, 2022
A Rust attribute macro to limit a function's number of runs over a specified period of time

throttle_my_fn: A Rust attribute macro to throttle the execution of functions throttle_my_fn is a Rust attribute macro to limit a function's number of

Fred Morcos 8 Dec 3, 2022
A new pure-Rust library for cross-platform low-level access to USB devices.

nusb A new pure-Rust library for cross-platform low-level access to USB devices. Documentation Compared to rusb and libusb Pure Rust, no dependency on

Kevin Mehall 23 Oct 30, 2023