docmirror / dev-sidecar

开发者边车,github打不开,github加速,git clone加速,git release下载加速,stackoverflow加速
Mozilla Public License 2.0
15.72k stars 1.84k forks source link

macOS Safari 使用问题 #380

Closed rs9c closed 2 weeks ago

rs9c commented 1 month ago

Ⅰ. 请说明操作系统及DS的版本号:

  1. 操作系统:macOS 15.1 beta
  2. DS版本号:1.8.8-node17

Ⅱ. 问题描述:

macos下使用safari浏览器有时无法访问github.com或长时间无响应(此时DS日志server.log没有输出任何内容)(有时运气好可以顺利访问github且日志中有内容输出);增强模式的特定网站根本无法访问。

但如果使用如Google chrome浏览器则响应迅速,且能访问增强模式下的特定网站,server.log有正常内容输出。

【应该是Safari的问题,不知能否解决】

Ⅲ. 期望的结果:

开启ds后使用safari能像chrome一样正常访问github

Ⅳ. 如何复现问题?

  1. 关闭safari上的所有插件,关闭其他任何代理软件
  2. 启用ds增强模式
  3. 使用safari访问github,有概率无响应且日志无内容输出
  4. 使用chrome访问github,能够立即响应且日志正常输出

image

Ⅴ. 请提供相关的错误日志,尽可能的详细:(日志文件在 ${user.home}/.dev-sidecar/logs/ 目录下)

Ⅵ. 有必要时,请提供 ${user.home}/.dev-sidecar/running.json 文件内容:

点击查看 running.json ```json { "whiteList": { "*.bilibili.com": true, "*.weixin.com": true, "*.broadcom.com": true, "cn.bing.com": true, "*.bing.com": true, "*.icloud.com": true, "*.lenovo.net": true, "*.cn": true, "cn.*": true, "*china*": true, "*.dingtalk.com": true, "*.apple.com": true, "*.microsoft.com": true, "*.alipay.com": true, "*.qq.com": true, "*.baidu.com": true, "192.168.*": true }, "sniList": {}, "intercepts": { "github.com": { "/.*/.*/releases/download/": { "redirect": "mirror.ghproxy.com/https://github.com" }, "/.*/.*/archive/": { "redirect": "mirror.ghproxy.com/https://github.com" }, "^(/[\\w-.]+){2,}/?(\\?.*)?$": { "tampermonkeyScript": "https://gitee.com/wangliang181230/dev-sidecar/raw/scripts/tampermonkey.js", "script": "https://gitee.com/wangliang181230/dev-sidecar/raw/scripts/GithubEnhanced-High-Speed-Download.user.js", "remark": "注:上面所使用的脚本地址,为高速镜像地址。", "desc": "油猴脚本:高速下载 Git Clone/SSH、Release、Raw、Code(ZIP) 等文件 (公益加速)、项目列表单文件快捷下载、添加 git clone 命令" }, "^(/[^/]+){2}/releases/download/.*$": { "redirect": "ghp.ci/https://github.com", "desc": "release文件加速下载重定向地址" }, "^(/[^/]+){2}/archive/.*\\.(zip|tar.gz)$": { "redirect": "ghp.ci/https://github.com", "desc": "release源代码加速下载重定向地址" }, "^((/[^/]+){2,})/raw((/[^/]+)+\\.js)(\\?.*)?$": { "sni": "baidu.com", "proxy": "https://raw.githubusercontent.com${m[1]}${m[3]}", "responseReplace": { "headers": { "content-type": "application/javascript; charset=utf-8" } }, "desc": "仓库内脚本,重定向改为代理,并设置响应头Content-Type。作用:方便script拦截器直接使用,避免引起跨域问题和脚本内容限制问题。" }, "^((/[^/]+){2,})/raw/(([^/]+/)+[^/]+\\.(jpg|jpeg|png|gif))(\\?.*)?$": { "proxy": "https://jsd.proxy.aks.moe/gh${m[1]}@${m[3]}", "cacheDays": 365, "desc": "仓库内图片,重定向改为代理,并缓存1年。" }, ".*": { "sni": "baidu.com" }, "/fluidicon.png": { "cacheDays": 365, "desc": "Github那只猫的图片,缓存1年" }, "^(/[^/]+){2}/pull/\\d+/open_with_menu.*$": { "cacheDays": 7, "desc": "PR详情页:标题右边那个Code按钮的HTML代码请求地址,感觉上应该可以缓存。暂时先设置为缓存7天" } }, "huggingface.co": { ".*": { "proxy": "hf-mirror.com" } }, "github.githubassets.com": { "^(/[^/]+)*/[^./]+\\.(svg|png|gif|jpg|jpeg|ico|js)(\\?.*)?$": { "cacheDays": 365, "desc": "图片和JS文件,缓存1年。注:JS文件似乎本来就是缓存时间1年的" }, ".*": { "sni": "baidu.com" } }, "raw.githubusercontent.com": { "^((/[^/]+){2,})/refs/heads/(.*)$": { "proxy": "https://jsd.proxy.aks.moe/gh${m[1]}@${m[3]}" } }, "api.github.com": { ".*": { "sni": "baidu.com" }, "^/_private/browser/stats$": { "success": true, "desc": "github的访问速度分析上传,没有必要,直接返回成功" } }, "opengraph.githubassets.com": { "^/$": { "cacheDays": 365 }, ".*": { "sni": "baidu.com" } }, "camo.githubusercontent.com": { ".*": { "sni": "baidu.com" }, "^[a-zA-Z0-9/]+(\\?.*)?$": { "cacheDays": 365, "desc": "图片,缓存1年" } }, "collector.github.com": { ".*": { "sni": "baidu.com" } }, "www.gstatic.com": { "/recaptcha/.*": { "proxy": "www.recaptcha.net" } }, "*.gravatar.com": { ".*": { "sni": "baidu.com" } }, "*.pixiv.net": { ".*": { "sni": "baidu.com" } }, "*.pixiv.org": { ".*": { "sni": "baidu.com" } }, "*.pximg.net": { ".*": { "sni": "baidu.com" } }, "jsd.proxy.aks.moe": { "^.*\\?DS_DOWNLOAD$": { "requestReplace": { "doDownload": true }, "responseReplace": { "doDownload": true } } }, "fastly.jsdelivr.net": { "^.*\\?DS_DOWNLOAD$": { "requestReplace": { "doDownload": true }, "responseReplace": { "doDownload": true } } }, "jsdelivr.pai233.top": { "^.*\\?DS_DOWNLOAD$": { "requestReplace": { "doDownload": true }, "responseReplace": { "doDownload": true } } }, "raw.incept.pw": { "^.*\\?DS_DOWNLOAD$": { "requestReplace": { "doDownload": true }, "responseReplace": { "doDownload": true } } }, "github-releases.githubusercontent.com": { ".*": { "sni": "baidu.com" } }, "customer-stories-feed.github.com": { ".*": { "proxy": "customer-stories-feed.fastgit.org" } }, "user-images.githubusercontent.com": { ".*": { "sni": "baidu.com" }, "^/.*\\.png(\\?.*)?$": { "cacheDays": 365, "desc": "用户在PR或issue等内容中上传的图片,缓存1年。注:每张图片都有唯一的ID,不会重复,可以安心缓存" } }, "private-user-images.githubusercontent.com": { ".*": { "sni": "baidu.com" }, "^/.*\\.png(\\?.*)?$": { "cacheHours": 1, "desc": "用户在PR或issue等内容中上传的图片,缓存1小时就够了,因为每次刷新页面都是不一样的链接。" } }, "avatars.githubusercontent.com": { ".*": { "sni": "baidu.com" }, "^/u/\\d+(\\?.*)?$": { "cacheDays": 365, "desc": "用户头像,缓存1年" } }, "*.docker.com": { ".*": { "sni": "baidu.com" } }, "login.docker.com": { "/favicon.ico": { "proxy": "hub.docker.com", "sni": "baidu.com", "desc": "登录页面的ico,采用hub.docker.com的" } }, "www.google.com": { "/recaptcha/.*": { "proxy": "www.recaptcha.net" } }, "ajax.googleapis.com": { ".*": { "proxy": "ajax.lug.ustc.edu.cn", "backup": [ "gapis.geekzu.org" ], "test": "ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js" } }, "fonts.googleapis.com": { ".*": { "proxy": "fonts.geekzu.org", "backup": [ "fonts.loli.net" ], "test": "https://fonts.googleapis.com/css?family=Oswald" } }, "themes.googleapis.com": { ".*": { "proxy": "themes.loli.net", "backup": [ "themes.proxy.ustclug.org" ] } }, "themes.googleusercontent.com": { ".*": { "proxy": "google-themes.proxy.ustclug.org" } }, "clients*.google.com": { ".*": { "abort": false, "desc": "设置abort:true可以快速失败,节省时间" } }, "www.googleapis.com": { ".*": { "abort": false, "desc": "设置abort:true可以快速失败,节省时间" } }, "lh*.googleusercontent.com": { ".*": { "abort": false, "desc": "设置abort:true可以快速失败,节省时间" } }, "*.s3.1amazonaws1.com": { "/sqlite3/.*": { "redirect": "npm.taobao.org/mirrors" } }, "*.carbonads.com": { "/carbon.*": { "abort": true, "desc": "广告拦截" } }, "*.buysellads.com": { "/ads/.*": { "abort": true, "desc": "广告拦截" } } }, "dns": { "mapping": { "*.githubusercontent.com": "aliyun", "github.com": "aliyun", "*github.com": "aliyun", "*.jetbrains.com": "quad9", "*.azureedge.net": "quad9", "*.stackoverflow.com": "quad9", "*.pixiv.org": "quad9", "*.pximg.net": "quad9", "*.onesignal.com": "cloudflare", "*.github.com": "quad9", "*github*.com": "quad9", "*.github.io": "quad9", "*.docker.com": "quad9", "*.electronjs.org": "quad9", "*.amazonaws.com": "quad9", "*.yarnpkg.com": "quad9", "*.cloudfront.net": "quad9", "*.cloudflare.com": "quad9", "img.shields.io": "quad9", "*.vuepress.vuejs.org": "quad9", "*.gh.docmirror.top": "quad9", "*.v2ex.com": "quad9", "*.pypi.org": "quad9" }, "speedTest": { "dnsProviders": [ "cloudflare", "quad9", "safe360", "rubyfish" ], "interval": 300000, "enabled": true, "hostnameList": [ "github.com" ] }, "providers": { "aliyun": { "type": "https", "server": "https://dns.alidns.com/dns-query", "cacheSize": 1000 }, "cloudflare": { "type": "https", "server": "https://1.1.1.1/dns-query", "cacheSize": 1000 }, "quad9": { "type": "https", "server": "https://9.9.9.9/dns-query", "cacheSize": 1000 }, "safe360": { "type": "https", "server": "https://doh.360.cn/dns-query", "cacheSize": 1000 }, "rubyfish": { "type": "https", "server": "https://rubyfish.cn/dns-query", "cacheSize": 1000 } } }, "compatible": { "connect": { "218.18.106.132:443": { "ssl": true } }, "request": { "218.18.106.132:443": { "rejectUnauthorized": false } } }, "preSetIpList": { "github.com": [ "4.237.22.38", "20.26.156.215", "20.27.177.113", "20.87.245.0", "20.200.245.247", "20.201.28.151", "20.205.243.166", "140.82.113.3", "140.82.114.4", "140.82.116.3", "140.82.116.4", "140.82.121.3", "140.82.121.4" ], "*.pixiv.net": [ "210.140.92.179", "210.140.92.182", "210.140.92.185" ], "api.github.com": [ "20.26.156.210", "20.27.177.116", "20.87.245.6", "20.200.245.245", "20.201.28.148", "20.205.243.168", "20.248.137.49", "140.82.112.5", "140.82.113.6", "140.82.116.6", "140.82.121.6" ], "codeload.github.com": [ "20.26.156.216", "20.27.177.114", "20.87.245.7", "20.200.245.246", "20.201.28.149", "20.205.243.165", "20.248.137.55", "140.82.113.9", "140.82.114.10", "140.82.116.10", "140.82.121.9" ], "*.githubusercontent.com": [ "185.199.108.133", "185.199.109.133", "185.199.110.133", "185.199.111.133" ], "github.githubassets.com": [ "185.199.108.154", "185.199.109.154", "185.199.110.154", "185.199.111.154" ], "github.io": [ "185.199.108.153", "185.199.109.153", "185.199.110.153", "185.199.111.153" ] }, "enabled": true, "host": "127.0.0.1", "port": 31181, "setting": { "NODE_TLS_REJECT_UNAUTHORIZED": true, "verifySsl": true, "script": { "enabled": true, "defaultDir": "./extra/scripts/" }, "userBasePath": "/Users/risingsun/.dev-sidecar", "rootCaFile": { "certPath": "/Users/risingsun/.dev-sidecar/dev-sidecar.ca.crt", "keyPath": "/Users/risingsun/.dev-sidecar/dev-sidecar.ca.key.pem" }, "defaultTimeout": 20000, "defaultKeepAliveTimeout": 30000, "timeoutMapping": { "github.com": { "timeout": 20000, "keepAliveTimeout": 30000 } } }, "intercept": { "enabled": true }, "app": { "closeStrategy": 2, "startShowWindow": false, "showHideShortcut": "无", "theme": "light", "dock": { "hideWhenWinClose": true }, "showShutdownTip": false, "mode": "ow", "autoStart": { "enabled": true }, "remoteConfig": { "enabled": true, "url": "https://gitee.com/wangliang181230/dev-sidecar/raw/docmirror/packages/core/src/config/remote_config.json5", "personalUrl": "" }, "windowSize": { "width": 900, "height": 750 }, "autoChecked": true, "skipPreRelease": true }, "plugin": { "node": { "setting": { "registry": "https://registry.npmmirror.com", "yarnRegistry": "https://registry.npmmirror.com", "command": "npm", "strict-ssl": true, "cafile": false, "NODE_EXTRA_CA_CERTS": false, "NODE_TLS_REJECT_UNAUTHORIZED": false }, "enabled": true, "name": "NPM加速", "tip": "如果你没有安装nodejs则不需要启动它", "startup": { "variables": true }, "variables": { "phantomjs_cdnurl": "https://npmmirror.com/mirrors/phantomjs", "chromedriver_cdnurl": "https://npmmirror.com/mirrors/chromedriver", "sass_binary_site": "https://npmmirror.com/mirrors/node-sass", "ELECTRON_MIRROR": "https://npmmirror.com/mirrors/electron/", "NVM_NODEJS_ORG_MIRROR": "https://npmmirror.com/mirrors/node", "CHROMEDRIVER_CDNURL": "https://npmmirror.com/mirrors/chromedriver", "OPERADRIVER": "https://npmmirror.com/mirrors/operadriver", "ELECTRON_BUILDER_BINARIES_MIRROR": "https://npmmirror.com/mirrors/electron-builder-binaries/", "PYTHON_MIRROR": "https://npmmirror.com/mirrors/python" } }, "git": { "enabled": true, "name": "Git.exe代理", "tip": "如果你没有安装git命令行则不需要启动它", "setting": { "sslVerify": true, "noProxyUrls": { "https://gitee.com": true, "https://e.coding.net": true, "https://codeup.aliyun.com": true } } }, "overwall": { "enabled": true, "targets": { "*.nodejs.org": true, "*.npmjs.com": true, "*.wikimedia.org": true, "*.v2ex.com": true, "*.azureedge.net": true, "*.cloudfront.net": true, "*.bing.com": true, "*.discourse-cdn.com": true, "*.gravatar.com": true, "*.docker.com": true, "*.vueuse.org": true, "*.elastic.co": true, "*.optimizely.com": true, "*.stackpathcdn.com": true, "*.fastly.net": true, "*.cloudflare.com": true, "*.233v2.com": true, "*.v2fly.org": true, "*.telegram.org": true, "*.amazon.com": true, "*.googleapis.com": true, "*.google-analytics.com": true, "*.cloudflareinsights.com": true, "*.intlify.dev": true, "*.segment.io": true, "*.shields.io": true, "*.jsdelivr.net": true, "*.z-library.sk": true, "*.zlibrary*.se": true, "*.wikipedia-on-ipfs.org": true, "*.oaiusercontent.com": true, "*.pixiv.org": true, "*.fanbox.cc": true, "*.onesignal.com": true }, "pac": { "pacFileUpdateUrl": "https://raw.kkgithub.com/gfwlist/gfwlist/master/gfwlist.txt", "enabled": true, "autoUpdate": true, "pacFilePath": "./extra/pac/pac.txt" }, "name": "梯子", "server": {}, "serverDefault": { "ow-prod.docmirror.top": { "port": 443, "path": "X2dvX292ZXJfd2FsbF8", "password": "dev_sidecar_is_666" } } }, "pip": { "name": "PIP加速", "statusOff": true, "tip": "如果你没有安装pip则不需要启动它", "startup": {}, "setting": { "command": "pip", "trustedHost": "pypi.org", "registry": "https://pypi.org/simple/" } } }, "proxy": { "remoteDomesticDomainAllowListFileUrl": "https://raw.kkgithub.com/pluwen/china-domain-allowlist/main/allow-list.sorl", "excludeIpList": { "objects-origin.githubusercontent.com": true, "*.windows.net": true, "*.ghproxy.net": true, "*.ghp.ci": true, "*.kkgithub.com": true, "*.github.io": true, "*.bilicomic.com": true, "[2049:8c54:813:10c::140]": true, "[2409:8a0c:a442:ff40:a51f:4b9c:8b41:25ea]": true, "[2606:2800:147:120f:30c:1ba0:fc6:265a]": true, "*.cmicapm.com": true, "*.cloudflare.com": true, "*.cloudflare-cn.com": true, "*.microsoftonline.com": true, "*.msecnd.net": true, "*.msedge.net": true, "*kaspersky*.com": true, "*.upd.kaspersky.com": true, "*.sandboxie-plus.com": true, "*.wuyou.net": true, "*.pyecharts.org": true, "*.bcloudlink.com": true, "*.qijishow.com": true, "*.z-lib.fo": true, "*.finalshell.com": true, "*.minebbs.com": true, "*.spigotmc.org": true, "*.virustotal.com": true, "*.youdemai.com": true, "*.casualthink.com": true, "44.239.165.12": true, "3.164.110.117": true, "*.cn": true, "cn.*": true, "*china*": true, "*.ghproxy.*": true, "ssh.github.com": true, "www.deepl.com": true, "*.csdn.net": true, "*.so.com": true, "*.baidu.com": true, "*.baiducontent.com": true, "*.bdimg.com": true, "*.bdstatic.com": true, "*.bdydns.com": true, "*.tencent.com": true, "*.qq.com": true, "*.weixin.com": true, "*.weixinbridge.com": true, "*.wechat.com": true, "*.idqqimg.com": true, "*.gtimg.com": true, "*.qpic.com": true, "*.qlogo.com": true, "*.myapp.com": true, "*.aliyun.com": true, "*.alipay.com": true, "*.taobao.com": true, "*.tmall.com": true, "*.alipayobjects.com": true, "*.dingtalk.com": true, "*.mmstat.com": true, "*.alicdn.com": true, "*.hdslb.com": true, "gitee.com": true, "*.gitee.com": true, "*.gitee.io": true, "*.giteeusercontent.com": true, "*.mozilla.org": true, "*.mozilla.com": true, "*.mozilla.net": true, "*.firefox.com": true, "*.firefox.org": true, "*.mozillademos.org": true, "*.mozillians.org": true, "*.mozillians.net": true, "*.mozillians.com": true, "*.sonatype.org": true, "*.maven.org": true, "*.mvnrepository.com": true, "*.apple.com": true, "*.icloud.com": true, "*.microsoft.com": true, "*.windows.com": true, "*.office.com": true, "*.office.net": true, "*.live.com": true, "*.msn.com": true, "*.wps.com": true, "*.wps.net": true, "*.ksord.com": true, "*.qihoo.com": true, "*.qihucdn.com": true, "*.360.com": true, "*.360safe.com": true, "*.360buyimg.com": true, "*.360buy.com": true, "*.jd.com": true, "*.jcloud.com": true, "*.jcloudcs.com": true, "*.jcloudcache.com": true, "*.jcloudcdn.com": true, "*.jcloudlb.com": true, "*.bilibili.com": true, "*.bilivideo.com": true, "*.biliapi.net": true, "*.10086.com": true, "*.10086cloud.com": true, "*.139.com": true, "*.xunlei.com": true, "*.icpapi.com": true, "*.navicat.com": true, "challenges.cloudflare.com": true, "localhost": true, "localhost.*": true, "127.*.*.*": true, "test.*": true, "10.*.*.*": true, "172.16.*.*": true, "172.17.*.*": true, "172.18.*.*": true, "172.19.*.*": true, "172.20.*.*": true, "172.21.*.*": true, "172.22.*.*": true, "172.23.*.*": true, "172.24.*.*": true, "172.25.*.*": true, "172.26.*.*": true, "172.27.*.*": true, "172.28.*.*": true, "172.29.*.*": true, "172.30.*.*": true, "172.31.*.*": true, "192.168.*.*": true }, "enabled": true, "name": "系统代理", "use": "local", "other": [], "proxyHttp": false, "setEnv": false, "excludeDomesticDomainAllowList": true, "autoUpdateDomesticDomainAllowList": true, "domesticDomainAllowListFilePath": "./extra/proxy/domestic-domain-allowlist.txt" } } ```
wangliang181230 commented 1 month ago

你应该是页面加载出来了,但是样式乱的,是吧? 最近Github站点的静态资源IP不稳定,加载慢导致的。

rs9c commented 1 month ago

你应该是页面加载出来了,但是样式乱的,是吧?

最近Github站点的静态资源IP不稳定,加载慢导致的。

用chrome一下就加载出来了,什么清除缓存啥的都试过了。

应该就是苹果safari的问题了😅近几年的macOS也极其不稳定

wangliang181230 commented 1 month ago

你应该是页面加载出来了,但是样式乱的,是吧? 最近Github站点的静态资源IP不稳定,加载慢导致的。

用chrome一下就加载出来了,什么清除缓存啥的都试过了。

应该就是苹果safari的问题了😅近几年的macOS也极其不稳定

可能是 Safari 浏览器发起的请求没有进代理。 你可以测一下,在 Safari 浏览器上访问一个不存在的页面 https://aaaaa.bbbbb.com ,然后去 ~/.dev-sidecar/logs/server.log 日志文件里,全局查找一下 aaaaa.bbbbb.com,看看有没有日志,如果没有,说明说是 Safari 浏览器没有进代理,可能是设置问题,你找一下 Safari 浏览器的代理设置。

GoldLoong commented 2 weeks ago

我说MAC os12 我也遇到了你说的相似问题,我尝试了以下方法有改善:

  1. 有时候需要完整退出safari重新打开
  2. 起初安装好完全不起作用,但是谷歌浏览器可以,检查后我尝试在发现代理和网页代理(https/http)中,删除了下方 -忽略这些主机与域的代理设置 里的所有内容,然后重新切换一下DS的模式就好用了

你可以试试

rs9c commented 2 weeks ago

我说MAC os12 我也遇到了你说的相似问题,我尝试了以下方法有改善:

  1. 有时候需要完整退出safari重新打开
  2. 起初安装好完全不起作用,但是谷歌浏览器可以,检查后我尝试在发现代理和网页代理(https/http)中,删除了下方 -忽略这些主机与域的代理设置 里的所有内容,然后重新切换一下DS的模式就好用了

你可以试试

照做了,依旧不起任何作用(macOS 15.1),Safari似乎没有走系统代理。

我认为这已经不是DS能解决的,应该让苹果官方去解决这个问题