Skip to content

Commit

Permalink
Merge pull request #70 from dklimpel/proxy_support
Browse files Browse the repository at this point in the history
Add http proxy support
  • Loading branch information
tcort authored Mar 10, 2024
2 parents 8016d5f + 9d1f24f commit e76e528
Show file tree
Hide file tree
Showing 3 changed files with 548 additions and 34 deletions.
3 changes: 3 additions & 0 deletions lib/proto/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const LinkCheckResult = require('../LinkCheckResult');
const ms = require('ms');
const needle = require('needle');
const pkg = require('../../package.json');
var { ProxyAgent } = require('proxy-agent');

module.exports = {

Expand Down Expand Up @@ -40,6 +41,8 @@ module.exports = {
const url = encodeURI(decodeURIComponent(new URL(link, opts.baseUrl).toString()));

const options = {
agent: new ProxyAgent(),
use_proxy_from_env_var: false,
user_agent: user_agent,
follow_max: 8,
response_timeout: ms(timeout),
Expand Down
Loading

0 comments on commit e76e528

Please sign in to comment.