Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need 2 new function to solve unencrypted dial #10

Open
iamsurfing opened this issue Jun 7, 2021 · 2 comments
Open

Need 2 new function to solve unencrypted dial #10

iamsurfing opened this issue Jun 7, 2021 · 2 comments

Comments

@iamsurfing
Copy link
Contributor

github.com/ameshkov/dnscrypt/[email protected]/client.go:216
r, _, err := client.Exchange(query, stamp.ServerAddrStr)

It request certificate using plaintext not encrypted DNS request, so I want 2 functions to set certificate information.

new--->func (c *Client) SetCertInfo(stamp dnsstamps.ServerStamp, certinfo dns.Msg) (*ResolverInfo, error)
from--->func (c *Client) Dial(stampStr string) (*ResolverInfo, error)
new-->func (c *Client) SetCertInfoByStamp(stampStr string, certinfo dns.Msg) (*ResolverInfo, error)
from--->func (c *Client) DialStamp(stampStr string) (*ResolverInfo, error)

@ameshkov
Copy link
Owner

ameshkov commented Jun 8, 2021

It request certificate using plaintext not encrypted DNS request, so I want 2 functions to set certificate information.

That's how it's supposed to work according to DNSCrypt spec: https://dnscrypt.info/protocol/

If you want to avoid this, you can compose ResolverInfo manually without using these two functions.

@iamsurfing
Copy link
Contributor Author

If It has 2 new functions, I think I can add a switch to control it.
#11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants