Strange byte gets added to the first packet

Juli Mallett juli at clockworksquid.com
Tue Jan 12 13:07:24 PST 2010


Hi Prabhat,

The naming of the fields in the proxy object are actually very confusing.

The "decoder" codec handles traffic going between the proxy and an
incoming connection.  The "encoder" codec handles traffic going
between the proxy and an outgoing connection.

So on the side that plaintext comes in on you want to have the
"decoder" set to "None".  On the side where plaintext goes back out
you want to have the "encoder" set to "None".

I suppose that "incoming_codec" and "outgoing_codec" would be better
names.  I'll make that change in the near future assuming nothing
better comes up.  (Or perhaps "interface_codec" and "peer_codec" to
match the fields for the connections they correspond with?)

Juli.

On Tue, Jan 12, 2010 at 08:59, Putchakayala, Prabhat S. <psp at mitre.org> wrote:
> Hello list,
>
>
>
> I have a small WANProxy scenario setup on a single computer for preliminary
> tests and I noticed some odd behavior. After a TCP connection is made, the
> first packet has a random byte inserted at the beginning of it after it
> passes through one of the proxies. Here is a brief example using netcat. The
> server is started on port 4001, and the client makes requests to port 3000.
> Our config files are attached to the end, but here is a summary:
>
>
>
> WANProxy 1: listening on port 3000, forwarding to port 4000. Applying the
> codec in both directions
>
> WANProxy 2: listening on port 4000, forwarding to port 4001. Applying the
> codec in both directions
>
>
>
> The server: $ nc -lp 4001
>
> The client: $ nc localhost 3000
>
>
>
> The following message is typed in the server: testing
>
> The following message appears in the client: �testing
>
>
>
> In case it fails to show up in this message, the byte in front of the second
> “testing” is \xef
>
>
>
> Our best guess is that some of the information needed for deduplication is
> left in the packet. We did a more complicated test using two computers on
> the network rather than just one, and the same thing happens. Anyone know
> what we are doing wrong?
>
>
>
> Thanks a lot!
>
> Prabhat
>
>
>
> Here are our config files:
>
>
>
> Server:
>
> create codec codec0
>
> set codec0.codec XCodec
>
> activate codec0
>
>
>
> create interface if0
>
> set if0.family IPv4
>
> set if0.host "127.0.0.1"
>
> set if0.port "4000"
>
> activate if0
>
>
>
> create peer peer0
>
> set peer0.family IPv4
>
> set peer0.host "localhost"
>
> set peer0.port "4001"
>
> activate peer0
>
>
>
> create proxy proxy0
>
> set proxy0.interface if0
>
> set proxy0.decoder codec0
>
> set proxy0.peer peer0
>
> set proxy0.encoder codec0
>
> activate proxy0
>
>
>
> Client:
>
> create codec codec0
>
> set codec0.codec XCodec
>
> activate codec0
>
>
>
> create interface if0
>
> set if0.family IPv4
>
> set if0.host "127.0.0.1"
>
> set if0.port "3000"
>
> activate if0
>
>
>
> create peer peer0
>
> set peer0.family IPv4
>
> set peer0.host "localhost"
>
> set peer0.port "4000"
>
> activate peer0
>
>
>
> create proxy proxy0
>
> set proxy0.interface if0
>
> set proxy0.decoder codec0
>
> set proxy0.peer peer0
>
> set proxy0.encoder codec0
>
> activate proxy0
>
> _______________________________________________
> wanproxy mailing list
> wanproxy at lists.wanproxy.org
> http://lists.wanproxy.org/listinfo.cgi/wanproxy-wanproxy.org
>
>



More information about the wanproxy mailing list