UpSnap

A simple wake on lan web app written with SvelteKit, Go and PocketBase.

MIT License

Stars
1.7K
Committers
3

Bot releases are visible (Hide)

UpSnap - 3.2.4

Published by github-actions[bot] over 1 year ago

Changelog

  • 9106d25 add armv6 support #64
UpSnap - 3.2.3

Published by github-actions[bot] over 1 year ago

Changelog

  • 8e9ba15 add package-lock again
  • 054f60e fix #63
  • 9e83416 update dependencies
UpSnap - 3.2.2

Published by github-actions[bot] over 1 year ago

Changelog

  • 469d480 fix devices would not load for normal users
UpSnap - 3.2.1

Published by github-actions[bot] over 1 year ago

Show a register form when no admin account exists

2023-03-10 11_11_27

Changelog

  • 87bf055 own func for setup completed, refreshDeviceList() now returns error
  • 93a7220 show register form if setup not completed
UpSnap - 3.2.0

Published by github-actions[bot] over 1 year ago

👋 Say hello to the new Gopher!

This is now the new project icon and also used as the default website favicon. I've created it in Affinity Designer and added the project file to the repo, so feel free to improve him if you're good at illustrations!

👎 Don't like him?

Sad to hear, but I got you... It's also possible to set your own favicon in the settings.

image

🔧 Database migration

To make this possible the database settings collection is now split up into settings_private and settings_public. The reason is that unauthorized users need to be able to receive the website title and the favicon, which are now stored settings_public.
settings_private contains the ping interval and scan ip which are only readable by admins.

If you have set your website title in the past and run UpSnap without the UPSNAP_WEBSITE_TITLE env var then you have to set your title again. If you use the env var you are already set.

🩹 Fixes

  • The website title on the login page shows the correct tab title

Changelog

  • 1b299aa add new gopher as project image
  • 59bc936 change import path for fa icons
  • df9f549 fix save record settingsPrivate
  • 79a70b6 set custom icon
  • c43bcbd update callout and screenshots
  • f061c7d update screenshots
UpSnap - 3.1.3

Published by github-actions[bot] over 1 year ago

Changelog

  • 327b47c apk add samba (not installed by samba-common-tools anymore), close #61
UpSnap - 3.1.2

Published by github-actions[bot] over 1 year ago

Changelog

  • d7c4a92 fix scan not working #59
UpSnap - 3.1.1

Published by github-actions[bot] over 1 year ago

Changelog

  • 8c4c402 refresh auth tokens to avoid expiration
UpSnap - 3.1.0

Published by github-actions[bot] over 1 year ago

🔒 Authorisation

Since version 3.1 authorisation is enabled by default.

User management is done through the PocketBase webinterface at http://localhost:8090/_/. This is mainly for internal use, such as within a home or corporate network. For external use please see below.

  • To manage users, click the "Collections" icon on the left and select "users".
  • To manage admins, click the "Settings" icon on the left and select "Admin".

Api permissions listed by user role:

Api Unauthorized Users Admins
List/Search Rule
View Rule
Create Rule
Delete Rule
Manage Rule
Wake devices
Shutdown devices
Scan network

🌍 Exposing to the open web

Although UpSnap has user authorisation, it is not recommended to expose it to the open web and make it accessible by everyone!

Reason: The shutdown device command is basically a command piped to #sh (root if you run docker). If anyone gains unauthorized access and can abuse this api route in any way, the attacker has access to a (root) shell on your local network.

Recommended: If you need access from outside your network, please use a vpn. Wireguard or OpenVPN is your way to go.

Changelog

  • 8d47966 add authentification #42 #55
  • 5ed25bb add custom welcome message
  • 5469a2b add shdow to theme dropdown menu
  • 0d9a743 authentification -> authorisation
  • 94fabed css and logic improvements
  • a1de163 fix navbar active background for settings
  • 5493df0 pnpm...
  • 9a6b3a0 remove log
  • 40f6bdd update dependencies
  • 12689b1 update readme with auth #42 #55
  • c519084 message is prerendered and cant be changed at runtime
  • 9351889 minor changes
  • 2764ed6 rel="external" fixes "not found" build error
  • 327ac67 update screenshots
UpSnap - 3.1.0-beta.1

Published by github-actions[bot] over 1 year ago

Changelog

  • 8d47966 add authentification #42 #55
  • 5ed25bb add custom welcome message
  • 5469a2b add shdow to theme dropdown menu
  • 0d9a743 authentification -> authorisation
  • 94fabed css and logic improvements
  • a1de163 fix navbar active background for settings
  • 5493df0 pnpm...
  • 9a6b3a0 remove log
  • 40f6bdd update dependencies
  • 12689b1 update readme with auth #42 #55
UpSnap - 3.0.6

Published by github-actions[bot] over 1 year ago

Changelog

  • 3aec978 docker-compose: make port change more clear #54
  • a7f3edd update dependencies
  • upgrade to PocketBase v0.13.0 which tries to solve #45
UpSnap - 3.0.5

Published by github-actions[bot] over 1 year ago

Changelog

  • Use Go 1.20
  • Update backend and frontend dependencies which fixed 2 npm vulnerabilities (dependabot #4 and #5)

Commits

  • 4148ef0 go mod tidy
  • 37f7df2 npm update
  • 49cda92 update backend dependencies
  • 021555d update frontend dependencies
  • 9a90d59 use go 1.20
UpSnap - 3.0.4

Published by github-actions[bot] over 1 year ago

Quick breakdown

  • Frontend: devices are now "natural sorted" by name. Before: 1,10,2, after: 1,2,10
  • Backend: Wrong broadcast ip was fixed when using netmask 0.0.0.0
  • Backend: If shutdown command fails, the log will show the stderr of that command instead of the exit code
  • Backend: if you need custom packages for you shutdown command, you can install them by using the custom entrypoint in docker-compose.yml
  • Docker: healthcheck is now done inside the Dockerfile. You can remove it from your docker-compose.yml
  • Added some funding options if you want to support me

Changelog

  • 3b9decd add container_name, fix health whitespace
  • 9a1a816 change error messages
  • 8d43554 check if To4() == nil
  • b88f567 move healthcheck to dockerfile
  • cb168f2 remove magicpacket log
  • 67870d8 add go version badge
  • 376220c natural sort devices by name
  • ef064e9 shutdown: print stderr to log
  • f3b740d Create FUNDING.yml
  • b9aa9fe Update issue templates
  • 59770cf Update issue templates
  • 8b65cd6 Update issue templates
  • 0f7026f Update issue templates
  • a721af0 add info about custom packages in container
  • 7bd4712 get correct broadcast for netmask 0.0.0.0, #46
  • 27b1a10 goreleaser: -rm-dist has been deprecated
  • 66b4117 rename workflow
UpSnap - 3.0.4-beta.3

Published by github-actions[bot] over 1 year ago

Changelog

  • b88f567 move healthcheck to dockerfile
  • cb168f2 remove magicpacket log
UpSnap - 3.0.4-beta.2

Published by github-actions[bot] over 1 year ago

Changelog

  • 67870d8 add go version badge
  • 376220c natural sort devices by name
  • ef064e9 shutdown: print stderr to log
UpSnap - 3.0.4-beta.1

Published by github-actions[bot] over 1 year ago

Changelog

  • f3b740d Create FUNDING.yml
  • b9aa9fe Update issue templates
  • 59770cf Update issue templates
  • 8b65cd6 Update issue templates
  • 0f7026f Update issue templates
  • a721af0 add info about custom packages in container
  • 7bd4712 get correct broadcast for netmask 0.0.0.0, #46
  • 27b1a10 goreleaser: -rm-dist has been deprecated
  • 66b4117 rename workflow
UpSnap - 3.0.3

Published by github-actions[bot] over 1 year ago

Changelog

  • 482a988 add some error logging
  • ed285f5 fix openssh not working, close #37
  • b6f76c5 replace go-ping/ping (deprecated)
UpSnap - 3.0.2

Published by github-actions[bot] over 1 year ago

Changelog

  • e07755f delete port relations if device is deleted
  • 647dfe3 device settings: update existing ports
  • 9b7a763 fix error 500 on device settings without ports
  • 8c86719 fix save new ports
  • 7bdb99c fix top level await and fix broken device delete
  • 288baf0 improve svelte stores
  • b0452aa simpify pocketbase store
  • b5258bb update readme
  • f77c2c0 update readme
  • b68bb20 update readme
UpSnap - 3.0.1

Published by github-actions[bot] over 1 year ago

Changelog

  • e07755f delete port relations if device is deleted
  • 647dfe3 device settings: update existing ports
  • 9b7a763 fix error 500 on device settings without ports
  • 8c86719 fix save new ports
  • 7bdb99c fix top level await and fix broken device delete
  • 288baf0 improve svelte stores
  • b0452aa simpify pocketbase store
  • b5258bb update readme
  • f77c2c0 update readme
  • b68bb20 update readme
UpSnap - 3.0.0

Published by github-actions[bot] over 1 year ago

v3 is here! 🤩

For UpSnap 3 the backend was completely rewritten with Go. Also the frontend was changed to SvelteKit, updated to Bootstrap 5.3.0-alpha and now uses much less RAM and disk space than v2. Also, the Docker image has moved to ghcr.io.

Changelog

  • ⚙️ Backend: rewritten in Go
  • ⚙️ Backend: Support for different databases dropped. Backend now uses PocketBase which is based on SQLite
  • ⚙️ Backend: Added the option to use passwords for wake events. If your network card supports it, you can find it in your BIOS called "SecureOn" or smiliar.
  • ⚙️ Backend: PocketBase offers an API. You can log in to localhost:8090/_/ and click "'API View" in the top right corner
  • 🎨 Frontend: converted from Svelte to SvelteKit and also almost rewritten everything
  • 🎨 Frontend: Got rid of modals. Pages should be more user friendly
  • 🎨 Frontend: Better badges on device card to show cron events and password protection
  • General: Drastically reduced resource requirements
  • General: Single binary to run everything!
  • General: No more custom routes necessary for reverse proxy

Resource improvements compared to v2

Version RAM Storage
v2 ~550-650 MB ~600 MB (Docker)
v3 ~27 MB ~43 MB (Binary), ~159MB (Docker)

How to upgrade to v3

  • ⚠️ If you had UpSnap v2 before, make sure to upgrade to v2.3.2 or higher first, as it fixes an issue with json exports ⚠️
  • Click top right "More"
  • Then click the button "Export .json"
  • Update your docker-compose.yml to the newest version (or just download the binary)
  • Head over to localhost:8090 (or whatever url you've set)
  • Go to the settings page at the top
  • Use the file upload at the very bottom and select the .json you just downloaded
  • (If you were using a reverse proxy like caddy or nginx-proxy-manager before, you don't need to add custom routes anymore. Just use localhost:8090)

Backup

You can't download json files anymore. The recommended way is to backup the pb_data directory.

Issues?

You found bugs that I didn't find? Please create an issue here.