EgressAddressPolicy
AgentPrism.Core.dllThe address rules one outbound surface applies to its targets.
public readonly struct EgressAddressPolicy : IEquatable<EgressAddressPolicy>Implements
Section titled “Implements”IEquatable<EgressAddressPolicy>
Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”Not to be confused with TenantEgressPolicy, which decides which model providers a tenant may call. This type decides which addresses a socket may connect to.
The two flags are separate because webhook delivery already carries a narrower loopback allowance: AgentPrismWebhookOptions.AllowInsecureHttp means “this is a local development setup” and opens loopback only, while AgentPrismEgressOptions.AllowPrivateNetworkTargets opens the entire private network. Collapsing them into one flag would trade production security for development convenience.
Constructors
Section titled “Constructors”EgressAddressPolicy(bool, bool)
Section titled “ EgressAddressPolicy(bool, bool)”The address rules one outbound surface applies to its targets.
public EgressAddressPolicy(bool AllowPrivateNetworkTargets, bool AllowLoopback)Parameters
Section titled “Parameters”AllowPrivateNetworkTargets bool
Whether connecting to a private network address is allowed.
AllowLoopback bool
Whether loopback (127.0.0.0/8, ::1) is allowed even while
AllowPrivateNetworkTargets is disabled.
Remarks
Section titled “Remarks”Not to be confused with TenantEgressPolicy, which decides which model providers a tenant may call. This type decides which addresses a socket may connect to.
The two flags are separate because webhook delivery already carries a narrower loopback allowance: AgentPrismWebhookOptions.AllowInsecureHttp means “this is a local development setup” and opens loopback only, while AgentPrismEgressOptions.AllowPrivateNetworkTargets opens the entire private network. Collapsing them into one flag would trade production security for development convenience.
Properties
Section titled “Properties”AllowLoopback
Section titled “ AllowLoopback”Whether loopback (127.0.0.0/8, ::1) is allowed even while
AllowPrivateNetworkTargets is disabled.
public bool AllowLoopback { get; init; }Property Value
Section titled “Property Value”AllowPrivateNetworkTargets
Section titled “ AllowPrivateNetworkTargets”Whether connecting to a private network address is allowed.
public bool AllowPrivateNetworkTargets { get; init; }Property Value
Section titled “Property Value”Gets the policy that rejects every private network address.
public static EgressAddressPolicy Deny { get; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”Deconstruct(out bool, out bool)
Section titled “ Deconstruct(out bool, out bool)”public void Deconstruct(out bool AllowPrivateNetworkTargets, out bool AllowLoopback)Parameters
Section titled “Parameters”AllowPrivateNetworkTargets bool
AllowLoopback bool
Equals(object)
Section titled “ Equals(object)”public override bool Equals(object obj)Parameters
Section titled “Parameters”obj object
Returns
Section titled “Returns”Equals(EgressAddressPolicy)
Section titled “ Equals(EgressAddressPolicy)”public bool Equals(EgressAddressPolicy other)Parameters
Section titled “Parameters”other EgressAddressPolicy
Returns
Section titled “Returns”GetHashCode()
Section titled “ GetHashCode()”public override int GetHashCode()Returns
Section titled “Returns”ToString()
Section titled “ ToString()”public override string ToString()Returns
Section titled “Returns”Operators
Section titled “Operators”operator ==(EgressAddressPolicy, EgressAddressPolicy)
Section titled “ operator ==(EgressAddressPolicy, EgressAddressPolicy)”public static bool operator ==(EgressAddressPolicy left, EgressAddressPolicy right)Parameters
Section titled “Parameters”left EgressAddressPolicy
right EgressAddressPolicy
Returns
Section titled “Returns”operator !=(EgressAddressPolicy, EgressAddressPolicy)
Section titled “ operator !=(EgressAddressPolicy, EgressAddressPolicy)”public static bool operator !=(EgressAddressPolicy left, EgressAddressPolicy right)Parameters
Section titled “Parameters”left EgressAddressPolicy
right EgressAddressPolicy