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

Changes from upstream #2

Open
wants to merge 68 commits into
base: upstream
Choose a base branch
from
Open

Changes from upstream #2

wants to merge 68 commits into from

Conversation

willscott
Copy link
Member

Creating a PR over local changes as a place to do code review

.goreleaser.yml Outdated
homepage: https://packetframe.com
maintainer: Nate Sales <[email protected]>
description: Oblivious DNS over HTTPS server
license: GNU GPL-3.0
Copy link
Member Author

Choose a reason for hiding this comment

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

given the use of MIT code from cloudflare, the easiest is to continue to mark this overall as an MIT package, if that's acceptable to you.

Copy link
Member

Choose a reason for hiding this comment

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

Good catch, that's a mistake on my part. Fixed in 9606a68

Copy link
Member

Choose a reason for hiding this comment

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

And the hompage there is wrong too. Remnants from an old package. Fixed in 4f4ccc5

main.go Outdated
log.Fatal(err)
}

keyPair, err := odoh.CreateKeyPairFromSeed(hpke.DHKEM_X25519, hpke.KDF_HKDF_SHA256, hpke.AEAD_AESGCM128, seed)
Copy link
Member Author

Choose a reason for hiding this comment

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

Is it okay to have the keypair only rotate on process restart? is it worth having the seed periodically roll over within the lifetime of the process?

Copy link
Member

Choose a reason for hiding this comment

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

I'll have to look deeper into the IETF draft to see if there's an explicit policy about this. From an initial look I'm not seeing any reference to automated key rollover, so if we were to add this what interval would you recommend? Should it be a configurable parameter?

Also, one thing that we may add later is configuration for long lived TLS sessions that are set up when the process starts. We'd need to keep this in mind during key rollover.

Copy link
Member Author

Choose a reason for hiding this comment

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

i imagine this would be needed for resuming sessions more efficiently, or something of that nature? having it rotate once a day seems like a reasonable default there.
Based on how it's passed in / used, I would expect that long-lived connections would continue to use whatever key existed when they were initiated, right?

Copy link
Member

Choose a reason for hiding this comment

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

I'll have to test to make sure, but it seems logical that we would keep any long lived sessions with their original key unless it's required by the protocol to keep it current.

main.go Outdated

target := &targetServer{
resolver: &targetResolver{
timeout: 2500 * time.Millisecond,
Copy link
Member Author

Choose a reason for hiding this comment

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

possible to make this configurable?

Copy link
Member

Choose a reason for hiding this comment

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

Good point. Timeouts are now configurable: 5e1a4dc

main.go Outdated
client: &http.Client{
Transport: &http.Transport{
MaxIdleConnsPerHost: 1024,
TLSHandshakeTimeout: 0 * time.Second,
Copy link
Member Author

Choose a reason for hiding this comment

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

shouldn't we force some sort of timeout here?

Copy link
Member

Choose a reason for hiding this comment

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

As per #2 (comment), timeouts are now configurable in 5e1a4dc

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