Fix --onion.

The configured onion proxy was not being used due to checking if the
passed string had suffix '.onion', which never matched because the
port number is part of the string.
This commit is contained in:
David Hill 2015-06-10 09:56:25 -04:00
parent 3aac3bda44
commit a1bd15e7c2

View file

@ -834,7 +834,7 @@ func loadConfig() (*config, []string, error) {
// one was specified, but will otherwise use the normal dial function (which
// could itself use a proxy or not).
func btcdDial(network, address string) (net.Conn, error) {
if strings.HasSuffix(address, ".onion") {
if strings.Contains(address, ".onion:") {
return cfg.oniondial(network, address)
}
return cfg.dial(network, address)