You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Dale Thatcher <su...@dalethatcher.com> on 2001/09/26 08:53:09 UTC
Changes to svn_ra.h for proxy support
Hi,
Below are my proposed changes to svn_ra.h to add proxy support into the
library. I've only included the sections that have been modified.
I've changed svn_ra_simple_password_authenticator_t to add a url parameter.
This provides data that can be used to indicate the resource that
authentication is being sought. This could be the remote host, proxy or for
other schemes could be the key to unlock an RSA cert (file url) etc.
There is also an addition to the callback table to request the proxy that
should be used for a particular url.
Comments please.
thanks,
- Dale Thatcher
/* A protocol which needs a username and password (used by ra_dav)
(matches type SVN_RA_AUTH_SIMPLE_PASSWORD above.) */
typedef struct svn_ra_simple_password_authenticator_t
{
/* Get a username and password from the client. */
svn_error_t *(*get_user_and_pass) (char *url,
char **username,
char **password,
void *auth_baton,
apr_pool_t *pool);
/* If authentication was successful, tell the client to store the
USERNAME or PASSWORD. If these routines are NULL, that means the
client is unable (or unwilling) to store auth data. */
svn_error_t *(*store_user_and_pass) (char *url,
const char *username,
const char *password,
void *auth_baton);
} svn_ra_simple_password_authenticator_t;
/* A collection of callbacks implemented by libsvn_client which allows
an RA layer to "pull" information from the client application, or
possibly store information. libsvn_client passes this vtable to
RA->open().
Each routine takes a CALLBACK_BATON originally provided with the
vtable. */
typedef struct svn_ra_callbacks_t
{
/* Open a unique temporary file for writing in the working copy.
This file will be automatically deleted when FP is closed. */
svn_error_t *(*open_tmp_file) (apr_file_t **fp,
void *callback_baton);
/* Retrieve an AUTHENTICATOR/AUTH_BATON pair from the client,
which represents the protocol METHOD. */
svn_error_t *(*get_authenticator) (void **authenticator,
void **auth_baton,
apr_uint64_t method,
void *callback_baton,
apr_pool_t *pool);
/* Retrieve the proxy that is to be used for the given URL. If no
proxy is required either the callback can be NULL or a NULL proxyhost
returned. */
svn_error_t *(*get_proxy) (char *url
char **proxyhost,
int **proxyport,
void *callback_baton,
apr_pool_t *pool);
} svn_ra_callbacks_t;
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Changes to svn_ra.h for proxy support
Posted by Daniel Stenberg <da...@haxx.se>.
On 27 Sep 2001, Ben Collins-Sussman wrote:
> Greg, can you comment on this? The truth is, I don't really understand
> how proxies work in general. And I certainly don't understand how they
> work in terms of neon<->apache traffic. Maybe someone can explain?
In general, HTTP proxies work like this:
Instead of connecting to a remote server, you connect to the local proxy and
ask for the remote document. The difference to the local client is very
minor, there's only a slight difference in how the request looks.
HTTP proxies may require authentication (and that works exactly the same way
a remote site may require it, only using a different header). One vendor
introduced their own authentication protocol named NTLM that is proprietary
and only supported by IE why numerous browser users are fenced in when using
a proxy from that vendor. There are reverse-engineered implementations of
NTLM-code but neon does not support that as of now.
Many companies run proxies for "external" machines and allow "internal"
machines get accessed directly. That's why some loonie invented the
"automatic proxy configuration" files (.pac in netscape/mozilla), which is a
piece of javascript that when fed with a URL returns which proxy to use.
Thus, some places even use different proxies for different remote hosts
etc...
HTTPS through a HTTP proxy is done differently. Then the client tells the
proxy to "tunnel-through" everything from the client to the specified remote
host, as encryption and everything needs to pass in and out unmodified. Since
this tunneling is done without any control or supervision from the proxy,
most companies block their proxies for HTTPS access to non-default ports
(443).
--
Daniel Stenberg - http://daniel.haxx.se - +46-705-44 31 77
ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Changes to svn_ra.h for proxy support
Posted by Ben Collins-Sussman <su...@collab.net>.
Greg, can you comment on this? The truth is, I don't really
understand how proxies work in general. And I certainly don't
understand how they work in terms of neon<->apache traffic. Maybe
someone can explain?
Dale Thatcher <su...@dalethatcher.com> writes:
> Hi,
>
> Below are my proposed changes to svn_ra.h to add proxy support into the
> library. I've only included the sections that have been modified.
>
> I've changed svn_ra_simple_password_authenticator_t to add a url parameter.
> This provides data that can be used to indicate the resource that
> authentication is being sought. This could be the remote host, proxy or for
> other schemes could be the key to unlock an RSA cert (file url) etc.
>
> There is also an addition to the callback table to request the proxy that
> should be used for a particular url.
>
> Comments please.
>
> thanks,
>
> - Dale Thatcher
>
>
> /* A protocol which needs a username and password (used by ra_dav)
> (matches type SVN_RA_AUTH_SIMPLE_PASSWORD above.) */
> typedef struct svn_ra_simple_password_authenticator_t
> {
> /* Get a username and password from the client. */
> svn_error_t *(*get_user_and_pass) (char *url,
> char **username,
> char **password,
> void *auth_baton,
> apr_pool_t *pool);
>
> /* If authentication was successful, tell the client to store the
> USERNAME or PASSWORD. If these routines are NULL, that means the
> client is unable (or unwilling) to store auth data. */
> svn_error_t *(*store_user_and_pass) (char *url,
> const char *username,
> const char *password,
> void *auth_baton);
>
> } svn_ra_simple_password_authenticator_t;
>
>
>
> /* A collection of callbacks implemented by libsvn_client which allows
> an RA layer to "pull" information from the client application, or
> possibly store information. libsvn_client passes this vtable to
> RA->open().
>
> Each routine takes a CALLBACK_BATON originally provided with the
> vtable. */
> typedef struct svn_ra_callbacks_t
> {
> /* Open a unique temporary file for writing in the working copy.
> This file will be automatically deleted when FP is closed. */
> svn_error_t *(*open_tmp_file) (apr_file_t **fp,
> void *callback_baton);
>
> /* Retrieve an AUTHENTICATOR/AUTH_BATON pair from the client,
> which represents the protocol METHOD. */
> svn_error_t *(*get_authenticator) (void **authenticator,
> void **auth_baton,
> apr_uint64_t method,
> void *callback_baton,
> apr_pool_t *pool);
>
> /* Retrieve the proxy that is to be used for the given URL. If no
> proxy is required either the callback can be NULL or a NULL proxyhost
> returned. */
> svn_error_t *(*get_proxy) (char *url
> char **proxyhost,
> int **proxyport,
> void *callback_baton,
> apr_pool_t *pool);
>
> } svn_ra_callbacks_t;
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org