<div dir="ltr">Well, after digging into the mail list, I found below description from Juli<div><br></div><div>-----------------------------------------------quote-----------------------------------------</div><div>Because we want all of the traffic that goes over the proxy to be compressed, what we do is compress the connection between the local proxy and the remote proxy. In the example, the local proxy listens on port 3300. This is what you'd configure a SOCKS client to connect to. What happens then is that data that arrives on port 3300 is compressed and sent to port 3301 on the remote proxy. The remote proxy then decompresses it and sends it to its local port 3302, which is where the actual SOCKS proxy is listening. So really, the SOCKS proxy listens on port 3302 on the remote (server) proxy. The local (client) proxy listens on port 3300. Traffic coming in port 3300 on the local proxy appears on port 3302 of the remote proxy, at which point it connects onward to the destination specified by the SOCKS client (e.g. your browser, IRC client, whatever.)<br>

</div><div>----------------------------------------------unquote----------------------------------------</div><div><br></div><div>After read it twenty or so times, I worked out a configuration below and tested it, amazingly, it worked. so I figure post it here so that any other people use Wanproxy in such weird way can have a sample config to start with. </div>

<div><br></div><div>---------------------Config for relay server, listen on port 3201 for compressed traffic from client, decompress and forward to local port 3202 where traffic will be compressed again and send to next hop-----------------------------------------------------------</div>

<div><div><div>create codec codec0</div><div>set codec0.codec XCodec</div><div>activate codec0</div><div><br></div><div>create interface if0</div><div>set if0.family IPv4</div><div>set if0.host "HKServer"</div>
<div>
set if0.port "3201"</div><div>activate if0</div><div><br></div><div>create peer peer0</div><div>set peer0.family IPv4</div><div>set peer0.host "localhost"</div><div>set peer0.port "3202"</div>

<div>activate peer0</div><div><br></div><div>create proxy proxy0</div><div>set proxy0.interface if0</div><div>set proxy0.interface_codec codec0</div><div>set proxy0.peer peer0</div><div>set proxy0.peer_codec None</div><div>

activate proxy0</div><div><br></div><div><br></div><div>create interface if1</div><div>set if1.family IPv4</div><div>set if1.host "localhost"</div><div>set if1.port "3202"</div><div>activate if1</div>
<div>
<br></div><div>create peer peer1</div><div>set peer1.family IPv4</div><div>set peer1.host "ChinaServer"</div><div>set peer1.port "3301"</div><div>activate peer1</div><div><br></div><div>create proxy proxy1</div>

<div>set proxy1.interface if1</div><div>set proxy1.interface_codec None</div><div>set proxy1.peer peer1</div><div>set proxy1.peer_codec codec0</div><div>activate proxy1</div><div><br></div></div></div><div class="gmail_extra">

<br><br><div class="gmail_quote">On Mon, Apr 21, 2014 at 6:25 PM, Mack <span dir="ltr"><<a href="mailto:mackman@iinet.net.au" target="_blank">mackman@iinet.net.au</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">Hi there,<div>   I would like to thank all the contributors of WANproxy project first and I feel a little bit nervous because I'm using it in an over-killing way.</div><div>   I set up a server in my home as Wanproxy client end and another server in Hong Kong as server end and funnel all the traffic from my Android STB through it to get better performance (less or no buffering time) when viewing contents located in China Mainland.</div>


<div>   It works quite good and I really enjoyed it until I found most of the content is only available to China Mainland IP.  I soon get a server with China IP running but I found the performance from my home to the server is extremely bad. I was going to stop there but I found the performance between my Hong Kong server and China server is quite good.</div>


<div>   So now I'm thinking using the Hong Kong server to relay the traffic so I can get better performance and a China IP, the whole path will be  Android STB ---- Server@home as client----Server@HK----Server@China as server---Contents. I believe this can be done by just looking at the configuration file, but after I tried some combinations I have to say it's harder than I think.</div>


<div>   I would like to see your help to see if this is really viable. hints,comments,sample configurations are appreciated.</div><div><br></div><div><br></div><div>Cheers</div><div>Meng<div class="gmail_extra"><br></div>


</div></div>
</blockquote></div><br></div></div>