Discussion:
HttpConnect in Buffer upload plugin
supraja sridhar
2017-12-26 08:50:33 UTC
Permalink
Hi ! I have just started using traffic server and I am experimenting with
the buffer-upload plugin. TSHttpConnect uses the address returned by
TSHttpTxnClientAddrGet. My question is, is TSHttpTxnClientAddrGet the IP
address of the client? When I print the return value it looks like this:
client: connecting to 2.0.182.120. I am running ATS as a reverse proxy to a
local web server.

Is it trying to connect to the client? If so, shouldn't the plugin try to
connect to the server instead of the client?

Having said that, the request does reach the web-server.
--
Thanks,
S.SUPRAJA
Leif Hedstrom
2017-12-26 18:20:34 UTC
Permalink
Yes, client IP. It sounds like maybe you are printing it in the wrong byte order? Make sure to use the right APIs for converting the addr to a string?

Ciao,

— Leif
Hi ! I have just started using traffic server and I am experimenting with the buffer-upload plugin. TSHttpConnect uses the address returned by TSHttpTxnClientAddrGet. My question is, is TSHttpTxnClientAddrGet the IP address of the client? When I print the return value it looks like this: client: connecting to 2.0.182.120. I am running ATS as a reverse proxy to a local web server.
Is it trying to connect to the client? If so, shouldn't the plugin try to connect to the server instead of the client?
Having said that, the request does reach the web-server.
--
Thanks,
S.SUPRAJA
supraja sridhar
2017-12-28 05:21:41 UTC
Permalink
Yes, it looks like the API I used wasn't the right one. I got it print the
client address.
But I don't understand why the buffer upload plugin is trying to connect to
the client? After the post data is buffered shouldn't the request be
forwarded to the origin server?

Thanks,
Supraja
Post by Leif Hedstrom
Yes, client IP. It sounds like maybe you are printing it in the wrong byte
order? Make sure to use the right APIs for converting the addr to a string?
Ciao,
— Leif
Post by supraja sridhar
Hi ! I have just started using traffic server and I am experimenting
with the buffer-upload plugin. TSHttpConnect uses the address returned by
TSHttpTxnClientAddrGet. My question is, is TSHttpTxnClientAddrGet the IP
client: connecting to 2.0.182.120. I am running ATS as a reverse proxy to a
local web server.
Post by supraja sridhar
Is it trying to connect to the client? If so, shouldn't the plugin try
to connect to the server instead of the client?
Post by supraja sridhar
Having said that, the request does reach the web-server.
--
Thanks,
S.SUPRAJA
--
Regards,
S.SUPRAJA
MIT
supraja sridhar
2017-12-28 12:04:40 UTC
Permalink
Sorry, figured out that using the client ip in the HTTPConnect is just to
make the the transaction look like it came from the client IP.

Thanks,
Supraja

Loading...