SmartProxy icon indicating copy to clipboard operation
SmartProxy copied to clipboard

Add system proxy as a pre-built proxy servers

Open fonlan opened this issue 1 year ago • 14 comments
trafficstars

Description

Company use a PAC script as the default system proxy. And I know SmartProxy will not support PAC. So is it possible add system proxy as a pre-built proxy server? So I can choice it as the default proxy.

Is your feature request related to a problem? Please describe.

Currently I can't use SmartProxy in my company's environment because it's not support PAC. Add system proxy as a pre-built proxy servers can be a solution.

Describe alternatives you've considered

No response

Any additional context

No response

fonlan avatar Feb 26 '24 10:02 fonlan

I don't understand what you mean by "system proxy as a pre-built proxy servers"! You can create different profiles and have them point to different proxy servers: https://github.com/salarcode/SmartProxy/wiki/Add-New-Smart-Profile

salarcode avatar Feb 26 '24 11:02 salarcode

The "system proxy" I means the proxy configured in windows setting like below. image

Currently I can't create proxy server profile point to windows system proxy setting.

fonlan avatar Feb 26 '24 13:02 fonlan

The option "System Proxy" should do that for you. That will tell browser to use whatever proxy is configured in windows. And because there is only one Windows you are using to run the browser there will be only one System profile, no more!

salarcode avatar Feb 26 '24 13:02 salarcode

But the option "System Proxy" will only use the proxy configured in windows setting. What I need is use dedicate proxy profile if domain exist in rule list. If domain not match any rule, use "System Proxy".

fonlan avatar Feb 26 '24 13:02 fonlan

What I need is use dedicate proxy profile if domain exist in rule list. If domain not match any rule, use "System Proxy".

I guess that:

If you're using firefox , i guess you could set using system proxy in the browersettings . https://support.mozilla.org/en-US/kb/connection-settings-firefox.

And then set the domain you want to proxy in "SmartProxy".

Reference: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/proxy/ProxyInfo#type_2

"direct": don't proxy the request. If this value is given, all other properties of this object are ignored. However, this setting doesn't override any proxy set by the user. Use proxy.settings to check whether a manual proxy is being used and, if necessary, monitor those settings for changes using BrowserSetting.onChange.

Chrome might be same.

jackyzy823 avatar Feb 26 '24 14:02 jackyzy823

What I need is use dedicate proxy profile if domain exist in rule list. If domain not match any rule, use "System Proxy".

I guess that:

If you're using firefox , i guess you could set using system proxy in the browersettings . support.mozilla.org/en-US/kb/connection-settings-firefox.

And then set the domain you want to proxy in "SmartProxy".

Reference: developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/proxy/ProxyInfo#type_2

"direct": don't proxy the request. If this value is given, all other properties of this object are ignored. However, this setting doesn't override any proxy set by the user. Use proxy.settings to check whether a manual proxy is being used and, if necessary, monitor those settings for changes using BrowserSetting.onChange.

Chrome might be same.

Thanks for your reply but description for "direct" is misleading. proxy set by the user is grayed out and not accessible for user when there is a proxy extension.

salarcode avatar Feb 26 '24 23:02 salarcode

But the option "System Proxy" will only use the proxy configured in windows setting. What I need is use dedicate proxy profile if domain exist in rule list. If domain not match any rule, use "System Proxy".

Why you want is basically is this: Use the PAC when there is matching rule!

I don't see a value in this and we don't want to cover all the edge cases

salarcode avatar Feb 26 '24 23:02 salarcode

But the option "System Proxy" will only use the proxy configured in windows setting. What I need is use dedicate proxy profile if domain exist in rule list. If domain not match any rule, use "System Proxy".

Why you want is basically is this: Use the PAC when there is matching rule!

I don't see a value in this and we don't want to cover all the edge cases

The key point is not the PAC. I means use system proxy when there is NO matching rule. When I use SmartProxy "System Proxy" option, will it check rule matching?

fonlan avatar Feb 27 '24 05:02 fonlan

Using system proxy with PAC , means you should following all PAC rules, and there's definitely a rule in PAC which asking all non-matching rules to use "DIRECT".


I'd suggest to extract rules and proxies from pac file and filled into smartproxy rules and proxies.

Then add rules for non-mathcing domains.

jackyzy823 avatar Feb 27 '24 07:02 jackyzy823

One Idea I get from this is allowing behaviour configuration of Smart Rules profile when there is no matching rule:

  • Use no proxy (default)
  • Use system proxy (new option)

This should be easy to implement but not sure how useful is for people!

salarcode avatar Feb 27 '24 08:02 salarcode

Using system proxy with PAC , means you should following all PAC rules, and there's definitely a rule in PAC which asking all non-matching rules to use "DIRECT".

I'd suggest to extract rules and proxies from pac file and filled into smartproxy rules and proxies.

Then add rules for non-mathcing domains.

The problem for this solution is the PAC is managed by company and we can't modify it by ourself. And there are too many rules in PAC and always updating by IT. Manually extract rules and fill into smartproxy seems not a good idea.

fonlan avatar Feb 27 '24 09:02 fonlan

One Idea I get from this is allowing behaviour configuration of Smart Rules profile when there is no matching rule:

  • Use no proxy (default)
  • Use system proxy (new option)

This should be easy to implement but not sure how useful is for people!

Yes. That's enough for me. It's a good solution. Thank you!

fonlan avatar Feb 27 '24 09:02 fonlan

One Idea I get from this is allowing behaviour configuration of Smart Rules profile when there is no matching rule:

  • Use no proxy (default)
  • Use system proxy (new option)

This should be easy to implement but not sure how useful is for people!

Yes. That's enough for me. It's a good solution. Thank you!

After some checking sorry to say that this is not possible in Chrome due its stupid limited api

salarcode avatar Feb 27 '24 12:02 salarcode

☹️ Ok, seems impossible now.

fonlan avatar Feb 27 '24 13:02 fonlan