Commit Graph

26 Commits

Author SHA1 Message Date
djkazic
d8e17e2da3 proxy: implement blocklist 2025-05-14 09:54:34 -04:00
Elle Mouton
c4aa21f487 tools+golangci: update linter 2025-02-27 15:19:27 +02:00
kindknow
29ed0445e8 chore: fix some function names in comment
Signed-off-by: kindknow <iturf@sina.com>
2024-12-29 17:43:04 +08:00
Oliver Gugger
17180f2a8b multi: format test proto with generic script 2024-06-21 11:09:43 +02:00
Oliver Gugger
9ad67ea672 proxy+auth: fix post request 2024-05-24 08:36:06 +02:00
Boris Nagaev
709463fe5b proxy: LSAT and L402 WWW-Authenticate headers
Old clients expect "L402 macaroon=..." in the first WWW-Authenticate, while
the protocol [1] says it should be "WWW-Authenticate: L402 macaroon=...",
so send both LSAT and L402. LSAT must be sent first, to maintain backward
compatibility with older clients.

[1] https://github.com/lightninglabs/L402/blob/master/protocol-specification.md
2024-04-23 09:27:49 -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
Oliver Gugger
27f3a1e15a multi: fix grpc version issue 2023-02-27 13:36:56 +01:00
Oliver Gugger
2b1feae753 multi: bump lnd+lndclient compile time dependency 2023-02-27 13:36:54 +01:00
ffranr
4f8e09f156 lint: remove depreciated tls config field
From the docs:
PreferServerCipherSuites is a legacy field and has no effect.
It used to control whether the server would follow the client's or the
server's preference. Servers now select the best mutually supported
cipher suite based on logic that takes into account inferred client
hardware, server hardware, and security.
2023-01-27 13:27:38 +00: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
positiveblue
2c3cb8c9f7 multi: bump btcec/v2 and btcutil to new versions 2022-03-25 10:30:54 +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
74282b9978 proxy: remove manual trailer fields
The last bugfix added some explicit header fields in an attempt of
fixing an issue with error responses. Unfortunately they weren't
strictly needed for the fix but ended up causing issues in a non-error
case.
This commit removes those header fields again and makes sure the "auth
header not found in response" header doesn't occur anymore.
2021-05-31 21:11:19 +02:00
Oliver Gugger
cf11bcc626 proxy: reproduce and fix weird HTTP/2 error 2021-05-11 13:25:25 +02:00
Oliver Gugger
14d9ef20f2 proxy_test: use require, merge tests 2021-05-07 16:47:03 +02:00
Oliver Gugger
ea8bde6636 proxy: log error when port is used 2021-04-28 09:30:14 +02:00
Oliver Gugger
ec089c4723 config+proxy: disable static file serving by default 2020-07-17 11:09:23 +02:00
Olaoluwa Osuntokun
0c14706fa4 aperture: propagate rename 2020-03-18 13:57:18 -07:00
Oliver Gugger
c6c62b9472 multi: fix all linter errors 2019-12-04 10:58:04 +01:00
Oliver Gugger
b60460feee proxy: add test for auth whitelist 2019-12-04 10:45:08 +01:00
Oliver Gugger
51c7deac05 proxy: replace certificate generation with cert package 2019-12-04 10:45:07 +01:00
Oliver Gugger
4b0a83b46a proxy: test HTTP and gRPC proxying 2019-11-15 09:45:06 +01:00
Oliver Gugger
c8cbeb9ab1 config: add static file root 2019-11-06 13:21:56 +01:00
Oliver Gugger
5a3b8b79d2 proxy: implement basic proxy functionality 2019-11-06 13:21:45 +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