Comments (7)
不代理的话应该从客户端入手吧,比如pac规则这种
from proxyee.
明白,我的问法有问题,应该是不希望截取被https解密的网址
from proxyee.
哦 你意思就是指定某些域名不走MITM,报文原始转发那种吧,目前还不支持,我看看怎么改下吧
from proxyee.
我现在做了一个正则匹配
private static final Pattern URL_PATTERN = Pattern.compile("(?i)(?:https?://)?([a-zA-Z0-9\.\-]+\.[a-zA-Z]{2,})(?::\d+)?(?:/\S*)?");
else { // ssl和websocket的握手处理
ByteBuf byteBuf = (ByteBuf) msg;
Pattern pattern = Pattern.compile("^http");
String request = byteBuf.toString(CharsetUtil.UTF_8);
// 使用正则表达式从请求内容中获取网址信息
Matcher matcher = URL_PATTERN.matcher(request);
if (matcher.find()) {
String url = matcher.group(1);
System.out.println("Received request: " + request);
System.out.println("URL: " + url);
}
// 处理原始的请求内容
System.out.println("Received request: " + request);
//然后如果匹配成功,把HandleSsl设置为false
if (getServerConfig().isHandleSsl() && byteBuf.getByte(0) == 22) {// ssl握手
from proxyee.
域名在握手信息里是有的,直接拿就行了
from proxyee.
是在byteBuf 里面拿吗,因为这个https里面好像是加密的,拿不到
from proxyee.
刚刚提交了一版,你升级到1.7.5,可以参考下最新的示例:https://github.com/monkeyWie/proxyee/blob/master/src/test/java/com/github/monkeywie/proxyee/MimtMatchHttpProxyServer.java
from proxyee.
Related Issues (20)
- config.setHandleSsl(false); 设置不启用https的情况下如何进行https拦截? HOT 5
- class org.bouncycastle.asn1.DEROutputStream from class org.bouncycastle.cert.CertUtils
- 是否支持vpn服务器的创建? HOT 1
- 支持socket5协议吗 HOT 1
- 一个请求会收到多次HttpResponse是哪里的原因 HOT 18
- 有没有办法根据request中header的标记决定请求是否走前置代理 HOT 1
- HTTP代理时(非HTTPS),TCP连接TIME_WAIT时,代理无法连接服务器 HOT 3
- Question: How to test and build the project from source HOT 1
- 通过篡改DNS 直连代理的方式 https 请求报错 HOT 1
- The https connection should not be closed if there is no proxy-authorization header
- With an ordinary httpS connection, the ssl flag is not true
- 大佬,你好,部署在服务器后,手机连接无响应 HOT 1
- Linux 2核2G 部署后一直刷错误日志,请求帮助 HOT 3
- 您好,我想问下 我把这工程集成到springboot中,代理就不能正常工作了 HOT 3
- 抓不了JD的包
- 是否提供健康检查的方法? HOT 2
- TCP 链接数量一致在增加 HOT 6
- 在阿里云申请了一个免费能信任的证书,替换了ca.crt和der,请问这个时候中间人做代理的时候,理论上会被信任吗 HOT 3
- 连接建立一段时间后,会稳定出现HTTP2超时异常 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from proxyee.