forked from youzan/zan-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 4.0.5 * save readme * improve host * update version * empty file * empty file * mobile doc * fix not forward * update version * save merge change * 4.0.10 * sync hosts * fix traffic service init * CHANGELOG
- Loading branch information
1 parent
e41fb16
commit 4270bb5
Showing
13 changed files
with
269 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
# Github Change Log | ||
|
||
## [email protected].5 (2018-05-02) | ||
## [email protected].10 (2018-05-16) | ||
|
||
**Implemented enhancements:** | ||
|
||
- 支持规则集的复制 | ||
- 支持Host文件的导出与导入 | ||
- 增加导入远程Host文件功能 | ||
- 优化mock数据交互 | ||
|
||
**Fixed bugs:** | ||
|
||
- 修复导出中文名字的规则集的bug | ||
- 修复windows平台下导入规则集的[bug](https://github.com/youzan/zan-proxy/issues/2) | ||
- 删除缓存数据导致启动失败的 [issue] (https://github.com/youzan/zan-proxy/issues/9) | ||
|
||
## [email protected] ~ 4.0.9 (2018-05-07) | ||
|
||
|
@@ -24,4 +23,16 @@ | |
**Fixed bugs:** | ||
|
||
- 修复请求监控中请求内容被遮挡的问题 | ||
- 自更新兼容npm的[issue](https://github.com/npm/npm/issues/17444) | ||
- 自更新兼容npm的[issue](https://github.com/npm/npm/issues/17444) | ||
|
||
## [email protected] (2018-05-02) | ||
|
||
**Implemented enhancements:** | ||
|
||
- 支持规则集的复制 | ||
- 支持Host文件的导出与导入 | ||
|
||
**Fixed bugs:** | ||
|
||
- 修复导出中文名字的规则集的bug | ||
- 修复windows平台下导入规则集的[bug](https://github.com/youzan/zan-proxy/issues/2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import ora from 'ora'; | ||
import { AppInfoService, HostService } from './../App/services'; | ||
|
||
const syncRemoteHosts = async () => { | ||
console.log('开始同步远程Host文件'); | ||
const appInfoService = new AppInfoService(false); | ||
const hostService = new HostService(appInfoService); | ||
const hostFileList = hostService.getHostFileList('root'); | ||
for (const hostFile of hostFileList) { | ||
if (!hostFile.meta) { | ||
continue; | ||
} | ||
if (!hostFile.meta.url || hostFile.meta.local) { | ||
continue; | ||
} | ||
const spinner = ora(`同步远程Host${hostFile.name}`).start(); | ||
try { | ||
await hostService.importRemoteHostFile('root', hostFile.meta.url); | ||
spinner.succeed(); | ||
} catch (e) { | ||
spinner.fail(); | ||
} | ||
} | ||
console.log('同步远程Host文件结束'); | ||
}; | ||
|
||
export default syncRemoteHosts; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.