808120e5b8
Add a new `com.docker.network.host_ipv6` bridge option to compliment the existing `com.docker.network.host_ipv4` option. When set to an IPv6 address, this causes the bridge to insert `SNAT` rules instead of `MASQUERADE` rules (assuming `ip6tables` is enabled). `SNAT` makes it possible for users to control the source IP address used for outgoing connections. Signed-off-by: Richard Hansen <rhansen@rhansen.org>
55 lines
1.9 KiB
Go
55 lines
1.9 KiB
Go
package netlabel
|
|
|
|
const (
|
|
// Prefix constant marks the reserved label space for libnetwork
|
|
Prefix = "com.docker.network"
|
|
|
|
// DriverPrefix constant marks the reserved label space for libnetwork drivers
|
|
DriverPrefix = Prefix + ".driver"
|
|
|
|
// DriverPrivatePrefix constant marks the reserved label space
|
|
// for internal libnetwork drivers
|
|
DriverPrivatePrefix = DriverPrefix + ".private"
|
|
|
|
// GenericData constant that helps to identify an option as a Generic constant
|
|
GenericData = Prefix + ".generic"
|
|
|
|
// PortMap constant represents Port Mapping
|
|
PortMap = Prefix + ".portmap"
|
|
|
|
// MacAddress constant represents Mac Address config of a Container
|
|
MacAddress = Prefix + ".endpoint.macaddress"
|
|
|
|
// ExposedPorts constant represents the container's Exposed Ports
|
|
ExposedPorts = Prefix + ".endpoint.exposedports"
|
|
|
|
// DNSServers A list of DNS servers associated with the endpoint
|
|
DNSServers = Prefix + ".endpoint.dnsservers"
|
|
|
|
// EnableIPv6 constant represents enabling IPV6 at network level
|
|
EnableIPv6 = Prefix + ".enable_ipv6"
|
|
|
|
// DriverMTU constant represents the MTU size for the network driver
|
|
DriverMTU = DriverPrefix + ".mtu"
|
|
|
|
// OverlayVxlanIDList constant represents a list of VXLAN Ids as csv
|
|
OverlayVxlanIDList = DriverPrefix + ".overlay.vxlanid_list"
|
|
|
|
// Gateway represents the gateway for the network
|
|
Gateway = Prefix + ".gateway"
|
|
|
|
// Internal constant represents that the network is internal which disables default gateway service
|
|
Internal = Prefix + ".internal"
|
|
|
|
// ContainerIfacePrefix can be used to override the interface prefix used inside the container
|
|
ContainerIfacePrefix = Prefix + ".container_iface_prefix"
|
|
|
|
// HostIPv4 is the Source-IPv4 Address used to SNAT IPv4 container traffic
|
|
HostIPv4 = Prefix + ".host_ipv4"
|
|
|
|
// HostIPv6 is the Source-IPv6 Address used to SNAT IPv6 container traffic
|
|
HostIPv6 = Prefix + ".host_ipv6"
|
|
|
|
// LocalKVClient constants represents the local kv store client
|
|
LocalKVClient = DriverPrivatePrefix + "localkv_client"
|
|
)
|