Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a reverse-proxy with nmos-cpp-node #391

Closed
joaofigueiredobisect opened this issue May 27, 2024 · 1 comment
Closed

Use a reverse-proxy with nmos-cpp-node #391

joaofigueiredobisect opened this issue May 27, 2024 · 1 comment

Comments

@joaofigueiredobisect
Copy link

Hello,

I have a question.

My goal is to use a reverse proxy and send the reverse proxy IP (for example, 192.168.1.2) to the registry. When accessing this address, the reverse proxy should redirect to the IP where the node is running (for example, 192.168.1.1).

My question is: Is it possible to have a node running on one IP (like 192.168.1.1) but send a different IP (like 192.168.1.2) to the registry?

@garethsb
Copy link
Contributor

With your own Node based on nmos-cpp, the thing to do is to set host_address(es) to the address(es) of the reverse proxy and use proxy_map to map between reverse proxy port(s) and the port(s) where the Node is actually running.

Of course, as well as the addresses/ports on which the NMOS APIs are being served, there's also the ones that Senders and Receivers are using. Both their IP addresses (in IS-05) and their interfaces (in IS-04) are advertised via NMOS. The example nmos-cpp-node doesn't really send or receive media streams, but it uses the first and last host_address(es) for its mock Senders and Receivers and attempts to discover the local interfaces associated with those IP addresses, which won't necessarily work with a reverse proxy IP address. I think it's possible to set up a working example nmos-cpp-node config with a reverse proxy but it needs a bit of care.

Also consider that we should be encouraging people to use DNS names instead of IP addresses. Therefore we also need to think about using host_name and href_mode.

And then there's security: client_secure and server_secure can be used along with the above to allow deployment of nmos-cpp behind a reverse proxy that does TLS termination. (That was one of the original motivations.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants