mirror of
https://github.com/aphrody-labs/WSL.git
synced 2026-10-15 06:09:04 +00:00
* Run the documentation pipeline when doc/ is edited + various rendering fixes * Fix inverted condition
786 B
786 B
ContainerPortMapping
Represents a published port.
using Windows.Networking;
public sealed class ContainerPortMapping
{
public ContainerPortMapping(ushort windowsPort, ushort containerPort, PortProtocol protocol);
public ushort WindowsPort { get; set; }
public ushort ContainerPort { get; set; }
public PortProtocol Protocol { get; set; }
public HostName WindowsAddress { get; set; }
}
Notes:
WindowsAddressis implemented.- It accepts only
HostNameType.Ipv4andHostNameType.Ipv6values. - DNS names are rejected.
nullmeans the default host bind address.
Example:
using Windows.Networking;
var mapping = new ContainerPortMapping(8080, 80, PortProtocol.TCP)
{
WindowsAddress = new HostName("127.0.0.1")
};