summaryrefslogtreecommitdiff
path: root/dialer.go
diff options
context:
space:
mode:
Diffstat (limited to 'dialer.go')
-rw-r--r--dialer.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/dialer.go b/dialer.go
index 5043aeb..db5d7b4 100644
--- a/dialer.go
+++ b/dialer.go
@@ -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