Closed zoheirkabuli closed 9 months ago
the API is listening on 127.0.0.1
within the Docker container's network namespace. This means it's not accessible from outside the container, including your host machine.
To make the API accessible, you'll need to adjust the listen
address to 0.0.0.0
in the inbound configuration for the API, which will allow connections from any IP address, not just 127.0.0.1
. modify the inbounds
section of your configuration:
"inbounds": [
{
"listen": "0.0.0.0",
"port": 62789,
"protocol": "dokodemo-door",
"settings": {
"address": "127.0.0.1"
},
"tag": "api"
}
]
when you run the Docker container, you need to ensure that the port 62789
is published to the host machine. do this by using the -p
flag in your docker run
command:
docker run -d --name xray-container -p 62789:62789 xray-image-name
try running grpcurl
again:
grpcurl -plaintext localhost:62789 list
double-check that there are no firewall rules on your host machine that may be blocking the connection to the specified port.
@us254 Thanks man It Works
Hello I hope you are well I run xray by docker and enabled api interface in config but it is not working with grpcurl I would be thankful if guide me I'll put my config and grpcurl down below
My config:
grpcurl output: