Commit Graph

56 Commits

Author SHA1 Message Date
Elle Mouton
a03d5fcb9e
tor: update btclog dep 2024-10-26 14:18:32 +02:00
ziggie
02c1264c53
multi: prevent nil panics in stop methods.
With this PR we might call the stop method even when the start
method of a subsystem did not successfully finish therefore we
need to make sure we guard the stop methods for potential panics
if some variables are not initialized in the contructors of the
subsystems.
2024-07-31 14:43:34 +02:00
erik
789c6bac8c multi: replace ioutil.WriteFile 2024-04-25 11:23:31 +02:00
erik
ab83343c87 multi: repleace ioutil.ReadFile 2024-04-25 11:22:43 +02:00
ffranr
cd566eb097
multi: fix fmt.Errorf error wrapping
Refactor fmt.Errorf usage to correctly wrap errors instead of using
non-wrapping format verbs.
2024-02-27 11:13:40 +00:00
dependabot[bot]
aa95469b1f
build(deps): bump golang.org/x/net from 0.10.0 to 0.17.0 in /tor
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.10.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.10.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-16 10:45:20 +00:00
positiveblue
09d21345e1
multi: bump Go version
Bump all build go versions to v1.21.0
Bump the minimum build package version to v1.19.0

Debian "buster" is not longer supported. Security updates have been
discontinued since June 30th 2022. We will build using the latest
version, "bookworm".
2023-09-05 10:11:42 -07:00
yyforyongyu
68e6cd5c2e
gomod: run go work sync to sync modules
This commit is the result of running `go work sync` and `go mod tidy`
that syncs module versions for all submodules.
2023-09-05 07:27:20 +08:00
Oliver Gugger
e95720cf3a
tor: short circuit host lookup if connecting to IP
With this commit we avoid calling LookupHost if we already have an IPv4
or IPv6 address, as we can return that directly.
This avoids asking Tor to resolve an IPv6 address, which it cannot do.
2023-06-22 09:43:22 +02:00
dependabot[bot]
534535f8db
build(deps): bump golang.org/x/net in /tor
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.0.0-20211015210444-4f30a5c0130f to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](https://github.com/golang/net/commits/v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-03 09:15:58 +00:00
dependabot[bot]
c9a5a0818c
build(deps): bump golang.org/x/sys in /tor
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.0.0-20211216021012-1d35b9e2eb4e to 0.1.0.
- [Release notes](https://github.com/golang/sys/releases)
- [Commits](https://github.com/golang/sys/commits/v0.1.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-25 10:47:32 +00:00
Olaoluwa Osuntokun
d61e668f56
multi: update to latest version of btcd in submodules
The main package has already been updated, but here we update the
submodules as well that only import things to use a constant or so here
and there.
2022-11-16 17:50:34 -08:00
habibitcoin
0b1e881d18
scripted-diff: replace ⛰ emoji with $ [skip ci]
-BEGIN VERIFY SCRIPT-
sed -i 's/⛰/$/g' $(git grep -l '⛰')
-END VERIFY SCRIPT-
2022-10-28 12:06:49 -04:00
Eng Zer Jun
22cd790586
tor: replace defer cleanup with t.Cleanup
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-10-13 17:47:04 +08:00
Orbital
177f365538
tor: Add option to encrypt Tor private key
This commit lays the groundwork for enabling the option of encrypting a Tor private key on disk, and removes the onion type parameters from the OnionStore interface methods, since they are unused.
2022-09-06 15:14:08 -05:00
Eng Zer Jun
ca1cc68b79
tor: use T.TempDir to create temporary test directory
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-08-24 09:03:05 +08:00
yyforyongyu
0735522194
multi: fix make fmt 2022-08-23 22:10:24 +08:00
Spring Raindrop
ff5b944400
tor: fix parsing replies
Replies may contain quoted values that include spaces, newlines and/or
escaped characters (including doublequote itself). Not accounting for
that leads to errors when e. g. `COOKIEFILE` path contains spaces.
2022-08-17 03:43:06 +00:00
Tommy Volk
9a10c80bcb multi: move many t.Fatalf calls to require.NoError 2022-06-17 04:26:55 +00:00
Olaoluwa Osuntokun
9ec26325b5
build: update to version of neutrino w/ BIP 155 support
Fixes #4973
2022-05-03 15:48:37 -07:00
Oliver Gugger
c5f3110616
tor: make tor its own submodule 2022-03-21 20:41:33 +01:00
Oliver Gugger
895a2e497b
multi: formatting and comment fixes 2022-02-10 11:02:02 +01:00
Dimitris Apostolou
530a2059e5
multi: Fix typos [skip ci] 2022-01-24 12:19:02 +02:00
Oliver Gugger
5155ebc405
tor+healthcheck: fix healthcheck for multiple services
Fixes #6013.
This commit fixes the Tor healthcheck that would previously fail if
there were multiple hidden service registered.
In the controller, we only need to know that our service is contained in
the list of active services. But we can't do a string equality check
since there might be multiple services, comma separated.
2021-11-23 09:53:36 +01:00
yyforyongyu
cbd22a7c74
tor: add method Reconnect to reset connection
A new method, Reconnect, is added to tor controller which can be used to
reset the current connection. This will be later used in healthcheck to
help us reset the connection to Tor Daemon.
2021-10-11 13:11:54 +08:00
yyforyongyu
2800c4364e
tor: add GETINFO method to check liveness of onion service 2021-10-11 13:11:54 +08:00
yyforyongyu
7daffcbba8
tor: add a new response reader for tor controller
This commit adds a new response reader which replaces the old
textproto.Reader.ReadResponse. The older reader cannot handle the case
when the reply from Tor server contains a data reply line, which uses
the symbol "+" to signal such a case.
2021-10-11 13:11:54 +08:00
yyforyongyu
90e6c70ea0
tor: remove Onion Service upon shutdown
This commit adds a new method to call DEL_ONION when lnd is shutting
down. Tor controller will now be aware of the active serviceID and
removes the service upon shutdown.
2021-10-11 13:11:53 +08:00
yyforyongyu
0b80d4feaa
tor: add logging to tor controller 2021-10-11 13:11:53 +08:00
yyforyongyu
a101a53eb4
tor: patch unit tests for tor controller 2021-10-11 13:11:53 +08:00
yyforyongyu
1ebc3b82c8
tor: rename dial to dialProxy
This commit renames dial to be dialProxy to make the connections
clearer. It also cleans the column width and provides more verbose error
messages.
2021-10-11 13:11:52 +08:00
Adrian-Stefan Mares
3378ad0120 config+lnd+tor: Update naming 2021-08-01 14:28:32 +02:00
Adrian-Stefan Mares
be666b55b6 tor: Allow direct connections to clearnet targets 2021-07-10 19:16:57 +02:00
Kishin Kato
e264e67764
Fixed typo in comment
Caught a typo, fixed it.
2021-07-06 18:35:54 +09:00
Oliver Gugger
02267565fe
multi: unify code blocks in READMEs 2021-01-22 09:14:11 +01:00
Oliver Gugger
6f3c8611f4
tor: convert onion v2 addrs into fake tcp6
If we use a chain backend that only understands IP addresses (like
Neutrino for example), we need to turn any Onion v2 host addresses into
a fake IPv6 representation, otherwise it would be resolved incorrectly.
To do this, we use the same fake IPv6 address format that bitcoind and
btcd use internally to represent Onion v2 hidden service addresses.
2020-11-30 22:42:57 +01:00
yyforyongyu
fb67b58d3f
brontide+tor:add timeout value for network connections 2020-09-16 11:50:03 +08:00
Olaoluwa Osuntokun
4cb518c174
Merge pull request #4056 from wpaulino/tor-onion-store
tor+server: add OnionStore to AddOnionConfig with file-based implementation
2020-03-12 18:49:57 -07:00
Tomas Carnecky
018e8b5b97
server+tor: add support for Tor HASHEDPASSWORD authentication method
This provides users an alternative over the SAFECOOKIE authentication
method, which may not be as useful if users are connecting to a remote
Tor sevrer due to lnd not being able to retrieve the cookie file.
2020-03-10 10:32:44 -07:00
Wilmer Paulino
2dfd6a7a3e
tor+server: add OnionStore to AddOnionConfig with file-based impl
In this commit, we modify the AddOnionConfig struct to include an
abstract OnionStore, which will be responsible for storing all relevant
information of an onion service. We also add a file-based implementation
of the interface to maintain the same behavior of storing an onion
service's private key in a file.
2020-03-06 17:44:29 -08:00
Wilmer Paulino
46f4da0b6b
tor: move AddOnion to its own file 2020-03-06 16:01:47 -08:00
Tomas Carnecky
b1fc008433 Tor option to override target ip address 2019-09-14 17:05:32 +02:00
Johan T. Halseth
c4415f0400
Merge pull request #3044 from cfromknecht/spelling-fixes
multi: fix spelling mistakes
2019-05-07 08:50:36 +02:00
Conner Fromknecht
17b2140cb5
multi: fix spelling mistakes 2019-05-04 15:35:37 -07:00
Wilmer Paulino
4eb9ff2abf
tor: use string comparison to check min supported version
The current method would not allow version strings like 0.4.0.5 since it
would check every number of the version string individually.
2019-05-03 11:26:59 -07:00
Alex Akselrod
288870f043 tor: add support for NULL authentication to controller
This change allows the Tor controller to request hidden service
configuration over unauthenticated Tor control ports, such as used
in Whonix.
2019-01-18 22:45:31 -07:00
Olaoluwa Osuntokun
6afee3d099
Merge pull request #1856 from maurycy/typos
multi: fix various typos in comments
2018-09-27 20:38:10 -07:00
Desuuuu
23c03cc51f tor/controller: fix response parsing for values containing the '=' character 2018-09-18 02:56:24 +02:00
Wilmer Paulino
9ae0ac53a2
tor/controller: add tor version number check
In this commit, we add a check for the Tor server's version number to
ensure it supports creating v3 onion services through its control port.
2018-09-11 19:37:10 -07:00
Wilmer Paulino
e38174c7ce
tor/controller: add support for v3 onion services
In this commit, we extend our Tor controller to also support creating v3
onion services, as they are now supported by the Tor daemon. We also
refactor our existing AddOnion method to take in a config struct that
houses all of the required options to create/restore an onion service.
2018-09-11 19:37:09 -07:00