v2ray.service not working
After setting the config, v2ray -c /etc/v2ray/config.json works fine. But sytemctal start v2ray.serivce, where v2ray.serivce is copy from /v2ray_config/v2ray.service, it seems dns query never return and soon I got the two many open files error.
I have checked that Oct 24 22:05:08 arch cgproxyd[467855]: info: execsnoop; noproxy: 601056 /usr/bin/v2ray exist.
solved by reboot with unit file as
❯ cat /etc/systemd/system/v2ray.service
[Unit]
Description=V2Ray Service
After=network.target nss-lookup.target
[Service]
User=nobody
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
ExecStart=/usr/bin/v2ray -confdir /etc/v2ray/
[Install]
WantedBy=multi-user.target
Noticed that restart/reload will also cause the v2ray service stop working. Same as issue as above, please help to check.
I just found out that if you restart cgproxy's service after starting v2ray's service it works. I think cgproxy's cgnoproxy list should be updated so it needs a restart