41 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
459a5728db multi: add new strict-verify CLI option to control invoice usage
In this commit, we add a new CLI argument that allows a user to control
if we use strict verification or not. Strict verification relies on
checking the actual invoice state against lnd, and requires more state
for the Aperture server.

When strict verification isn't on, we rely only on the preimage payment
hash relationship. Namely that the only way a user can obtain the
preimage is to pay the invoice, and as we check the HMAC on the
macaroon, we know that we created it with an invoice obtained from lnd.
2025-05-15 14:59:57 -07:00
djkazic
d8e17e2da3 proxy: implement blocklist 2025-05-14 09:54:34 -04:00
Elle Mouton
90941dc033 multi: update btclog, lnd and lndclient deps
Update the deps so that structured logging is available in aperture.
2025-03-05 11:12:29 +02:00
Elle Mouton
c4aa21f487 tools+golangci: update linter 2025-02-27 15:19:27 +02:00
Andras Banki-Horvath
94e80ab128 challenger: configurable invoice query batch size with sane default 2025-01-16 09:41:15 +01:00
Slyghtning
36d5649fec conf: add signet support 2024-11-22 12:07:37 +01:00
Olaoluwa Osuntokun
145b2c56ff config: add new config values for read, write and idle timeout 2023-11-20 12:22:37 -06:00
Olaoluwa Osuntokun
c715f728a9 config: fix profile port arg parsing
In this commit, we fix a subtle bug in the parsing of the yaml config.
With the way the library works, the attribute name needs to match the
config attribute name. Otherwise, parsing just doesn't work.
2023-11-15 16:25:33 -08:00
Olaoluwa Osuntokun
c1dea365a1 config: fix config parsing for new dbbackend option
For the yaml parser, since the public attribute differs from the name of
the yaml field, we need to specify the `yaml` flag.
2023-07-04 17:32:46 -07:00
positiveblue
8dde304da5 config: support config for LNC connections 2023-06-30 13:30:22 -07:00
positiveblue
a9fb600044 config: support params for different database backends 2023-06-14 21:44:19 -07:00
Oliver Gugger
9badd7fb5e multi: remove Tor v2 support 2023-01-27 16:42:23 +01:00
Elle Mouton
870a617657 multi: gc stale mailboxes
In this commit, we start a timer if a mailbox stream is completely
un-occupied (neither read or write stream is occupied). The timer
stopped if either of the streams are occupied and is reset if both
streams are unoccupied.
2022-09-29 11:27:35 +02:00
Elle Mouton
cbc8a414f7 multi: add pprof
This commit adds a config option that can be set inorder to spin up a
pprof profile server on the given port.
2022-09-22 13:54:40 +02:00
positiveblue
2c3cb8c9f7 multi: bump btcec/v2 and btcutil to new versions 2022-03-25 10:30:54 +01:00
Elle Mouton
559d2b3b97 aperture: add NewConfig function
Add a NewConfig func so that all pointer variables in the config object
can be initialised so that we can avoid needing to do nil checks
everywhere.
2022-02-14 09:37:41 +00:00
Elle Mouton
9362f2325f multi: extract prometheus config and exporter
In this commit, the prometheus config is extracted from the hashmail
config so that it can be used more generally.
2022-02-10 09:41:35 +02:00
Elle Mouton
18486d2bf9 config: add group and namespace to hashmail config
Add group and namespace to hashmail config so that hashmail params can
be specified on the command line.
2022-01-21 13:40:06 +02:00
Olaoluwa Osuntokun
dd485d9a8e aperture: add basic gRPC prometheus scraping for hashmail server 2021-11-29 20:22:40 -08:00
Oliver Gugger
7bcc8355d0 multi: configure and start hashmail server
With this commit we make it possible to enable the Lightning Node
Connect mailbox server to be enabled and started as a local service
within aperture.
2021-11-24 17:32:47 +01:00
carla
3184fe63de multi: add base dir to aperture 2021-10-04 09:11:32 +02:00
carla
0b8128232d aperture: add config file flag and parse command line flags 2021-09-28 10:14:44 +02:00
carla
e6fae0f007 aperture: add validation to config 2021-09-28 10:14:43 +02:00
carla
a0cf13ba00 config: make etcd, tor and auth groups so they can be specified inline
Our yaml parsing is unaffected, but this change allows us to specify
these groups one param at a time. We do not update services because they
require special grouping, so we leave that as a json parameter.
2021-09-28 10:14:42 +02:00
carla
9bddd76993 aperture: add descriptions to lnd config 2021-09-28 10:14:41 +02:00
Elle Mouton
0206ecb031 multi: add disable authenticator option
To make it easier to use aperture in a setup where we only need its
proxy functionality but not its LSAT capabilities, we add the option to
disable the authenticator. This makes it possible to run aperture
without needing to connect it to an lnd node.
2021-07-15 11:19:30 +02:00
Oliver Gugger
087c52a358 multi: export config structs
In order to allow running aperture as a library, we need to export its
configuration structs so they can be instantiated externally.
2021-07-15 11:19:29 +02:00
Gregor Pogacnik
665eed84e1 Kirin comments renamed to Aperture 2020-12-29 17:26:12 +01:00
Oliver Gugger
ec089c4723 config+proxy: disable static file serving by default 2020-07-17 11:09:23 +02:00
Oliver Gugger
52e03c826b config+aperture: add insecure flag 2020-05-05 09:54:07 +02:00
Olaoluwa Osuntokun
0c14706fa4 aperture: propagate rename 2020-03-18 13:57:18 -07:00
Wilmer Paulino
494fdcc0a3 kirin: allow handling client requests over Tor onion services
In this commit, we integrate Tor onion services into the proxy. Clients
can now make their requests through Tor's encrypted network. To make
this possible, there were a few quirks, the most important being that
clients were unable to establish encrypted HTTP/2 connections due to
TLS certificates not being able to verify onion services. To work around
this, we now spin up an additional HTTP/2 server _without TLS_ that's
not exposed to the outside world and can only be accessed through the
onion services, which already provide encryption.

Once the onion services are created, we store their private keys within
etcd to ensure we can recover them later on as the proxy is intended to
be long-lived.
2020-03-13 12:54:33 -07:00
Oliver Gugger
9af8647028 config: add autocert options 2020-01-10 14:00:36 +01:00
Oliver Gugger
c6c62b9472 multi: fix all linter errors 2019-12-04 10:58:04 +01:00
Wilmer Paulino
401c0e2d38 kirin: add etcd client configuration
Allows the ability for the proxy to connect to an etcd cluster for any
reliable data storage purposes. No data is being stored yet as of this
commit, but we'll be storing LSAT secrets at a later commit.

One key component in this commit is that we introduce a new top level
key that will serve to hold all LSAT proxy-related data. Any nested keys
should be prefixed with said top level key.

Co-authored-by: Oliver Gugger <gugger@gmail.com>
2019-11-25 17:08:32 -08:00
Oliver Gugger
8cbb4fc4fb auth: create invoice request with closure, add challenger 2019-11-12 12:02:09 +01:00
Oliver Gugger
c8cbeb9ab1 config: add static file root 2019-11-06 13:21:56 +01:00
Oliver Gugger
7e0c1dd97e multi: add persistent logger 2019-11-06 13:21:51 +01:00
Oliver Gugger
5a3b8b79d2 proxy: implement basic proxy functionality 2019-11-06 13:21:45 +01:00
Oliver Gugger
9552a70cb9 proxy: match service with regular expressions 2019-11-04 12:43:25 +01:00
Valentine Wallace
279fa2a64b Initial version of the proxy.
Missing: logging, an Authenticator implementing the LSAT HTTP
and gRPC protocol.
2019-09-12 16:41:25 -07:00