1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-10 09:50:43 +00:00
Commit Graph

6 Commits

Author SHA1 Message Date
Jebbs
ebbf31f07e
improve commands (#648)
* stat show json refactor
> will show {} since scripts should expect it, its the json style of blank value

* combine statistics commands to one

* code optimize

* fix runtime flag

* remove json indent

* change overridden to override

* api bi -json

* convert stdin support
code optimize

* writeRow() code optimize
add stats tittle
revert back to restartlogger

* api log -restart

* follow log

* codeql

* move -json to shared flags

* flags optimize
* update flag descriptions
* change "-v" of "api bo" to duration
* change "-expire" of "tls cert" to days

* cmds short description optimize

* fix multiple log followers

* Format loader refactor
* "infra/conf/merge" refactor
* "LoadConfig" refactor
* add "infra/conf/mergers"
    * contribute to it will benifit `v2ray run`,`v2ray test`,`v2ray convert`
    * easily add new formats, by just adding a converter like json.FromTOML
* default format auto, to all cmds above
    * auto detect input format
    * mixed formats support
* better stdin behavior
    * don't wait if no content
    * don't use 'stdin:' placeholder
* `v2ray test` now behaves exactly the same with `v2ray run`, including stdin reading

* api ado, adi, rmo, rmi refactor
* support folders to files resolving, mixed formats
* remove remaining 'stdin:' placeholders

* fix tests
* os.Stdin.Stat() behaves different in platforms, removed

* code optimize

Co-authored-by: loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
2021-02-21 23:02:42 +08:00
loyalsoldier
d581fb9c00
Merge branch 'master' into v5 2021-02-17 08:07:12 +08:00
Jebbs
7c1ab06206
v5: Remove v2ctl & wv2ray (#488)
* remove v2ctl, wv2ray
* remove v2ctl, wv2ray build scripts
* remove infra/control/main
* remove !confonly flag
* remove ctlcmd package
* remove Confgi.Override func
* move commands package into main
2020-12-04 22:32:55 +08:00
Jebbs
9367e9b1f2
V5: YAML support (#475)
* yml support

* code optimize

* remove external conf loaders

* update yaml test
code optimize

* code optimize

* fix a typo

* update convert desc
2020-12-03 06:11:24 +08:00
Jebbs
ff59bd37ce
v5: New multi-json loader (#451)
* scalable commands column

* new multi-json loader
For both internal & external json loader

This commit also:
* applies -confdir to other formats, e.g. "yaml" in the future
* multiple assign of -confdir is accepted
* add flag to load confdir recursively
* config loader can have alias name
* json loader also accepts .jsonc
* add merge command
* add help topics for json merge, format loader
* format loaders don't panic

* apply lint style

* add merge test

* merge same tag in array, solve v2fly/discussion#97

* apply lint style

* merge code optimize

* fix merge cmdarg.Arg

* update cmd description

* improve merge logic
* fix zero value overwrite
* fix "null" lost after array merge

* code optimize

* fix merged slices not sorted

* code optimize

* add package doc

* fix a typo
2020-11-28 22:06:03 +08:00
Jebbs
521120d196
go style commands, merge v2ctl commands, v5 oriented (#369)
* go style commands
merge v2ctl commandsw

* migrate go style commands to v2ctl

* fixes & code optimize

* sort the commands

* update commands description

* restore old proto
golang.org proto has removed UnmarshalText, without alternative

* add test command

* remove unused code

* code optimize and fix
* The commit simplifies the run and test commands code,
* Fixes a hidden issue that the format flag not applied in command "v2ray test -format=pb ..."

* fix default loader logic
2020-11-23 23:38:43 +08:00