Repository: caddyserver/caddy
File: modules/caddyhttp/reverseproxy/caddyfile.go (Go)

Code before:
			}
			size, err := humanize.ParseBytes(d.Val())
			if err != nil {
				return d.Errf("invalid max response header size '%s': %v", d.Val(), err)
			}
			h.MaxResponseHeaderSize = int64(size)

		case "proxy_protocol":
			if !d.NextArg() {
				return d.ArgErr()
			}
			switch proxyProtocol := d.Val(); proxyProtocol {
			case "v1", "v2":
				h.ProxyProtocol = proxyProtocol
			default:
				return d.Errf("invalid proxy protocol version '%s'", proxyProtocol)
			}

		case "forward_proxy_url":
			caddy.Log().Warn("The 'forward_proxy_url' field is deprecated. Use the 'network_proxy' field instead.")
			if !d.NextArg() {
				return d.ArgErr()
			}

			h.ForwardProxyURL = d.Val()
		case "network_proxy":
			if !d.NextArg() {
				return d.ArgErr()
			}
			modStem := d.Val()
			modID := "caddy.network_proxy.source." + modStem
			unm, err := caddyfile.UnmarshalModule(d, modID)
			if err != nil {
				return err
			}
			h.NetworkProxyRaw = caddyconfig.JSONModuleObject(unm, "from", modStem, nil)
		case "dial_timeout":
			if !d.NextArg() {
				return d.ArgErr()
			}
			dur, err := caddy.ParseDuration(d.Val())
			if err != nil {
				return d.Errf("bad timeout value '%s': %v", d.Val(), err)
			}
			h.DialTimeout = caddy.Duration(dur)

		case "dial_fallback_delay":
			if !d.NextArg() {
				return d.ArgErr()
			}
			dur, err := caddy.ParseDuration(d.Val())

Review comment (suggestion):
Newline between cases for consistency (and visual separation)

Also pls remove the newline before this line, Github isn't letting me put in a suggestion for that :sob:

```suggestion
			h.ForwardProxyURL = d.Val()

		case "network_proxy":
```

As an aside, maybe just make `forward_proxy_url` set up a `NetworkProxyRaw` with `url` module right away? We can make Caddyfile adapter do the "right thing" in the meantime and handling of this option & for JSON later.

Code after:
			}
			size, err := humanize.ParseBytes(d.Val())
			if err != nil {
				return d.Errf("invalid max response header size '%s': %v", d.Val(), err)
			}
			h.MaxResponseHeaderSize = int64(size)

		case "proxy_protocol":
			if !d.NextArg() {
				return d.ArgErr()
			}
			switch proxyProtocol := d.Val(); proxyProtocol {
			case "v1", "v2":
				h.ProxyProtocol = proxyProtocol
			default:
				return d.Errf("invalid proxy protocol version '%s'", proxyProtocol)
			}

		case "forward_proxy_url":
			caddy.Log().Warn("The 'forward_proxy_url' field is deprecated. Use 'network_proxy <url>' instead.")
			if !d.NextArg() {
				return d.ArgErr()
			}
			u := network.ProxyFromURL{URL: d.Val()}
			h.NetworkProxyRaw = caddyconfig.JSONModuleObject(u, "from", "url", nil)

		case "network_proxy":
			if !d.NextArg() {
				return d.ArgErr()
			}
			modStem := d.Val()
			modID := "caddy.network_proxy." + modStem
			unm, err := caddyfile.UnmarshalModule(d, modID)
			if err != nil {
				return err
			}
			h.NetworkProxyRaw = caddyconfig.JSONModuleObject(unm, "from", modStem, nil)

		case "dial_timeout":
			if !d.NextArg() {
				return d.ArgErr()
			}
			dur, err := caddy.ParseDuration(d.Val())
			if err != nil {
				return d.Errf("bad timeout value '%s': %v", d.Val(), err)
			}
			h.DialTimeout = caddy.Duration(dur)

		case "dial_fallback_delay":
			if !d.NextArg() {
				return d.ArgErr()