R
Railway11mo ago
Luis

TCP Proxy

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