Skip to content

feat: add custom header support to PHT protocol#80

Open
ppdms wants to merge 1 commit intogo-gost:masterfrom
ppdms:feature/pht-custom-headers
Open

feat: add custom header support to PHT protocol#80
ppdms wants to merge 1 commit intogo-gost:masterfrom
ppdms:feature/pht-custom-headers

Conversation

@ppdms
Copy link

@ppdms ppdms commented Jan 16, 2026

This PR adds support for custom HTTP headers in the PHT protocol, enabling usage with header-based authentication systems like Cloudflare Access.

Changes

  • 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)

Testing

Tested with Cloudflare Access service tokens - successfully authenticates and proxies traffic.

Backwards compatible - headers are optional.

- 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.
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.

1 participant