Replies: 4 comments
-
|
Beta Was this translation helpful? Give feedback.
0 replies
-
不过有个比较现实的情况就是有不少人用的第三方的 geo 资源,应该可以支持自定义 |
Beta Was this translation helpful? Give feedback.
0 replies
-
刚才想到了一个问题,那就是下载加速,Github上的资源在中国国内访问可能会很慢,除非让用户自行使用镜像,否则 |
Beta Was this translation helpful? Give feedback.
0 replies
-
除了下载速度这点,发布的包里是包含数据文件的,因此这可能只是一个简单更新功能。 ip 的更新速度是每周一次,site 取决于更改,这个频率比较高点,但这些基本和发布频率是保持一致的。 不过如果你想做这个功能,也完全没有问题 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
*
geoip.dat
和geosite.dat
,在标题中称为 geo 数据文件,以下统称geofiles
我所想到的可能会造成的利害关系
利
systemd.timer
,将能自定义自动更新 geofiles 的周期。install-dat-release.sh
,成为一个单文件脚本项目。害
我的想法
初步命令行设想
然后用户可以通过以下新的有效环境变量设定 geofiles 的下载地址:
用户可以通过已有的有效环境变量
V2RAY_LOCATION_ASSET
设置 geofiles 的保存位置,但若存在--path
参数将会被覆盖补充
systemd.exec
能完美的调整环境变量,于是就想用这种方法自定义下载地址。但是说实话我并不了解 Windows 上能否使用环境变量和适用程度,所以还请各位指正。用例
# case 1 v2ctl geoupdate
什么都不会做
# case 2 v2ctl geoupdate --geoip
将会下载 geoip.dat 并下载 geoip.dat.sha256sum 获取校验和以验证文件完整型,成功后保存到当前目录 (workdir) 。
将会下载 geoip.dat ,不做验证,直接保存到
/usr/local/share/v2ray
。将会下载 geoip.dat 和 dlc.dat 并下载 geoip.dat.sha256sum 和 dlc.dat.sha256sum 获取校验和以验证文件完整型,成功后保存到家目录下的 v2ray 文件夹中 。
由于 geofiles 不存在版本号所以我觉得下载时保持时间戳有一定的必要性。并且我发现 github raw 中下载文件的响应由于没有
Last-Modified
头部所以无法做到保持时间戳,这也是我选择用 github release download 作为默认下载地址的原因。Beta Was this translation helpful? Give feedback.
All reactions