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

Stream support domain name. #1612

Closed
8Q757 opened this issue Nov 27, 2021 · 1 comment
Closed

Stream support domain name. #1612

8Q757 opened this issue Nov 27, 2021 · 1 comment

Comments

@8Q757
Copy link

8Q757 commented Nov 27, 2021

Hello, thank you for developing this project.
Now, I have a required function.
I may often use Stream as a proxy.
However, I use docker deployment, and only open ports 80 and 443.
After the container is started, it is not so easy to modify the exposed port, but the current Stream can only listen other ports, so once you need to add Stream, you need to modify and restart the container.
Can the Stream support domain name forwarding?

@chaptergy
Copy link
Collaborator

Routing streams via domain names is generally not possible with Nginx. Because Nginx needs to know what the target domain is to route it to the correct server. The HTTP protocol does contain the domain name, which is why it is easy to do this for websites. But streams are on a lower network level, where the information about the target domain is simply not there, because that depends on the protocol. There is a feature called SNI, but it really depends on what data is being transmitted via the stream host. If it is HTTPS, it's theoretically possible (see #853 (comment)), but most protocols do not disclose the target domain names.

So this is first and foremost a limitation of how networking works and of nginx, since npm is only an interface to generate nginx configs, we can only do what nginx actually supports.

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

No branches or pull requests

2 participants