Skip to content

Commit

Permalink
Merge pull request #7 from reneManqueros/feature/MongoDB_as_a_backend
Browse files Browse the repository at this point in the history
Feature/mongodb as a backend
  • Loading branch information
reneManqueros committed Oct 22, 2022
2 parents a51ecf2 + 93c58e0 commit 9d5e582
Show file tree
Hide file tree
Showing 11 changed files with 215 additions and 32 deletions.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 aceberg
Copyright (c) 2022

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
DUSER=aceberg
DUSER=reneManqueros
DNAME=watchyourlan

IFACE=virbr-bw
Expand Down
23 changes: 14 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<div align="center">

<a href="https://github.com/aceberg/WatchYourLAN">
<img src="https://raw.githubusercontent.com/aceberg/WatchYourLAN/main/assets/logo.png" width="200" />
<a href="https://github.com/reneManqueros/WatchYourLAN">
<img src="https://raw.githubusercontent.com/reneManqueros/WatchYourLAN/main/assets/logo.png" width="200" />
</a>
</div>
<br/>

# WatchYourLAN

[![Docker](https://github.com/aceberg/WatchYourLAN/actions/workflows/main-docker-all.yml/badge.svg)](https://github.com/aceberg/WatchYourLAN/actions/workflows/main-docker-all.yml)
![Docker Image Size (latest semver)](https://img.shields.io/docker/image-size/aceberg/watchyourlan)
[![Docker](https://github.com/reneManqueros/WatchYourLAN/actions/workflows/main-docker-all.yml/badge.svg)](https://github.com/reneManqueros/WatchYourLAN/actions/workflows/main-docker-all.yml)
![Docker Image Size (latest semver)](https://img.shields.io/docker/image-size/renemanqureos/watchyourlan)

Lightweight network IP scanner with web GUI
https://github.com/aceberg/WatchYourLAN
https://github.com/reneManqueros/WatchYourLAN

![Screenshot_v0.6](https://raw.githubusercontent.com/aceberg/WatchYourLAN/main/assets/Screenshot_v0.6.png)
![Screenshot_v0.6](https://raw.githubusercontent.com/reneManqueros/WatchYourLAN/main/assets/Screenshot_v0.6.png)

## Quick start

Expand All @@ -25,7 +25,7 @@ docker run --name wyl \
-e "IFACE=$YOURIFACE" \
-e "TZ=$YOURTIMEZONE" \
--network="host" \
aceberg/watchyourlan
renemanqueros/watchyourlan
```

Set `$DOCKERDATAPATH` for container to save data:
Expand All @@ -36,7 +36,7 @@ docker run --name wyl \
-e "TZ=$YOURTIMEZONE" \
--network="host" \
-v $DOCKERDATAPATH/wyl:/data \
aceberg/watchyourlan
renemanqueros/watchyourlan
```
Web GUI should be at http://localhost:8840

Expand All @@ -49,12 +49,17 @@ Configuration can be done through config file or environment variables
| -------- | ----------- | ------- |
| IFACE | Interface to scan. Could be one or more, separated by space. Currently `docker0` is not allowed, as arp-scan wouldn't work with it correctly | enp1s0 |
| DBPATH | Path to Database | /data/db.sqlite |
| DBPROVIDER | DBMS to use (sqlite, mongodb) | sqlite |
| GUIIP | Address for web GUI | localhost (127.0.0.1) |
| GUIPORT | Port for web GUI | 8840 |
| GUIAUTH | Basic auth credentials for web GUI, e.g.: GUIAUTH=user:pass | (empty - no auth) |
| TIMEOUT | Time between scans (seconds) | 60 (1 minute) |
| SHOUTRRR_URL | Url to any notification service supported by [Shoutrrr](https://github.com/containrrr/shoutrrr/tree/main/docs/services) (gotify, email, telegram and others) | "" |
| THEME | Any theme name from https://bootswatch.com in lowcase | solar |
| MONGODBCONNECTIONURI | Connection string to MongoDB | (empty) |
| MONGODBCOLLECTION | MongoDB Collection | (empty) |
| MONGODBDATABASE | MongoDB Database | (empty) |


## Config file

Expand Down Expand Up @@ -87,7 +92,7 @@ curl -sfL https://goreleaser.com/static/run | bash -s -- release


## Thanks
- All go packages listed in [dependencies](https://github.com/aceberg/WatchYourLAN/network/dependencies)
- All go packages listed in [dependencies](https://github.com/reneManqueros/WatchYourLAN/network/dependencies)
- Favicon and logo: [Access point icons created by Freepik - Flaticon](https://www.flaticon.com/free-icons/access-point)
- [Bootstrap](https://getbootstrap.com/)
- Themes: [Free themes for Bootstrap](https://bootswatch.com)
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "3"
services:
wyl:
image: aceberg/watchyourlan
image: renemanqueros/watchyourlan
network_mode: "host"
restart: unless-stopped
volumes:
Expand Down
17 changes: 14 additions & 3 deletions src/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,36 @@ require (
github.com/containrrr/shoutrrr v0.6.1
github.com/mattn/go-sqlite3 v1.14.15
github.com/spf13/viper v1.13.0
go.mongodb.org/mongo-driver v1.10.3
)

require (
github.com/fatih/color v1.13.0 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/klauspost/compress v1.15.11 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/montanaflynn/stats v0.6.6 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.5 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/spf13/afero v1.9.2 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.4.1 // indirect
golang.org/x/sys v0.0.0-20221006211917-84dc82d7e875 // indirect
golang.org/x/text v0.3.7 // indirect
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
github.com/xdg-go/scram v1.1.1 // indirect
github.com/xdg-go/stringprep v1.0.3 // indirect
github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect
golang.org/x/crypto v0.1.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.1.0 // indirect
golang.org/x/text v0.4.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
Loading

0 comments on commit 9d5e582

Please sign in to comment.