Hi Willy,

Something strange noticed.
Here is the system calls:
====
write(2, "SOCKS PROXY HS FD[000A], Request"..., 60SOCKS PROXY HS
FD[000A], Request, conn->flags  [0x11432776]) = 60
sendto(10, "\4\1'`\177\0\0\1HAProxy\0", 16,
MSG_DONTWAIT|MSG_NOSIGNAL|MSG_MORE, NULL, 0) = 16
write(2, "SOCKS PROXY HS FD[000A]: Before "..., 63SOCKS PROXY HS
FD[000A]: Before send remain is [16], sent [16]) = 63
epoll_ctl(3, EPOLL_CTL_DEL, 10, 0x7fc2056cf7b0) = 0
====

Looks like the socks4 FD get removed from the poll just after sending
the socks4 request.

Please have a look into it, thank you.

Regards,
Alexander Liu

On Mon, Jun 3, 2019 at 1:40 AM Alec Liu <[email protected]> wrote:
>
> Hi Willy,
>
> Your configuration working for me too, but once I have the "mode tcp"
> changed to "mode http", it was failed.
> Can you give it a try by changing your testing configuration mode from
> "mode tcp" to "mode http"?
>
> Thank you.
>
> Regards,
> Alexander Liu
>
> On Sun, Jun 2, 2019 at 6:56 PM Willy Tarreau <[email protected]> wrote:
> >
> > On Sun, Jun 02, 2019 at 06:49:18PM +0800, Alec Liu wrote:
> > > Hi Willy,
> > >
> > > Can you send me your testing configuration for this? Thank you.
> >
> > Sure, here it comes. Please note that I'm done with typing the release
> > message, so I'm releasing -dev5 now, but nothing prevents us from fixing
> > this problem of course!
> >
> >     global
> >         log stdout daemon
> >
> >     listen 20080
> >         bind 0.0.0.0:20080
> >         mode tcp
> >         log global
> >         option tcplog
> >         timeout connect 5s
> >         timeout client  5s
> >         timeout server  5s
> >         #option tcp-check
> >         #option httpchk
> >         #server srv 127.0.0.1:10080 socks4 127.0.0.1:1080 send-proxy-v2 
> > #check check-via-socks4
> >         server srv 127.0.0.1:10080 socks4 127.0.0.1:1080 send-proxy #check 
> > check-via-socks4
> >
> >     listen 10080
> >         bind :10080 accept-proxy
> >         bind :10081
> >         mode http
> >         log global
> >         option httplog
> >         ### below just to create a pause (1s response time)
> >         #no option http-use-htx
> >         #tcp-request content accept if { req.len gt 10000 }
> >         #tcp-request inspect-delay 1s
> >         redirect location /PP
> >
> > Cheers,
> > Willy

Reply via email to