Index: src/db.c ================================================================== --- src/db.c +++ src/db.c @@ -4368,14 +4368,12 @@ ** which will cause the client to avoid generating a delta ** manifest. */ /* ** SETTING: proxy width=32 default=off -** URL of the HTTP proxy. If undefined or "off" then -** the "http_proxy" environment variable is consulted. -** If the http_proxy environment variable is undefined -** then a direct HTTP connection is used. +** URL of the HTTP proxy. If "system", the "http_proxy" environment variable is +** consulted. If undefined or "off", a direct HTTP connection is used. */ /* ** SETTING: redirect-to-https default=0 width=-1 ** Specifies whether or not to redirect http:// requests to ** https:// URIs. A value of 0 (the default) means not to Index: src/sync.c ================================================================== --- src/sync.c +++ src/sync.c @@ -24,16 +24,22 @@ /* ** Explain what type of sync operation is about to occur */ static void sync_explain(unsigned syncFlags){ if( g.url.isAlias ){ + const char *url; + if( g.url.useProxy ){ + url = g.url.proxyUrlCanonical; + }else{ + url = g.url.canonical; + } if( (syncFlags & (SYNC_PUSH|SYNC_PULL))==(SYNC_PUSH|SYNC_PULL) ){ - fossil_print("Sync with %s\n", g.url.canonical); + fossil_print("Sync with %s\n", url); }else if( syncFlags & SYNC_PUSH ){ - fossil_print("Push to %s\n", g.url.canonical); + fossil_print("Push to %s\n", url); }else if( syncFlags & SYNC_PULL ){ - fossil_print("Pull from %s\n", g.url.canonical); + fossil_print("Pull from %s\n", url); } } } Index: src/url.c ================================================================== --- src/url.c +++ src/url.c @@ -63,11 +63,12 @@ char *canonical; /* Canonical representation of the URL */ char *proxyAuth; /* Proxy-Authorizer: string */ char *fossil; /* The fossil query parameter on ssh: */ unsigned flags; /* Boolean flags controlling URL processing */ int useProxy; /* Used to remember that a proxy is in use */ - char *proxyUrlPath; + char *proxyUrlPath; /* Remember path when proxy is use */ + char *proxyUrlCanonical; /* Remember canonical path when proxy is use */ int proxyOrigPort; /* Tunneled port number for https through proxy */ }; #endif /* INTERFACE */ @@ -534,11 +535,11 @@ void url_enable_proxy(const char *zMsg){ const char *zProxy; zProxy = zProxyOpt; if( zProxy==0 ){ zProxy = db_get("proxy", 0); - if( zProxy==0 || zProxy[0]==0 || is_false(zProxy) ){ + if( fossil_strcmp(zProxy, "system")==0 ){ zProxy = fossil_getenv("http_proxy"); } } if( zProxy && zProxy[0] && !is_false(zProxy) && !g.url.isSsh && !g.url.isFile ){ @@ -564,10 +565,11 @@ } g.url.user = zOriginalUser; g.url.passwd = zOriginalPasswd; g.url.isHttps = fOriginalIsHttps; g.url.useProxy = 1; + g.url.proxyUrlCanonical = zOriginalUrl;; g.url.proxyUrlPath = zOriginalUrlPath; g.url.proxyOrigPort = iOriginalPort; g.url.flags = uOriginalFlags; } } @@ -722,14 +724,20 @@ /* ** Remember the URL and password if requested. */ void url_remember(void){ if( g.url.flags & URL_REMEMBER ){ + const char *url; + if( g.url.useProxy ){ + url = g.url.proxyUrlCanonical; + }else{ + url = g.url.canonical; + } if( g.url.flags & URL_USE_PARENT ){ - db_set("parent-project-url", g.url.canonical, 0); + db_set("parent-project-url", url, 0); }else{ - db_set("last-sync-url", g.url.canonical, 0); + db_set("last-sync-url", url, 0); } if( g.url.user!=0 && g.url.passwd!=0 && ( g.url.flags & URL_REMEMBER_PW ) ){ if( g.url.flags & URL_USE_PARENT ){ db_set("parent-project-pw", obscure(g.url.passwd), 0); }else{