TCP Proxy
How can i activate the tcp proxy, i dont find it in the public networking
35 Replies
Please provide your project ID or reply with
N/A
. Thread will automatically be closed if no reply is received within 10 minutes. You can copy your project's id by pressing Ctrl/Cmd + K -> Copy Project ID.No project ID was provided. Closing thread.
a8f4079d-087c-441a-bd34-1eeeaf08bb52
a8f4079d-087c-441a-bd34-1eeeaf08bb52
if you have a domain set you would first need to remove it
what does that means? that if i do domain:4000 i send something to that port?
it means that any incoming tcp traffic to
roundhouse.proxy.rlwy.net:44402
will be proxied to your app at port 4000
what kind of app are you running?im running a socket app
websocket?
yes
then you dont want to use a tcp proxy for that, use the railway provided domain
but how can i do it i mean i send you my code
remove the tcp proxy and generate a domain
but should I put domain:port
nope it would be something like https://domain.com/ws
are you running an http and a ws server at the same time?
no, im just running socket-io and ws
the socket io for sending the data to angular
no http involved?
no
did you add a domain to your service
to railway you mean?
yes
yes
screenshot please?
perfect, that is the domain you will use in the websocket client
i have this, like 0 security
you want to listen on the environment variable
PORT
okey thank you so much
but for making the aplication work, i have to make app.listen(process.env.PORT) and for listening with ws i have to make the ws.listen(process.env.PORT), and it doesnt work. How should i fix it?
why do you have two listens? you said this was just websockets?
but in nestjs, there is an app variable that has to be listening in one port
i think it works like that, im not 100% sure
then you do indeed have http and websockets
they would need to listen on the same port
thats for the http server
but if i put both in the same port it doesnt work, so how should i do it?
id recommend researching this topic, there would be plenty of online examples
ok