100-compat-v5.patch 843 B

123456789101112131415161718192021
  1. --- a/core/v2ray/process.go
  2. +++ b/core/v2ray/process.go
  3. @@ -226,6 +226,7 @@ func StartCoreProcess(ctx context.Contex
  4. dir := path.Dir(v2rayBinPath)
  5. var arguments = []string{
  6. v2rayBinPath,
  7. + "run",
  8. "--config=" + asset.GetV2rayConfigPath(),
  9. }
  10. if confdir := asset.GetV2rayConfigDirPath(); confdir != "" {
  11. --- a/core/v2ray/where/where.go
  12. +++ b/core/v2ray/where/where.go
  13. @@ -41,7 +41,7 @@ func GetV2rayServiceVersion() (variant V
  14. if err != nil || len(v2rayPath) <= 0 {
  15. return Unknown, "", fmt.Errorf("cannot find v2ray executable binary")
  16. }
  17. - out, err := exec.Command(v2rayPath, "-version").Output()
  18. + out, err := exec.Command(v2rayPath, "version").Output()
  19. var fields []string
  20. if fields = strings.Fields(strings.TrimSpace(string(out))); len(fields) < 2 {
  21. return Unknown, "", fmt.Errorf("cannot parse version of v2ray")