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

feat: basic server functionality #3

Merged
merged 1 commit into from
Jul 7, 2023
Merged

Conversation

agaffney
Copy link
Contributor

@agaffney agaffney commented Jul 6, 2023

No description provided.

@agaffney agaffney force-pushed the feat/basic-config-and-server branch from 369e62f to 750fca1 Compare July 6, 2023 21:12
@agaffney
Copy link
Contributor Author

agaffney commented Jul 6, 2023

$ ./chnsd 
{"level":"info","timestamp":"2023-07-06T16:09:33-05:00","caller":"chnsd/main.go:69","msg":"starting DNS listener on :8053"}
{"level":"info","timestamp":"2023-07-06T16:09:38-05:00","caller":"dns/dns.go:43","msg":"request: AAAA foo."}
{"level":"info","timestamp":"2023-07-06T16:09:40-05:00","caller":"dns/dns.go:43","msg":"request: A bar."}
$ dig @localhost -p 8053 AAAA foo

; <<>> DiG 9.18.12-0ubuntu0.22.04.2-Ubuntu <<>> @localhost -p 8053 AAAA foo
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 60606
;; flags: qr rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;foo.				IN	AAAA

;; ANSWER SECTION:
test.zone.		0	IN	TXT	"AAAA foo."

;; Query time: 0 msec
;; SERVER: 127.0.0.1#8053(localhost) (UDP)
;; WHEN: Thu Jul 06 16:09:38 CDT 2023
;; MSG SIZE  rcvd: 52
$ dig @localhost -p 8053 A bar

; <<>> DiG 9.18.12-0ubuntu0.22.04.2-Ubuntu <<>> @localhost -p 8053 A bar
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 3146
;; flags: qr rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;bar.				IN	A

;; ANSWER SECTION:
test.zone.		0	IN	TXT	"A bar."

;; Query time: 0 msec
;; SERVER: 127.0.0.1#8053(localhost) (UDP)
;; WHEN: Thu Jul 06 16:09:40 CDT 2023
;; MSG SIZE  rcvd: 49

Copy link
Member

@wolf31o2 wolf31o2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, but with one question.

internal/config/config.go Show resolved Hide resolved
@agaffney agaffney merged commit bed22e8 into main Jul 7, 2023
@agaffney agaffney deleted the feat/basic-config-and-server branch July 7, 2023 16:00
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

Successfully merging this pull request may close these issues.

2 participants