v2ray-core icon indicating copy to clipboard operation
v2ray-core copied to clipboard

v5.1.0无法正确读取stdin

Open uuid855634 opened this issue 3 years ago • 9 comments
trafficstars

相关Issue

几个月前提过相关issue https://github.com/v2fly/v2ray-core/issues/1769 ,昨天测试v5.1.0版本,似乎还未修复。

你正在使用哪个版本的 V2Ray?

OS:Win10 21H2 V2Ray:v5.1.0

你的使用场景是什么?

比如使用 Chrome 通过 Socks/VMess 代理观看 YouTube 视频

你看到的异常现象是什么?

无法从stdin读取配置,未设置环境变量并移除了目录下config.json文件。 尝试使用v4.45.0内核是可以正常读取stdin。 以上测试均使用v4配置文件。

你期待看到的正常表现是怎样的?

正确读取stdin

请附上出错时软件输出的错误日志

未产生日志,仅输出如下信息。

V2Ray 5.1.0 (V2Fly, a community-driven edition of V2Ray.) Custom (go1.19 windows/amd64)
A unified platform for anti-censorship.

uuid855634 avatar Sep 20 '22 13:09 uuid855634

5.1 你这个是指两边版本的core运行参数有没有加run的区别?

33lyl avatar Sep 22 '22 07:09 33lyl

v4.50 加与不加run 均能正常读取stdin。 v5.1.0 加run无法正常读取stdin, 不加run无法正常运行。

uuid855634 avatar Sep 22 '22 11:09 uuid855634

难道又是bug ?

在 2022-09-22 19:27:02,"uuid855634" @.***> 写道:

v4.50 加与不加run 均能正常读取stdin。 v5.1.0 加run无法正常读取stdin, 不加run无法正常运行。

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

33lyl avatar Sep 26 '22 14:09 33lyl

I tested it on Arch Linux. I think you should close the standard input by youself. Input config then press Control and D.

AkinoKaede avatar Sep 28 '22 01:09 AkinoKaede

在Win10 21H2上测试,使用v4配置格式在v4.50版本能正常读取StandardInput,v5.1.0使用-config参数从json文件中读取配置也很顺利,就是从StandardInput读取有点问题。有点迷。

uuid855634 avatar Sep 28 '22 15:09 uuid855634

貌似5.1 改了cli,文档没有更新,现在命令是这个 v2ray run -c **.json??

zizifn avatar Oct 06 '22 12:10 zizifn

复现:

### NOT working:
$ v2ray run < /tmp/v2config.json 
V2Ray 5.1.0 (V2Fly, a community-driven edition of V2Ray.) Custom (go1.19 linux/amd64)
A unified platform for anti-censorship.
2022/10/16 15:54:36 Using config from STDIN
^C
### NOT working.

### NOT working:
$ cat /tmp/v2config.json | v2ray run
V2Ray 5.1.0 (V2Fly, a community-driven edition of V2Ray.) Custom (go1.19 linux/amd64)
A unified platform for anti-censorship.
2022/10/16 15:54:57 Using config from STDIN
^C
### NOT working.

### working:
$ v2ray run -c /tmp/v2config.json 
V2Ray 5.1.0 (V2Fly, a community-driven edition of V2Ray.) Custom (go1.19 linux/amd64)
A unified platform for anti-censorship.
2022/10/16 15:55:18 [Info] app/dns: DNS: created UDP client initialized for 8.8.8.8:53
...
### working.

版本与编译详情:https://github.com/archlinux/svntogit-community/blob/daa45988344959632767497bdb59c3d92e0df956/trunk/PKGBUILD

bryango avatar Oct 16 '22 08:10 bryango

得等新版本了

At 2022-10-16 16:00:47, "bryango" @.***> wrote:

复现:

NOT working:

$ v2ray run < /tmp/v2config.json

V2Ray 5.1.0 (V2Fly, a community-driven edition of V2Ray.) Custom (go1.19 linux/amd64)

A unified platform for anti-censorship.

2022/10/16 15:54:36 Using config from STDIN

^C

NOT working.### NOT working:

$ cat /tmp/v2config.json | v2ray run

V2Ray 5.1.0 (V2Fly, a community-driven edition of V2Ray.) Custom (go1.19 linux/amd64)

A unified platform for anti-censorship.

2022/10/16 15:54:57 Using config from STDIN

^C

NOT working.### working:

$ v2ray run -c /tmp/v2config.json

V2Ray 5.1.0 (V2Fly, a community-driven edition of V2Ray.) Custom (go1.19 linux/amd64)

A unified platform for anti-censorship.

2022/10/16 15:55:18 [Info] app/dns: DNS: created UDP client initialized for 8.8.8.8:53

...

working.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

33lyl avatar Oct 24 '22 14:10 33lyl

I think this is similar to #1949. This issue can be reproduced on v5.1.0 with a stdin stream larger than 2kB. Already fixed by #1923.

dyhkwong avatar Oct 25 '22 13:10 dyhkwong

This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 5 days

github-actions[bot] avatar Feb 23 '23 02:02 github-actions[bot]

It seems to me that the issue has been fixed.

$ v2ray version
V2Ray 5.3.0 (V2Fly, a community-driven edition of V2Ray.) Custom (go1.20 linux/amd64)
A unified platform for anti-censorship.

Built by arch: https://github.com/archlinux/svntogit-community/blob/9decb43bcde933694a8312623f45ff69b175113e/trunk/PKGBUILD

bryango avatar Feb 23 '23 15:02 bryango