Add support for client identities in http requests

This commit is contained in:
Owen
2026-10-12 16:57:05 -04:00
parent 7856d5f4c1
commit 7c9841b2c6
8 changed files with 317 additions and 14 deletions
+18
View File
@@ -376,6 +376,24 @@ func (net *Net) ReplaceProxySubnetRules(rules []SubnetRule) {
}
}
// ReplaceClientIdentities replaces the full set of client identities used by
// the HTTP proxy to set Remote-* headers.
func (net *Net) ReplaceClientIdentities(ids []ClientIdentity) {
tun := (*netTun)(net)
if tun.proxyHandler != nil {
tun.proxyHandler.ReplaceClientIdentities(ids)
}
}
// AddClientIdentities adds or overwrites client identities used by the HTTP
// proxy to set Remote-* headers.
func (net *Net) AddClientIdentities(ids []ClientIdentity) {
tun := (*netTun)(net)
if tun.proxyHandler != nil {
tun.proxyHandler.AddClientIdentities(ids)
}
}
// GetProxySubnetRules returns all subnet rules from the proxy handler
func (net *Net) GetProxySubnetRules() []SubnetRule {
tun := (*netTun)(net)