Coder Social home page Coder Social logo

multitak's Introduction

multitak

A simple TAK server written in Javascript that relays messages between networks and servers

About

MultiTAK is designed to connect TAK users on various networks together with minimal configuration. It automatically relays TAK messages (COT and proto formats) between multicast, remote TAK servers and it's own hosted TAK server.

MultiTAK is an incomplete implementation of a TAK server, expect issues and report any messages that do not work

Installation

MultiTAK is designed to be used with Docker. Docker images can be found at https://hub.docker.com/r/vidterra/multitak. Images are available for x86, arm64 and arm/v7 (Pi).

Docker

Basic command

docker run -it --rm --net=host vidterra/multitak

Advanced command

docker run -it --rm --net=host --env MULTITAK_API_PORT=9090 --env REMOTE_TCP_SERVER=tcp://your.takserver.com:8087 vidterra/multitak

You must run in host mode for multicast to work

Docker Compose

Create a docker-compose.yml file like this

version: '3.8'

services:
  multitak:
    image: vidterra/multitak
    #env_file: /home/pi/.env
    network_mode: host
    restart: always
    logging:
      options:
        max-file: "3"
        max-size: "50m"

run docker-compose up -d

Node.js

git clone [email protected]:vidterra/multitak.git
npm install
node app/index.js

MultiTAK is designed for Node.js 14.x LTS

Design

MultiTAK is opinionated and designed to work without any user configuration. By default it will listen for TAK messages on all physical network interfaces and repeats what it receives to every interface. It also hosts a simple TAK server and can be a client to a remote TAK server.

MultiTAK can receive TAK proto messages, but will always translate to COT XML for storage and output. Proto to COT translation is incomplete, and some message types may not work correctly yet. MultiTAK relies on https://github.com/vidterra/tak.js for message conversion.

A simple REST JSON API is provided to get information about MultiTAK's message history. MultiTAK is ephemeral and does not save messages between restarts.

Configuration

MultiTAK can be configured using environment variables in 3 ways

  • docker command-line --env or --env-file when starting a container
  • docker-compose docker-compose.yml files with a environment: or a env_file: block
  • a .env in the base folder when running directly using node

Environment Variables

REMOTE_TCP_SERVER=tcp://yourserver:8087

  • MultiTAK will connect to a remote TAK server via TCP
  • When disconnected, reconnection attempts occur every 5 sec.
  • Default is off if not defined

REMOTE_SSL_SERVER=ssl://yourserver:8089

  • MultiTAK will connect to a remote TAK server via SSL
  • Reconnections are not attempted
  • Default is off if not defined

REMOTE_SSL_SERVER_CERTIFICATE=<path to file>

  • SSL certificate in PEM format with no password
  • Required when using REMOTE_SSL_SERVER

REMOTE_SSL_SERVER_KEY=<path to file>

  • SSL certificate key in PEM format with no password
  • Required when using REMOTE_SSL_SERVER

MULTITAK_API_ADDRESS=0.0.0.0

  • IP address for the web API server to listen on
  • Default is 0.0.0.0

MULTITAK_API_PORT=8080

  • Port for the web API server to listen on
  • Default is 8080

MULTITAK_MULTICAST_RECEIVE_DISABLE

  • Disable receiving multicast
  • Default multicast receive enabled if not defined

MULTITAK_MULTICAST_SEND_DISABLE

  • Disable sending multicast
  • Default multicast sending enabled if not defined

INTERFACE_BLACKLIST_SEND=eth0,eth1

  • Comma separated list of ethernet interfaces to ignore sending multicast
  • Default is off if not defined

INTERFACE_BLACKLIST_RECEIVE=eth0,eth1

  • Comma separated list of ethernet interfaces to ignore receiving multicast
  • Default is off if not defined

TCP_SERVER_ADDRESS=0.0.0.0

  • IP address for the TAK message server to listen on
  • Default is 0.0.0.0

TCP_SERVER_PORT=8087

  • Port for the TAK message server to listen on
  • Default is 8087

MESSAGE_HISTORY_LIMIT=1000

  • Maximum # of messages to retain in memory
  • Default is 1000
  • 0 is unlimited

Web API

/api/messages

  • return all messages stored in the history (less than MESSAGE_HISTORY_LIMIT)

Contributing

Contributions are welcome

multitak's People

Contributors

dbussert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

multitak's Issues

Docker-compose Error in yaml file

Install on Raspberry Pi4 running current RaspiOS

running "docker-compose up -d" I get

"ERROR: Version in "./docker-compose.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version (e.g "2.2" or "3.3") and place your service definitions under the services key, or omit the version key and place your service definitions at the root of the file to use version 1.
For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.