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: add proxy support via global-agent #143

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import filenamify from 'filenamify';
import TimeFormat from 'hh-mm-ss';
import ProgressBar from 'xprogress';
import countryData from 'country-data';
import {bootstrap} from 'global-agent';
import {publicIpv4} from 'public-ip';
import {isBinaryFile} from 'isbinaryfile';
import {program as commander} from 'commander';
Expand Down Expand Up @@ -435,6 +436,10 @@ function CHECK_FILTER_FIELDS(arrayOfFields, props = {}) {

async function init(packageJson, queries, options) {
const initTimeStamp = Date.now();

process.env['GLOBAL_AGENT_ENVIRONMENT_VARIABLE_NAMESPACE'] = '';
bootstrap();

const stackLogger = new StackLogger({indentSize: 1, autoTick: false});
if (!((Array.isArray(queries) && queries.length > 0) || options.input))
stackLogger.error('\x1b[31m[i]\x1b[0m Please enter a valid query'), process.exit(1);
Expand Down
Loading