• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java ChainedProxy类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.littleshoot.proxy.ChainedProxy的典型用法代码示例。如果您正苦于以下问题:Java ChainedProxy类的具体用法?Java ChainedProxy怎么用?Java ChainedProxy使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ChainedProxy类属于org.littleshoot.proxy包,在下文中一共展示了ChainedProxy类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: ProxyToServerConnection

import org.littleshoot.proxy.ChainedProxy; //导入依赖的package包/类
private ProxyToServerConnection(
        DefaultHttpProxyServer proxyServer,
        ClientToProxyConnection clientConnection,
        String serverHostAndPort,
        ChainedProxy chainedProxy,
        Queue<ChainedProxy> availableChainedProxies,
        HttpFilters initialFilters,
        GlobalTrafficShapingHandler globalTrafficShapingHandler)
        throws UnknownHostException {
    super(DISCONNECTED, proxyServer, true);
    this.clientConnection = clientConnection;
    this.serverHostAndPort = serverHostAndPort;
    this.chainedProxy = chainedProxy;
    this.availableChainedProxies = availableChainedProxies;
    this.trafficHandler = globalTrafficShapingHandler;
    this.currentFilters = initialFilters;

    // Report connection status to HttpFilters
    currentFilters.proxyToServerConnectionQueued();

    setupConnectionParameters();
}
 
开发者ID:wxyzZ,项目名称:little_mitm,代码行数:23,代码来源:ProxyToServerConnection.java


示例2: ProxyToServerConnection

import org.littleshoot.proxy.ChainedProxy; //导入依赖的package包/类
private ProxyToServerConnection(
        DefaultHttpProxyServer proxyServer,
        ClientToProxyConnection clientConnection,
        String serverHostAndPort,
        ChainedProxy chainedProxy,
        Queue<ChainedProxy> availableChainedProxies,
        HttpFilters initialFilters,
        GlobalTrafficShapingHandler globalTrafficShapingHandler)
        throws UnknownHostException {
    super(DISCONNECTED, proxyServer, true);
    this.clientConnection = clientConnection;
    this.serverHostAndPort = serverHostAndPort;
    this.chainedProxy = chainedProxy;
    this.availableChainedProxies = availableChainedProxies;
    this.trafficHandler = globalTrafficShapingHandler;
    this.currentFilters = initialFilters;

    // Report connection status to HttpFilters
    this.currentFilters.proxyToServerConnectionQueued();

    setupConnectionParameters();
}
 
开发者ID:Elitward,项目名称:LittleProxy,代码行数:23,代码来源:ProxyToServerConnection.java


示例3: create

import org.littleshoot.proxy.ChainedProxy; //导入依赖的package包/类
/**
 * Create a new ProxyToServerConnection.
 * 
 * @param proxyServer
 * @param clientConnection
 * @param serverHostAndPort
 * @param initialHttpRequest
 * @return
 * @throws UnknownHostException
 */
static ProxyToServerConnection create(DefaultHttpProxyServer proxyServer,
        ClientToProxyConnection clientConnection,
        String serverHostAndPort,
        HttpRequest initialHttpRequest)
        throws UnknownHostException {
    Queue<ChainedProxy> chainedProxies = new ConcurrentLinkedQueue<ChainedProxy>();
    ChainedProxyManager chainedProxyManager = proxyServer
            .getChainProxyManager();
    if (chainedProxyManager != null) {
        chainedProxyManager.lookupChainedProxies(initialHttpRequest,
                chainedProxies);
    }
    return new ProxyToServerConnection(proxyServer, clientConnection,
            serverHostAndPort, chainedProxies.poll(), chainedProxies);
}
 
开发者ID:Mobideck,项目名称:appdeck-android,代码行数:26,代码来源:ProxyToServerConnection.java


示例4: create

import org.littleshoot.proxy.ChainedProxy; //导入依赖的package包/类
/**
 * Create a new ProxyToServerConnection.
 * 
 * @param proxyServer
 * @param clientConnection
 * @param serverHostAndPort
 * @param initialFilters
 * @param initialHttpRequest
 * @return
 * @throws UnknownHostException
 */
static ProxyToServerConnection create(DefaultHttpProxyServer proxyServer,
        ClientToProxyConnection clientConnection,
        String serverHostAndPort,
        HttpFilters initialFilters,
        HttpRequest initialHttpRequest,
        GlobalTrafficShapingHandler globalTrafficShapingHandler)
        throws UnknownHostException {
    Queue<ChainedProxy> chainedProxies = new ConcurrentLinkedQueue<ChainedProxy>();
    ChainedProxyManager chainedProxyManager = proxyServer
            .getChainProxyManager();
    if (chainedProxyManager != null) {
        chainedProxyManager.lookupChainedProxies(initialHttpRequest,
                chainedProxies);
        if (chainedProxies.size() == 0) {
            // ChainedProxyManager returned no proxies, can't connect
            return null;
        }
    }
    return new ProxyToServerConnection(proxyServer,
            clientConnection,
            serverHostAndPort,
            chainedProxies.poll(),
            chainedProxies,
            initialFilters,
            globalTrafficShapingHandler);
}
 
开发者ID:wxyzZ,项目名称:little_mitm,代码行数:38,代码来源:ProxyToServerConnection.java


示例5: initProxyServer

import org.littleshoot.proxy.ChainedProxy; //导入依赖的package包/类
private void initProxyServer() throws Exception
{
   org.littleshoot.proxy.ProxyAuthenticator proxyAuthenticator = new org.littleshoot.proxy.ProxyAuthenticator()
   {
      @Override
      public boolean authenticate(String user, String pwd)
      {
         return (PROXY_USER.equals(user) && PROXY_PWD.equals(pwd));
      }
   };
   InetSocketAddress address = new InetSocketAddress(getServerHost(), ++proxyPort);
   ChainedProxyManager chainProxyManager = new ChainedProxyManager()
   {
      @Override
      public void lookupChainedProxies(HttpRequest httpRequest, Queue<ChainedProxy> chainedProxies)
      {
         chainedProxies.add(new ChainedProxyAdapter()
         {
            @Override
            public InetSocketAddress getChainedProxyAddress()
            {
               return new InetSocketAddress(getServerHost(), getServerPort());
            }

         });
      }
   };
   proxyServer = org.littleshoot.proxy.impl.DefaultHttpProxyServer
                         .bootstrap()
                         .withChainProxyManager(chainProxyManager)
                         .withAddress(address)
                         .withProxyAuthenticator(proxyAuthenticator)
                         .start();
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:35,代码来源:HTTPProxyTestCaseForked.java


示例6: chainedProxyManager

import org.littleshoot.proxy.ChainedProxy; //导入依赖的package包/类
protected ChainedProxyManager chainedProxyManager() {
    return new ChainedProxyManager() {
        @Override
        public void lookupChainedProxies(HttpRequest httpRequest,
                Queue<ChainedProxy> chainedProxies) {
            chainedProxies.add(newChainedProxy());
        }
    };
}
 
开发者ID:chocotan,项目名称:kazeproxy,代码行数:10,代码来源:KazeProxy.java


示例7: newChainedProxy

import org.littleshoot.proxy.ChainedProxy; //导入依赖的package包/类
protected ChainedProxy newChainedProxy() {
    return new ChainedProxyAdapter() {
        @Override
        public TransportProtocol getTransportProtocol() {
            return TransportProtocol.TCP;
        }

        @Override
        public boolean requiresEncryption() {
            return true;
        }

        @Override
        public SSLEngine newSslEngine() {
            SslEngineSource sslEngineSource = new KazeSslEngineSource(
                    "kclient.jks", "tclient.jks", false, true, "serverkey",
                    jkspw);
            return sslEngineSource.newSslEngine();
        }

        @Override
        public InetSocketAddress getChainedProxyAddress() {
            try {
                return new InetSocketAddress(
                        InetAddress.getByName(serverIp), serverPort);
            } catch (UnknownHostException uhe) {
                throw new RuntimeException("Unable to resolve " + serverIp);
            }
        }
    };
}
 
开发者ID:chocotan,项目名称:kazeproxy,代码行数:32,代码来源:KazeProxy.java


示例8: ProxyToServerConnection

import org.littleshoot.proxy.ChainedProxy; //导入依赖的package包/类
private ProxyToServerConnection(
        DefaultHttpProxyServer proxyServer,
        ClientToProxyConnection clientConnection,
        String serverHostAndPort,
        ChainedProxy chainedProxy,
        Queue<ChainedProxy> availableChainedProxies)
        throws UnknownHostException {
    super(DISCONNECTED, proxyServer, true);
    this.clientConnection = clientConnection;
    this.serverHostAndPort = serverHostAndPort;
    this.chainedProxy = chainedProxy;
    this.availableChainedProxies = availableChainedProxies;
    setupConnectionParameters();
}
 
开发者ID:Mobideck,项目名称:appdeck-android,代码行数:15,代码来源:ProxyToServerConnection.java


示例9: lookupChainedProxies

import org.littleshoot.proxy.ChainedProxy; //导入依赖的package包/类
@Override
public void lookupChainedProxies(HttpRequest httpRequest, Queue<ChainedProxy> chainedProxies) {
   ProxyAdapter proxy = new ProxyAdapter(proxyHost, proxyPort);
   chainedProxies.add(proxy);
}
 
开发者ID:Wolfgang-Winter,项目名称:cibet,代码行数:6,代码来源:ChainedProxyManagerImpl.java


示例10: getChainedProxy

import org.littleshoot.proxy.ChainedProxy; //导入依赖的package包/类
public ChainedProxy getChainedProxy() {
    return chainedProxy;
}
 
开发者ID:wxyzZ,项目名称:little_mitm,代码行数:4,代码来源:ProxyToServerConnection.java



注:本文中的org.littleshoot.proxy.ChainedProxy类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java RenderCoordinates类代码示例发布时间:2022-05-22
下一篇:
Java BeanAttributes类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap