• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java ClientToProxyConnection类的典型用法和代码示例

java 2次浏览

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

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

示例1: issueDebugRequest

点赞 2

import org.littleshoot.proxy.impl.ClientToProxyConnection; //导入依赖的package包/类
/**
 * Issue a debug request when debugging is enabled.
 *
 * @param httpObject      Http request of client
 * @param m_ctx           Netty context
 * @param fromDebugFilter Indicator shows if the request require to be forwarded
 * @return An indicator showing if debug manager consumes the request. If true, the caller needs to stop handling request.
 */
public void issueDebugRequest(FullHttpRequest httpObject, final ChannelHandlerContext m_ctx, boolean fromDebugFilter) {
	if (debugEnabled()) {
		final FullHttpRequest request = httpObject.copy();
		if (fromDebugFilter) {
			try {
				if (ssl(request)) {
					Field field = ClientToProxyConnection.class.getDeclaredField("mitming");
					field.setAccessible(true);
					field.set(m_ctx.handler(), true);
				}
			} catch (Exception e) {
				LOGGER.error(e.getMessage());
			}
			String key = m_policyManager.generateCacheKey(request);
			FullHttpResponse cacheResponse = m_policyManager.getCacheManager().get(key);
			CacheResultVerifier verifier = new CacheResultVerifier(key, request, cacheResponse);
			Attribute<CacheResultVerifier> debugging = m_ctx.attr(DEBUG_RESULT);
			debugging.set(verifier);
		} else {
			executor.execute(new Runnable() {
				@Override
				public void run() {
					forwardDebugRequest(request);
				}
			});
		}
	}
}
 

开发者ID:eBay,
项目名称:ServiceCOLDCache,
代码行数:37,
代码来源:DebugManager.java

示例2: FlowContext

点赞 2

import org.littleshoot.proxy.impl.ClientToProxyConnection; //导入依赖的package包/类
public FlowContext(ClientToProxyConnection clientConnection) {
    super();
    this.clientAddress = clientConnection.getClientAddress();
    SSLEngine sslEngine = clientConnection.getSslEngine();
    this.clientSslSession = sslEngine != null ? sslEngine.getSession()
            : null;
}
 

开发者ID:wxyzZ,
项目名称:little_mitm,
代码行数:8,
代码来源:FlowContext.java

示例3: FullFlowContext

点赞 2

import org.littleshoot.proxy.impl.ClientToProxyConnection; //导入依赖的package包/类
public FullFlowContext(ClientToProxyConnection clientConnection,
        ProxyToServerConnection serverConnection) {
    super(clientConnection);
    this.serverHostAndPort = serverConnection.getServerHostAndPort();
    this.chainedProxy = serverConnection.getChainedProxy();
}
 

开发者ID:wxyzZ,
项目名称:little_mitm,
代码行数:7,
代码来源:FullFlowContext.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)