An open API service indexing awesome lists of open source software.

https://github.com/maxirmx/o-container

O!Service OpenVPN docker container
https://github.com/maxirmx/o-container

openvpn openvpn-configuration openvpn-installer vpn

Last synced: 4 months ago
JSON representation

O!Service OpenVPN docker container

Awesome Lists containing this project

README

          

# TrustVPN

OpenVPN docker container for trustvpn projects
This is a small wrap up of ```kylemanna/openvpn```, nothing more

## Configuration and initalization

User profiles are defined by files in app/profiles folder. File names shall match profile names as operated by openvpn-backend. Should you need to alter/add profiles you will need to rebuild container or modify container internals.

The name ```blocked``` is reserved for blocked users. It should not be used as a profile name. It is not controlled but will break blocking logic.

Container shall be initialized with the following command:
```
docker run -rm -v :/etc/openvpn trustvpn-container bash -c "trustvpn-container-config -u "
```

## API

API calls are actually bash scripts that shall be executed inside container after its initialization, i.e.: something like
```
docker run -rm -v :/etc/openvpn trustvpn-container bash -c ""
```
Please refer to ```tests api-tests.sh``` for examples

All API calls return 0 on success, 1 in case of error. Additionally ```create\modify\block\remove``` output end output with ```" == OK == "``` in case of success.

```
trustvpn-client-create
```
Sets up access for ``````, links personal configuration to ``````

```
trustvpn-client-get
```
Outputs to ```stdout``` personal OpenVPN configuration file for ``````

```
trustvpn-client-modify
```
Links `````` personal configuration to ``````

```
trustvpn-client-remove
```
Removes profile for ``````, i.e.: revokes key, removes personal configuration