yanue / V2rayU

V2rayU,基于v2ray核心的mac版客户端,用于科学上网,使用swift编写,支持trojan,vmess,shadowsocks,socks5等服务协议,支持订阅, 支持二维码,剪贴板导入,手动配置,二维码分享等
https://github.com/yanue/V2rayU
18.85k stars 2.88k forks source link

全新安装新版 V2RayU 无法启动 v2ray-core #784

Closed myloft closed 3 years ago

myloft commented 3 years ago

1) 你正在使用的 V2RayU 和 Mac 版本 ?

  1. V2RayU 2.3.1 3.0.0
  2. macos 10.15.7

2) 你遇到的问题是什么?(请描述具体现象,比如访问超时,TLS 证书错误等)

V2RayU 正常启动,v2ray-core 未启动,无日志输出。

3) 请附上你的配置(提交 Issue 前请隐藏服务器端IP地址)。

{
  "log": {
    "error": "",
    "loglevel": "info",
    "access": ""
  },
  "inbounds": [
    {
      "listen": "127.0.0.1",
      "protocol": "socks",
      "settings": {
        "udp": false,
        "auth": "noauth"
      },
      "port": "10808"
    },
    {
      "listen": "127.0.0.1",
      "protocol": "http",
      "settings": {
        "timeout": 360
      },
      "port": "10807"
    }
  ],
  "dns": {},
  "routing": {
    "settings": {
      "domainStrategy": "AsIs",
      "rules": []
    }
  },
  "transport": {}
}

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

    // v2ray-core 无日志输出

    // 手动启动 V2RayU 日志 ,此时无 v2ray-core 进程
2020-11-20 00:06:48.222 V2rayU[2006:19341] Permission is root admin
2020-11-20 00:06:48.222 V2rayU[2006:19341] Permission is ok
after SCPreferencesCommitChanges: commitRet = true, applyRet = true
2020-11-20 00:06:48.290 V2rayU[2006:19341] setSystemProxy backup succeeded.
2020-11-20 00:06:48.290 V2rayU[2006:19341] start menu
isOldConfigVersion true
2020-11-20 00:06:48.295 V2rayU[2006:19341] start v2ray-core begin
webServer.start at:11085
/Users/xxxx/Library/LaunchAgents/yanue.v2rayu.v2ray-core.plist: No such file or directory
/Users/xxxx/Library/LaunchAgents/yanue.v2rayu.v2ray-core.plist: No such file or directory
2020-11-20 00:06:48.313 V2rayU[2006:19341] Start v2ray-core succeeded.
2020-11-20 00:06:48.313 V2rayU[2006:19341] start v2ray-core done.
webServer.start at:11085
/Users/xxxx/Library/LaunchAgents/yanue.v2rayu.v2ray-core.plist: No such file or directory
/Users/xxxx/Library/LaunchAgents/yanue.v2rayu.v2ray-core.plist: No such file or directory
2020-11-20 00:06:48.323 V2rayU[2006:19341] Start v2ray-core succeeded.
after SCPreferencesCommitChanges: commitRet = true, applyRet = true
2020-11-20 00:06:48.387 V2rayU[2006:19341] setSystemProxy manual succeeded.
sync from Subscribe list
loadConfig nil
SubSync fail:  please add Subscription Url
ping start
chmod: Unable to change file mode on ./V2rayUHelper: Operation not permitted
chmod: Unable to change file mode on ./V2rayUTool: Operation not permitted
GeneratePACFile rewrite 10808
PACFilePath /Applications/V2rayU.app/Contents/Resources/pac/proxy.js
webServer.start at:11085
2020-11-20 00:06:48.441 V2rayU[2006:19341] working dir:/Applications/V2rayU.app
ping error xxx.xxx.xxx Optional(Error Domain=NSURLErrorDomain Code=-1015 "(null)")

    // 手动启动 V2Ray 日志 ,一切正常
V2Ray 4.31.0 (V2Fly, a community-driven edition of V2Ray.) Custom (go1.15.2 darwin/amd64)
A unified platform for anti-censorship.
2020/11/20 00:09:31 Using default config:  /Applications/V2rayU.app/Contents/Resources/v2ray-core/config.json
2020/11/20 00:09:31 [Info] v2ray.com/core/common/platform/ctlcmd: <v2ctl message> 
v2ctl> Read config:  /Applications/V2rayU.app/Contents/Resources/v2ray-core/config.json
2020/11/20 00:09:31 [Warning] v2ray.com/core: V2Ray 4.31.0 started
myloft commented 3 years ago
  1. 全新安装的 MacOS 的 ~/Library/LaunchAgents 目录所有者为 root,其它用户无写权限。
  2. V2RayU 似乎并未使用 root 权限向该目录写入 yanue.v2rayu.v2ray-core.plist,从而导致 V2Ray-core 无法启动。
  3. 使用 chmod a+x 为其它用户增加写权限后,可以正常启动。