profile
viewpoint
Nathan Rajlich TooTallNate @zeit San Francisco, CA https://n8.io Programmer / Nerd. Former @nodejs core committer, revolutionizing deployments @zeit. Before you ask, I'm 6’6”

kelektiv/node.bcrypt.js 5045

bcrypt for NodeJs

nodejs/nan 2705

Native Abstractions for Node.js

chjj/pty.js 792

Bindings to forkpty(3) for node.js.

TooTallNate/ansi-canvas 546

Render a <canvas> node to your terminal

leo/args 385

Toolkit for building command line interfaces

TooTallNate/ansi.js 304

Advanced ANSI formatting tool for Node.js

substack/node-ent 211

Encode and decode HTML entities

gf3/IRC-js 176

The best IRC library for node.js

stephenmathieson/node-tlds 90

list of TLDs

hemanth/cors-now 89

reverse proxy with CORS headers.

release TooTallNate/node-pac-proxy-agent

4.1.0

released time in 21 hours

created tagTooTallNate/node-pac-proxy-agent

tag4.1.0

A PAC file proxy `http.Agent` implementation for HTTP and HTTPS

created time in a day

push eventTooTallNate/node-pac-proxy-agent

Nathan Rajlich

commit sha c20aa55b8d56850d44c58459e17cb6744a5a25f4

4.1.0

view details

push time in a day

push eventimportpw/import

Nathan Rajlich

commit sha 552c203e85b4cf656dc3b7a809af5872cb837961

Fix

view details

push time in a day

push eventimportpw/import

Nathan Rajlich

commit sha d2e63b81140f150b196436da520b82f435df546a

Tweaks

view details

push time in a day

push eventimportpw/import

Nathan Rajlich

commit sha dc290ff12fe3a29fdf98bdaad1fbcb9d16759ded

Fix URL

view details

push time in a day

push eventimportpw/import

Nathan Rajlich

commit sha a47a52297b83d8272cb2d6b59a9c151325e2bc48

Fix URL

view details

push time in a day

push eventimportpw/import

Nathan Rajlich

commit sha f766b815d3d93eb1f1a6859f8cc4bd76346f41af

Add GH Actions badge to Readme

view details

push time in a day

delete branch importpw/import

delete branch : update/use-curl-dump-header

delete time in a day

push eventimportpw/import

Nathan Rajlich

commit sha 372a3dc18fbe79ebf05b0b0953a435191e6571af

Use curl `--dump-header` to parse "Location" (#24) * Use curl `--dump-header` to parse "Location" Now there's no FIFO, nor sub-process necessary to parse the "Location" header of the source file. Fixes #20. * Fix

view details

push time in a day

PR merged importpw/import

Use curl `--dump-header` to parse "Location"

Now there's no FIFO, nor sub-process necessary to parse the "Location" header of the source file.

Fixes #20.

+14 -17

0 comment

1 changed file

TooTallNate

pr closed time in a day

issue closedimportpw/import

When run in an interactive shell, background process information is printed

$ import tootallnate/nexec
[1] 26760
[1]+  Done                    import_parse_headers "$url" "$locfile" < "$tmpfifo" > "$tmpfile"
[1]+  Done                    import_parse_headers "$url" "$locfile" < "$tmpfifo" > "$tmpfile"
[1]+  Done                    import_parse_headers "$url" "$locfile" < "$tmpfifo" > "$tmpfile"

https://unix.stackexchange.com/a/26535

closed time in a day

TooTallNate

push eventimportpw/import

Nathan Rajlich

commit sha af9497355632749e4c3ee6ac722d155bb31ed0cd

Fix

view details

push time in a day

PR opened importpw/import

Use curl `--dump-header` to parse "Location"

Now there's no FIFO, nor sub-process necessary to parse the "Location" header of the source file.

Fixes #20.

+14 -17

0 comment

1 changed file

pr created time in a day

create barnchimportpw/import

branch : update/use-curl-dump-header

created branch time in a day

delete branch importpw/import

delete branch : fix/basename-illegal-option-b

delete time in a day

push eventimportpw/import

Nathan Rajlich

commit sha 8b95216b03439c49258acf025173558783d73524

Don't execute `basename -bash` (#23) Fixes when `$0` is `"-bash"`, like in some shells: ``` $ eval "$(curl -sfLS import.pw)" basename: invalid option -- 'b' Try 'basename --help' for more information. ```

view details

push time in a day

PR merged importpw/import

Don't execute `basename -bash`

Fixes when $0 is "-bash", like in some shells:

$ eval "$(curl -sfLS import.pw)"
basename: invalid option -- 'b'
Try 'basename --help' for more information.
+1 -1

0 comment

1 changed file

TooTallNate

pr closed time in a day

push eventimportpw/import

Nathan Rajlich

commit sha 59a090f853930732ad8d316cdfff92117146ba66

Create test.yml

view details

Nathan Rajlich

commit sha 51216136871a5334d6b10c62f3f93beb8550c529

Don't execute `basename -bash` Fixes when `$0` is `"-bash"`, like in some shells: ``` $ eval "$(curl -sfLS import.pw)" basename: invalid option -- 'b' Try 'basename --help' for more information. ```

view details

push time in a day

push eventimportpw/import

Nathan Rajlich

commit sha 59a090f853930732ad8d316cdfff92117146ba66

Create test.yml

view details

push time in a day

PR opened importpw/import

Don't execute `basename -bash`

Fixes when $0 is "-bash", like in some shells:

$ eval "$(curl -sfLS import.pw)"
basename: invalid option -- 'b'
Try 'basename --help' for more information.
+1 -1

0 comment

1 changed file

pr created time in a day

create barnchimportpw/import

branch : fix/basename-illegal-option-b

created branch time in a day

issue closedTooTallNate/node-http-proxy-agent

Exported API does not match README

In README this library is used as a class:

import ProxyAgent from 'http-proxy-agent';

new ProxyAgent(options);

In typescript definition the export is a function:

import createHttpProxyAgent from 'http-proxy-agent';

createHttpProxyAgent(options);

closed time in 2 days

otakustay

issue commentTooTallNate/node-http-proxy-agent

Exported API does not match README

You are correct, however there is a backwards-compatibility shim such that the old-style JS code still works as expected (that is, you can use new keyword, and instanceof works correctly).

For modern TypeScript code I would recommend to use the factory function:

import createHttpProxyAgent from 'http-proxy-agent';

createHttpProxyAgent(options);

Or import the HttpProxyAgent class directly:

import { HttpProxyAgent } from 'http-proxy-agent';

new HttpProxyAgent(options);

Hope that helps!

otakustay

comment created time in 2 days

issue closedTooTallNate/node-http-proxy-agent

404 Not Found tootallnate%2fonce from version 4.0.1

npm ERR! code E404 npm ERR! 404 Not Found - GET http://*****/@tootallnate%2fonce - no such package available npm ERR! 404 npm ERR! 404 '@tootallnate/once@1' is not in the npm registry. npm ERR! 404 You should bug the author to publish it (or use the name yourself!) npm ERR! 404 It was specified as a dependency of 'http-proxy-agent' npm ERR! 404 npm ERR! 404 Note that you can also install from a npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in: npm ERR! C:\build1\build_dca\rbuild.npm_logs\2020-02-13T08_53_45_450Z-debug.log

closed time in 2 days

jaganathan

issue commentTooTallNate/node-http-proxy-agent

404 Not Found tootallnate%2fonce from version 4.0.1

This was probably a caching issue. The package is indeed public.

jaganathan

comment created time in 2 days

pull request commentzeit/now

[now-build-utils] Add monorepo packages to "dependencies"

Well I don't really consider it "fixed", but if it's wont-fix then ya.

TooTallNate

comment created time in 5 days

create barnchTooTallNate/node-proxy-agent

branch : refactor/typescript

created branch time in 5 days

push eventTooTallNate/node-pac-proxy-agent

Nathan Rajlich

commit sha b29335649ddd83b5e35f286c066c4467efc996e6

Dedup the `loadResolver()` function invocations Only one "in-flight" creation / revalidation of the `FindProxyForURL()` function will be executed at a time. If two concurrent HTTP requests come in and the `FindProxyForURL()` function is still be retrieved, then they will share the same promise for the result.

view details

push time in 5 days

push eventTooTallNate/node-https-proxy-agent

Nathan Rajlich

commit sha 3d2981c25a3ff0363a6a38754cfe25b3bf27e5cc

Remove `servername` check

view details

push time in 5 days

push eventTooTallNate/node-socks-proxy-agent

Nathan Rajlich

commit sha c9b852e02c9d6d3fb6d882889d1fddb13a0a3b3a

Support `username` option

view details

Nathan Rajlich

commit sha 8ed8efa99c8a17a8ee52872728f13a94497ddc13

Simpler `servername`

view details

push time in 5 days

push eventTooTallNate/node-pac-proxy-agent

Nathan Rajlich

commit sha 706cf6452ce8f48fe1a8e9cd8ec6b124b6ac94c9

Fix test

view details

push time in 6 days

push eventTooTallNate/node-pac-proxy-agent

Nathan Rajlich

commit sha 8f226c66add1721a96c1f99ed22b9aaf0d88b4e3

Fix comments

view details

push time in 6 days

create barnchTooTallNate/node-pac-proxy-agent

branch : add/aggregate-error

created branch time in 6 days

delete branch TooTallNate/node-pac-proxy-agent

delete branch : add/fallback-to-direct

delete time in 6 days

push eventTooTallNate/node-pac-proxy-agent

Nathan Rajlich

commit sha 55dff751e2b206196898b03edf0c8b9edd63fb3e

Add `fallbackToDirect` option (#31)

view details

push time in 6 days

PR merged TooTallNate/node-pac-proxy-agent

Add `fallbackToDirect` option

Similar to Mozilla's documentation, this is an opt-in feature.

If all proxies are down, and there was no DIRECT option specified, the browser will ask if proxies should be temporarily ignored, and direct connections attempted.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Proxy_servers_and_tunneling/Proxy_Auto-Configuration_(PAC)_file

+37 -0

0 comment

3 changed files

TooTallNate

pr closed time in 6 days

delete branch TooTallNate/node-pac-proxy-agent

delete branch : add/proxy-event

delete time in 6 days

push eventTooTallNate/node-pac-proxy-agent

Nathan Rajlich

commit sha 927d251bcccdd6ca7e8b4fe6bcae8d995ce8082b

Emit a "proxy" event on the `http.ClientRequest` instance (#32)

view details

push time in 6 days

PR closed TooTallNate/superagent-proxy

Update proxy-agent to 3.1.1 (Fix #34)

@TooTallNate Please merge and publish to avoid MitM Vulnerability.

+2 -2

2 comments

1 changed file

rajarv

pr closed time in 7 days

issue closedTooTallNate/node-https-proxy-agent

ERR_UNEXPECTED_PROXY_AUTH in chrome

I am using it in combination with http-proxy-middleware but getting ERR_UNEXPECTED_PROXY_AUTH in crhome network console.

any idea how to fix it? I tried multiple variations.

closed time in 7 days

raDiesle

issue closedTooTallNate/node-https-proxy-agent

Options passed into HttpsProxyAgent() constructor aren't propagated to tls.connect() when switching to the TLS handshake

The options that are passed in to the constructor at index.js:25 (and eventually assigned to this.proxy) are not propagated to the call to tls.connect() at index.js:153. This means that attempting to alter TLS behavior from the default with a statement like new HttpsProxyAgent({ rejectUnauthorized: false }) doesn't work.

I suggest a fix something like this:

      if (opts.secureEndpoint) {
        // This line is the fix.
        opts = Object.assign({}, proxy, opts);

        // since the proxy is connecting to an SSL server, we have
        // to upgrade this socket connection to an SSL connection
        debug(
          'upgrading proxy-connected socket to TLS connection: %o',
          opts.host
        );
        opts.socket = socket;
        opts.servername = opts.servername || opts.host;
        opts.host = null;
        opts.hostname = null;
        opts.port = null;
        sock = tls.connect(opts);
      }

closed time in 7 days

robertbullen

issue commentTooTallNate/node-https-proxy-agent

Options passed into HttpsProxyAgent() constructor aren't propagated to tls.connect() when switching to the TLS handshake

There's two potential places to set rejectUnauthorized, depending on which target you want:

  • On the constructor options only applies to the connection to the proxy server (not the destination endpoint).
  • On the options to http.request() only applies to the destination endpoint, but not the proxy server.

Take a look at the test case code that covers this:

			let proxy =
				process.env.HTTPS_PROXY ||
				process.env.https_proxy ||
				`https://localhost:${sslProxyPort}`;
			proxy = url.parse(proxy);
			proxy.rejectUnauthorized = false; // This one is for the connection to the proxy server
			let agent = new HttpsProxyAgent(proxy);

			let opts = url.parse(`https://localhost:${sslServerPort}`);
			opts.agent = agent;
			opts.rejectUnauthorized = false; // This one is for the connection to the endpoint server

			https.get(opts, function(res) {
                          // ...
robertbullen

comment created time in 7 days

issue closedTooTallNate/node-https-proxy-agent

HttpsProxyAgent inheritance from base Agent partially broken in v4.0.0

I noticed that timeouts passed to the HttpsProxyAgent constructor have no effect in v4.0.0. I believe the bug is a result of the agent-base TypeScript rewrite released in agent-base@5.0.0.

HttpsProxyAgent inherits prototype methods from Agent via util.inherits, but when the Agent constructor is invoked, this refers to the Agent instance, not the HttpsProxyAgent child instance. The effect is equivalent to the parent Agent constructor never being called.

v2.2.4:

const HttpsProxyAgent = require('https-proxy-agent');
const agent = new HttpsProxyAgent({ timeout: 100 });
agent.timeout; // Result is 100

v4.0.0:

const HttpsProxyAgent = require('https-proxy-agent');
const agent = new HttpsProxyAgent({ timeout: 100 });
agent.timeout; // Result is undefined

closed time in 7 days

kadler15

issue closedTooTallNate/node-http-proxy-agent

How to use this package to connect our crawler to Tor

Hi all,

I have a crawler to crawl pages and extract hyperlinks. It currently works well for common pages like google.com and I want to use it to crawl pages on Tor. I found this package and am interested in using it in my code to enable the crawler to work on Tor pages. My code is as follows:

var cheerio = require('cheerio');
var Crawler = require("simplecrawler");
var fs = require('fs');
var readline = require('readline');
var stream = require('stream');


var txtFile = "./test.txt";
var temp = [''];
var tree = {};
var readArr = [];
var i = 0;
var crawler = Crawler("http://www.torlinkbgs6aabns.onion/");

function configuringRobot(){
        
    crawler.timeout=3000000;
    crawler.listenerTTL=100000;
    /crawler.proxyPort=9050; //Tor proxy
    crawler.maxDepth=3;
    crawler.allowInitialDomainChange=false; //let the crawler to fetch links accessible from other domains.
    crawler.filterByDomain=false; //let the crawler to fetch links accessible from other domains.
    crawler.scanSubdomains=true;
    crawler.stripQuerystring=true; //strip queries to be fetched
    crawler.maxConcurrency=5;
    crawler.ignoreWWWDomain=false;
    crawler.acceptCookies = false;
}

function callingRobot(file, crawler){

    crawler.discoverResources = function(buffer, queueItem) { //to fetch hyperlinks
        var $ = cheerio.load(buffer.toString("utf8"));

        return $("a[href]").map(function () {
            return $(this).attr("href");
        }).get();

    };

    crawler.addDownloadCondition(function(queueItem, referrerQueueItem, callback) {
        i = i + 1;
        callback(null, i < 1000);
    });
    
    crawler.addFetchCondition(function(queueItem, referrerQueueItem, callback) {
        // We only ever want to move one step away from example.com, so if the
        // referrer queue item reports a different domain, don't proceed
        callback(null, referrerQueueItem.host === crawler.host);
    });
    
    crawler.on("fetch404", function(queueItem, responseObject)
    {
        console.log("URL: " + queueItem.url, "emits 404 Error");   
    });
    crawler.on("fetchcomplete", function(queueItem, responseBuffer, response) {
        console.log("I just received %s (%s status)", queueItem.url, queueItem.status);
        //console.log("It was a resource of type %s", response.headers['content-type']);
        var depth_key = queueItem.depth.toString();
        if (!(depth_key in tree)){
            tree[depth_key] = [];
        }
        tree[depth_key].push({parent: queueItem.referrer, child: queueItem.url});
        temp.push(["Child: "+ queueItem.url, "Parent: "+ queueItem.referrer]);
        //tempr.push(queueItem.referrer);
        fs.writeFileSync(file, temp);
        fs.writeFileSync(file, '\n');
        fs.writeFileSync(file, temp);
    });
    
    crawler.on("complete", function(){
        console.log("Final temp object: ");
        console.log(temp);
        console.log("Final tree:");
        console.log(tree);
    });
    
 
    crawler.start();
    
    
}// function f



configuringRobot();
callingRobot(txtFile, crawler);

Could you please let me know how to do this?

closed time in 7 days

zabihimayvan

issue commentTooTallNate/node-http-proxy-agent

How to use this package to connect our crawler to Tor

This doesn't seem to be related to this module.

zabihimayvan

comment created time in 7 days

pull request commentTooTallNate/node-pac-proxy-agent

Trigger `ECONNREFUSED` instead of DNS `ENOENT` for tests

Still failing.

Not sure what's up with Windows 😞 https://gist.github.com/TooTallNate/7b540264334d967bbc233621692373ff

TooTallNate

comment created time in 7 days

Pull request review commentzeit/now

[now-go] Fix path segments with square brackets

 Learn more: https://github.com/golang/go/wiki/Modules   ]);    const srcPath = join(goPath, 'src', 'lambda');-  let downloadedFiles;-  if (meta.isDev) {-    downloadedFiles = await download(files, workPath, meta);-  } else {-    downloadedFiles = await download(files, srcPath);-  }+  const downloadPath = meta.isDev ? workPath : srcPath;+  let downloadedFiles = await download(files, downloadPath, meta);
  const downloadedFiles = await download(files, downloadPath, meta);
styfle

comment created time in 7 days

issue commentsindresorhus/got

Got exists without an error

Please try out https-proxy-agent@5.0.0, it should support the Node 10 request() API.

szmarczak

comment created time in 7 days

create barnchTooTallNate/node-pac-proxy-agent

branch : add/proxy-event

created branch time in 8 days

PullRequestEvent

create barnchTooTallNate/node-pac-proxy-agent

branch : fix/slow-windows-tests

created branch time in 8 days

delete branch TooTallNate/node-pac-proxy-agent

delete branch : fix/slow-windows-tests

delete time in 8 days

PR opened TooTallNate/node-pac-proxy-agent

Add `fallbackToDirect` option

Similar to Mozilla's documentation, this is an opt-in feature.

If all proxies are down, and there was no DIRECT option specified, the browser will ask if proxies should be temporarily ignored, and direct connections attempted.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Proxy_servers_and_tunneling/Proxy_Auto-Configuration_(PAC)_file

+37 -0

0 comment

3 changed files

pr created time in 8 days

create barnchTooTallNate/node-pac-proxy-agent

branch : add/fallback-to-direct

created branch time in 8 days

Pull request review commentzeit/now

[tests] Add windows to CI unit tests

 const getStaticFiles = async (dir, isBuilds = false) => {     strict: false,   }); -  return getStaticFiles_(dir, nowConfig, { hasNowJson, output, isBuilds });+  const files = await getStaticFiles_(dir, nowConfig, {+    hasNowJson,+    output,+    isBuilds,+  });+  return normalizeWindowsPaths(files);+};++const normalizeWindowsPaths = files => {+  if (process.platform === 'win32') {+    const prefix = 'D:/a/now/now/packages/now-cli/test/fixtures/unit/';

What is this path?

styfle

comment created time in 8 days

PR opened TooTallNate/node-pac-proxy-agent

Trigger `ECONNREFUSED` instead of DNS `ENOENT` for tests

Fixes Windows slow tests waiting for DNS to fail.

+2 -8

0 comment

1 changed file

pr created time in 8 days

create barnchTooTallNate/node-pac-proxy-agent

branch : fix/slow-windows-tests

created branch time in 8 days

Pull request review commentzeit/now

[tests] Add windows to CI unit tests

 function runScript(pkgName, script) {     }     if (pkgJson && pkgJson.scripts && pkgJson.scripts[script]) {       console.log(`\n[${pkgName}] Running yarn ${script}`);-      const child = spawn('yarn', [script], { cwd, stdio: 'inherit' });+      const child = spawn('yarn', [script], {+        cwd,+        stdio: 'inherit',+        env: process.env,

It's strange because process.env is already the default value for env option: https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options/

env <Object> Environment key-value pairs. Default: process.env.

styfle

comment created time in 8 days

Pull request review commentzeit/now

[tests] Add windows to CI unit tests

 test('[DevServer] parseListen()', t => {   t.deepEqual(parseListen('3000'), [3000]);   t.deepEqual(parseListen('0.0.0.0'), [3000, '0.0.0.0']);   t.deepEqual(parseListen('127.0.0.1:3005'), [3005, '127.0.0.1']);-  t.deepEqual(parseListen('tcp://127.0.0.1:5000'), [5000, '127.0.0.1']);-  t.deepEqual(parseListen('unix:/home/user/server.sock'), [-    '/home/user/server.sock',-  ]);-  t.deepEqual(parseListen('pipe:\\\\.\\pipe\\PipeName'), [-    '\\\\.\\pipe\\PipeName',-  ]);+  if (process.platform !== 'win32') {+    t.deepEqual(parseListen('tcp://127.0.0.1:5000'), [5000, '127.0.0.1']);

Just the tcp one.

styfle

comment created time in 8 days

Pull request review commentzeit/now

[tests] Add windows to CI unit tests

 function runScript(pkgName, script) {     }     if (pkgJson && pkgJson.scripts && pkgJson.scripts[script]) {       console.log(`\n[${pkgName}] Running yarn ${script}`);-      const child = spawn('yarn', [script], { cwd, stdio: 'inherit' });+      const child = spawn('yarn', [script], {+        cwd,+        stdio: 'inherit',+        env: process.env,

I don't think this one is necessary? 🤔

styfle

comment created time in 8 days

Pull request review commentzeit/now

[tests] Add windows to CI unit tests

 const getStaticFiles = async (dir, isBuilds = false) => {     strict: false,   }); -  return getStaticFiles_(dir, nowConfig, { hasNowJson, output, isBuilds });+  const files = await getStaticFiles_(dir, nowConfig, {+    hasNowJson,+    output,+    isBuilds,+  });+  return normalizeWindowsPaths(files);+};++const normalizeWindowsPaths = files => {+  if (process.platform === 'win32') {+    const prefix = 'D:/a/now/now/packages/now-cli/test/fixtures/unit/';+    return files.map(f =>+      f.replace(new RegExp(/\\/g), '/').slice(prefix.length)

Why new RegExp()? It's not even passing in a string 😛

      f.replace(/\\/g, '/').slice(prefix.length)
styfle

comment created time in 8 days

Pull request review commentzeit/now

[tests] Add windows to CI unit tests

 test('[DevServer] parseListen()', t => {   t.deepEqual(parseListen('3000'), [3000]);   t.deepEqual(parseListen('0.0.0.0'), [3000, '0.0.0.0']);   t.deepEqual(parseListen('127.0.0.1:3005'), [3005, '127.0.0.1']);-  t.deepEqual(parseListen('tcp://127.0.0.1:5000'), [5000, '127.0.0.1']);-  t.deepEqual(parseListen('unix:/home/user/server.sock'), [-    '/home/user/server.sock',-  ]);-  t.deepEqual(parseListen('pipe:\\\\.\\pipe\\PipeName'), [-    '\\\\.\\pipe\\PipeName',-  ]);+  if (process.platform !== 'win32') {+    t.deepEqual(parseListen('tcp://127.0.0.1:5000'), [5000, '127.0.0.1']);

Weird that that one is failing 🤔

styfle

comment created time in 8 days

Pull request review commentzeit/now

[tests] Add windows to CI unit tests

 test( test(   '[DevServer] Allow `cache-control` to be overwritten',   testFixture('now-dev-headers', async (t, server) => {-    const res = await get(+    const res = await fetch(       `${server.address}/?name=cache-control&value=immutable`     );-    t.is(res.headers['cache-control'], 'immutable');+    t.is(res.headers.get('cache-control'), 'immutable');   }) );  test(   '[DevServer] Sends `etag` header for static files',   testFixture('now-dev-headers', async (t, server) => {+    if (process.platform === 'win32') {+      console.log(+        'Skipping "etag" test on windows since it yields a different result.'+      );+      t.is(true, true);+      return;+    }     const res = await fetch(`${server.address}/foo.txt`);     t.is(res.headers.get('etag'), '"d263af8ab880c0b97eb6c5c125b5d44f9e5addd9"');

I think changing this test to this would be better than skipping:

     t.is(/^"[a-f0-9]{40}"$/.test(res.headers.get('etag')), true);
styfle

comment created time in 8 days

Pull request review commentzeit/now

[tests] Add windows to CI unit tests

 const treeKill = promisify(_treeKill); let nodeBinPromise: Promise<string>;  async function getNodeBin(): Promise<string> {-  return which.sync('node', { nothrow: true }) || process.execPath;+  //return which.sync('node', { nothrow: true }) || process.execPath;

Let's just remove this function?

styfle

comment created time in 8 days

startedsindresorhus/aggregate-error

started time in 8 days

release TooTallNate/node-pac-proxy-agent

4.0.0

released time in 8 days

created tagTooTallNate/node-pac-proxy-agent

tag4.0.0

A PAC file proxy `http.Agent` implementation for HTTP and HTTPS

created time in 8 days

push eventTooTallNate/node-pac-proxy-agent

Nathan Rajlich

commit sha 49bb28ab7d92a81162e71d18273076bdc0d9e3a0

4.0.0

view details

push time in 8 days

delete branch TooTallNate/node-pac-proxy-agent

delete branch : update/try-all-proxies

delete time in 8 days

push eventTooTallNate/node-pac-proxy-agent

Nathan Rajlich

commit sha 46cf5c585e0369aeb2191107bfe15079d397725e

Try all proxies (#29) * Try all proxies Previously only the first proxy was attempted. Closes #1. * Add `https` proxy fallback test * Add 10s timeouts to fall back tests for Windows :/

view details

push time in 8 days

PR merged TooTallNate/node-pac-proxy-agent

Try all proxies

Previously only the first proxy was attempted.

Closes #1.

+108 -28

0 comment

3 changed files

TooTallNate

pr closed time in 8 days

issue closedTooTallNate/node-pac-proxy-agent

Figure out an API for the fallback proxy servers

The FindProxyForURL() function is able to return multiple semi-colon delimited values ("PROXY 1.2.3.4:3128; SOCKS 127.0.0.1:9050; DIRECT") which this agent is expected to try sequentially until the first working proxy is found.

Currently, only the first proxy server specified will ever be used, so I need to either figure out some API to step through the possibilities and then let the user handle it from there (i.e. let the user call http.request() multiple times upon failure, trying the next proxy down the list each time), but that's a PITA for the user.

Ideally, we could do some crazy hacks and hijack the "error" event on the http.Request instance, and transparently try the next proxy server when an error occurs. We would have to tear down the hijacking machinery once the "response" event occurred… Kinda a crazy idea, but if I can pull it off cleanly and reliably then this would be the best UX.

closed time in 8 days

TooTallNate

push eventTooTallNate/node-pac-proxy-agent

Nathan Rajlich

commit sha 047972c10795f5019f8adb00a61c1a6b7eed0626

Add 10s timeouts to fall back tests for Windows :/

view details

push time in 8 days

Pull request review commentzeit/now

[now-python] Fix path segments with square brackets

 import base64 import json import inspect+from importlib import util -import __NOW_HANDLER_FILENAME-__now_variables = dir(__NOW_HANDLER_FILENAME)+# Import relative path https://stackoverflow.com/a/67692/266535+__now_spec = util.spec_from_file_location("__NOW_HANDLER_MODULE_NAME", "./__NOW_HANDLER_ENTRYPOINT")

Is this ./ going to work on Windows?

styfle

comment created time in 8 days

release TooTallNate/node-get-uri

3.0.1

released time in 8 days

created tagTooTallNate/node-get-uri

tag3.0.1

Returns a `stream.Readable` from a URI string

created time in 8 days

push eventTooTallNate/node-get-uri

Nathan Rajlich

commit sha 5eb62d6c57f9a707cc09e70648d8ce3982ce9d7e

3.0.1

view details

push time in 8 days

push eventTooTallNate/node-http-proxy-agent

Nathan Rajlich

commit sha ef184d6b7af42e02920b015ecea557a0ac201fdc

Remove dead code

view details

push time in 8 days

delete branch TooTallNate/node-get-uri

delete branch : update/use-tootallnate-once

delete time in 9 days

push eventTooTallNate/node-get-uri

Nathan Rajlich

commit sha 212d5fb8d0ae1b074ceefa90cfc1b18eeb0c1ed3

Use `@tootallnate/once` (#21) It's the same code, just moved to a re-usable module.

view details

push time in 9 days

PR merged TooTallNate/node-get-uri

Use `@tootallnate/once`

It's the same code, just moved to a re-usable module.

+4 -26

0 comment

4 changed files

TooTallNate

pr closed time in 9 days

delete branch TooTallNate/node-http-proxy-agent

delete branch : update/wait-for-connect

delete time in 10 days

push eventTooTallNate/node-pac-proxy-agent

Nathan Rajlich

commit sha 825197f2f51ee76f1ec1185e534cbf671d801de4

Add `https` proxy fallback test

view details

push time in 10 days

release TooTallNate/node-http-proxy-agent

4.0.1

released time in 10 days

created tagTooTallNate/node-http-proxy-agent

tag4.0.1

An HTTP(s) proxy `http.Agent` implementation for HTTP endpoints

created time in 10 days

push eventTooTallNate/node-http-proxy-agent

Nathan Rajlich

commit sha d41fd2093cc0ef2314fd5a6fd42a5eb36d728c08

4.0.1

view details

push time in 10 days

push eventTooTallNate/node-http-proxy-agent

Nathan Rajlich

commit sha c19dc0ad1db60e08da9b854ce38844d8ab3e815c

Wait for "connect" event before returning the socket (#15) So that this `callback()` function throws instead of the `http` request machinery. This is important for i.e. `PacProxyAgent` which determines a failed proxy connection via the `callback()` function throwing.

view details

push time in 10 days

PR merged TooTallNate/node-http-proxy-agent

Wait for "connect" event before returning the socket

So that this callback() function throws instead of the http request machinery. This is important for i.e. PacProxyAgent which determines a failed proxy connection via the callback() function throwing.

+13 -5

0 comment

2 changed files

TooTallNate

pr closed time in 10 days

PR opened TooTallNate/node-get-uri

Use `@tootallnate/once`

It's the same code, just moved to a re-usable module.

+4 -26

0 comment

4 changed files

pr created time in 10 days

create barnchTooTallNate/node-get-uri

branch : update/use-tootallnate-once

created branch time in 10 days

PR opened TooTallNate/node-http-proxy-agent

Wait for "connect" event before returning the socket

So that this callback() function throws instead of the http request machinery. This is important for i.e. PacProxyAgent which determines a failed proxy connection via the callback() function throwing.

+13 -5

0 comment

2 changed files

pr created time in 10 days

create barnchTooTallNate/node-http-proxy-agent

branch : update/wait-for-connect

created branch time in 10 days

push eventTooTallNate/node-get-uri

Nathan Rajlich

commit sha 76f901a483df06ef1d9554b3146a10ec2155498d

Move "@types/fs-extra" to `devDependencies`

view details

push time in 10 days

more