Skip to content

Commit 6a22f99

Browse files
authored
Merge pull request #10254 from yyforyongyu/docs-deprecate-tor
docs: add deprecation warning for `tor.v2`
2 parents 01ca50d + dcdc97c commit 6a22f99

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

config_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,16 @@ func TestConfigToFlatMap(t *testing.T) {
2424
cfg.DB.Etcd.Pass = testPassword
2525
cfg.DB.Postgres.Dsn = testPassword
2626

27-
// Set a deprecated field.
27+
// Set deprecated fields.
2828
cfg.Bitcoin.Active = true
29+
cfg.Tor.V2 = true
2930

3031
result, deprecated, err := configToFlatMap(cfg)
3132
require.NoError(t, err)
3233

3334
// Check that the deprecated option has been parsed out.
3435
require.Contains(t, deprecated, "bitcoin.active")
36+
require.Contains(t, deprecated, "tor.v2")
3537

3638
// Pick a couple of random values to check.
3739
require.Equal(t, DefaultLndDir, result["lnddir"])

docs/release-notes/release-notes-0.20.0.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,10 @@ reader of a payment request.
252252
`QueryRoutes` RPC. This [transition](https://github.com/lightningnetwork/lnd/pull/10057) allows us to specify more than one outgoing channel
253253
the pathfinder should use when finding a route.
254254

255+
* Support for Tor v2 onion services is deprecated and will be removed in
256+
v0.21.0. The `--tor.v2` configuration option is now
257+
[hidden](https://github.com/lightningnetwork/lnd/pull/10254).
258+
255259
# Technical and Architectural Updates
256260
## BOLT Spec Updates
257261

lncfg/tor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ type Tor struct {
1212
Control string `long:"control" description:"The host:port that Tor is listening on for Tor control connections"`
1313
TargetIPAddress string `long:"targetipaddress" description:"IP address that Tor should use as the target of the hidden service"`
1414
Password string `long:"password" description:"The password used to arrive at the HashedControlPassword for the control port. If provided, the HASHEDPASSWORD authentication method will be used instead of the SAFECOOKIE one."`
15-
V2 bool `long:"v2" description:"Automatically set up a v2 onion service to listen for inbound connections"`
15+
V2 bool `long:"v2" description:"DEPRECATED: Tor v2 onion services are obsolete and support will be removed in v0.21.0. Use v3 instead." hidden:"true"`
1616
V3 bool `long:"v3" description:"Automatically set up a v3 onion service to listen for inbound connections"`
1717
PrivateKeyPath string `long:"privatekeypath" description:"The path to the private key of the onion service being created"`
1818
EncryptKey bool `long:"encryptkey" description:"Encrypts the Tor private key file on disk"`

0 commit comments

Comments
 (0)