diff options
Diffstat (limited to 'dialer.go')
-rw-r--r-- | dialer.go | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -76,21 +76,22 @@ func unpackCert(cert string) (*ntor.NodeID, *ntor.PublicKey, error) { return nodeID, pubKey, nil } -// NewDialerCert creates a dialer from a node certificate. -func NewDialerCert(cert string) (*Dialer, error) { +// NewDialerFromCert creates a dialer from a node certificate. +func NewDialerFromCert(cert string) (*Dialer, error) { nodeID, publicKey, err := unpackCert(cert) if err != nil { return nil, err } - return &Dialer{ + d := &Dialer{ NodeID: nodeID, PublicKey: publicKey, - }, nil + } + return d, nil } -// NewDialerArgs creates a dialer from existing pluggable transport arguments. -func NewDialerArgs(args pt.Args) (*Dialer, error) { +// NewDialerFromArgs creates a dialer from existing pluggable transport arguments. +func NewDialerFromArgs(args pt.Args) (*Dialer, error) { cf, err := (&obfs4.Transport{}).ClientFactory("") if err != nil { return nil, err |