oldj

Results 55 comments of oldj

有没有新建一个 hosts 方案?截图中好像只看到系统 hosts ,那个是只读的。点击左上角那个加号,新建一个 hosts 方案,编辑然后启用它。

左上角,类似下图的位置: ![CleanShot 2021-06-22 at 13 53 54@2x](https://user-images.githubusercontent.com/416130/122871275-59fd6800-d361-11eb-81c1-2e7662d7c938.png) 或者按快捷键 Ctrl + N 也能新建。

@Yhooooo 也有可能是 360 安全卫士等安全软件做了拦截。参见 #628

只靠修改 hosts 文件暂时是不支持这样的泛解析的,目前要实现这样的功能,可能需要依靠 Dnsmasq 等工具。

It's strange, I haven't noticed this before. SwitchHosts doesn't collect the user's geolocation information, probably there is a function in some framework to get geolocation related information, but I don't...

4.0 开始数据文件拆分为多个小文件了,暂时还没有专门的备份、恢复方案,不过数据、配置都在 `~/.SwitchHosts` 目录下,可以直接复制备份这个文件夹。 `~/.SwitchHosts` 目录下的主要内容有: ``` ./ config/ # 选项配置目录 data/ # 数据目录 window-state.json # 主窗口状态记录 ```

改动主要是为了存储更多内容,比如自定义命令的执行记录等等。 如果只是想备份选项配置的内容的话,可以备份这个文件:`~/.SwitchHosts/config/dict/cfg.json` ,它就相当于 3.x 中的 `~/.SwitchHosts/preferences.json` 。

这次更新了很多依赖,有没有试过 `rm -rf node_modules && npm install` 再 build ?

应该是新添加的 [mfsu](https://github.com/oldj/SwitchHosts/blob/master/src/renderer/.umirc.ts#L32) 配置有一点问题。 可以先执行一次 `npm run dev` 生成相关文件,等执行完成按 Ctrl + C 退出,再执行 `npm run build` ,应该就可以了。

构建脚本有一些问题。试一试 `develop` 分支,刚刚提交了一些更改,应该可以 `npm run build` 了。