Tencent / nohost

基于 Whistle 实现的多账号多环境远程配置及抓包调试平台
https://nohost.pro
Other
1.42k stars 162 forks source link

偶发网站无法访问,需要过段时间才能访问 #201

Open aogg opened 1 year ago

aogg commented 1 year ago

终于找到必现手段了

主要问题

这个网址https://flysystem.thephpleague.com/docs/adapter/aws-s3-v3/ ,使用代理后,刚访问会一直无法打开,需要过一段时间才能打开

@avwo

通过下面复现

如果已经能打开了,重启下服务就又开始打不开了,估计是whistle本身问题 curl -kvx localhost:8899 https://flysystem.thephpleague.com/docs/adapter/aws-s3-v3/

alpine:~# # echo $(export http_proxy=socks://172.18.0.6:7634 && export https_proxy=socks://172.18.0.6:7634 && curl 172.22.187.82)
alpine:~# curl -kvx localhost:8899 https://flysystem.thephpleague.com/docs/adapter/aws-s3-v3/ \
> || echo $(export http_proxy=http://localhost:8899 && export https_proxy=http://localhost:8899 && curl https://flysystem.thephpleague.com/docs/adapter/aws-s3-v3/)
*   Trying 127.0.0.1:8899...
* Connected to localhost (127.0.0.1) port 8899 (#0)
* allocate connect buffer!
* Establish HTTP proxy tunnel to flysystem.thephpleague.com:443
> CONNECT flysystem.thephpleague.com:443 HTTP/1.1
> Host: flysystem.thephpleague.com:443
> User-Agent: curl/7.79.1
> Proxy-Connection: Keep-Alive
> 
* Proxy CONNECT aborted
* CONNECT phase completed!
* Closing connection 0
curl: (56) Proxy CONNECT aborted
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:06 --:--:--     0curl: (56) Proxy CONNECT aborted
aogg commented 1 year ago

远程环境配置及抓包调试系统 版本 1.5.10

avwo commented 1 year ago

在 nohost 上抓包看看

aogg commented 1 year ago

一般都是提示dns错误

aogg commented 1 year ago

你那不能必现吗

avwo commented 1 year ago

没出现过,那是你系统的dns服务不稳定

aogg commented 1 year ago

还要docker搭建一个自定义的dns服务器,不过不指定的时候我这样也能重现

# 下面是初始化
# network网关支持容器名称有ip地址
#server=223.5.5.5
#server=172.18.0.1
#server=127.0.0.11
mkdir -p /data/docker/dnsmasq;
touch /data/docker/dnsmasq/dnsmasq.conf;
#docker run -d --name test-dnsmasq --rm jpillora/dnsmasq;
#mkdir -p /data/docker/dnsmasq;
#docker cp test-dnsmasq:/etc/dnsmasq.conf /data/docker/dnsmasq;
#docker rm -f test-dnsmasq;
docker rm -f dnsmasq;
docker run \
--name dnsmasq --ip 172.18.0.178 \
-d \
-v /data/docker/dnsmasq/dnsmasq.conf:/etc/dnsmasq.conf \
-p 53:53/udp \
-p 5380:8080 \
--log-opt "max-size=1m" \
-e "HTTP_USER=dnsmasq" \
-e "HTTP_PASS=dnsmasq" \
--restart always \
--network common-all \
jpillora/dnsmasq 
aogg commented 1 year ago

确实今天似的时候无法重现了 curl -kvx localhost:8899 https://flysystem.thephpleague.com/docs/adapter/aws-s3-v3/

但当时直接dns解析是没问题,但通过whistle的时候就会出现过一段时间才能访问