Skip to content

Commit bd8b7c7

Browse files
author
brad
committed
up v2ray service
1 parent 9bcde1a commit bd8b7c7

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

v2ray/conf/config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"log": {
3-
"loglevel": "warning"
3+
"loglevel": "none"
44
},
55
"routing": {
66
"domainStrategy": "AsIs",
@@ -30,7 +30,7 @@
3030
"network": "ws",
3131
"security": "none",
3232
"wsSettings": {
33-
"path": "/"
33+
"path": "/ray"
3434
}
3535
}
3636
}

v2ray/conf/nginx.conf.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ server {
88
server_name mydomain.me;
99
location /ray { # 与 V2Ray 配置中的 path 保持一致
1010
proxy_redirect off;
11-
proxy_pass http://127.0.0.1:10000;#假设WebSocket监听在环回地址的10000端口上
11+
proxy_pass http://v2ray:8888;#假设WebSocket监听在环回地址的8888端口上
1212
proxy_http_version 1.1;
1313
proxy_set_header Upgrade $http_upgrade;
1414
proxy_set_header Connection "upgrade";

v2ray/v2ray.service

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ ExecStartPre=-/usr/bin/docker stop v2ray
1111
ExecStartPre=-/usr/bin/docker kill v2ray
1212
ExecStartPre=-/usr/bin/docker rm v2ray
1313
ExecStartPre=-/home/core/docker/shell/install_fleetctl v2ray
14-
ExecStart=/usr/bin/docker run --name v2ray -p 8888:8888 -v /home/core/data/v2ray:/etc/v2ray v2fly/v2fly-core
14+
ExecStartPre=-/usr/bin/docker network create nginx-network
15+
ExecStart=/usr/bin/docker run --name v2ray --net nginx-network -p 8888:8888 -v /home/core/data/v2ray:/etc/v2ray v2fly/v2fly-core
1516
ExecStop=/usr/bin/docker stop v2ray
1617
ExecStop=/usr/bin/docker kill v2ray
1718

0 commit comments

Comments
 (0)