Interface IIpMapper
- Namespace
- VpnHood.Core.Filtering.Abstractions
- Assembly
- VpnHood.Core.Filtering.Abstractions.dll
Defines a map of endpoints: from the one a flow is sent to, to the one it reaches instead, and back for its replies.
public interface IIpMapper : IDisposable
- Inherited Members
Remarks
The server maps the destinations of the packets and TCP streams it forwards, and the sources of their replies; the client maps the flows it sends around the tunnel. The tests use it to reach local servers in place of remote ones.
Methods
FromHost(IpProtocol, IpEndPointValue, out IpEndPointValue)
Maps the endpoint a reply comes from back to the one its flow was sent to: the reverse of ToHost(IpProtocol, IpEndPointValue, out IpEndPointValue).
bool FromHost(IpProtocol protocol, IpEndPointValue hostEndPoint, out IpEndPointValue newEndPoint)
Parameters
protocolIpProtocolThe reply's protocol.
hostEndPointIpEndPointValueThe endpoint the reply comes from.
newEndPointIpEndPointValueWhen this method returns true, the endpoint the flow was sent to.
Returns
ToHost(IpProtocol, IpEndPointValue, out IpEndPointValue)
Maps the endpoint a flow is sent to, to the one it reaches instead.
bool ToHost(IpProtocol protocol, IpEndPointValue hostEndPoint, out IpEndPointValue newEndPoint)
Parameters
protocolIpProtocolThe flow's protocol.
hostEndPointIpEndPointValueThe endpoint the flow is sent to.
newEndPointIpEndPointValueWhen this method returns true, the endpoint the flow reaches.