forked from lightninglabs/aperture
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sample-conf.yaml
166 lines (133 loc) · 5.37 KB
/
sample-conf.yaml
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# The address which the proxy can be reached at.
listenaddr: "localhost:8081"
# The root path of static content to serve upon receiving a request the proxy
# cannot handle.
staticroot: "./static"
# Should the static file server be enabled that serves files from the directory
# specified in `staticroot`?
servestatic: false
# The log level that should be used for the proxy.
#
# Valid options include: trace, debug, info, warn, error, critical, off.
debuglevel: "debug"
# Whether the proxy should create a valid certificate through Let's Encrypt for
# the fully qualifying domain name.
autocert: false
servername: aperture.example.com
# The port on which the pprof profile will be served. If no port is provided,
# the profile will not be served.
profile: 9999
# Settings for the lnd node used to generate payment requests. All of these
# options are required.
authenticator:
# The host:port which lnd's RPC can be reached at.
lndhost: "localhost:10009"
# The path to lnd's TLS certificate.
tlspath: "/path/to/lnd/tls.cert"
# The path to lnd's macaroon directory.
macdir: "/path/to/lnd/data/chain/bitcoin/simnet"
# The chain network the lnd is active on.
network: "simnet"
# Settings for the etcd instance which the proxy will use to reliably store and
# retrieve token information.
etcd:
# The client host:port which the etcd instance can be reached at.
host: "localhost:2379"
# If authentication is enabled, the user and password required to access the
# etcd instance.
user: "user"
password: "password"
# List of services that should be reachable behind the proxy. Requests will be
# matched to the services in order, picking the first that satisfies hostregexp
# and (if set) pathregexp. So order is important!
#
# Use single quotes for regular expressions with special characters in them to
# avoid YAML parsing errors!
services:
# The identifying name of the service. This will also be used to identify
# which capabilities caveat (if any) corresponds to the service.
- name: "service1"
# The regular expression used to match the service host.
hostregexp: '^service1.com$'
# The regular expression used to match the path of the URL.
pathregexp: '^/.*$'
# The host:port which the service can be reached at.
address: "127.0.0.1:10009"
# The HTTP protocol that should be used to connect to the service. Valid
# options include: http, https.
protocol: https
# If required, a path to the service's TLS certificate to successfully
# establish a secure connection.
tlscertpath: "path-to-optional-tls-cert/tls.cert"
# A comma-delimited list of capabilities that will be granted for tokens of
# the service at the base tier.
capabilities: "add,subtract"
# The set of constraints that are applied to tokens of the service at the
# base tier.
constraints:
# This is just an example of how aperture could be extended
# but would not have any effect without additional support added.
"valid_until": 1682483169
# a caveat will be added that expires the LSAT after this many seconds,
# 31557600 = 1 year.
timeout: 31557600
# The LSAT value in satoshis for the service. It is ignored if
# dynamicprice.enabled is set to true.
price: 0
# Options to use for connection to the price serving gRPC server.
dynamicprice:
# Whether or not a gRPC server is available to query price data from. If
# this option is set to true then the 'price' option is ignored.
enabled: true
# The address of the gRPC pricer server.
grpcaddress: "127.0.0.1:10010"
# Whether or not TLS encryption should be used for communications with the
# gRPC server.
insecure: false
# The path to the pricer server's tls.cert. If the 'insecure' option is
# set to true then this path must be set.
tlscertpath: "path-to-pricer-server-tls-cert/tls.cert"
- name: "service2"
hostregexp: "service2.com:8083"
pathregexp: '^/.*$'
address: "123.456.789:8082"
protocol: https
constraints:
"valid_until": "2020-01-01"
price: 1
- name: "service3"
hostregexp: "service3.com:8083"
pathregexp: '^/.*$'
address: "123.456.789:8082"
protocol: https
constraints:
"valid_until": "2020-01-01"
dynamicprice:
enbled: true
grpcaddress: 123.456.789:8083
insecure: false
tlscertpath: "path-to-pricer-server-tls-cert/tls.cert"
# Settings for a Tor instance to allow requests over Tor as onion services.
# Configuring Tor is optional.
tor:
# The host:port which Tor's control can be reached at.
control: "localhost:9051"
# The internal port we should listen on for client requests over Tor. Note
# that this port should not be exposed to the outside world, it is only
# intended to be reached by clients through the onion service.
listenport: 8082
# The port through which the onion services to be created can be reached at.
virtualport: 8082
# Whether a v3 onion service should be created to handle requests.
v3: false
# Enable the Lightning Node Connect hashmail server, allowing up to 1k messages
# per burst and a new message every 20 milliseconds.
hashmail:
enabled: true
messagerate: 20ms
messageburstallowance: 1000
# Enable the prometheus metrics exporter so that a prometheus server can scrape
# the metrics.
prometheus:
enabled: true
listenaddr: "localhost:9000"