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
该项目是ser2net的增强版本,ser2net是一种代理,它允许将telnet / tcp连接建立到计算机上的串行端口。
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 { ...
esri.config.defaults.io.proxyUrl is not set所缺文件 proxy.jsp、proxy.ashx、proxy.php、proxy.config
Windows.Internal.UI.Logon.ProxyStub
Google Chrome插件: Proxy SwitchOmega 2.5.15. 轻松快捷地管理和切换多个代理设置. 离线插件使用方法: 1. 打开Chrome -> 自定义及控制按钮(右上角) -> 更多工具 -> 扩展程序 (有可能需要打开开发者模式) 2. 拖拽...
2014最新版proxy lab参考答案,小伙伴快来吧!
ABAP 调用ABAP PROXY
该项目提供了一个代理,该代理允许将telnet / tcp连接建立到计算机上的串行端口。
f5 配置 We’ve gone out with our full proxy messaging for v9 and NS has responded by claiming that they ... In its simplest form, a proxy is a piece of software that "acts on behalf of" a network client.
book 2020 for proxy settings
browsermob-proxy-2.1.4,与selenium一起进行爬虫,获取network中的链接资源
MySQL Proxy 实现负载均衡测试 MySQL Proxy 实现负载均衡测试
OPC Proxy Foundation
forum proxy leecher 1.11forum proxy leecher 1.11forum proxy leecher 1.11forum proxy leecher 1.11
simple proxy
一个功能强大的代理软件,通过简单的配置即可实现快速透传