mypi-tools

module
v0.0.0-...-63b66d1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2024 License: MIT

README

MyPi-Tools

Go CodeQL Codecov Go Report Card

Tools

mypi-setup

Runs on your PC/Notebook and creates an SD-Card for a automated installation of Alpine-Linux on a Raspberry-PI. It's not necessary to connect a keyboard or display to your Raspberry-PI. All you need is a network cable and a power supply.

When you start mypi-setup a browser window will open. Just follow the instructions and you will get a SD-Card ready for your Raspberry-PI. After you have inserted this SD-Card to your Raspberry-PI, mypi-setup will connect to it and completes the installation.

mypi-control

Runs on your Raspberry-PI and

  • completes the installation
    • makes the image bootable from disk (this requires less memory)
    • install basic packages like
      • docker
      • bash
      • jq
  • provides a management Web-UI
mypi-auth

The user authentication service. Provides a Login-UI.

mypi-router

All requests from the internet are routed to the applications by the mypi-router. Plain HTTP requests will just be redirected to HTTPS, the only exception are lets-encrypt challenges.

To decide, how HTTPS connections shall be routed, the mypi-router parses, the first TLS packet and extracts the SNI extension. If the SNI extension is missing, or the requested server-name is unknown, the mypi-router will just close the connection. This filters out most unwanted traffic without giving potential attackers to much information.

For known server-names, the mypi-router supports different routing methods:

  • forward to application directly (the application has to perform the TLS handshake itself)
  • terminate the TLS connection and forward the HTTP content to the application
    • without modifying the headers
    • with an additional layer of authentication (using mypi-auth)
    • use HTTPS to connect to the application

mypi-router

mypi-videostream

Allows to access web-cams

mypi-owntracks

Reacts on owntracks events. It opens my gate when I come home.

Dev-Environment

To allow debugging of the GoLang and Web Applications you could use do the following:

ssh mypi
mypi service mypi-debug start

This starts a docker container with an sshd to allow port forwarding back to the developer notebook/pc.

./scripts/debug

This starts the mypi-debug application which

  • provides a web UI allowing to start/stop the different tools
  • establishes an SSH-tunnel to the docker container
  • uses the mypi-router code to forward requests to the correct tool

mypi-debug

Directories

Path Synopsis
cmd
go
ccu
cmd
gotty/localcommand
Package localcommand provides an implementation of webtty.Slave that launches a local command with a PTY.
Package localcommand provides an implementation of webtty.Slave that launches a local command with a PTY.
gotty/webtty
Package webtty provides a protocl and an implementation to controll terminals thorough networks.
Package webtty provides a protocl and an implementation to controll terminals thorough networks.
otp
pki
ssh

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL