
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
org.rnorth:tcp-unix-socket-proxy
Advanced tools
Listens on a TCP port and proxies connections to a UNIX domain socket.
Listens on a TCP port and proxies connections to a UNIX domain socket.
Like socat TCP-LISTEN:2375,fork UNIX-CONNECT:/var/tmp/docker.sock
,
except this is literally the only thing this program does.
Purposefully simplistic in implementation, potentially buggy or suboptimal in performance, may contain nuts.
This proxy uses Christian Kohlschütter's junixsocket library for interaction with Unix sockets.
This was implemented as a short term workaround for incompatibility between netty and Docker for Mac beta's use of unix domain sockets on OS X - described here.
This proxy uses a deliberately simple blocking I/O with threads model, purely for simplicity. This clearly eliminates the performance advantages of using netty in docker-java. However, I feel that in most cases the performance of the docker API is not a critical factor, and a working but slow solution is preferable in the short term. Still, once kqueue support for netty is in place, that will become the better solution.
This library is only useful on OS X; Linux unix socket support through epoll is well supported by netty.
Instantiate a proxy instance:
TcpToUnixSocketProxy proxy = new TcpToUnixSocketProxy(new File("/var/run/docker.sock"));
Start it, and obtain the listening address (localhost with a random port by default):
InetSocketAddress address = proxy.start();
Use the proxy by connecting to localhost on the port given by address.getPort()
.
Then when the proxy is no longer needed:
proxy.stop();
See LICENSE.
Copyright (c) 2016 Richard North.
FAQs
Listens on a TCP port and proxies connections to a UNIX domain socket.
We found that org.rnorth:tcp-unix-socket-proxy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.