10 months ago
My api using actix-web in rust responds to requests over the public networking. But if I want to call it using private networking by the cloudflare tunnel template, connections are rejected.
Public Networking is over IPv4 and Private Networking is over IPv6 as per documentation https://docs.railway.app/guides/private-networking#listen-on-ipv6.
Binding to 0.0.0.0 works fine as noted by the docs https://docs.railway.app/guides/public-networking#railway-provided-port. But now i want to bind to IPv6 which does not work.
I tried the following options:
Using "::" as addressUsing "[::]" as address
Using "[::1]" as address
Is this the wrong way of binding to ipv6? I thinks its probably the framework, but i think binding to :: should be possible.
PS: I have the same setup i want to achieve in javascript where 0.0.0.0 also works for private networking calls.
4 Replies
10 months ago
You would want to refer to the actix documentation on how to bind to IPv6.
10 months ago
Sry my mistake. You can not bind to :: and 0.0.0.0 at the same time. At least not on railway, probably not in a container.
Cloudflare tunnel can still not find the service. When enabling a tcp proxy per railway the calls go through, but tcp is not really what i want.
2024-07-27T15:45:29Z ERR error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp [fd12:df7a:cfe2::7b:cf2:fe38]:9000: i/o timeout" connIndex=2 event=1 ingressRule=0 originService=http://actix.railway.internal:9000
2024-07-27T15:45:29Z ERR Request failed error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp [fd12:df7a:cfe2::7b:cf2:fe38]:9000: i/o timeout" connIndex=2 dest=https://github-stats.bycrookie.com/ event=0 ip=198.41.200.43 type=http
I have to figure it out. Why is it so hard to get a rust app running... 3 Weeks and it is still not fully operational :)
10 months ago
Ok, I fixed it that second. Now everything works. Thanks a lot. Finally operational.
Status changed to Solved brody • 10 months ago