This commit is contained in:
Alexandre
2021-12-07 15:59:02 +01:00
3 changed files with 12 additions and 5 deletions

View File

@@ -17,6 +17,8 @@ _Thanks to everyone having starred my repo! To star it click on the image below,
[arpspoof](https://github.com/t0mer/Arpspoof-Docker) adds ability to block internet connection for local network devices
This addon is based on the docker image https://hub.docker.com/r/techblog/arpspoof-docker
See all informations here : https://en.techblog.co.il/2021/03/15/home-assistant-cut-internet-connection-using-arpspoof/
## Installation
The installation of this add-on is pretty straightforward and not different in comparison to installing any other add-on.
@@ -37,7 +39,7 @@ Webui can be found at <http://your-ip:PORT>.
```yaml
ROUTER_IP: 127.0.0.1 #Required Router IP
INTERFACE_NAME: name #Required Interface name, can use this command to get it: ip route get 8.8.8.8 | sed -nr 's/.*dev ([^\ ]+).*/\1/p'
INTERFACE_NAME: name #Required Interface name. Autofilled if empty.
```
## Support

View File

@@ -11,8 +11,7 @@
"host_network": true,
"name": "Arpspoof",
"options": {
"ROUTER_IP": "yourip",
"INTERFACE_NAME": "interface name"
"ROUTER_IP": "yourip"
},
"ports": {
"7022/tcp": 7022
@@ -23,7 +22,7 @@
"privileged": ["SYS_ADMIN", "DAC_READ_SEARCH"],
"schema": {
"ROUTER_IP": "str",
"INTERFACE_NAME": "str"
"INTERFACE_NAME": "str?"
},
"slug": "arpspoof",
"upstream": "1.0",

View File

@@ -1,4 +1,10 @@
#!/usr/bin/env bashio
# Autodefine if not defined
if [ -z INTERFACE_NAME ]; then
INTERFACE_NAME=$(ip route get 8.8.8.8 | sed -nr 's/.*dev ([^\ ]+).*/\1/p')
bashio::log.blue "Autodetection : INTERFACE_NAME=$INTERFACE_NAME"
fi
bashio::log.info "Starting..."
/usr/bin/python3 /opt/arpspoof/arpspoof.py
/usr/bin/python3 /opt/arpspoof/arpspoof.py