添加 -cvqxtvs 和 -eqxrs 命令,

分别意思是 convert QX to verysimple 和 extract QX remote servers

将圈叉的配置文件转换为verysimple格式,这样就可以更快地使用自己的vs客户端
This commit is contained in:
e1732a364fed
2000-01-01 00:00:00 +00:00
parent 12fcad3c22
commit 07b0a53a12
5 changed files with 189 additions and 16 deletions

View File

@@ -26,6 +26,9 @@ var (
cmdPrintVer bool
cmdGenerateUUid bool
cmdConvertQxToVs string
cmdExtractQX_remoteServer string
download bool
defaultApiServerConf machine.ApiServerConf
@@ -34,10 +37,13 @@ var (
)
func init() {
flag.BoolVar(&download, "d", false, " automatically download required mmdb file")
flag.BoolVar(&cmdPrintSupportedProtocols, "sp", false, "print supported protocols")
flag.BoolVar(&cmdPrintVer, "v", false, "print the version string then exit")
flag.BoolVar(&download, "d", false, " automatically download required mmdb file")
flag.BoolVar(&cmdGenerateUUid, "gu", false, " automatically generate a uuid for you")
flag.StringVar(&cmdConvertQxToVs, "cvqxtvs", "", "if given, convert qx server config string to vs toml config")
flag.StringVar(&cmdExtractQX_remoteServer, "eqxrs", "", "if given, automatically extract remote servers from quantumultX config for you")
//apiServer stuff
@@ -67,6 +73,18 @@ func runExitCommands() (atLeastOneCalled bool) {
generateAndPrintUUID()
}
if cmdConvertQxToVs != "" {
atLeastOneCalled = true
convertQxToVs()
}
if cmdExtractQX_remoteServer != "" {
atLeastOneCalled = true
extractQxRemoteServers()
}
return
}