chiark / gitweb /
dot/profile: Respect explicit scheme in proxy variables.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 15 Jan 2025 13:58:18 +0000 (13:58 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 15 Jan 2025 14:03:40 +0000 (14:03 +0000)
dot/profile

index b8ee53608d6c9c9aafc0465811ede9cf1562df2e..3c3ab08928ba67f942e3d78019042f5fa4f5e32c 100644 (file)
@@ -223,18 +223,21 @@ case ${HOST+t} in t) ;; *) HOST=$(hostname); export HOST; esac
 http=$(mdw-conf http-proxy none)
 case "${http_proxy-none},$http" in
   *,none) ;;
+  none,*://*) http_proxy=$http; export http_proxy ;;
   none,*) http_proxy=http://$http/; export http_proxy ;;
 esac
 https=$(mdw-conf https-proxy none)
 case "${https_proxy-none},$https,${http_proxy-none}" in
   *,none,none) ;;
   none,none,*) https_proxy=$http_proxy; export https_proxy ;;
+  none,*://*,*) https_proxy=$https; export https_proxy ;;
   none,*,*) https_proxy=http://$https/; export https_proxy ;;
 esac
 ftp=$(mdw-conf ftp-proxy none)
 case "${ftp_proxy-none},$ftp,${http_proxy-none}" in
   *,none,none) ;;
   none,none,*) ftp_proxy=$http_proxy; export ftp_proxy ;;
+  none,*://*,*) ftp_proxy=$https; export ftp_proxy ;;
   none,*,*) ftp_proxy=http://$ftp/; export ftp_proxy ;;
 esac
 unset http https ftp