Search code examples
linuxcompressiontunnel

Creating a compression tunnel


I'm trying to compress all traffic on port 6999 and pipe it out onto port 7000. I was thinking of creating a tunnel for this. I would like to use Intel's performance primitive compression library rather than gzip et al.

Any thoughts or ideas greatly appreciated.

Many thanks in advance,


Solution

  • $ echo 'hello world' > a
    $ nc -l 6999 | gzip | nc -l 7000 &
    [1] 3004
    $ nc localhost 6999 < a
    $ nc localhost 7000 > b
    [1]+  Done                    nc -l 6999 | gzip | nc -l 7000
    $ gzip -d < b > c
    $ md5sum a b c
    6f5902ac237024bdd0c176cb93063dc4  a
    74e8a26018c51612ce9257cff9f75c95  b
    6f5902ac237024bdd0c176cb93063dc4  c