Skip to content

Commit f9f024d

Browse files
authored
Merge pull request #112 from Impa10r/v5.0.4
v5.0.4
2 parents d4bbd1e + 66342ec commit f9f024d

5 files changed

Lines changed: 16 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Versions
22

3+
## 5.0.4
4+
5+
- Bypass Tor proxy for LAN calls to bitcoind
6+
- Fix base64-encoded passwords truncated at "=" character
7+
38
## 5.0.3
49

510
- Allow capitalized supported_assets tickers in peerlist

cmd/psweb/bitcoin/bitcoin.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,15 @@ func BitcoinClient() (c *RPCClient) {
156156
if err != nil {
157157
return nil
158158
}
159+
perHost := proxy.NewPerHost(dialer, proxy.Direct)
160+
perHost.AddFromString("localhost")
161+
perHost.AddFromString("127.0.0.1")
162+
perHost.AddFromString("192.168.0.0/16")
163+
perHost.AddFromString("10.0.0.0/8")
164+
perHost.AddFromString("172.16.0.0/12")
159165
httpClient = &http.Client{
160166
Transport: &http.Transport{
161-
Dial: dialer.Dial,
167+
Dial: perHost.Dial,
162168
},
163169
}
164170
} else {

cmd/psweb/config/cln.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func loadDefaults(home, dataDir, network string) {
5353
// ignore commented out lines
5454
continue
5555
}
56-
if parts := strings.Split(l, "="); len(parts) > 1 {
56+
if parts := strings.SplitN(l, "=", 2); len(parts) == 2 {
5757
if parts[0] == "wallet" {
5858
// ignore inline comments
5959
value := strings.TrimSpace(strings.Split(parts[1], "#")[0])
@@ -240,7 +240,7 @@ func GetPeerswapCLNSetting(section, searchVariable string) string {
240240
// end of section reached
241241
break
242242
}
243-
if parts := strings.Split(line, "="); len(parts) > 1 {
243+
if parts := strings.SplitN(line, "=", 2); len(parts) == 2 {
244244
if parts[0] == searchVariable {
245245
// ignore inline comments
246246
value := strings.TrimSpace(strings.Split(parts[1], "#")[0])

cmd/psweb/config/lnd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ func getConfSetting(searchVariable, filePath string) string {
211211

212212
lines := strings.Split(string(content), "\n")
213213
for _, line := range lines {
214-
if parts := strings.Split(line, "="); len(parts) > 1 {
214+
if parts := strings.SplitN(line, "=", 2); len(parts) == 2 {
215215
if parts[0] == searchVariable {
216216
// ignore inline comments
217217
return strings.TrimSpace(strings.Split(parts[1], "#")[0])

cmd/psweb/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import (
3434

3535
const (
3636
// App VERSION tag
37-
VERSION = "v5.0.3"
37+
VERSION = "v5.0.4"
3838
// Unusable BTC balance
3939
ANCHOR_RESERVE = 25_000
4040
// assume creatediscountct=1 for mainnet in elements.conf

0 commit comments

Comments
 (0)