Compare commits
	
		
			No commits in common. "master" and "f_influxdb-line-protocol" have entirely different histories.
		
	
	
		
			master
			...
			f_influxdb
		
	
		
							
								
								
									
										24
									
								
								Dockerfile
									
									
									
									
									
								
							
							
						
						
									
										24
									
								
								Dockerfile
									
									
									
									
									
								
							@ -1,28 +1,18 @@
 | 
			
		||||
# ---- Base ----
 | 
			
		||||
FROM alpine:3 AS base
 | 
			
		||||
FROM node:16-alpine
 | 
			
		||||
 | 
			
		||||
# Create app directory
 | 
			
		||||
WORKDIR /usr/src/app
 | 
			
		||||
 | 
			
		||||
# Copy project file
 | 
			
		||||
COPY package.json .
 | 
			
		||||
 | 
			
		||||
# Install required apk-packages
 | 
			
		||||
RUN apk add --no-cache nodejs npm tcpdump
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# ---- Dependencies ----
 | 
			
		||||
FROM base AS dependencies
 | 
			
		||||
 | 
			
		||||
# Install app dependencies
 | 
			
		||||
RUN npm install --only=production
 | 
			
		||||
COPY package*.json ./
 | 
			
		||||
RUN npm install
 | 
			
		||||
 | 
			
		||||
# remove development dependencies
 | 
			
		||||
RUN npm prune --production
 | 
			
		||||
 | 
			
		||||
# ---- Release ----
 | 
			
		||||
FROM base AS release
 | 
			
		||||
# Install required apk-packages & delete cache
 | 
			
		||||
RUN apk update && apk add tcpdump && rm -rf /var/cache/apk/*
 | 
			
		||||
 | 
			
		||||
# copy from build image
 | 
			
		||||
COPY --from=dependencies /usr/src/app/ ./
 | 
			
		||||
# Bundle app source
 | 
			
		||||
COPY ./src/ .
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										11
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								README.md
									
									
									
									
									
								
							@ -17,7 +17,6 @@ Table of contents
 | 
			
		||||
    - [1.1. What kind of data](#11-what-kind-of-data)
 | 
			
		||||
    - [1.2. Data-Usage](#12-data-usage)
 | 
			
		||||
    - [1.3. Tools used](#13-tools-used)
 | 
			
		||||
  - [1.4. Architecture](#14-architecture)
 | 
			
		||||
- [2. Usage/Installation](#2-usageinstallation)
 | 
			
		||||
    - [2.1. Prerequisites](#21-prerequisites)
 | 
			
		||||
    - [2.2. Choosing an Export-Method](#22-choosing-an-export-method)
 | 
			
		||||
@ -82,14 +81,6 @@ e.g.
 | 
			
		||||
The program uses `tcpdump` for listening in a subProcess and then extract the metadata when packets arrive.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<br>
 | 
			
		||||
 | 
			
		||||
## 1.4. Architecture
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
The system heavily uses NodeJS-Streams to read, transform and pass data around.
 | 
			
		||||
 | 
			
		||||
<br>
 | 
			
		||||
 | 
			
		||||
# 2. Usage/Installation
 | 
			
		||||
@ -265,7 +256,7 @@ Variable|Description
 | 
			
		||||
Variable|Default|Description
 | 
			
		||||
---|---|---
 | 
			
		||||
`LOGLEVEL`          | INFO              | Loglevel
 | 
			
		||||
`WIFI_INTERFACE`    | wlan0             | Wifi-Interface name in Monitor-Mode
 | 
			
		||||
`WIFI_INTERFACE`    | wlan0             | Token with write-access
 | 
			
		||||
~~`HOSTNAME`~~          | ~~Device's Hostname~~ | ~~Hostname to use as global hostname-tag~~ *(Unused)*
 | 
			
		||||
 | 
			
		||||
<br>
 | 
			
		||||
 | 
			
		||||
@ -1,9 +0,0 @@
 | 
			
		||||
TAG="ruakij/rfmon-to-influx"
 | 
			
		||||
PLATFORM="linux/amd64,linux/arm64/v8,linux/arm/v7"
 | 
			
		||||
EXTRA_ARGS="$@"
 | 
			
		||||
 | 
			
		||||
docker buildx build \
 | 
			
		||||
--platform $PLATFORM \
 | 
			
		||||
--tag $TAG \
 | 
			
		||||
$EXTRA_ARGS \
 | 
			
		||||
.
 | 
			
		||||
@ -1,7 +0,0 @@
 | 
			
		||||
TAG="ruakij/rfmon-to-influx"
 | 
			
		||||
EXTRA_ARGS="$@"
 | 
			
		||||
 | 
			
		||||
docker build \
 | 
			
		||||
--tag $TAG \
 | 
			
		||||
$EXTRA_ARGS \
 | 
			
		||||
.
 | 
			
		||||
										
											Binary file not shown.
										
									
								
							| 
		 Before Width: | Height: | Size: 147 KiB  | 
@ -47,13 +47,6 @@ class PacketStreamFactory extends Transform{
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    _transform(chunk, encoding, next){
 | 
			
		||||
        if(!chunk){
 | 
			
		||||
            const err = "Chunk was invalid!";
 | 
			
		||||
            logger.error(err);
 | 
			
		||||
            next(err);
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        let packet = new Packet();
 | 
			
		||||
 | 
			
		||||
        const lines = chunk.split("\n");
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user