Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: allow DERP headers to be set#6572

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
kylecarbs merged 7 commits intocoder:mainfromJoshVee:joshvee-websocket-headers
Mar 21, 2023

Conversation

JoshVee
Copy link
Contributor

@JoshVeeJoshVee commentedMar 12, 2023
edited
Loading

This PR adds the ability to set custom HTTP headers to be passed to the Tailscale connection. This allows the websocket-based DERP connection to function behind reverse proxies or tunnels (for example, authentication headers).

The DERP header functionality is controlled via the existing--header CLI flags.

This functionality utilizes the changes introduced in the following PRs:

uri-canva reacted with rocket emoji
@github-actions
Copy link

github-actionsbot commentedMar 12, 2023
edited
Loading

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@JoshVee
Copy link
ContributorAuthor

I have read the CLA Document and I hereby sign the CLA

@JoshVee
Copy link
ContributorAuthor

recheck

@kylecarbs
Copy link
Member

@JoshVee can we make it always use the global HTTP headers instead? I'd rather not add a new top-level flag specifically for DERP.

@JoshVee
Copy link
ContributorAuthor

Thanks@kylecarbs. I've made the relevant changes.

@JoshVee
Copy link
ContributorAuthor

recheck

@JoshVee
Copy link
ContributorAuthor

Hi@kylecarbs,
Any chance we can get this included in the next release? This is a key feature for our use case.
Thanks.

@kylecarbs
Copy link
Member

@JoshVee certainly!

@bpmct
Copy link
Member

bpmct commentedMar 20, 2023
edited
Loading

This is a key feature for our use case.

Can you explain why you need this, is it for a specific LoadBalancer or proxy?

Edit, just saw your comment:coder/tailscale#12 (comment)

cdrcommunity added a commit to coder/cla that referenced this pull requestMar 21, 2023
@kylecarbs
Copy link
Member

@JoshVee doing a release today that will include this. I'm going to make a few minor changes on your branch if that's alright!

Copy link
Member

@mafredrimafredri left a comment

Choose a reason for hiding this comment

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

Looks like scaletest needs some changes, but other than that, LGTM! 👍🏻

@kylecarbskylecarbsforce-pushed thejoshvee-websocket-headers branch fromdcf5d50 toaa99c6cCompareMarch 21, 2023 17:41
for k, v := range h.headers {
req.Header.Add(k, v)
for k, v := range h.header {
for _, vv := range v {
Copy link
Member

Choose a reason for hiding this comment

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

Oh, noticed we don't seem to handle the multi-value when first parsing the headers. Should we?

Copy link
Member

Choose a reason for hiding this comment

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

We probablyshould, but feels like it's not super hard to add in the future anyhow.

mafredri reacted with thumbs up emoji
Header() http.Header
})
if ok {
header = headerTransport.Header().Clone()
Copy link
Member

Choose a reason for hiding this comment

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

(Accidentally deleted this comment): We seem to clone in both the function and here, not an issue per-se just pointing it out.

Copy link
Member

Choose a reason for hiding this comment

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

Ahh, I'll change that!

Copy link
Member

Choose a reason for hiding this comment

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

Fixed!

mafredri reacted with hooray emoji
@kylecarbskylecarbsforce-pushed thejoshvee-websocket-headers branch fromaa99c6c tob543213CompareMarch 21, 2023 17:45
@kylecarbskylecarbsenabled auto-merge (squash)March 21, 2023 17:49
@kylecarbskylecarbs merged commit97f77c4 intocoder:mainMar 21, 2023
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsMar 21, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@mafredrimafredrimafredri approved these changes

@kylecarbskylecarbskylecarbs approved these changes

Assignees

@JoshVeeJoshVee

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@JoshVee@kylecarbs@bpmct@mafredri

[8]ページ先頭

©2009-2025 Movatter.jp