Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support http(s) proxy #226

Merged
merged 8 commits into from
Jul 31, 2017
Merged

feat: support http(s) proxy #226

merged 8 commits into from
Jul 31, 2017

Conversation

fengmk2
Copy link
Member

@fengmk2 fengmk2 commented Oct 14, 2016

@mention-bot
Copy link

@fengmk2, thanks for your PR! By analyzing the history of the files in this pull request, we identified @xingrz, @dead-horse and @coderhaoxin to be potential reviewers.

@fengmk2 fengmk2 mentioned this pull request Dec 6, 2016
@fengmk2 fengmk2 force-pushed the support-http-proxy branch from 1a05460 to b901cb7 Compare March 16, 2017 03:55
@fengmk2 fengmk2 changed the title [WIP] feat: support http(s) proxy feat: support http(s) proxy Mar 16, 2017
@fengmk2 fengmk2 requested a review from dead-horse March 16, 2017 03:55
@dead-horse
Copy link
Member

CI 挂了,jshint 没过

@fengmk2
Copy link
Member Author

fengmk2 commented Mar 16, 2017 via email

@fengmk2
Copy link
Member Author

fengmk2 commented Jul 28, 2017

@fengmk2 fengmk2 force-pushed the support-http-proxy branch from 5eac62c to 12877f3 Compare July 28, 2017 16:01
lib/urllib.js Outdated
@@ -113,6 +114,8 @@ var PROTO_RE = /^https?:\/\//i;
* - {Boolean} [timing]: Enable timing or not, default is `false`.
* - {Function} [lookup]: Custom DNS lookup function, default is `dns.lookup`.
* Require node >= 4.0.0 and only work on `http` protocol.
* - {Boolean} [enableProxy]: optional, enable proxy request. Default is `false`.
* - {String|Object} [proxy]: optional proxy agent uri or options. Default is `null`.
* @param {Function} [callback], callback(error, data, res). If missing callback, will return a promise object.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

逗号是上一行的吧?

@codecov
Copy link

codecov bot commented Jul 28, 2017

Codecov Report

Merging #226 into master will decrease coverage by 5.23%.
The diff coverage is 47.27%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #226      +/-   ##
==========================================
- Coverage   97.83%   92.59%   -5.24%     
==========================================
  Files           4        6       +2     
  Lines         553      608      +55     
  Branches      139      161      +22     
==========================================
+ Hits          541      563      +22     
- Misses         12       45      +33
Impacted Files Coverage Δ
lib/urllib.js 96.88% <100%> (-0.88%) ⬇️
lib/get_proxy_from_uri.js 16.12% <16.12%> (ø)
lib/detect_proxy_agent.js 85% <85%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 92808ad...80031be. Read the comment docs.

@codecov
Copy link

codecov bot commented Jul 28, 2017

Codecov Report

Merging #226 into master will decrease coverage by 4.58%.
The diff coverage is 46.29%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #226      +/-   ##
==========================================
- Coverage   97.83%   93.24%   -4.59%     
==========================================
  Files           4        6       +2     
  Lines         553      607      +54     
  Branches      139      161      +22     
==========================================
+ Hits          541      566      +25     
- Misses         12       41      +29
Impacted Files Coverage Δ
lib/urllib.js 97.77% <100%> (+0.02%) ⬆️
lib/get_proxy_from_uri.js 16.12% <16.12%> (ø)
lib/detect_proxy_agent.js 84.21% <84.21%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 92808ad...a67b410. Read the comment docs.

@fengmk2 fengmk2 merged commit bb4f233 into master Jul 31, 2017
@fengmk2 fengmk2 deleted the support-http-proxy branch July 31, 2017 07:54
@fengmk2
Copy link
Member Author

fengmk2 commented Jul 31, 2017

2.24.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

how to use with proxy
4 participants