Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jsonv5 is nearly unusable for homebrew installed v2ray #2620

Open
frankli0324 opened this issue Jul 23, 2023 · 6 comments
Open

jsonv5 is nearly unusable for homebrew installed v2ray #2620

frankli0324 opened this issue Jul 23, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@frankli0324
Copy link

frankli0324 commented Jul 23, 2023

https://github.com/v2fly/discussion/issues 已无法使用

What version of V2Ray are you using?

V2Ray 5.7.0 (V2Fly, a community-driven edition of V2Ray.) Custom (go1.20.6 darwin/amd64)
A unified platform for anti-censorship.

What's your scenario of using V2Ray?

irrelevant

What did you see?

homebrew services still locked to old configuration format (v2ray run -c /usr/local/etc/v2ray/config.json)

also -d option doesn't pick up v5.json files.

image

What's your expectation?

  1. fix configdir option so v2ray could pick up config.v5.json etc. and parse them correctly.

  2. modify https://github.com/Homebrew/homebrew-core/blob/master/Formula/v2ray.rb#L65 to run -d /usr/local/etc/v2ray so brew v2ray keeps jsonv4 backward compatibility while jsonv5 users could also live.

modifying the plist file would be overridden when updated, so that's not an option

@frankli0324
Copy link
Author

I'm thankful for the lack of documentation and the fact that it wasted me an entire night on this. I would love to write a detailed bug report but I need sleep.

@frankli0324
Copy link
Author

the reason to the confdir issue is that filepath.Ext only returns the last part of a file (see https://pkg.go.dev/path/filepath#example-Ext)

https://github.com/v2fly/v2ray-core/blob/master/main/commands/run.go#L122

and someone somehow decided to use .xx.json as the "extension" of the config file. absolute genius.

@AkinoKaede
Copy link
Contributor

V2Ray will try to use all config loaders, but v4 loaders may not throw any expectation when loading v5 format config.
I think we can add a priority for config loaders. @xiaokangwang

@AkinoKaede
Copy link
Contributor

I think the first issue is fixed.

@AkinoKaede AkinoKaede removed their assignment Jul 25, 2023
@AkinoKaede AkinoKaede added the bug Something isn't working label Jul 29, 2023
Copy link
Contributor

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

Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants