Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion 12 daemon/libnetwork/controller_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import (
"github.com/moby/moby/v2/daemon/libnetwork/osl"
)

// FirewallBackend returns the name of the firewall backend for "docker info".
// FirewallBackend returns FirewallInfo for "docker info".
// Despite the name, FirewallInfo may include information about the userland proxy as well.
func (c *Controller) FirewallBackend() *system.FirewallInfo {
var info system.FirewallInfo
info.Driver = "iptables"
Expand All @@ -26,6 +27,15 @@ func (c *Controller) FirewallBackend() *system.FirewallInfo {
info.Info = [][2]string{{"ReloadedAt", reloadedAt.Format(time.RFC3339)}}
}
}
if c.cfg.EnableUserlandProxy {
// EnableUserlandProxy is exposed in FirewallInfo since Docker v29.5.
// In older versions, EnableUserlandProxy is not included in FirewallInfo,
// but it is still used in most cases as it is enabled by default.
info.Info = append(info.Info, [2]string{"EnableUserlandProxy", "true"})
if c.cfg.UserlandProxyPath != "" {
info.Info = append(info.Info, [2]string{"UserlandProxyPath", c.cfg.UserlandProxyPath})
}
}
return &info
}

Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.