Closed clowwindy closed 9 years ago
Well, I wonder it could develop a method to support PAC file.
like it too......
Right, can at least nw use the common HTTP_PROXY, http_proxy, HTTPS_PROXY, and https_proxy environment variables when it can't find any system settings?
The PAC and system support in this closed issue is wonderful:
https://github.com/rogerwang/node-webkit/issues/130?source=cc
But I've found some linux variants that don't supply the system proxy settings in a way Chrome or nw can understand. In those cases, either using the environment variables or a command line option to set the proxy would be helpful. Of course, the proxy given should be returned by the new API in the above issue
Actually, it is quite annoying to work behind proxy using NW-application, because users are asked for the credentials twice - first for NW, second for Node
I think there should be implemented some common way - i.e. environment variable HTTP_PROXY which is accessible from the NW and Node, or, another option, some API
Bump?
The project I'm working on at the moment needs me to find a portable web browser of some sort that runs things through a locally hosted proxy.
node-webkit would be perfect for the task if only I could figure out how to make it use said proxy…
uppfinnarn: you can't unless the System config is set to your local hosted server. I implemented kind of http client to make nodewebkit working with my own proxy with authentication.
You can use chromium portable if you don't need any node.js modules. It has an extensions that allows you configure the proxy.
Looking at that now, thanks. Not as elegant as I could make my node-webkit solution (where I could run the proxy within the same process), but it works.
Nevermind, Windows only, back to looking for alternatives until (if) this gets addressed...
Need it too ...
+1
+1 as well
An API method would be cool but supporting the --proxy-server chromium arg is a first step and is probably easy to implement.
+1
I support felicienfrancois proposal to support the --proxy-server arg. For users that cannot edit their system proxy configuration (at work for example), this is really necessary.
+1 would be very useful
+1 like it too......
+1
++
+1
This feature is quite important for Chinese :+1:
+1
proxy_service.cc:
#if defined(OS_WIN)
return new ProxyConfigServiceWin();
#elif defined(OS_IOS)
return new ProxyConfigServiceIOS();
#elif defined(OS_MACOSX)
return new ProxyConfigServiceMac(io_thread_task_runner);
I think this is the code to check the system proxy. I will try to 'hard coding' the proxy setting before this issues be fixed.
+1 this is very important for anyone who needs to have their content go through any sort of proxy, i.e tor.
I created a node module to manage the system proxy. Only working in windows (xp/7/+) for now on. https://github.com/131/proxytoggle
Looks like your module requires .Net to be installed and don't support anything we need in this issue - proxy credentials and configuration
Yep, leave that to node-proxy (so your nw app start & configure it's own proxy configuration), my toggle is just here to force nw to use it.
cough - oh, I mean +1
Oh, atom-shell implemented this: https://github.com/atom/atom-shell/issues/584 Exactly what I need.
@clowwindy this is still an issue of node-webkit so I'm re-opening this.
@clowwindy And a command line option is not an API, which you proposed in OP.
Roger, can a username/password be passed with this?
Thanks for your work!
On Mon, Nov 17, 2014 at 11:59 PM, Roger Wang notifications@github.com wrote:
documented here: https://github.com/rogerwang/node-webkit/wiki/App#setproxyconfigconfig
Reply to this email directly or view it on GitHub: https://github.com/rogerwang/node-webkit/issues/916#issuecomment-63434134
@tommoor I'm afraid not, but later a username / password dialog will be shown to the user upon network request.
Ok, how to set the proxy credentials and change them on fly
?
Look, there are lots of cases - i.e. when app opens external page that makes ajax requests - credentials are required When the app uses node http to make some requests. Node http is required to bypass several restrictions of XHR. Credentias are required again
When the password expires or user switches to different network, he must re-enter the credentials . Such cases are impossible to implement
@rogerwang Thank you for your work!
Any plans to support PAC(Proxy Auto-Config)?
auto_detect
and pac_url
are in net/proxy/proxy_config.cc
but currently in node-webkit App#setProxyConfig() handles only proxy_rules
.
PAC is very useful. Please consider it.
@ayapi yeah, would like to support it. Re-open this issue for this.
I'd like to add that it seems App.setProxyConfig()
does not seem to be working - network requests initiated by Chromium still go use the system proxy settings.
Tested with nw 0.11.2 on CentOS 7 (with GNOME desktop) and Squid proxy.
@tommoor Have you find any solution to autologin in proxy configuration ? My app is meant to run alone without any interaction so I must find a way to do that..
With 12.0 & 12.2 for win7 32bit . And operating system is win7 64bit.
After set proxy by setProxyConfig. and proxy works good. But Devtools show Empty.
My proxy string pass to setProxyConfig is : "http=192.168.2.2:8087;https=192.168.2.2:8087;socks=direct://" OR "http=192.168.2.2:8087;direct://"
Both cause the same result.
Remote debugging via local socket? And how can I passby the local socket for remote debugging?
+1 I have the same problem as @bestplay :(
This can be done by CLI argument in Electron (Previously named Atom Shell) via a commit that was made a while ago right? Should it not now be easy to add to nw.js?
@ayapi the support for auto detect proxy and PAC url will be added in the next 0.12.4 release. Thanks for your patience.
Thank you very much!
I know a lot of people would love to use nwjs for web automation and so being able to rotate proxies with logins and no user interaction required is essential. There are other use-cases as well.
Please merge commit by rogerwang c45f686
In 0.6.3 an API to get proxy for url has been added. Can we have an API to set proxy?
Chrome has a proxy API, which doesn't affect system settings. I'm wondering if nw could have the same feature.
http://developer.chrome.com/extensions/proxy.html
Did you help close this issue? Go claim the $85 bounty on Bountysource.