LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   How do I install and configure V2Ray? (https://www.linuxquestions.org/questions/debian-26/how-do-i-install-and-configure-v2ray-4175733487/)

Jason.nix 02-03-2024 06:36 AM

How do I install and configure V2Ray?
 
Hello,
I did the following command to install V2Ray:
Code:

$ sudo apt install v2ray
The V2Ray configuration file should be in the /etc/v2ray/config.json directory, but there was no such directory, so I created it manually and filled it as follows:
Code:

{
 "log" : {
    "access": "/var/log/v2ray/access.log",
    "error": "/var/log/v2ray/error.log",
    "loglevel": "warning"
  },
  "inbounds": [
    {
      "listen":"192.168.1.1",
      "port": 1024, // Listening port
      "protocol": "shadowsocks",
      "settings": {
        "method": "chacha20-poly1305",
        "ota": false, // Whether enable OTA or not
        "password": "sspasswd" // Password of Shadowsocks
      }
    }
  ],
  "outbounds": [
    {
      "protocol": "freedom", 
      "settings": {}
    }
  ]
}

After it, I created /var/log/v2ray/access.log and /var/log/v2ray/error.log files manually. I tried running V2Ray, but got the following error:
Code:

# systemctl status v2ray
× v2ray.service - V2Ray Service
    Loaded: loaded (/lib/systemd/system/v2ray.service; disabled; preset: enabled)
    Active: failed (Result: exit-code) since Sat 2024-02-03 07:25:44 EST; 1s ago
  Duration: 49ms
      Docs: https://www.v2fly.org/
    Process: 25265 ExecStart=/usr/bin/v2ray run -config /etc/v2ray/config.json (code=exited, status=1/FAILURE)
  Main PID: 25265 (code=exited, status=1/FAILURE)
        CPU: 55ms

Feb 03 07:25:44 Proxy systemd[1]: v2ray.service: Scheduled restart job, restart counter is at 5.
Feb 03 07:25:44 Proxy systemd[1]: Stopped v2ray.service - V2Ray Service.
Feb 03 07:25:44 Proxy systemd[1]: v2ray.service: Start request repeated too quickly.
Feb 03 07:25:44 Proxy systemd[1]: v2ray.service: Failed with result 'exit-code'.
Feb 03 07:25:44 Proxy systemd[1]: Failed to start v2ray.service - V2Ray Service.

The report file also shows me the following lines:
Code:

# cat /var/log/v2ray/error.log
2024/02/03 07:23:59 [Warning] V2Ray 5.12.1 started
2024/02/03 07:24:52 [Warning] V2Ray 5.12.1 started

How to solve it?

Thank you.

Jason.nix 02-03-2024 12:09 PM

Hello,
Has anyone here configured V2Ray on Debian?

Thanks.

Jason.nix 02-05-2024 08:22 AM

Hello,
The error is related to the permission of access.log and error.log files. I changed the permission using chmod 777 -R command, but still the permission problem.
Any idea?

Thank you.

Jason.nix 02-07-2024 06:38 AM

Hello,
This was due to a read-only file system error.

Thanks.


All times are GMT -5. The time now is 04:33 AM.