Commit Graph

4 Commits

Author SHA1 Message Date
Akihiro Suda d3e7ca726d proxy: clean up code (addendum to #1598)
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-01-12 04:46:23 +00:00
Akihiro Suda 9fb8d5696e proxy: fix an issue about half-closing net.TCPConn after io.Copy()
Fix docker/docker#27539

After io.Copy(to, from), we should call to.CloseWrite(), not to.CloseRead().

Without this fix, TestTCP4ProxyHalfClose (newly added in this commit) fails as
follows:

  --- FAIL: TestTCP4ProxyHalfClose (0.00s)
          network_proxy_test.go:135: EOF

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2016-12-24 20:49:04 +00:00
Justin Cormack 65356ed861 Do not use logrus for proxy
This simplifies how we build it in docker/docker as no vendoring needed,
and this does program not use any logrus features.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-10-19 00:01:11 +01:00
Justin Cormack 5202f95604 Make the docker proxy a standalone binary not a re-exec
Rather than re-execing docker as the proxy, create a new command docker-proxy
that is much smaller to save memory in the case where there are a lot of
procies being created. Also allows the proxy to be replaced, for example
in Docker for Mac we have a proxy that proxies to osx instead of locally.

This is the vendoring pull for https://github.com/docker/docker/pull/23312

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-07-04 13:17:16 +01:00