Skip to content

Conversation

EthanHeilman
Copy link
Contributor

This adds the ability to specify additional HTTP headers in the Extended Connect.

cl := masque.Client{
  QUICConfig:      quicConf,
  TLSClientConfig: tlsConf,
  Headers:         http.Header{"EXAMPLE_HEADER": []string{"example_header_value}},
}
tunnelConn, _, err := cl.Dial(
  context.Background(),
  uritemplate.MustNew(template),
  targetAddr,
)

Copy link

codecov bot commented May 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.41%. Comparing base (b312bc5) to head (1ca9b66).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #85      +/-   ##
==========================================
+ Coverage   74.08%   74.41%   +0.33%     
==========================================
  Files           4        4              
  Lines         382      387       +5     
==========================================
+ Hits          283      288       +5     
  Misses         77       77              
  Partials       22       22              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@marten-seemann
Copy link
Member

Which issue does this resolve?

@EthanHeilman
Copy link
Contributor Author

@marten-seemann The issue this solves is that I wanted to set HTTP headers in the extended connect and AFAIC masque-go didn't expose a way to do this.

I was writing some code, ran into some features I needed in masque-go. Added them to my local fork and then figured I'd push them upstream in case upstream seems them as valuable. I have one more PR incoming.

@marten-seemann
Copy link
Member

@marten-seemann The issue this solves is that I wanted to set HTTP headers in the extended connect

I can see that :)
My question is: what do you need this for?

@EthanHeilman
Copy link
Contributor Author

I'm doing reverse QUIC tunnels for rendezvous nodes. I'm using the HTTP headers to offer the ability to associate arbitrary metadata with the tunnel on first connect.

I don't think this use case is that unusual HERMES does something similar with HTTP headers in QUIC proxies.

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