
Unix socket -> TCP
```
socat -d -d TCP-LISTEN:8080,fork,bind=127.0.0.1 UNIX:/var/run/docker.sock
```

cURL unix socket
```
curl --unix-socket /var/run/docker.sock http://localhost/images/json
```

unix socket -> TCP -> unix socket
```
sudo mv /var/run/docker.sock /var/run/docker.sock.original
sudo socat TCP-LISTEN:8089,reuseaddr,fork UNIX-CONNECT:/var/run/docker.sock.original
sudo socat UNIX-LISTEN:/var/run/docker.sock,fork TCP-CONNECT:127.0.0.1:8089
```

<br>

https://plantegg.github.io/2019/04/04/就是要你懂抓包--Unix-Socket抓包/


