Commit Graph

35 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
Loyalsoldier f94dd11a8c
Chore: change module name (#677) 2021-02-17 04:31:50 +08:00
young-zy 6d25d51519
Update protobuf version (#527)
Co-authored-by: loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
2020-12-20 10:50:46 +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
Roger Shimizu 90af5f19ba
Apply Debian's patch to upstream 2020-06-24 12:57:03 +08:00
vcptr 0d71d3dcf8 revert back to multiconfig 2020-03-19 19:11:16 +08:00
Kslr fdbec9a141
Revert "multiple config" 2020-01-02 01:23:56 +08:00
vcptr f14eb97e3c rearrange loader 2019-12-16 10:22:17 +08:00
vcptr 75f0879c12 proper handle stdin 2019-12-14 23:48:56 +08:00
vcptr 1bb34bfe17 abstract type for conf load func 2019-12-14 23:48:56 +08:00
Darien Raymond 1ab94fed79
optimize v2ctl size 2019-02-01 20:08:21 +01:00
wuxiangzhou2010 5a08411ee2 fix typo 2018-04-02 15:52:16 +08:00
Darien Raymond 3d8f837c07
comments 2018-02-16 14:04:02 +01:00
Darien Raymond 2a07838bb9
extendable config format 2018-02-14 23:57:40 +01:00
Darien Raymond ca721230e1
split listening settings from inbound proxies and apply context 2017-01-26 20:46:44 +01:00
Darien Raymond 8b00d6fc30
clean imports 2017-01-14 00:27:45 +01:00
Darien Raymond a4dfca0ef7
accommodate protobuf compiler change 2016-12-23 12:42:25 +01:00
Darien Raymond f95c322677
rename 'this' 2016-11-27 21:39:09 +01:00
Darien Raymond ad59e56925
default send through value 2016-10-18 00:02:41 +02:00
Darien Raymond 5a311cbe08
json config parser 2016-10-17 14:35:13 +02:00
Darien Raymond e33b7df34c
remove use of any 2016-10-16 14:22:21 +02:00
Darien Raymond 39939b00f0
outbound config 2016-10-16 00:46:08 +02:00
Darien Raymond 35a0ed6fb4
config loader 2016-10-14 23:41:41 +02:00
Darien Raymond 0a32345af9
protobuf for v2ray config 2016-10-14 22:21:45 +02:00
Darien Raymond c1f91567ad
refactor shell 2016-10-12 16:46:02 +02:00
V2Ray 72b4eeba8b Simpilify configuration files 2015-10-06 23:11:08 +02:00
V2Ray 075753c030 Massive refactoring for better code structure 2015-09-19 23:54:36 +02:00
V2Ray 8be5d695c8 test case for socks.net 2015-09-19 15:35:20 +02:00
V2Ray 729312f3b5 Convert point server config to interface for testibility 2015-09-19 15:07:10 +02:00
V2Ray d12737b3b8 Simplify channel operations 2015-09-13 20:01:50 +02:00
V2Ray 51670b223d Remove prefix 'V' in struct names 2015-09-12 22:11:54 +02:00