User Tools

Site Tools


docu:csheet:net:relays:socat_usage

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
docu:csheet:net:relays:socat_usage [2020/09/10 08:42]
admin created
docu:csheet:net:relays:socat_usage [2022/05/17 14:27] (current)
admin [2. Create a **simple network-based TCP logging** endpoint]
Line 1: Line 1:
-==== Curated practical uses for socat, a whole TCP/UDP/UNIXSOCK relay tool ====+===== Curated practical uses for socat, a whole TCP/UDP/UNIXSOCK relay tool =====
  
 \\ \\
-If you want to connect a remote mysql UNIX socket to the localhost (for development), you can do so by using 2 socat commands+==== 1. Connect a remote mysql UNIX socket to the localhost ====
  
 <code bash> <code bash>
Line 22: Line 22:
  
 </code> </code>
 +
 +\\
 +==== 2. Create a **simple network-based TCP logging** endpoint ====
 +<code bash>
 +socat -u TCP4-LISTEN:3334,reuseaddr,fork OPEN:/tmp/test.log,creat,append &
 +</code>
 +
 +\\
 +==== 3. Create a HTTP -> HTTPS proxy for certificate errors when unsupported. ====
 +<code bash>
 +# creates an http server at 127.0.0.1:8008 that proxies to https
 +socat TCP4-LISTEN:8008,reuseaddr,fork openssl:185.93.2.243:443,verify=0
 +</code>
 +
 +\\
 +\\
 +==== Sources: ====
 +
 +https://www.redhat.com/sysadmin/getting-started-socat
docu/csheet/net/relays/socat_usage.1599727329.txt.gz · Last modified: 2020/09/10 08:42 by admin