Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

We use socat to buffer logs sent from containers (docker-compose) during the short window at startup where logstash and elasticsearch are not ready yet. Works great!


Similar: using it to get syslog out of self-chrooting ssh with minimal trauma: socat -u UNIX-RECV:/home/sftponly/user/dev/log,mode=666 UNIX-SENDTO:/dev/log

It's also an CLI IMAPS client, with history: socat READLINE,history=$HOME/.imaps_history EXEC:'"openssl s_client -connect mailserver:993"'

or a CLI web browser with history: socat -d -d READLINE,history=$HOME/.http_history TCP4:www.domain.com:www,crnl

or, if you have to interact with something that has no readline, say sendmail: socat READLINE EXEC:"sendmail -bt"


> if you have to interact with something that has no readline

See also https://github.com/hanslub42/rlwrap


Have you happened to blog about this? I'd love to be able to fix our setups with this trick!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: