Table of Contents

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

protocol IpProtocol

The reply's protocol.

hostEndPoint IpEndPointValue

The endpoint the reply comes from.

newEndPoint IpEndPointValue

When this method returns true, the endpoint the flow was sent to.

Returns

bool

true if the endpoint is mapped; otherwise, false.

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

protocol IpProtocol

The flow's protocol.

hostEndPoint IpEndPointValue

The endpoint the flow is sent to.

newEndPoint IpEndPointValue

When this method returns true, the endpoint the flow reaches.

Returns

bool

true if the endpoint is mapped; otherwise, false.