Giter Club home page Giter Club logo

etv's Introduction

etv

web service for local control of my home server

In a sense, this is my home server dashboard.

web services

The web services control the ISC BIND DNS Server by editing the named.conf.local file from a standard ubuntu/debian config. This allowed me to block or unblock various sites. It also blocks some network hosts using iptables.

UI

The UI is simple HTML and an included typescript file. Build with npx tsc index.ts

typescript

No -g install for this or anything. npm install typescript --save-dev was done. npm install will restore it if node_modules is deleted. I'm a JS/TS noob, can you tell?

etv's People

Contributors

jrwren avatar solkuczala avatar

Watchers

 avatar  avatar  avatar

etv's Issues

Show latest downloads

photos, videos, unwatched, priority to watch, etc.

makes good sense for a home dashboard.

have ability to categorize to watch as movie/tv or comedy or not... no other genres though because really, all I care about is comedy or not.

Do a better job with unknown IP addresses

e.g.

Jun 17 11:25:52 delays etv[2116]: main.go:810: err looking up 192.168.21.101 
Jun 17 11:25:52 delays etv[2116]: main.go:810: err looking up 192.168.21.13 

deal with these better.

there be panics

Dec 23 19:47:33 delays etv[12060]: main.go:152: tv turned on after 6pm, enabling
Dec 23 19:47:33 delays etv[12060]: main.go:352: exit status 1iptables: Bad rule (does a matching rule exist in that chain?).
Dec 23 19:47:33 delays etv[12060]: panic: runtime error: invalid memory address or nil pointer dereference
Dec 23 19:47:33 delays etv[12060]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x69032c]
Dec 23 19:47:33 delays etv[12060]: goroutine 6 [running]:
Dec 23 19:47:33 delays etv[12060]: time.(*Timer).Stop(...)
Dec 23 19:47:33 delays etv[12060]:         /usr/local/go/src/time/sleep.go:76
Dec 23 19:47:33 delays etv[12060]: main.tvOn()
Dec 23 19:47:33 delays etv[12060]:         /home/jrwren/src/etv/main.go:154 +0xcc
Dec 23 19:47:33 delays etv[12060]: main.pinger()
Dec 23 19:47:33 delays etv[12060]:         /home/jrwren/src/etv/main.go:137 +0x8d5
Dec 23 19:47:33 delays etv[12060]: created by main.main
Dec 23 19:47:33 delays etv[12060]:         /home/jrwren/src/etv/main.go:41 +0xdb
Dec 23 19:47:43 delays etv[12142]: main.go:152: tv turned on after 6pm, enabling
Dec 23 19:47:43 delays etv[12142]: main.go:352: exit status 1iptables: Bad rule (does a matching rule exist in that chain?).
Dec 23 19:47:43 delays etv[12142]: panic: runtime error: invalid memory address or nil pointer dereference
Dec 23 19:47:43 delays etv[12142]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x69032c]
Dec 23 19:47:43 delays etv[12142]: goroutine 6 [running]:
Dec 23 19:47:43 delays etv[12142]: time.(*Timer).Stop(...)
Dec 23 19:47:43 delays etv[12142]:         /usr/local/go/src/time/sleep.go:76
Dec 23 19:47:43 delays etv[12142]: main.tvOn()
Dec 23 19:47:43 delays etv[12142]:         /home/jrwren/src/etv/main.go:154 +0xcc
Dec 23 19:47:43 delays etv[12142]: main.pinger()
Dec 23 19:47:43 delays etv[12142]:         /home/jrwren/src/etv/main.go:137 +0x8d5
Dec 23 19:47:43 delays etv[12142]: created by main.main
Dec 23 19:47:43 delays etv[12142]:         /home/jrwren/src/etv/main.go:41 +0xdb

The date is twice in journalctl

systemd does a nice job timestamping, we don't need the time date stamp from "github.com/gorilla/handlers".handlers.CombinedLoggingHandler. Write the same thing but without the date.

so if "%v:%p %h %l %u %t "%r" %>s %O "%{Referer}i" "%{User-Agent}i"" vhost_combined is a thing, then without the date

equiv to: or something... or durp, maybe not vhost since we dont' care about that.
"%v:%p %h %l %u "%r" %>s %O "%{Referer}i" "%{User-Agent}i"

make the key a cookie saved input box on the page

Since this is internal to my home i don't need a lot of security. I accept the current risk.

The password is currently hardcoded to 1234

It would be nice to remove this hardcode and have it entered one time per client, saved indefinitely in a cookie.

tv control could be input via UI

tv control is currently a mix of this UI and cron which is confusing.

remove the cron and use this exclusively.
allow setting hours in the IU

consider expanding this for other services

extend pinger to execute commands for various detected IPs

The use case is these old amazon dash buttons I have lying around. It turns out that pinging every 5 seconds is enough to catch them when they come onto the network. No need for packet sniffing their DHCP or anything else, just ping it and if it is up, do the action.

add mtls auth

The named file rewrite functionality would be nice to use from an API. Add mTLS so that it is easier to do that.

add an ipv6 status element

a simple green/red indicator shall suffice.

I often forget to enable ipv6 on reboot, it would be nice to check connectivity.

make the UI prettier

Style the section after the links into something other than just div and buttons.

add a recent DNS lookups element

So that we can tell which hosts on the network recently looked up which DNS domains.

Have some filtering so that subdomains are not displayed.

Do not display anything older than 1hr.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.