What changed, and why it matters
This commit marks the `tor.v2` configuration option in LND as deprecated. Tor v2 onion services are an older, weaker addressing format that the Tor network itself has made obsolete. The change hides the option from help text and warns users to switch to v3 onion services. It is a deprecation/cleanup patch, not a fix for an active software vulnerability in LND itself.
No urgent action is required. Operators still using `tor.v2` should plan to migrate to `tor.v3` before support is removed in LND v0.21.0. Reviewers should confirm that the eventual removal of v2 support is tracked and communicated in release notes.
Security signals we found
Deprecation of Tor v2 onion services, which are cryptographically weaker than v3
Option hidden from default help output to discourage new use
No functional or cryptographic code change
Evidence from the diff
The patch adds hidden:"true" and updates the description of the V2 field in lncfg/tor.go to indicate that Tor v2 onion services are deprecated and will be removed in v0.21.0, directing users to v3. It also updates config_test.go to assert that tor.v2 is reported as a deprecated option by configToFlatMap. There is no code change to behavior, authentication, cryptography, or network handling.
Changed components
lncfg/tor.goconfig_test.goTor v2 onion service configuration optionInspect captured patch +4 / −2
diff --git a/config_test.go b/config_test.go
index 6383a99..7655807 100644
--- a/config_test.go
+++ b/config_test.go
@@ -24,14 +24,16 @@ func TestConfigToFlatMap(t *testing.T) {
cfg.DB.Etcd.Pass = testPassword
cfg.DB.Postgres.Dsn = testPassword
- // Set a deprecated field.
+ // Set deprecated fields.
cfg.Bitcoin.Active = true
+ cfg.Tor.V2 = true
result, deprecated, err := configToFlatMap(cfg)
require.NoError(t, err)
// Check that the deprecated option has been parsed out.
require.Contains(t, deprecated, "bitcoin.active")
+ require.Contains(t, deprecated, "tor.v2")
// Pick a couple of random values to check.
require.Equal(t, DefaultLndDir, result["lnddir"])
diff --git a/lncfg/tor.go b/lncfg/tor.go
index f41d7b0..932d5df 100644
--- a/lncfg/tor.go
+++ b/lncfg/tor.go
@@ -12,7 +12,7 @@ type Tor struct {
Control string `long:"control" description:"The host:port that Tor is listening on for Tor control connections"`
TargetIPAddress string `long:"targetipaddress" description:"IP address that Tor should use as the target of the hidden service"`
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."`
- V2 bool `long:"v2" description:"Automatically set up a v2 onion service to listen for inbound connections"`
+ 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"`
V3 bool `long:"v3" description:"Automatically set up a v3 onion service to listen for inbound connections"`
PrivateKeyPath string `long:"privatekeypath" description:"The path to the private key of the onion service being created"`
EncryptKey bool `long:"encryptkey" description:"Encrypts the Tor private key file on disk"`
Why this scored 21/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.