R
Railway5mo ago
Luis

TCP Proxy

How can i activate the tcp proxy, i dont find it in the public networking
35 Replies
Percy
Percy5mo ago
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.
Percy
Percy5mo ago
No project ID was provided. Closing thread.
Luis
Luis5mo ago
a8f4079d-087c-441a-bd34-1eeeaf08bb52 a8f4079d-087c-441a-bd34-1eeeaf08bb52
Brody
Brody5mo ago
if you have a domain set you would first need to remove it
Luis
Luis5mo ago
what does that means? that if i do domain:4000 i send something to that port?
No description
Brody
Brody5mo ago
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?
Luis
Luis5mo ago
im running a socket app
Brody
Brody5mo ago
websocket?
Luis
Luis5mo ago
yes
Brody
Brody5mo ago
then you dont want to use a tcp proxy for that, use the railway provided domain
Luis
Luis5mo ago
but how can i do it i mean i send you my code
Brody
Brody5mo ago
remove the tcp proxy and generate a domain
Luis
Luis5mo ago
but should I put domain:port
Brody
Brody5mo ago
nope it would be something like https://domain.com/ws are you running an http and a ws server at the same time?
Luis
Luis5mo ago
no, im just running socket-io and ws the socket io for sending the data to angular
Brody
Brody5mo ago
no http involved?
Luis
Luis5mo ago
no
Brody
Brody5mo ago
did you add a domain to your service
Luis
Luis5mo ago
to railway you mean?
Brody
Brody5mo ago
yes
Luis
Luis5mo ago
yes
Brody
Brody5mo ago
screenshot please?
Luis
Luis5mo ago
No description
Brody
Brody5mo ago
perfect, that is the domain you will use in the websocket client
Luis
Luis5mo ago
i have this, like 0 security
No description
Brody
Brody5mo ago
you want to listen on the environment variable PORT
Luis
Luis5mo ago
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?
Brody
Brody5mo ago
why do you have two listens? you said this was just websockets?
Luis
Luis5mo ago
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
Brody
Brody5mo ago
then you do indeed have http and websockets they would need to listen on the same port
Luis
Luis5mo ago
No description
Brody
Brody5mo ago
thats for the http server
Luis
Luis5mo ago
but if i put both in the same port it doesnt work, so how should i do it?
Brody
Brody5mo ago
id recommend researching this topic, there would be plenty of online examples
Luis
Luis5mo ago
ok