Default Proxy how bypass most url and only apply to a few

我是研究僧i 提交于 2020-05-24 05:06:28

问题


In our BizTalk Server, administrators have installed a proxy.

This proxy is only for a few URLs and the most URLs have to bypass it.

We set on BTSNTSvc64.exe.config the property:

<defaultProxy enabled="true" useDefaultCredentials="true">  
                               <proxy usesystemdefault="True"
                                               proxyaddress="http://XX.XX.XX.XXX:8080"
                                               bypassonlocal="True" />
</defaultProxy>     

How to set the bypasslist to include the most URLs that don't need a proxy and remove only a few that need a proxy?


回答1:


How about adding everything to the bypass list and the remove the urls you want to use the proxy?

<bypasslist>
<add address='.*' />
<remove address='my url' />
</bypasslist>



回答2:


So, this is not your problem and it's not a BizTalk issue. It's the Administrator's issue.

You need to ask them how to configure apps to bypass their proxy. Consider, it wouldn't be very useful if any person could just bypass it with a config file.

Meaning, they need to tell you how to exempt specific apps from whatever proxy process they're using. If they refuse, it's still not your problem, it's for your manager or the business owner to address.




回答3:


Add following regex in the <bypasslist>

^((?!domain1)(?!domain2\.com).)*$

It will take all domain except defined above

www.contoso.com
api.contoso.com
www.domain1.com
sub.domain1.net
http2://www.domain2.com
sub.domain2.com
sub.domain2.edu
http://sub.domain2.net
sub.domain1.edu
http://sub.domain1.net
10.10.10.10
192.168.1.1
www.microsoft.com
api.google.com

Have created a test: https://regexr.com/52o30

Eg:

<defaultProxy enabled="true">
  <proxy usesystemdefault="True" proxyaddress="http://2.3.4.5:6789" bypassonlocal="True" />
  <bypasslist>
    <add address="^((?!domain1)(?!domain2\.com).)*$" />
  </bypasslist>
</defaultProxy>

Here, domain1 will be completely ignored with any TLD, but domain2 will be ignored only when full domain name is present like domain2.com, (with any preceding characters or pre-domain for both domains).



来源:https://stackoverflow.com/questions/49295285/default-proxy-how-bypass-most-url-and-only-apply-to-a-few

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!