-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.toml
51 lines (45 loc) · 2 KB
/
config.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# clip-sync
# Roles can be "server", "websocket-client", "mqtt-client"
# "server" starts a websocket server that can be used by clients to sync their clipboards
# "websocket-client" connects to a server
# "mqtt-client" connects to an MQTT broker and publishes clipboard updates to a topic
roles = ["server", "websocket-client", "mqtt-client"]
# Server configuration
# Only used if "server" is in the roles list
[server]
endpoint = "0.0.0.0:443"
# Set to `true` if you want to use TLS, the server cert is verified by clients with system Root CAs, so you should use a cert signed by a trusted CA,
# Or you have to add the CA cert to the client's trust store
use-tls = true
# Ignored if use-tls is false
cert-path = "/path/to/server.crt"
# Ignored if use-tls is false
key-path = "/path/to/server.key"
# Can be omitted if authentication is not required
secret = "magicword"
# Index is in memory if omitted, specify a path to a directory to use a persistent index
index-path = "/path/to/index/dir"
# Path to a directory where images will be stored
image-path = "/path/to/image/dir"
# Path to a directory where the UI bundle will be stored, UI bundle is generated by running `npm run build` in the `clip-sync-ui` directory
web-root = "/path/to/ui/bundle/dir"
# Websocket client configuration
# Only used if "websocket-client" is in the roles list
[websocket-client]
# Protocol can be "ws"/"http" or "wss"/"https", depending on whether the server uses TLS
server-url = "https://server.example.com/"
# Can be omitted if authentication is not required
secret = "magicword"
# MQTT client configuration
# Only used if "mqtt-client" is in the roles list
[mqtt-client]
mqtt-server-addr = "mqtt-server.example.com"
mqtt-server-port = 1883
# Can be omitted if no authentication is required
# mqtt-username = "some-mqtt-username"
# Can be omitted if no authentication is required
# mqtt-password = "some-mqtt-password"
# Default is "clipboard"
# mqtt-topic = "clipboard"
# Default is the hostname of the machine
# mqtt-client-id = "some-mqtt-client-id"