-
-
Notifications
You must be signed in to change notification settings - Fork 101
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
Is there "no proxy" configuration support? #2
Comments
Hello Nathan,
My use case for Px has primarily been to use it with CLI tools since most modern browsers can handle the Windows proxy directly, along with any NoProxy declarations. It will help if you could describe your use case a bit further since it will help me understand the utility of such a capability. Thanks for your feedback. |
That's how we're using it, as well. We've got a whole host of originated-on-Linux CLI tools like git.exe and none of them know how to perform NTLM negotiation. The way we use px is to define the forward proxy to be the corporate proxy. The thing is, it is nearly impossible (politically) to get new ignore rules added to the corporate proxy. A good example on our network is If you did add ignore capability, it would be useful to allow us to specify them in both wildcard and CIDR format. Windows' Internet Options control panel only allows wildcards, which makes ignoring non-octet-bounded networks irritating.
Thanks for writing such a great tool! The only other useful thing I think px is missing is an installer that runs it as a Windows service. It's a bit cumbersome to set that up manually. |
It's been a while but I've finally finished v0.2.0 which has the noproxy feature you requested. I discovered several issues with Px while I built out the feature so it took longer than expected. Please download and try it out, your feedback will be appreciated. I'll leave this issue open until I hear back. Note that the noproxy declaration only supports IP addresses at this time (specific IPs, ranges, with wildcards and CIDR format), I haven't gotten around to domain names and related variations. Another note, I've not been able to test Px on an IPv6 network so while the implementation should support IPv6 addresses, there could be issues. I considered your suggestion to provide an installer that runs Px as a Windows service. However, given Px has to run as a domain user (and not a local system account) in order to successfully perform NTLM authentication, running it would require manual configuration anyway (user login and password). Using a service manager such as NSSM might make things easier without requiring functionality within Px. A lighter alternative would be to run Px via startup, though that would require the user to login first. However, I'm open to your comments on the matter. Please feel free to open a new feature request on the subject so that it is tracked independently from this noproxy thread. |
Thanks, @genotrance! The noproxy stuff is exciting! I'll let you know what I find. |
Hi, @genotrance. I'm getting 0.2 installed on my machine now. I have a question: Does |
I mentioned this above - the noproxy declaration only supports IP addresses at this time (specific IPs, ranges, with wildcards and CIDR format), I haven't gotten around to domain names and related variations so corporatedomain.com won't work. I've also not been able to test Px on an IPv6 network so while the implementation should support IPv6 addresses, there could be issues since I've not been able to try it out. I'm interested to know how it works for you. |
Yep, I understood that domain names are not currently supported; I was just pasting what my existing before-px environment variable was set to. So far, I haven't seen any issues. I am able to use commands like |
That's good to hear, hopefully, performance is also better since I fixed several bugs that were causing long delays. Are you seeing the IPv6 portion also working as expected? |
Great job on this, I was going to actually start implementing this for my company. |
Yes, that can be done, I can add that in a few days. Adding support for PAC proxy configurations will be a lot harder though. |
I also looked into doing some pac parsing, I think I got it to work just running it as javascript, however I am very concerned about the performance of checking that every call. I do not believe that would be feasible. I think there would probably have to be some sort of parsing done at startup which is very much more complicated. |
Kronos11, can you please clarify what you mean by this:
When you say incorporating into the noproxy list, what do you mean? I initially thought you meant that you'd set the NTLM proxy to the value set in IE but I don't see what noproxy has to do with that. |
Windows allows you to configure an exceptions list. Maybe that's what @Kronos11 is referring to? |
Nathan, yes that is what I am referring to. |
Okay, that makes sense - so here's the design I'm moving towards:-
The pypac Python module makes the PAC load and check pretty easy. Python has a js2py module as well which can run the PAC Javascript so most of the heavy lifting is done. Performance will be impacted with PAC though since each host will have to be checked. I could cache the PAC responses within Python but will need to see how to synchronize that data across all threads and processes, might be easier just to use pypac and deal with the overhead for simplicity. Let me know if you have any feedback on this approach. |
that sounds like a great plan |
Took a while but I finally just added support for PAC files and auto discovery of the proxy. Issue #30 is being used to track that in specific. I'll continue using this issue to track the
|
Any updates on supporting domain names for noproxy? Both issues related to this have been closed as of 2018. I can look into adding support for this feature if you are not planning on working on it in the near future. |
Now that Px relies on libcurl, this should be much easier to implement. We simply need to forward the info to mcurl.py. Right now, wproxy.py is doing the noproxy processing (but IP only, not domains). We simply need to rewire Px to just delegate everything to mcurl.py. |
Hello @genotrance, First of all, thanks for writing such a great tool. I'm thinking about using I also noticed this [EDIT] : I am on Windows platform and using the v0.8.3 release Thanks for your help. |
After forking repo, I found out the issue and created a PR #177 |
The idea here is that MODE_CONFIG_PAC will download a PAC file which will handle all noproxy situations within the PAC file. The noproxy configuration within px.ini is only relevant when you configure the proxy server within px.ini. That's what it means when it says - same sources - the PAC file should include everything within it, including noproxy handling. What's your scenario? Is your PAC file not adding the right exceptions? |
Exactly ! PAC file is managed by company and does not include all of the exceptions. |
This is fixed in v0.9.0 still in development - see branch. Fixes include noproxy host support as well as overriding NOPROXY for all modes from the Px configuration. Appreciate any tests. |
Could you create a prerelease with the binaries? Then I could test it. By the way, I appreciate your hard work on this, it has made my work-live inside a corporate network much easier. |
v0.9.0 has been released finally! |
One cool feature of Cntlm (and most other proxies) is the ability to ignore certain IP addresses/ranges and hostnames/ranges. e.g., in Cntlm, I could do this:
This is a critical feature because without it, I can't force certain IPs and hostnames to resolve locally.
The text was updated successfully, but these errors were encountered: