1
0
Fork 0
mirror of https://github.com/SamTherapy/dnscrypt.git synced 2024-12-22 00:50:42 +00:00

Update README.md (#9)

Add import to example code
This commit is contained in:
iamsurfing 2021-06-03 00:28:36 +08:00 committed by GitHub
parent 70b18f35f7
commit 42711ade6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -135,6 +135,10 @@ You can also send a DNSCrypt request using a command that does not require stamp
### <a id="client"></a> Client
```go
import (
"github.com/ameshkov/dnscrypt/v2"
)
// AdGuard DNS stamp
stampStr := "sdns://AQMAAAAAAAAAETk0LjE0MC4xNC4xNDo1NDQzINErR_JS3PLCu_iZEIbq95zkSV2LFsigxDIuUso_OQhzIjIuZG5zY3J5cHQuZGVmYXVsdC5uczEuYWRndWFyZC5jb20"
@ -166,6 +170,10 @@ reply, err := c.Exchange(&req, resolverInfo)
## <a id="server"></a> Server
```go
import (
"github.com/ameshkov/dnscrypt/v2"
)
// Prepare the test DNSCrypt server config
rc, err := dnscrypt.GenerateResolverConfig("example.org", nil)
if err != nil {