Skip to content
This repository has been archived by the owner on Jul 30, 2018. It is now read-only.

Feature: request under Node.js can proxy like a browser #335

Open
kitsonk opened this issue May 15, 2017 · 4 comments
Open

Feature: request under Node.js can proxy like a browser #335

kitsonk opened this issue May 15, 2017 · 4 comments

Comments

@kitsonk
Copy link
Member

kitsonk commented May 15, 2017

Enhancement

When working with request under Node.js, we should have similar functionality to what is available when running under XHR, in the sense of being able to configure the proxies in a particular way, but also supporting things like PAC configurations.

In order to do this we need to:

  • A proxy detection functionality, including DNS WPAD
  • Ability to read and resolve proxy configuration files (PAC)
  • Ability to assert manual configuration using authentication
@dylans dylans added this to the 2017.06 milestone May 19, 2017
bryanforbes added a commit to bryanforbes/core that referenced this issue May 21, 2017
@bryanforbes
Copy link
Member

We may want some of this to be a separate package. I started the PAC parser/resolver on Friday and it’s going to add dependencies on fibers (to be able to run dns.lookup synchronously in the PAC script), netmask, and ip.

@kitsonk
Copy link
Member Author

kitsonk commented May 22, 2017

Blah, yeah, I see the problem. What we have as a very light external run-time dependencies would suddenly become crowded and only be required by a smaller subset of users. I would be 👍 for breaking out as a separate package, with a replacement node request provider and additional modules for doing the proxy detection. I just don't know what we would name it.

@bryanforbes
Copy link
Member

I think most of the code to actually use the proxy settings could still live in @dojo/core, but we could move the PAC and auto detection stuff to a separate package and users would do something like this:

import request from @dojo/core/request’;
import { pac } from @dojo/proxy’;

request(url, { proxy: pac(...) })

@kitsonk
Copy link
Member Author

kitsonk commented May 23, 2017

Would proxy be the right name, given that it would (at this point) only relate to running under Node.js or Electron? That is also one thing to check with fibres that it would work under Electron.

@dylans dylans modified the milestones: 2017.06, 2017.07 Jul 4, 2017
@dylans dylans modified the milestones: 2017.07, 2017.08 Jul 29, 2017
@kitsonk kitsonk modified the milestones: 2017.08, 2017.09 Sep 4, 2017
@dylans dylans modified the milestones: 2017.09, 2017.10 Oct 10, 2017
@kitsonk kitsonk removed the beta3 label Oct 30, 2017
@kitsonk kitsonk modified the milestones: 2017.10, long-grass Oct 30, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants