v2ray相关记录📝



-相关目录
程序目录:/usr/local/v2ray
配置文件:/etc/v2ray/config.json

      - 服务文件:/usr/lib/systemd/system/v2ray.service

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[Unit]
Description=V2Ray Service
Documentation=https://www.v2fly.org/
After=network.target nss-lookup.target
 
[Service]
User=nobody
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
NoNewPrivileges=true
ExecStart=/usr/local/v2ray/v2ray -config /etc/v2ray/config.json
Restart=on-failure
RestartPreventExitStatus=23
 
[Install]
WantedBy=multi-user.target

-相关命令

1
2
3
4
cp v2ray.service /usr/lib/systemd/system/
systemctl daemon-reload
systemctl enable v2ray
systemctl start v2ray






Comments

Popular posts from this blog

海外回国代理分流

openwrt设置定时任务-远程唤醒计算机

从Blogger转移