Comments (16)
附加说明:
在 clash 提供的 http代理下,以上代码会等待60秒,然后收到返回的结果。
from clash.
附加说明:
在 clash 提供的 http代理下,以上代码会等待60秒,然后收到返回的结果。
每次都是60s吗?
from clash.
附加说明:
在 clash 提供的 http代理下,以上代码会等待60秒,然后收到返回的结果。每次都是60s吗?
对的,每次都是60秒,然后收到响应结果。
from clash.
附加说明:
在 clash 提供的 http代理下,以上代码会等待60秒,然后收到返回的结果。每次都是60s吗?
对的,每次都是60秒,然后收到响应结果。
不会php,我看下curl能构造出来不
from clash.
附加说明:
在 clash 提供的 http代理下,以上代码会等待60秒,然后收到返回的结果。每次都是60s吗?
对的,每次都是60秒,然后收到响应结果。
不会php,我看下curl能构造出来不
我测试过curl,是没问题的。
from clash.
对应的头部都加上了?
from clash.
对应的头部都加上了?
从 burp suite 的抓包来看,是identical的。
from clash.
我开始以为是漏了什么header,导致clash无法正常解析。
但是用curl模拟了一个一模一样头的请求,发过去就是正常的。
from clash.
抓包看是,php一直没有断开,最后应该是60tcp发了fin包断开
from clash.
我大概知道原因了。
PHP在请求的时候发送了 Connection: close
Header
但是 Clash 在返回的时候依然返回了 Connection: Keep-Alive
from clash.
直接请求源站返回的header
HTTP/1.1 200 OK
Server: nginx
Date: Fri, 07 Dec 2018 11:23:53 GMT
Content-Type: application/json
Content-Length: 1492
Last-Modified: Fri, 07 Dec 2018 11:23:39 GMT
Connection: close
Vary: Accept-Encoding
ETag: "5c0a583b-2b2"
Clash返回的header
HTTP/1.1 200 OK
Content-Length: 1492
Connection: keep-alive
Content-Type: application/json
Date: Fri, 07 Dec 2018 11:28:02 GMT
Etag: "5c0a58ed-2b3"
Keep-Alive: timeout=4
Last-Modified: Fri, 07 Dec 2018 11:26:37 GMT
Proxy-Connection: keep-alive
Server: nginx
Vary: Accept-Encoding
from clash.
应该是多加的几个头部引起的问题
from clash.
应该是多加的几个头部引起的问题
应该是因为Clash没有遵循客户端的要求关闭连接。
客户端要求了 Connection: close,数据传输完成后就应该关闭连接了。
但是Clash依然保持了连接,导致客户端继续在等待。
from clash.
我大概知道原因了。
PHP在请求的时候发送了
Connection: close
Header
但是 Clash 在返回的时候依然返回了Connection: Keep-Alive
你说的对,我看下怎么修
from clash.
你可以先参考这个实现下 https://stackoverflow.com/questions/18187419/get-file-contents-when-connection-is-keep-alive, 自己先判断下content-length
from clash.
这个不是我写的代码,是Composer的代码......
我只是把其中受影响的核心部分提炼出来了...
from clash.
Related Issues (20)
- [Feature] nameserver-policy 支持系统默认 DNS
- [Feature] 配置项 ebpf.redirect-to-tun 可以支持 auto-detect-interface ?
- [Feature] default proxy for GLOBAL
- Installation of clash-linux-armv5 on RT-AC86U not working
- [Feature] <增强"rule groups"的 可配置性,添加诸如sub-rule、更多条件判断……等等> HOT 21
- [Bug] <centos 7 amd64运行问题> HOT 1
- [Feature] <可以提升一下clash的并发能力吗> HOT 5
- [Feature] Allow Lan Bind 网卡IP 本机127.0.0.1无法访问 HOT 1
- [Feature] 给出连接域名/ IP 时会使用的代理 / 规则的匹配结果
- [Feature] <titIs it possible to have the dns request sent out through a proxy, rather than through a physical NIC like this, which is a very insecure practice?le> HOT 7
- [Feature] <标题> 关于一些使用clash的gui的开源建议 HOT 10
- title
- title
- [Bug] <iPad局域网无法使用youtube应用播放视频>
- [Bug] <load-balance模式proxy-group节点变红后, 无法使用该节点发送请求(和interval时间无关)>
- The External Controller 提供接口获取clash当前yaml配置文件路径
- [Bug] auto set route failed error=unsupported kernel version
- 在开启TUN模式后,UPNP功能就不正常了,看起来NAT也降级了
- [Bug] TUN模式下使用script模式时,不识别rule-providers中的PROCESS-NAME规则
- [Bug] Ubuntu 上使用 clash premium 开启 TUN 模式后,局域网内其他设备无法通过该设备上网
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 clash.