]> Sergey Matveev's repositories - tofuproxy.git/blobdiff - httpauth.go
External netrc module
[tofuproxy.git] / httpauth.go
index 92eff6e699dc81fa0261438a804ab713525d8499..96f23d48a5b31bebae0b4defa4eecc19f6c9185a 100644 (file)
@@ -25,12 +25,13 @@ import (
        "os/exec"
        "strings"
 
+       "go.cypherpunks.ru/netrc"
        ttls "go.stargrave.org/tofuproxy/tls"
 )
 
 func authDialog(host, realm string) (string, string, error) {
        var b bytes.Buffer
-       userInit, passInit := findInNetrc(host)
+       userInit, passInit := netrc.Find(host)
        fmt.Fprintf(&b, `
 tk_setPalette grey
 wm title . "Unauthorized: %s"