Skip to content

Commit fe60eb4

Browse files
authored
Merge pull request #148 from lightninglabs/multi-fix
multi: update pool, fix docs, fix timeout issue
2 parents 883c560 + 5c6b893 commit fe60eb4

File tree

5 files changed

+23
-6
lines changed

5 files changed

+23
-6
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,15 @@ Lightning Terminal is backwards compatible with `lnd` back to version v0.11.1-be
6666

6767
| LiT | LND |
6868
| ---------------- | ------------ |
69+
| **v0.3.1-alpha** | v0.11.1-beta |
6970
| **v0.3.0-alpha** | v0.11.1-beta |
7071
| **v0.2.0-alpha** | v0.11.0-beta |
7172

7273
## Daemon Versions packaged with LiT
7374

7475
| LiT | LND | Loop | Faraday | Pool |
7576
| ---------------- | ------------ | ----------- | ------------ |---------------|
77+
| **v0.3.1-alpha** | v0.11.1-beta | v0.11.1-beta | v0.2.2-alpha | v0.3.3-alpha |
7678
| **v0.3.0-alpha** | v0.11.1-beta | v0.11.0-beta | v0.2.2-alpha | v0.3.2-alpha |
7779
| **v0.2.0-alpha** | v0.11.1-beta | v0.10.0-beta | v0.2.1-alpha | n/a |
7880
| **v0.1.1-alpha** | v0.11.0-beta | v0.8.1-beta | v0.2.0-alpha | n/a |

doc/config-lnd-integrated.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,10 @@ For `lnd`:
149149
After:
150150

151151
```text
152+
# New flag to tell LiT to run its own lnd in integrated mode. We need to set
153+
# this because "remote" is the new default value if we don't specify anything.
154+
lnd-mode=integrated
155+
152156
# Application Options
153157
lnd.alias=merchant
154158

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require (
1111
github.com/lightninglabs/faraday v0.2.2-alpha
1212
github.com/lightninglabs/lndclient v0.11.0-3
1313
github.com/lightninglabs/loop v0.11.1-beta
14-
github.com/lightninglabs/pool v0.3.2-alpha
14+
github.com/lightninglabs/pool v0.3.3-alpha
1515
github.com/lightningnetwork/lnd v0.11.1-beta
1616
github.com/lightningnetwork/lnd/cert v1.0.3
1717
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,8 @@ github.com/lightninglabs/loop v0.11.1-beta/go.mod h1:xZfGG0AbxwAoarGGLeEl8TEzGm/
235235
github.com/lightninglabs/neutrino v0.11.0/go.mod h1:CuhF0iuzg9Sp2HO6ZgXgayviFTn1QHdSTJlMncK80wg=
236236
github.com/lightninglabs/neutrino v0.11.1-0.20200316235139-bffc52e8f200 h1:j4iZ1XlUAPQmW6oSzMcJGILYsRHNs+4O3Gk+2Ms5Dww=
237237
github.com/lightninglabs/neutrino v0.11.1-0.20200316235139-bffc52e8f200/go.mod h1:MlZmoKa7CJP3eR1s5yB7Rm5aSyadpKkxqAwLQmog7N0=
238-
github.com/lightninglabs/pool v0.3.2-alpha h1:5wIXMBAPqxf7vQSRG/PUfrg47kfRssRGsBW+586Uk1k=
239-
github.com/lightninglabs/pool v0.3.2-alpha/go.mod h1:a955Z6GMXMUZWWbm0ytzVWKxU2uighi1h8PZrjFwmhI=
238+
github.com/lightninglabs/pool v0.3.3-alpha h1:WqCw+9jU6atIxlzau6r08xmiJB9CcWrwdpIgU+1/Zh8=
239+
github.com/lightninglabs/pool v0.3.3-alpha/go.mod h1:a955Z6GMXMUZWWbm0ytzVWKxU2uighi1h8PZrjFwmhI=
240240
github.com/lightninglabs/protobuf-hex-display v1.3.3-0.20191212020323-b444784ce75d h1:QWD/5MPnaZfUVP7P8wLa4M8Td2DI7XXHXt2vhVtUgGI=
241241
github.com/lightninglabs/protobuf-hex-display v1.3.3-0.20191212020323-b444784ce75d/go.mod h1:KDb67YMzoh4eudnzClmvs2FbiLG9vxISmLApUkCa4uI=
242242
github.com/lightningnetwork/lightning-onion v1.0.2-0.20200501022730-3c8c8d0b89ea h1:oCj48NQ8u7Vz+MmzHqt0db6mxcFZo3Ho7M5gCJauY/k=

terminal.go

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -555,9 +555,20 @@ func (g *LightningTerminal) startMainWebServer() error {
555555
// Create and start our HTTPS server now that will handle both gRPC web
556556
// and static file requests.
557557
g.httpServer = &http.Server{
558-
WriteTimeout: defaultServerTimeout,
559-
ReadTimeout: defaultServerTimeout,
560-
Handler: http.HandlerFunc(httpHandler),
558+
// To make sure that long-running calls and indefinitely opened
559+
// streaming connections aren't terminated by the internal
560+
// proxy, we need to disable all timeouts except the one for
561+
// reading the HTTP headers. That timeout shouldn't be removed
562+
// as we would otherwise be prone to the slowloris attack where
563+
// an attacker takes too long to send the headers and uses up
564+
// connections that way. Once the headers are read, we either
565+
// know it's a static resource and can deliver that very cheaply
566+
// or check the authentication for other calls.
567+
WriteTimeout: 0,
568+
IdleTimeout: 0,
569+
ReadTimeout: 0,
570+
ReadHeaderTimeout: defaultServerTimeout,
571+
Handler: http.HandlerFunc(httpHandler),
561572
}
562573
httpListener, err := net.Listen("tcp", g.cfg.HTTPSListen)
563574
if err != nil {

0 commit comments

Comments
 (0)