Sign inSign up

xantios/socket-wrapper

By xantios

•Updated over 6 years ago

Wrap a unix-socket with JWT Secured HTTP

Image
0

954

xantios/socket-wrapper repository overview

⁠Socket wrapper

Just a simple unix socket wrapper using JWT, please DO NOT expose things to the internet !!

⁠Config

the config file is a simple json file, just replace some values and you should be good to go

⁠Run

Using docker-hub

Generate something like this:

    "jwtSecret": "changeme",
    "users": [
        {
            "username": "example",
            "password": "changeme"
        }
    ],
    "whitelist": [
        "::1",
        "172.0.0.0/8",
        "127.0.0.0/8",
        "192.168.0.0/16"
    ],
    "unixSocket": "/var/run/docker.sock"
}```

and run 
```bash 
docker run --name socket-wrapper -v ./config.json:/app/config.json -p 8080:3000 xantios/socket-wrapper

Using docker

docker build . -t socket-wrapper
docker run --name socket-wrapper -p 8080:3000 socket-wrapper

Without docker

npm start
⁠Usage

Send a username and a password to /users/authenticate and save the token you get back

Use this token in all other requests to connect to your unix-socket over HTTP

Tag summary

Content type

Image

Digest

Size

34.1 MB

Last updated

over 6 years ago

docker pull xantios/socket-wrapper