R
Railway10mo ago
Luis

TCP Proxy

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