Commit Graph

66 Commits

Author SHA1 Message Date
Oliver Gugger
795949f4a1 multi: update to lnd v0.18.4-beta release branch 2024-10-15 14:10:48 +02:00
Oliver Gugger
a17ecf6520 mod+aperture: bump lnd compile time dependency to latest master
Due to a change in the logging library of lnd, we need to pass in a new
parameter to be compatible with the latest lnd master version.
2024-09-18 17:03:36 +02:00
Boris Nagaev
866322689e aperture: change invoice memo from LSAT to L402 2024-04-16 19:34:12 -03:00
Boris Nagaev
a4431801ef multi: replace LSAT with L402
auth: LsatAuthenticator -> L402Authenticator
sed -i 's/LsatAuthenticator/L402Authenticator/g' aperture.go auth/authenticator.go auth/authenticator_test.go

rename package lsat to l402
git mv lsat/ l402
sed 's@aperture/lsat@aperture/l402@g' -i `git grep -l aperture/lsat`
sed -i 's@package lsat@package l402@' `git grep -l 'package lsat'`
sed -i 's@lsat\.@l402.@g' -i `git grep -l 'lsat\.'`
sed 's@l402.Id@lsat.Id@' -i mint/mint_test.go

replace lsat with l402 in the code
sed 's@lsat@l402@' -i mint/mint_test.go
sed 's@Lsat@L402@' -i l402/client_interceptor.go
sed 's@lsatstore@l402store@' -i l402/store_test.go

replace LSAT to L402 in comments
sed '/\/\//s@LSAT@L402@g' -i `git grep -l '//.*LSAT'`

replace LSAT -> L402 in the code, skip when a string starts with it
sed 's@\([^"/]\)LSAT@\1L402@g' -i `git grep -l LSAT`
2024-04-16 19:33:03 -03: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
9ea2efc3bd aperture: start setting default values for the http timeout configs
In this commit, we start to set default values for the HTTP timeout
config values. Otherwise, it's possible that TCP connections will never
be closed, causing them to stack up over time, eventually consuming a
lot of memory.
2023-11-20 12:22:35 -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
positiveblue
cd7ee83b57 config: set default mailbox address
Make the LNC authenticator use the default mailbox address whenever the
config does not specify a custom one.
2023-07-05 09:18:04 -07:00
positiveblue
aa9ca467da aperture: initialize server with the configured authenticator 2023-06-30 15:22:28 -07:00
positiveblue
4e81f5ddb5 challenger: move challenger logic to its own package
The new package contains a new interface (`Challenger`) that any
new challenger must implement.

Because aperture uses the new interface instead of using directly the
`LndChallenger` struct I added the `Stop()` method to the
`mint.Challenger`. Instead of also adding the `Start()` method the constructor
returns a Challenger already "started".
2023-06-30 15:22:28 -07:00
positiveblue
a04f3b1e0f challenger: custom context for LightningClient methods
Whenever we use the LightningClient from an LNC connection we need to
add the macaroon to the headers.
2023-06-30 15:22:27 -07:00
positiveblue
3d53f20597 multi: use InvoiceClient in NewLndChallenger
Stop creating the connection inside the `NewLndChallenger`. That will
allow us reuse the function with an LNC connection.
2023-06-30 15:22:27 -07:00
Oliver Gugger
f17b877806 multi: address linter issues 2023-06-15 14:11:09 +02:00
positiveblue
bf96592f63 aperture: initialize server with the configured db backend 2023-06-14 21:44:20 -07:00
Buck Perley
62f604bfe8 aperture: adds timeout option for services for relative expiration 2023-04-25 23:29:31 -05:00
Oliver Gugger
2b1feae753 multi: bump lnd+lndclient compile time dependency 2023-02-27 13:36:54 +01:00
Oliver Gugger
9badd7fb5e multi: remove Tor v2 support 2023-01-27 16:42:23 +01:00
ffranr
db30c8384d lint: remove depreciated io/ioutil
As of Go 1.16, functionality provided in io/ioutil has been depreciated
in favour of the io or os packages. Now that Go has been
upgraded in go.mod, the linter will not pass without these changes.
2023-01-27 13:27:38 +00: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
Oliver Gugger
d86e49706f aperture: only register prometheus metrics when enabled
To avoid running into an issue in the race unit test with the Prometheus
histogram metrics that aren't concurrency safe, we don't register any of
them if Prometheus isn't enabled in the first place.
This shouldn't be an issue in production, since we don't start multiple
instances of Aperture _within the same process_ at the same time.
2022-03-25 14:22:31 +01: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
32842116d6 aperture: export hashmail grpc metrics to prometheus 2022-02-10 09:44:30 +02: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
ffeafa4d2e aperture: hashmail keepalive enforcement policy
Lower the MinTime frequency that the client is allowed to send pings to
1 min instead of the default of 5 mins.
2022-02-08 12:07:26 +02:00
Oliver Gugger
9ffd5d8de7 aperture: connect REST proxy correctly when insecure is set 2022-02-02 17:18:49 +01:00
Elle Mouton
655bca0ecb aperture: disable websocket proxy pings for hashmail server
Set the ping and pong intervals of the websocket proxy to zero in order
to disable them. This is needed since a browser client is unable to
respond to these pings.
2022-01-21 13:40:30 +02:00
Olaoluwa Osuntokun
dd485d9a8e aperture: add basic gRPC prometheus scraping for hashmail server 2021-11-29 20:22:40 -08:00
Oliver Gugger
7c7b1145eb hashmail_server: fix writes up to 2 MB
This commit adds the ability for a mailbox message to be up to 2MB in
size.
2021-11-24 17:32:47 +01: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
Oliver Gugger
c45cd3a317 proxy+aperture: refactor to local service
We want aperture to handle some of the incoming requests on its own,
without forwarding/proxying them to a remote backend. Those "local"
services can register themselves and will be given every request for
inspection. If a service decides to handle it locally, the request is
passed to that service and not forwarded.
2021-11-24 17:32:46 +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
264fc2f998 aperture: allow relative macaroon/tls paths 2021-09-28 10:14:41 +02:00
carla
c22c0db128 aperture: parse command line flags 2021-09-28 10:14:40 +02:00
Elle Mouton
853b131d80 multi: cleanup proxy
This commit adds to ability to cleanup the Proxy by adding a Close
method and calling this method during server shut down.
2021-08-03 14:30:55 +02:00
Oliver Gugger
beed396b0e Merge pull request #56 from lightninglabs/custom-config-file
Refactor to be run as library in integration tests
2021-07-30 09:12:14 +02:00
Oliver Gugger
aa3f3cfcde multi: update to lnd with etcd 3.5 2021-07-30 09:00:21 +02:00
Alex Miller
f7fa03917e aperture: add servername to self-signed cert 2021-07-22 16:31:16 -04: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
5061b659c9 aperture: allow updating services at runtime
In order to be able to dynamically update the proxy's backend
configuration, we add a new method that can overwrite the list of
backend services.
2021-07-15 11:19:30 +02:00
Oliver Gugger
b85c7089a2 aperture: allow aperture to be run in-process
We refactor the main Aperture service code into a struct that can be
started and stopped. This allows aperture to be used more easily as a library in
other projects.
2021-07-15 11:19:29 +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
Oliver Gugger
b88feb173f multi: update to lnd 0.13.0-beta
We update the compile time dependency of lnd to version 0.13.0-beta to
make it easier to run aperture in the same process as other projects
which also updated.
The runtime dependency is still kept at v0.12.0-beta as we don't use any
new RPCs.
2021-07-15 11:19:12 +02:00
Oliver Gugger
c4778c3fd2 multi: update dependencies 2021-05-07 16:47:03 +02:00
Gregor Pogacnik
665eed84e1 Kirin comments renamed to Aperture 2020-12-29 17:26:12 +01:00
Oliver Gugger
ad6a69b1b5 mod: update to latest lnd and lndclient dep 2020-12-02 10:17:52 +01:00
Oliver Gugger
e1269a7f86 aperture+challenger: add error channel to challenger
To make sure we can capture errors in the challenger's invoice
subscription, we hand the main error channel to the challenger so it can
report back errors on it.
2020-09-23 10:11:49 +02:00