Switch xray server from unix socket to TCP socket
This commit is contained in:
+1
-1
@@ -10,7 +10,7 @@ server {
|
|||||||
keepalive_timeout 5m;
|
keepalive_timeout 5m;
|
||||||
|
|
||||||
location /trapdoor {
|
location /trapdoor {
|
||||||
proxy_pass http://unix:/dev/shm/xray.socket;
|
proxy_pass http://xray-server:8080;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection "upgrade";
|
proxy_set_header Connection "upgrade";
|
||||||
|
|||||||
+2
-1
@@ -4,7 +4,8 @@
|
|||||||
},
|
},
|
||||||
"inbounds": [
|
"inbounds": [
|
||||||
{
|
{
|
||||||
"listen": "/dev/shm/xray.sock,0666",
|
"listen": "0.0.0.0",
|
||||||
|
"port": 8080,
|
||||||
"protocol": "vless",
|
"protocol": "vless",
|
||||||
"settings": {
|
"settings": {
|
||||||
"clients": [
|
"clients": [
|
||||||
|
|||||||
@@ -23,13 +23,11 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ./config/nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
- ./config/nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
||||||
- tls-certs:/etc/nginx/ssl:ro
|
- tls-certs:/etc/nginx/ssl:ro
|
||||||
- xray-socket:/dev/shm
|
|
||||||
|
|
||||||
xray-server:
|
xray-server:
|
||||||
image: ghcr.io/xtls/xray-core:latest
|
image: ghcr.io/xtls/xray-core:latest
|
||||||
volumes:
|
volumes:
|
||||||
- ./config/server.json:/etc/xray/config.json:ro
|
- ./config/server.json:/etc/xray/config.json:ro
|
||||||
- xray-socket:/dev/shm
|
|
||||||
command: run -c /etc/xray/config.json
|
command: run -c /etc/xray/config.json
|
||||||
|
|
||||||
xray-client:
|
xray-client:
|
||||||
@@ -44,4 +42,3 @@ services:
|
|||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
tls-certs:
|
tls-certs:
|
||||||
xray-socket:
|
|
||||||
|
|||||||
Reference in New Issue
Block a user