Skip to content

Commit

Permalink
Fix --onion.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dajohi committed Jun 10, 2015
1 parent 3aac3bd commit a1bd15e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config.go
Expand Up @@ -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)
Expand Down

0 comments on commit a1bd15e

Please sign in to comment.