feat: add custom header support to PHT protocol
- Add Header field to PHT Client and clientConn structs - Support custom headers in authorize, push, and pull requests - Add metadata parsing for header configuration as map[string]string - Enables PHT usage with header-based authentication (e.g., Cloudflare Access) Backwards compatible - headers are optional.
This commit is contained in:
committed by
ginuerzh
parent
cd7bf9521f
commit
96f35bd7aa
@@ -109,6 +109,7 @@ func (d *phtDialer) Dial(ctx context.Context, addr string, opts ...dialer.DialOp
|
||||
PushPath: d.md.pushPath,
|
||||
PullPath: d.md.pullPath,
|
||||
TLSEnabled: d.tlsEnabled,
|
||||
Header: d.md.header,
|
||||
Logger: d.options.Logger,
|
||||
}
|
||||
d.clients[addr] = client
|
||||
|
||||
Reference in New Issue
Block a user