You can use Traffic Squeezer - free Linux Open-Source WAN Optimization solution.

Traffic Squeezer - Optimizes:
WAN and MAN Traffic Networks
Satellite (VSAT) Links
Marine Internet
Internet (ISP) Optimization
VPN Optimization
VOIP Optimization
ISP Backbone Optimization
Cloud Networks Optimization
CDN (Content Distribution Network) Optimization

Traffic Squeezer is built within Linux Kernel TCP/IP network stack. Hence you need to compile the customized pre-patched Traffic Squeezer Linux Kernel. And then compile and install Traffic squeezer CLI to control the same.

If you want to setup a wan optimizated tunnel in SOHO and other installation, Traffic Squeezer is the ideal Linux solution which you can build yourself.