From 3e6adb7e33110f8f620bb387ce5884dba56783ad Mon Sep 17 00:00:00 2001 From: xiehuc Date: Thu, 1 Feb 2018 18:11:29 +0800 Subject: [PATCH] update all_proxy and man pages #3751 --- Library/Homebrew/manpages/brew.1.md.erb | 10 ++++++++-- bin/brew | 2 +- docs/Manpage.md | 10 ++++++++-- manpages/brew-cask.1 | 2 +- manpages/brew.1 | 12 +++++++++--- 5 files changed, 27 insertions(+), 9 deletions(-) diff --git a/Library/Homebrew/manpages/brew.1.md.erb b/Library/Homebrew/manpages/brew.1.md.erb index eaded21ed3..508c90f2d4 100644 --- a/Library/Homebrew/manpages/brew.1.md.erb +++ b/Library/Homebrew/manpages/brew.1.md.erb @@ -247,6 +247,10 @@ can take several different forms: Sets the HTTPS proxy to be used by `curl`, `git` and `svn` when downloading through Homebrew. + * `all_proxy`: + Sets the SOCKS5 proxy to be used by `curl`, `git` and `svn` when downloading + through Homebrew. + * `ftp_proxy`: Sets the FTP proxy to be used by `curl`, `git` and `svn` when downloading through Homebrew. @@ -256,12 +260,14 @@ can take several different forms: by `curl`, `git` and `svn` when downloading through Homebrew. ## USING HOMEBREW BEHIND A PROXY -Use the `http_proxy`, `https_proxy`, `no_proxy` and/or `ftp_proxy` documented above. +Use the `http_proxy`, `https_proxy`, `all_proxy`, `no_proxy` and/or `ftp_proxy` documented above. -For example for an unauthenticated HTTP proxy: +For example for an unauthenticated HTTP or SOCKS5 proxy: export http_proxy=http://: + export all_proxy=socks5://: + And for an authenticated HTTP proxy: export http_proxy=http://:@: diff --git a/bin/brew b/bin/brew index 6fbdbd012c..881ace1ec1 100755 --- a/bin/brew +++ b/bin/brew @@ -67,7 +67,7 @@ then FILTERED_ENV=() # Filter all but the specific variables. for VAR in HOME SHELL PATH TERM LOGNAME USER CI TRAVIS SSH_AUTH_SOCK SUDO_ASKPASS \ - http_proxy https_proxy ftp_proxy no_proxy HTTPS_PROXY FTP_PROXY ALL_PROXY \ + http_proxy https_proxy ftp_proxy no_proxy all_proxy HTTPS_PROXY FTP_PROXY ALL_PROXY \ "${!HOMEBREW_@}" "${!TRAVIS_@}" "${!JENKINS_@}" do # Skip if variable value is empty. diff --git a/docs/Manpage.md b/docs/Manpage.md index cd3f874527..6229a0a016 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -1062,6 +1062,10 @@ can take several different forms: Sets the HTTPS proxy to be used by `curl`, `git` and `svn` when downloading through Homebrew. + * `all_proxy`: + Sets the SOCKS5 proxy to be used by `curl`, `git` and `svn` when downloading + through Homebrew. + * `ftp_proxy`: Sets the FTP proxy to be used by `curl`, `git` and `svn` when downloading through Homebrew. @@ -1071,12 +1075,14 @@ can take several different forms: by `curl`, `git` and `svn` when downloading through Homebrew. ## USING HOMEBREW BEHIND A PROXY -Use the `http_proxy`, `https_proxy`, `no_proxy` and/or `ftp_proxy` documented above. +Use the `http_proxy`, `https_proxy`, `all_proxy`, `no_proxy` and/or `ftp_proxy` documented above. -For example for an unauthenticated HTTP proxy: +For example for an unauthenticated HTTP or SOCKS5 proxy: export http_proxy=http://`host`:`port` + export all_proxy=socks5://`host`:`port` + And for an authenticated HTTP proxy: export http_proxy=http://`user`:`password`@`host`:`port` diff --git a/manpages/brew-cask.1 b/manpages/brew-cask.1 index 1261a40188..29905fcce1 100644 --- a/manpages/brew-cask.1 +++ b/manpages/brew-cask.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BREW\-CASK" "1" "January 2018" "Homebrew" "brew-cask" +.TH "BREW\-CASK" "1" "February 2018" "Homebrew" "brew-cask" . .SH "NAME" \fBbrew\-cask\fR \- a friendly binary installer for macOS diff --git a/manpages/brew.1 b/manpages/brew.1 index 10f58d294b..40b2f25d60 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BREW" "1" "January 2018" "Homebrew" "brew" +.TH "BREW" "1" "February 2018" "Homebrew" "brew" . .SH "NAME" \fBbrew\fR \- The missing package manager for macOS @@ -1088,6 +1088,10 @@ Sets the HTTP proxy to be used by \fBcurl\fR, \fBgit\fR and \fBsvn\fR when downl Sets the HTTPS proxy to be used by \fBcurl\fR, \fBgit\fR and \fBsvn\fR when downloading through Homebrew\. . .TP +\fBall_proxy\fR +Sets the SOCKS5 proxy to be used by \fBcurl\fR, \fBgit\fR and \fBsvn\fR when downloading through Homebrew\. +. +.TP \fBftp_proxy\fR Sets the FTP proxy to be used by \fBcurl\fR, \fBgit\fR and \fBsvn\fR when downloading through Homebrew\. . @@ -1096,16 +1100,18 @@ Sets the FTP proxy to be used by \fBcurl\fR, \fBgit\fR and \fBsvn\fR when downlo Sets the comma\-separated list of hostnames and domain names that should be excluded from proxying by \fBcurl\fR, \fBgit\fR and \fBsvn\fR when downloading through Homebrew\. . .SH "USING HOMEBREW BEHIND A PROXY" -Use the \fBhttp_proxy\fR, \fBhttps_proxy\fR, \fBno_proxy\fR and/or \fBftp_proxy\fR documented above\. +Use the \fBhttp_proxy\fR, \fBhttps_proxy\fR, \fBall_proxy\fR, \fBno_proxy\fR and/or \fBftp_proxy\fR documented above\. . .P -For example for an unauthenticated HTTP proxy: +For example for an unauthenticated HTTP or SOCKS5 proxy: . .IP "" 4 . .nf export http_proxy=http://: + +export all_proxy=socks5://: . .fi .