如果代理设置在全局级别,如何使用httpurlconnection.openconnection而不使用任何代理? [英] How to use httpurlconnection.openconnection without any proxy if the proxy is set at global level?

查看:119
本文介绍了如果代理设置在全局级别,如何使用httpurlconnection.openconnection而不使用任何代理?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序使用一些设置在全局级别的代理。因此,即使在执行httpurlconnection.openconnection(不是以代理作为参数的httpurlconnection.openconnection(代理))之后,也通过代理进行连接。我想知道我是否不能在案件中使用默认代理?



我尝试了什么:



我正在寻找避免默认代理的方法但不能这样做。

My application uses some proxy which is set at global level.So,even after doing httpurlconnection.openconnection (not httpurlconnection.openconnection (proxy) which takes proxy as parameter) ,the connection is made through the proxy. I would like to know if I can not use the default proxy in cases?

What I have tried:

I am looking for ways to avoid default proxy but not able to do so.

推荐答案

这完全取决于你的 - 首先是网络人士。您要么必须使用代理,要么不使用代理,或者您可以使用应用程序在工作站的代理配置中进行异常设置。
That is entirely up to your on-premises network people. You either have to use a proxy or you don't, or you may be able to get an exception setup in the proxy configuration for the workstations using your app.


这篇关于如果代理设置在全局级别,如何使用httpurlconnection.openconnection而不使用任何代理?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆