mattfox / home-gateway-routes-selector Goto Github PK
View Code? Open in Web Editor NEWWeb app for selecting default route for devices on LAN, in Node.js and Python.
Web app for selecting default route for devices on LAN, in Node.js and Python.
Run the node.js web app in Docker. It will need access out to a service on the host- similar to a persistent DB, but it needs to do the ip rule
management, not just keep records on disk. Or maybe the service on the host that it talks to can be a real DB (ie Redis), and another process on the host watches the DB and makes the appropriate ip rule
changes.
Possibly just run routesrules load
. Consider replacing JSON file with sqlite DB just for fun.
So that I don't have to start it manually after a reboot.
For my own reference, here's what needs to be run at boot:
ip route add default via 10.8.0.5 dev tun0 table 100
rm /var/lib/misc/usaroutes.json
sudo -u www-data node /usr/local/share/routes/node/app.js
Probably should adapt the whole project to work on the basis of MAC addresses instead of IPv4 addresses. Then traffic can be sent to the numbered routing table from specific source MACs no matter its IP version. Continue mapping MAC addresses from /var/lib/misc/dnsmasq.leases to hostnames. Also consider looking up MAC vendor names to show somewhere.
Probably just use FPM
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.