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

/etc/init.d/v2ray 的 typo 導致無法啟動 v2ray 服務 #46

Closed
jasonts opened this issue Jan 14, 2020 · 1 comment
Closed

/etc/init.d/v2ray 的 typo 導致無法啟動 v2ray 服務 #46

jasonts opened this issue Jan 14, 2020 · 1 comment

Comments

@jasonts
Copy link

jasonts commented Jan 14, 2020

機器: Xiaomi Mi Router 3G
OpenWrt 版本: 19.07.0
v2ray-core 版本: 4.22.1-3
luci-app-v2ray 版本: 1.5.2-1

情況:
在 luci 裡面無論是 reload service, 或是在 Startup 裡面 restart 都無法正常啟動
在 ssh 將生成的 json 檔案 copy 至 home directory 之後 test run 是這樣子

root@OpenWrt:~# v2ray -test -config /root/v2ray.main.json
V2Ray 4.22.1 (OpenWrt) R3 (go1.13.5 linux/mipsle)
A unified platform for anti-censorship.
main: failed to read config file: /root/v2ray.main.json > v2ray.com/core/main/json: failed to execute v2ctl to convert config file. > v2ray.com/core/common/platform/ctlcmd: failed to execute v2ctl: v2ray.com/core/infra/conf/command: failed to parse json config > v2ray.com/core/infra/conf/serial: failed to parse json config > v2ray.com/core/infra/conf: invalid VMess user > json: cannot unmarshal string into Go struct field VMessAccount.alterId of type uint16

疑似是 /etc/init.d/v2ray 的腳本有 typo 而無法啟動,
編輯了該檔案之後恢復正常

解決方式:
vim /etc/init.d/v2ray
搜尋 test -n "$s_vmess_client_alter_id"
將後面的 json_add_string 改成 json_add_int
大概在 1155 行的位置

@kuoruan
Copy link
Owner

kuoruan commented Jan 14, 2020

确实。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants