[souphttpsrc] Proxy authentication not working

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[souphttpsrc] Proxy authentication not working

Thomas Loewe
Hi,

i'm trying to implement proxy support to my application, but it looks like the auth doesn't work with souphttpsrc 0.10.16.

I've tried gst-launch with the "proxy-id=user" / "proxy-pw=pass" and the "http:\\user:pass@proxy" too, but booth of them returns "407 Proxy Authentication Required".

Is this a known bug or do i something wrong?

Thank you,
Thomas
Reply | Threaded
Open this post in threaded view
|

Re: [souphttpsrc] Proxy authentication not working

Ron McOuat
I added both the direct and proxy authentication code which first
appeared in 0.10.14, prior to this the element had no capability for
authentication. It is a thin layer over the soup library in Gnome. When
I was using the element I tried to get basic authentication working to a
network camera by supplying credentials inline on the URL as
http://user:pass@address but these were ignored by the soup library so
the user-id user-pw parameters were added to the element using the
SoupSession "authenticate" signal. In a similar way the proxy-id and
proxy-pw were put in but tested to a lesser extent. The soup library
does most of the work, all that was needed in the gst element is a
simple callback as follows plus a line to register the callback

static void
gst_soup_http_src_authenticate_cb (SoupSession *session, SoupMessage *msg,
    SoupAuth *auth, gboolean retrying, GstSoupHTTPSrc *src)
{
  if (! retrying) {
    /* First time authentication only, if we fail and are called again
with retry true fall through */
    if (msg->status_code == SOUP_STATUS_UNAUTHORIZED) {
      soup_auth_authenticate (auth, src->user_id, src->user_pw);
    }
    else if (msg->status_code ==
SOUP_STATUS_PROXY_AUTHENTICATION_REQUIRED) {
      soup_auth_authenticate (auth, src->proxy_id, src->proxy_pw);
    }
  }
}

The callback does not process the request if the retrying parameter is
true because the user id and password are supplied as properties during
element initialization and not by user input  from a GUI so the answer
will always be the same resulting in an endless loop.

Just to ask the obvious the proxy user and password you are using is
correct?

Could you make a URL available to me for testing, the difficulty
probably is the proxy is inside your firewall.

Ron


Thomas Loewe wrote:

> Hi,
>
> i'm trying to implement proxy support to my application, but it looks like
> the auth doesn't work with souphttpsrc 0.10.16.
>
> I've tried gst-launch with the "proxy-id=user" / "proxy-pw=pass" and the
> "http:\\user:pass@proxy" too, but booth of them returns "407 Proxy
> Authentication Required".
>
> Is this a known bug or do i something wrong?
>
> Thank you,
> Thomas
>  

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: [souphttpsrc] Proxy authentication not working

Ron McOuat
In reply to this post by Thomas Loewe
I didn't mention in the last message that the proxy URI needs to be put
in using the "proxy=URI" property or can be put in the environment
variable http_proxy according to the souphttpsrc source code. The
location uri would be the actual http URL you are trying to address
beyond the proxy.

I can't tell from your message if the http://proxy is against the proxy=
or the location= property.

Ron

Thomas Loewe wrote:

> Hi,
>
> i'm trying to implement proxy support to my application, but it looks like
> the auth doesn't work with souphttpsrc 0.10.16.
>
> I've tried gst-launch with the "proxy-id=user" / "proxy-pw=pass" and the
> "http:\\user:pass@proxy" too, but booth of them returns "407 Proxy
> Authentication Required".
>
> Is this a known bug or do i something wrong?
>
> Thank you,
> Thomas
>  

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: [souphttpsrc] Proxy authentication not working

Thomas Loewe
In reply to this post by Ron McOuat
Thanks for the fast response.

> Just to ask the obvious the proxy user and password you are using is correct?

I see that the "soup_auth_authenticate (auth, src->proxy_id, src->proxy_pw);" is called with the correct user/pass, but the error message (407 Proxy Authentication Required) is the same also with wrong user/pass. Looks like no auth is send to the proxy.

> Could you make a URL available to me for testing, the difficulty probably is the proxy is inside your firewall.

No, sorry. That's the internal proxy behind fw at work here.

I could compile souphttpsrc if you have something to test. Version of libsoup is 2.26 running under xubuntu 9.04 and Squid 2.5 as proxy if this is interesting.

> I can't tell from your message if the http://proxy is against the proxy= or the location= property.

I've set proxy=proxy and location=destination.

Thank you,
Thomas
Reply | Threaded
Open this post in threaded view
|

Re: [souphttpsrc] Proxy authentication not working

Ron McOuat
Thanks for filling in more details Thomas. I need to work on this to
isolate the problem to either souphttpsrc or the soup library. There has
been activity lately in libsoup related to proxy handling update 2.27.2
in the page at  
http://www.rpmfind.net/linux/RPM/opensuse/factory/i586/libsoup-2_4-1-2.27.92-1.1.i586.html
shows some details.

If you have the resources (time and programs loaded) it would be good if
you could capture a tcpdump or wireshark session with filtering set to
capture packets between your system and the proxy and then try the
gst-launch. You can send that result to my email if you are okay with that.

Thanks
Ron

Thomas Loewe wrote:

> Thanks for the fast response.
>
>  
>> Just to ask the obvious the proxy user and password you are using is
>> correct?
>>    
>
> I see that the "soup_auth_authenticate (auth, src->proxy_id,
> src->proxy_pw);" is called with the correct user/pass, but the error message
> (407 Proxy Authentication Required) is the same also with wrong user/pass.
> Looks like no auth is send to the proxy.
>
>  
>> Could you make a URL available to me for testing, the difficulty probably
>> is the proxy is inside your firewall.
>>    
>
> No, sorry. That's the internal proxy behind fw at work here.
>
> I could compile souphttpsrc if you have something to test. Version of
> libsoup is 2.26 running under xubuntu 9.04 and Squid 2.5 as proxy if this is
> interesting.
>
>  
>> I can't tell from your message if the http://proxy is against the proxy=
>> or the location= property.
>>    
>
> I've set proxy=proxy and location=destination.
>
> Thank you,
> Thomas
>  

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: [souphttpsrc] Proxy authentication not working

Thomas Loewe
> There has been activity lately in libsoup related to proxy handling update 2.27.2

I've updated to 2.27.5, but doesn't work for me.

> If you have the resources (time and programs loaded) it would be good if you could capture a tcpdump or wireshark session with filtering set to capture packets between your system and the proxy and then try the gst-launch.

Capture is done, i'll send it after work from home.

Thank you,
Thomas