dev-sidecar
dev-sidecar copied to clipboard
脚本插入出问题导致资源地址被重定向404,无法访问GitHub
- [x] 你是否在现有 Issue列表 中搜索过相同问题,但未找到?
Ⅰ. 请说明操作系统及DS的版本号:
- 操作系统:win11 25H2
- DS版本号:2.0.0.2
Ⅱ. 问题描述:
目前,由于未知原因,DS对github注入下载加速脚本时会出现类似对https://github.githubassets.com/assets/.js 转发到 https://github.com/ds_script_proxy/.js,但是返回404的问题,导致网站无法使用或报错
Ⅲ. 期望的结果:
正常注入脚本,且不影响页面资源加载和访问
Ⅳ. 如何复现问题?
正常访问GitHub
Ⅴ. 请提供相关的错误日志,尽可能的详细:(日志文件在 ${user.home}/.dev-sidecar/logs/ 目录下)
部分相关日志如下
点击查看日志
[2026-01-11T00:00:07.959] [INFO] server - matchHostname: matched intercepts: 'github.com' -> { "github.com": {"^(/[^/]+){2,}/?(\\?.*)?$":{"tampermonkeyScript":"/____ds_script_proxy____/https_gitee_com_wangliang181230_dev_sidecar_raw_scripts_tampermonkey.js","script":"/____ds_script_proxy____/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,})/raw((/[^/]+)+\\.(jpg|jpeg|png|gif))(\\?.*)?$":{"cacheDays":365,"desc":"仓库内图片重定向,缓存1年。"},"^((/[^/]+){2,})/raw((/[^/]+)+\\.js)(\\?.*)?$":{"responseReplace":{"headers":{"content-type":"application/javascript; charset=utf-8"}},"desc":"仓库内脚本,设置响应头Content-Type。作用:方便script拦截器直接使用,避免引起跨域问题和脚本内容限制问题。"},".*":{"sni":"baidu.com"},"/fluidicon.png":{"cacheDays":365,"desc":"Github那只猫的图片,缓存1年"},"^(/[^/]+){2}/pull/\\d+/open_with_menu.*$":{"cacheDays":7,"desc":"PR详情页:标题右边那个Code按钮的HTML代码请求地址,感觉上应该可以缓存。暂时先设置为缓存7天"},"^/____ds_script_proxy____/https_gitee_com_wangliang181230_dev_sidecar_raw_scripts_GithubEnhanced_High_Speed_Download_user\\.js$":{"proxy":"https://gitee.com/wangliang181230/dev-sidecar/raw/scripts/GithubEnhanced-High-Speed-Download.user.js","requestReplace":{"headers":{"host":"[remove]","referer":"[remove]","cookie":"[remove]"}},"responseReplace":{"headers":{"content-type":"application/javascript; charset=utf-8","set-cookie":"[remove]","server":"[remove]"}},"cacheDays":7,"desc":"为伪脚本文件设置代理地址,并设置响应头 `content-type: 'application/javascript; charset=utf-8'`,同时缓存7天。"},"^/____ds_script_proxy____/https_gitee_com_wangliang181230_dev_sidecar_raw_scripts_tampermonkey\\.js$":{"proxy":"https://gitee.com/wangliang181230/dev-sidecar/raw/scripts/tampermonkey.js","requestReplace":{"headers":{"host":"[remove]","referer":"[remove]","cookie":"[remove]"}},"responseReplace":{"headers":{"content-type":"application/javascript; charset=utf-8","set-cookie":"[remove]","server":"[remove]"}},"cacheDays":7,"desc":"为伪脚本文件设置代理地址,并设置响应头 `content-type: 'application/javascript; charset=utf-8'`,同时缓存7天。"}} }
[2026-01-11T00:00:07.959] [INFO] server - getServerPromise, hostname: github.com:443, ssl: true, protocol: https
[2026-01-11T00:02:16.192] [INFO] server - 替换script配置值:'https://gitee.com/wangliang181230/dev-sidecar/raw/scripts/GithubEnhanced-High-Speed-Download.user.js' -> '/____ds_script_proxy____/https_gitee_com_wangliang181230_dev_sidecar_raw_scripts_GithubEnhanced_High_Speed_Download_user.js'
[2026-01-11T00:02:16.192] [INFO] server - 替换tampermonkey配置值:'https://gitee.com/wangliang181230/dev-sidecar/raw/scripts/tampermonkey.js' -> '/____ds_script_proxy____/https_gitee_com_wangliang181230_dev_sidecar_raw_scripts_tampermonkey.js'
Ⅵ. 有必要时,请提供 ${user.home}/.dev-sidecar/running.json 文件内容:
默认配置
若出现该问题,可以暂时手动在加速服务-拦截设置中对script关键字进行修改来暂时屏蔽以恢复正常访问,或直接删除对应配置。
目前已采用取消注入脚本的方式暂时恢复正常加载访问,用户重启软件或设置中重新获取远程配置即可。
仍然需要脚本的朋友可以手动浏览器添加原油猴脚本: https://greasyfork.org/zh-CN/scripts/412245-github-enhancement-high-speed-download
v2.0.0.3应已修复