internal network which is using pac url such as: http://proxypac.*.com/proxy.pac for proxying, might causing IDE(s) eg(Eclipse/Intellij) can't connect or install plugins, we can using the following code to generate the actual proxied url, and once get it then set it in IDE.
if you using dart sdk cmd mod, you can use
写道
set https_proxy=username:%password%@proxy.*.com:8080
this tool code needs proxy-vole-20131209.jar
import com.btr.proxy.search.ProxySearch; import com.btr.proxy.util.Logger; import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.net.ProxySelector; import java.net.URL; import java.text.MessageFormat; public class ProxyChecker extends JFrame { private static final long serialVersionUID = 1L; private JComboBox modes; private JButton testButton; private JTextField urlField; private JTextArea logArea; public ProxyChecker() { this.init(); } private void init() { this.setTitle("Proxy Vole Tester"); this.setDefaultCloseOperation(3); JPanel p = new JPanel(); p.add(new JLabel("Mode:")); this.modes = new JComboBox(ProxySearch.Strategy.values()); p.add(this.modes); p.add(new JLabel("URL:")); this.urlField = new JTextField(30); this.urlField.setText("https://pub.dartlang.org"); p.add(this.urlField); this.testButton = new JButton("Check"); this.testButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { ProxyChecker.this.testUrl(); } }); p.add(this.testButton); this.logArea = new JTextArea(5, 50); JPanel contenPane = new JPanel(new BorderLayout()); contenPane.add(p, "North"); contenPane.add(new JScrollPane(this.logArea), "Center"); this.setContentPane(contenPane); this.pack(); this.setLocationRelativeTo((Component) null); this.installLogger(); } private void installLogger() { Logger.setBackend(new Logger.LogBackEnd() { public void log(Class<?> clazz, Logger.LogLevel loglevel, String msg, Object... params) { ProxyChecker.this.logArea.append(loglevel + "\t" + MessageFormat.format(msg, params) + "\n"); } public boolean isLogginEnabled(Logger.LogLevel logLevel) { return true; } }); } protected void testUrl() { try { if (this.urlField.getText().trim().length() == 0) { JOptionPane.showMessageDialog(this, "Please enter an URL first."); return; } this.logArea.setText(""); ProxySearch.Strategy e = (ProxySearch.Strategy) this.modes.getSelectedItem(); ProxySearch ps = new ProxySearch(); ps.addStrategy(e); ProxySelector psel = ps.getProxySelector(); if (psel == null) { JOptionPane.showMessageDialog(this, "No proxy settings available for this mode."); return; } ProxySelector.setDefault(psel); URL url = new URL(this.urlField.getText().trim()); java.util.List result = psel.select(url.toURI()); if (result == null || result.size() == 0) { JOptionPane.showMessageDialog(this, "No proxy found for this url."); return; } System.out.println("there are " + result.size() + " results."); //santiago //JOptionPane.showMessageDialog(this, "Proxy Settings found using " + e + " strategy.\n" + "Proxy used for URL is: " + result.get(0)); ProxyChecker.this.logArea.append("result:" + "\t" + "Proxy used for URL is: " + result.get(0) + "\n"); } catch (Exception var6) { JOptionPane.showMessageDialog(this, "Error:" + var6.getMessage(), "Error checking URL.", 0); } } public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable() { public void run() { ProxyChecker.setLookAndFeel(); ProxyChecker mainFrame = new ProxyChecker(); mainFrame.setVisible(true); } }); } private static void setLookAndFeel() { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (Exception var1) { ; } } }
相关推荐
network-proxy-flutter-1.0.4.zip
配置时同样需要将`proxy.ashx`部署到服务器,并在ArcGIS JavaScript API中设置`proxyUrl`属性。 **proxy.php** 是PHP语言实现的代理服务,适用于PHP环境,如Apache或Nginx。对于那些基于PHP的Web应用,可以使用`...
DesktopView.Internal.Broker.ProxyStub
在SAP系统中,ABAP调用ABAP Proxy是一种常见的技术操作,用于在不同系统间或者同一系统内的组件之间实现通信。ABAP Proxy是SAP提供的一个强大的接口技术,它允许开发者创建安全、高效的远程调用机制。接下来,我们将...
Proxy和Stub的作用是解决进程间通信的问题,使得不同地址空间的应用程序可以透明地调用彼此的功能。 3. **MergeModule (x86)**:MergeModule是一个MSI(Microsoft Installer)模块,用于将组件打包到安装程序中。...
《GoProxy-Android:全能代理服务器在安卓平台的应用与实现》 GoProxy-Android是由snail007/goproxy团队开发的一款适用于安卓系统的全能代理服务器应用。此项目旨在为移动设备提供强大的网络代理功能,使得用户能够...
标题“Serial port to network proxy-开源”所涉及的是一个开源项目,它的主要功能是实现串行端口(Serial Port)与网络(Network)之间的代理连接。这个代理使得远程设备可以通过TCP或telnet协议与本地计算机的串行...
proxy源代码,linux下的ftp 代理的源代码,大家多多支持啊
FoxyProxy 是一款高级代理服务器管理工具,是 Firefox 火狐浏览器的代理插件,相比比 SwitchProxy、ProxyButton、QuickProxy、xyzproxy、ProxyTex 等扩展提供更多的功能。 FoxyProxy 通过使用通配符、正则表达式和...
apache Proxy Error apache Proxy Error apache Proxy Error apache Proxy Error
通过运行安装react-native-network-proxy $ yarn add react-native-network-proxy 或者 $ npm i react-native-network-proxy --save 将react-native-network-proxy到您的react-native应用程序中: import { ...
标题中的"network_example.rar_Radvision Sip_proxy_sip_sip proxy"暗示了这是一个与网络通信相关的项目,特别关注的是Radvision公司的SIP(Session Initiation Protocol)代理服务器的实现。Radvision是一家专注于...
Windows.Internal.UI.Logon.ProxyStub
Windows.Internal.Feedback.Analog.ProxyStub
arcgis for javascript api所需要的配置文件,能解决跨域访问的问题,我在proxy....包含两个文件proxy.ashx,proxy.config两个文件,上次下载一个说是有两个文件,其实里面只有一个,有被骗了的感觉,所以这次上传上来
2014最新版proxy lab参考答案,小伙伴快来吧!
【JsProxy:在线JavaScript代理与离线打包工具】 JsProxy是一个强大的在线JavaScript处理工具,它提供了两种主要功能:JavaScript代理(js proxy)和JavaScript打包(js packer)。这两个功能对于前端开发者来说是...