Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
191 commits
Select commit Hold shift + click to select a range
d889e5b
Update README.template.md
CodeShellDev Dec 6, 2025
280bacc
Update README.md
github-actions[bot] Dec 6, 2025
7a29fe3
Update docker-compose.yaml
CodeShellDev Dec 6, 2025
96aff4c
Update README.md
github-actions[bot] Dec 6, 2025
3c878c9
fix
CodeShellDev Dec 6, 2025
eaf2f5a
fix
CodeShellDev Dec 6, 2025
9231526
Update docker-compose.yaml
CodeShellDev Dec 6, 2025
b717109
Update README.md
github-actions[bot] Dec 6, 2025
82e17c0
Merge branch 'dev' of https://github.com/codeshelldev/wol-redirect in…
CodeShellDev Dec 6, 2025
b98481a
test
CodeShellDev Dec 6, 2025
531268d
fix
CodeShellDev Dec 6, 2025
83624ed
fix missing rsrc url
CodeShellDev Dec 6, 2025
128ebd5
debugging
CodeShellDev Dec 6, 2025
4de5d2d
debugging
CodeShellDev Dec 6, 2025
52dbecf
test
CodeShellDev Dec 6, 2025
9b951c0
debugging
CodeShellDev Dec 6, 2025
b0d602a
test
CodeShellDev Dec 6, 2025
f41f347
debugging
CodeShellDev Dec 6, 2025
382b00a
debugging
CodeShellDev Dec 6, 2025
c233dfd
test
CodeShellDev Dec 6, 2025
1decbab
test
CodeShellDev Dec 6, 2025
209e941
test
CodeShellDev Dec 6, 2025
cd01bb9
test
CodeShellDev Dec 6, 2025
92c1bcd
test
CodeShellDev Dec 6, 2025
415f69c
test
CodeShellDev Dec 6, 2025
e8b810c
test
CodeShellDev Dec 6, 2025
a2ed1fc
test
CodeShellDev Dec 6, 2025
38760b3
test
CodeShellDev Dec 6, 2025
6b4d0ec
test
CodeShellDev Dec 6, 2025
31b057f
add ws
CodeShellDev Dec 6, 2025
1baca4a
add uuid pkg
CodeShellDev Dec 6, 2025
21bede8
debug
CodeShellDev Dec 6, 2025
5f68bdb
fix
CodeShellDev Dec 6, 2025
b05f6d9
fix ws/s
CodeShellDev Dec 6, 2025
81a76bf
fix typo
CodeShellDev Dec 6, 2025
641e83e
add dummy base
CodeShellDev Dec 6, 2025
3a93e9a
add pong to keep ws socket alive
CodeShellDev Dec 6, 2025
540ed96
small updates
CodeShellDev Dec 6, 2025
3a2e7c6
check if redirect to stop loops
CodeShellDev Dec 6, 2025
96e9f1e
stop loop
CodeShellDev Dec 6, 2025
9884f2b
service instead of device
CodeShellDev Dec 7, 2025
f1a729a
debug waitForHostUp
CodeShellDev Dec 7, 2025
d6dfbf5
fix debug
CodeShellDev Dec 7, 2025
ee8a370
debug
CodeShellDev Dec 7, 2025
8357445
debug post fetch error
CodeShellDev Dec 7, 2025
f7530e4
fix urlparse
CodeShellDev Dec 7, 2025
12916a3
debug fix
CodeShellDev Dec 7, 2025
81783c0
testing done.
CodeShellDev Dec 7, 2025
546982f
cleanup
CodeShellDev Dec 7, 2025
bf2b377
add override for query pattern
CodeShellDev Dec 7, 2025
ab0aabe
update due to wol-client
CodeShellDev Dec 7, 2025
403c96a
cleanup
CodeShellDev Dec 7, 2025
6b3a708
fix package
CodeShellDev Dec 7, 2025
aaf7eff
debug
CodeShellDev Dec 7, 2025
f2e4a81
wait for client
CodeShellDev Dec 7, 2025
23963ea
add logger to request
CodeShellDev Dec 7, 2025
4845d8c
fix import
CodeShellDev Dec 7, 2025
1deacd1
fix
CodeShellDev Dec 7, 2025
d370c99
fix requestjson
CodeShellDev Dec 7, 2025
ffc6541
switch back to dark
CodeShellDev Dec 7, 2025
2ed59b6
debug
CodeShellDev Dec 7, 2025
b16631f
more debugging
CodeShellDev Dec 7, 2025
42efb64
fix debugs
CodeShellDev Dec 7, 2025
4748d73
remove unused logs
CodeShellDev Dec 7, 2025
1f27af3
readd log
CodeShellDev Dec 7, 2025
02dd7ae
make ws blocking
CodeShellDev Dec 7, 2025
988f6ca
test new promise
CodeShellDev Dec 7, 2025
48f6290
more debugging
CodeShellDev Dec 7, 2025
bde49b3
more debugging
CodeShellDev Dec 7, 2025
e9ab8ba
remove unneeded debugs
CodeShellDev Dec 7, 2025
57167c2
remove host var
CodeShellDev Dec 7, 2025
9fafb0a
update due to wol-dockerized update
CodeShellDev Dec 8, 2025
28f8ace
change config for docker
CodeShellDev Dec 9, 2025
dd13670
remove wold and instead merge config into host entry via `docker` field
CodeShellDev Dec 9, 2025
dc06b20
update logs
CodeShellDev Dec 9, 2025
ab5c01a
fix if-statement
CodeShellDev Dec 9, 2025
0aa2f46
only expose logs if expose logs is set to true
CodeShellDev Dec 9, 2025
1c8a39d
fix typos
CodeShellDev Dec 9, 2025
1e5edfc
create wsurl based on targeturl
CodeShellDev Dec 9, 2025
4cbf579
fix payload for virtual hosts
CodeShellDev Dec 9, 2025
d6b17fe
use virtIP instead of ip for pinging purposes
CodeShellDev Dec 10, 2025
17b8c2b
update vePort
CodeShellDev Dec 10, 2025
b47abfe
fix payload of ve
CodeShellDev Dec 10, 2025
0e22375
return whole host object
CodeShellDev Dec 10, 2025
305a236
uppercase in logs
CodeShellDev Dec 10, 2025
5b8ec06
fix
CodeShellDev Dec 10, 2025
98d3870
fix
CodeShellDev Dec 10, 2025
9f8f028
move frontend js into module
CodeShellDev Dec 12, 2025
83b07f7
add public folder
CodeShellDev Dec 12, 2025
9aa790b
move css into own files
CodeShellDev Dec 12, 2025
272b800
add profile picture with ejs and oauth claims
CodeShellDev Dec 12, 2025
ba0878e
fix static
CodeShellDev Dec 12, 2025
cd82f40
add --silent
CodeShellDev Dec 12, 2025
39364c4
move
CodeShellDev Dec 12, 2025
aceefd7
silent
CodeShellDev Dec 12, 2025
b9da142
add package infos
CodeShellDev Dec 12, 2025
64d6349
use loglevel at start
CodeShellDev Dec 12, 2025
124b27f
fix cmd
CodeShellDev Dec 12, 2025
3bdc621
node_env = production
CodeShellDev Dec 12, 2025
57d9076
npm silent
CodeShellDev Dec 12, 2025
5aab12b
fix compose
CodeShellDev Dec 12, 2025
3463fed
fix user.js missing hues
CodeShellDev Dec 12, 2025
24e791e
add redis for sessions
CodeShellDev Dec 12, 2025
7a0fd9d
Update README.md
github-actions[bot] Dec 12, 2025
8bcb0df
default
CodeShellDev Dec 12, 2025
4afb43d
fix config path
CodeShellDev Dec 12, 2025
fdf1527
fix import
CodeShellDev Dec 12, 2025
0636df5
delete key from cache after serving html
CodeShellDev Dec 12, 2025
258aabd
fix redis session management
CodeShellDev Dec 12, 2025
9e995ba
apply rename for wss
CodeShellDev Dec 12, 2025
3c42968
fix sessionkey
CodeShellDev Dec 12, 2025
f6a26cb
actually use password and user for redis
CodeShellDev Dec 12, 2025
bae866a
escape redis password
CodeShellDev Dec 12, 2025
29b183f
add close
CodeShellDev Dec 12, 2025
61faf1d
await db.Init
CodeShellDev Dec 12, 2025
7faecc3
await db in app
CodeShellDev Dec 12, 2025
58de056
convert to mjs for await cap
CodeShellDev Dec 12, 2025
f9e9a26
convert to ESM :(
CodeShellDev Dec 12, 2025
e824009
fix ES imports
CodeShellDev Dec 12, 2025
76b43a8
place env init before routers
CodeShellDev Dec 12, 2025
861e27e
fixed logic because of immediate imports due to ESM
CodeShellDev Dec 12, 2025
174809d
fix wss import
CodeShellDev Dec 12, 2025
aaf2aab
imagine running routes on import instead of only when the user reques…
CodeShellDev Dec 12, 2025
b17a22e
fix?
CodeShellDev Dec 12, 2025
9ee2fca
debug eSm tImInGs :|
CodeShellDev Dec 12, 2025
d9feb69
fixed issue by invoking method instead of passing func in order for r…
CodeShellDev Dec 12, 2025
dbbea7e
fixed incorrect import 🤦
CodeShellDev Dec 12, 2025
825f66b
fix typo / missing import class
CodeShellDev Dec 12, 2025
c818a6f
test
CodeShellDev Dec 12, 2025
5d2dc2e
debugging sessions
CodeShellDev Dec 12, 2025
e7e5178
fix
CodeShellDev Dec 12, 2025
bd15f04
fix order of logger
CodeShellDev Dec 12, 2025
095fc04
fix debug
CodeShellDev Dec 12, 2025
51f5b90
fix
CodeShellDev Dec 12, 2025
0ce8991
fix cross-site cookie
CodeShellDev Dec 12, 2025
1dff4af
add hostname to session for cross-site cookies
CodeShellDev Dec 12, 2025
4a1774c
pass query like before, but instead of passing url (can be modified) …
CodeShellDev Dec 12, 2025
19c299c
add signed cookies for storing session_id
CodeShellDev Dec 12, 2025
667bf9a
move cookieParser to correct router (app)
CodeShellDev Dec 12, 2025
df128c1
fix import
CodeShellDev Dec 12, 2025
e28b377
fix deletion from cache
CodeShellDev Dec 12, 2025
026570e
use outputHandler
CodeShellDev Dec 12, 2025
47e1ade
debug claims
CodeShellDev Dec 12, 2025
b3a4c72
style the user profile
CodeShellDev Dec 12, 2025
030c25f
remove cookie signing
CodeShellDev Dec 12, 2025
1184e13
add back cookie parser
CodeShellDev Dec 12, 2025
e4dda2c
dynamic font and picture size
CodeShellDev Dec 12, 2025
c7490ef
more dynamic growing / shrinking
CodeShellDev Dec 12, 2025
683750d
add serviceUrl to client
CodeShellDev Dec 13, 2025
c0bb2ba
fix onwserror
CodeShellDev Dec 13, 2025
04b4ae5
handle error manually to remove annoying errors in the console
CodeShellDev Dec 13, 2025
3d045b1
add theme toggle
CodeShellDev Dec 13, 2025
bfc93bf
mvoe button
CodeShellDev Dec 13, 2025
2e99530
fix missing null-check
CodeShellDev Dec 13, 2025
f9c2f28
move css
CodeShellDev Dec 13, 2025
ad473ab
move css
CodeShellDev Dec 13, 2025
b5389a6
fix css
CodeShellDev Dec 13, 2025
a74754a
fix typo
CodeShellDev Dec 13, 2025
88fe0ea
add icons for toggle (from fontawesome)
CodeShellDev Dec 13, 2025
a23a774
hide and show
CodeShellDev Dec 13, 2025
eeca842
fix theme
CodeShellDev Dec 13, 2025
991ff81
add iconcolor
CodeShellDev Dec 13, 2025
a053df9
removed fontawesome icons due to incorrect colors; will create custom :)
CodeShellDev Dec 13, 2025
2c3a63b
add icons
CodeShellDev Dec 13, 2025
0110653
add possibility to not use auth
CodeShellDev Dec 13, 2025
dd6610f
fix noauth
CodeShellDev Dec 13, 2025
749a8ca
fix?
CodeShellDev Dec 13, 2025
3bb8d3e
fix missing redirectURl for noauth
CodeShellDev Dec 13, 2025
282dde0
add check before sending
CodeShellDev Dec 13, 2025
cb49a75
testing ?fix?
CodeShellDev Dec 13, 2025
0fddf51
add session to noauth
CodeShellDev Dec 13, 2025
01b82f7
add "auth" to noauth
CodeShellDev Dec 13, 2025
0201634
check if isAuthenticated is a func / exists
CodeShellDev Dec 13, 2025
a7fefb2
add session managament for fakeauth
CodeShellDev Dec 13, 2025
f2d2e2c
add icon-color
CodeShellDev Dec 13, 2025
6f30d7c
remove unnecessary css
CodeShellDev Dec 13, 2025
3f4397a
fix css
CodeShellDev Dec 13, 2025
d943f02
remove unnecessary redirects with noauth
CodeShellDev Dec 14, 2025
ad29bd0
fix
CodeShellDev Dec 14, 2025
0b5660b
fix remove async
CodeShellDev Dec 14, 2025
a4efb8d
fix debug
CodeShellDev Dec 14, 2025
b39acaf
improve session_id management, use state instead of query
CodeShellDev Dec 14, 2025
61d34b4
fix animation
CodeShellDev Dec 14, 2025
253b81b
fix user name centering
CodeShellDev Dec 14, 2025
93ea6d2
fix log
CodeShellDev Dec 14, 2025
9a856f0
use return of func instead of func object
CodeShellDev Dec 15, 2025
edc7ff5
fix: use sessionID generated by server instead of query
CodeShellDev Dec 15, 2025
bd30e52
handle premature websocket close as error instead of waiting
CodeShellDev Dec 15, 2025
16f5cca
use hostname as username
CodeShellDev Dec 15, 2025
90883be
make redirectURL optional for noauth
CodeShellDev Dec 15, 2025
319c414
reorder noauth router
CodeShellDev Dec 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/templates/README.template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

WoL Redirect is a Docker Container with graphical interface, which allows users to wake up their services.
Integrates with all of the WoL Containers.

s
_Well, except for meteorite_

## Installation
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ FROM node:alpine

WORKDIR /app

ENV NODE_ENV=production

COPY . .

RUN npm install

CMD ["npm", "start"]
CMD ["npm", "start", "-s"]
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@

WoL Redirect is a Docker Container with graphical interface, which allows users to wake up their services.
Integrates with all of the WoL Containers.

s
_Well, except for meteorite_

## Installation

Get the latest `docker-compose.yaml` file:

```yaml
---
services:
wol:
container_name: wol-client
Expand Down
1 change: 0 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
services:
wol:
container_name: wol-client
Expand Down
147 changes: 143 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 19 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,33 @@
{
"name": "wol-redirect",
"version": "1.0.0",
"description": "A Redirect and WoL Service",
"version": "none",
"description": "",
"homepage": "https://github.com/CodeShellDev/wol-redirect#readme",
"bugs": {
"url": "https://github.com/CodeShellDev/wol-redirect/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/CodeShellDev/wol-redirect.git"
},
"license": "MIT",
"author": "codeshelldev",
"type": "module",
"main": "app.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node ./src/app.js"
},
"author": "codeshell",
"license": "MIT",
"dependencies": {
"connect-redis": "^9.0.0",
"cookie-parser": "^1.4.7",
"ejs": "^3.1.10",
"express": "^4.21.1",
"express-session": "^1.18.1",
"express-session": "^1.18.2",
"passport": "^0.7.0",
"passport-oauth2": "^1.8.0"
"passport-oauth2": "^1.8.0",
"redis": "^5.10.0",
"uuid": "^13.0.0",
"ws": "^8.18.3"
}
}
27 changes: 27 additions & 0 deletions public/js/theme.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
const THEME_KEY = "theme"

export function setTheme(theme) {
document.body.setAttribute("data-theme", theme)
localStorage.setItem(THEME_KEY, theme)
}

export function applyInitialTheme() {
const saved = localStorage.getItem(THEME_KEY)
const system = matchMedia("(prefers-color-scheme: dark)").matches
const theme = saved || (system ? "dark" : "light")

document.documentElement.setAttribute("data-theme", theme)
}

export function initToggle(query = ".theme-toggle") {
const toggle = document.querySelector(query)
if (!toggle) return

toggle.addEventListener("click", () => {
const html = document.documentElement
const next = html.getAttribute("data-theme") === "dark" ? "light" : "dark"

html.setAttribute("data-theme", next)
localStorage.setItem(THEME_KEY, next)
})
}
23 changes: 23 additions & 0 deletions public/js/user.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
export function getProfileColor(
str,
{ hues = [10, 40, 60, 90, 120, 150, 180, 200, 220, 250, 280, 310, 340] } = {}
) {
let hash = 0
for (let i = 0; i < str.length; i++) {
hash = str.charCodeAt(i) + ((hash << 5) - hash)
}

const hue = hues[Math.abs(hash) % hues.length]

const saturation = 70
const lightness = 60

return `hsl(${hue}, ${saturation}%, ${lightness}%)`
}

export function setUser(userData, query = ".user .profile") {
const userProfile = document.querySelector(query)

userProfile.textContent = userData.name.substring(0, 2).toUpperCase()
userProfile.style.backgroundColor = getProfileColor(userData.name)
}
Loading