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

TCP support #1033

Open
kuritka opened this issue Nov 24, 2022 · 4 comments
Open

TCP support #1033

kuritka opened this issue Nov 24, 2022 · 4 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@kuritka
Copy link
Collaborator

kuritka commented Nov 24, 2022

DNS runs primarily on UDP. Support TCP is low-hanging fruit. Roughly it is just a matter of changing the DNS server request settings.

TCP support has another - for contributor very important reason. If I'm not in an environment that supports UDP (e.g: colima) and I need to start debugging k8gb (in my case directly from my IDE), I have to make temporary changes in the dns.go file. Would be nice keep settings in ENV_VARS only.

Instructions

  • Introduce a new config variable e.g.: EDGE_DNS_PORT EDGE_DNS_PROTOCOL

    • keep UDP as default protocol
    • cover by unit tests
  • Fix the implementation in the utils package, e.g.:

        // something like this (localhost:1053 is defined in envvars as well):
 	// msg, err = dns.Exchange(m, ns.String())
        client := dns.Client{Net: "tcp"}
        msg, _, err = client.Exchange(m, "localhost:1053")
@kuritka kuritka added enhancement New feature or request good first issue Good for newcomers labels Nov 24, 2022
@somaritane
Copy link
Contributor

@kuritka I'd suggest using EDGE_DNS_PROTOCOL, port is something that can be changed and it's not necessarily tied to a certain protocol type.

@kuritka
Copy link
Collaborator Author

kuritka commented Nov 24, 2022

@somaritane Hey, thanks for the heads up. Of course, I was referring to the protocol. My mistakes; Fixed

@goku321
Copy link

goku321 commented Dec 19, 2023

Hello. I would like to work on this :)

@ytsarev
Copy link
Member

ytsarev commented Dec 19, 2023

Hi @goku321 , amazing! I assigned this one to you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants