Commit Graph

25 Commits

Author SHA1 Message Date
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
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
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
Dimitris Apostolou
530a2059e5
multi: Fix typos [skip ci] 2022-01-24 12:19:02 +02: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
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
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
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
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
maurycy
ac24b12bf2
multi: fix various typos in comments 2018-09-07 06:51:49 +02:00
Wilmer Paulino
d6c2957f3c
tor: add inital tor controller implementation
In this commit, we add our inital implementation of a Tor Controller.
This commit includes the ability for the controller to automatically
signal the Tor daemon to create a v2 onion service. This will be
expanded later on to support creating v3 onion services.

Before allowing the controller to interact with the Tor daemon, the
connection must be authenticated first. This commit includes support for
the SAFECOOKIE authentication method as a sane default.

Co-Authored-By: Eugene <crypt-iq@users.noreply.github.com>
2018-06-04 20:41:36 -07:00