Skip to content

Commit

Permalink
update doh-client
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptix committed Aug 13, 2024
1 parent 4c23c13 commit 6747e68
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion golang/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ toolchain go1.21.7
require (
github.com/davecgh/go-spew v1.1.1
github.com/miekg/dns v1.1.58
github.com/shynome/doh-client v1.1.0
github.com/shynome/doh-client v1.2.0
github.com/stretchr/testify v1.9.0
github.com/urfave/cli/v2 v2.27.1
)
Expand Down
2 changes: 2 additions & 0 deletions golang/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/shynome/doh-client v1.1.0 h1:g42zg3cJjMEG7hZpoV0r8caxCB63hps+YhpN5mykxtU=
github.com/shynome/doh-client v1.1.0/go.mod h1:fSKGg5Q8Mo2oYF2KsLxPkE8Hf0xbyw2PJXtYl5QAz1Y=
github.com/shynome/doh-client v1.2.0 h1:ZtW0ztE0lPytvq6WdIIB2JdNkTlS4W7jTRzpc4qfC4I=
github.com/shynome/doh-client v1.2.0/go.mod h1:fSKGg5Q8Mo2oYF2KsLxPkE8Hf0xbyw2PJXtYl5QAz1Y=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/urfave/cli/v2 v2.27.1 h1:8xSQ6szndafKVRmfyeUMxkNUJQMjL1F2zmsZ+qHpfho=
Expand Down
15 changes: 4 additions & 11 deletions golang/wasm/wrapper_js.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"github.com/miekg/dns"

"github.com/NetworkCommons/sig0namectl/sig0"
"net/url"
)

// Go <-> JS bridging setup
Expand Down Expand Up @@ -90,9 +89,9 @@ func listKeysFiltered(_ js.Value, args []js.Value) any {
// checkKeyStatus()
// arguments: 3
//
// arg 1: keystore key filename prefix
// arg 2: key zone
// arg 3: DoH server
// arg 1: keystore key filename prefix
// arg 2: key zone
// arg 3: DoH server
//
// Returns an array of JSON object of keystore status bool values
//
Expand Down Expand Up @@ -482,13 +481,7 @@ func query(_ js.Value, args []js.Value) any {
}
}
if du := opt.Get("dohurl"); du.Type() == js.TypeString {
duStr := du.String()
duUrl, err := url.Parse(duStr)
if err == nil {
dohResolver = duUrl.Host
} else {
dohResolver = duStr
}
dohResolver = du.String()
}
return nil
}
Expand Down

0 comments on commit 6747e68

Please sign in to comment.