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

Ability to set ustreamer host on config file #34

Closed
leandrotoledo opened this issue Aug 31, 2022 · 8 comments
Closed

Ability to set ustreamer host on config file #34

leandrotoledo opened this issue Aug 31, 2022 · 8 comments
Assignees
Labels
feature request feature request

Comments

@leandrotoledo
Copy link

Is your feature request related to a problem? Please describe

In addition to use the cameras on Mainsail, I also have them set up behind a reverse proxy that is in different server, therefore the ustream instance should accept connections from 0.0.0.0 but currently it's hardcoded to 127.0.0.1 at launch.

It would be convenient if that's an option on crowsnest.conf.

Thoughts?

Describe the solution you'd like

--- a/libs/ustreamer.sh
+++ b/libs/ustreamer.sh
-    start_param=( --host 127.0.0.1 -p "${pt}" )
+    start_param=( --host "${host}" -p "${pt}" )

Describe alternatives you've considered

I have tried to overload custom_flags: --host 0.0.0.0 but it executes with ustream ... --host 127.0.0.1 --host 0.0.0.0, so it's not a very elegant solution.

Additional information

No response

@leandrotoledo leandrotoledo added the feature request feature request label Aug 31, 2022
@KwadFan KwadFan self-assigned this Sep 4, 2022
@KwadFan
Copy link
Contributor

KwadFan commented Sep 4, 2022

Hey there,

I know its not an elegant solution. But here is the catch, ustreamer by itself uses 127.0.0.1 if --host is not set.
But if I launch ustreamer without --host set it sometimes ( under which circumstances ever) it refuses to start.

Because we are using nginx as reverse proxy already it is "hardcoded" to use the proxy instead of all "networks".

I am aware of setups they dont use a proxy or running crowsnest in stand alone mode, I think I will implement a solution like "standalone: true" to avoid that duplicate of host address.

Please be patient :)

@KwadFan
Copy link
Contributor

KwadFan commented Nov 15, 2022

@leandrotoledo It took a long time but I did it 🤣

So, please be kind and test that on your side, use develop branch for that.
If you report success I will merge that asap.

Regards Kwad

@leandrotoledo
Copy link
Author

@KwadFan welp, it took me even longer to confirm 🤣, but I had to perform a fresh Klipper installation, and I encountered this issue again. I can now confirm that setting no_proxy: true indeed solves the problem as intended. Thank you!

@fluxor99232
Copy link

Is "no_proxy: true" only affecting ustreamer? Would love to be able to use this with camera-streamer! Or am I getting something wrong there? Been pulling my hair out and spent ours trying to figure out why I couldn't access my camera stream for my server on the same network hosting Klipper, Fluidd and Moonraker. (I like to use separate devices for these jobs because the camera and Klipperscreen only need to be running while the printer is on, so my server switches both the printer and the Pi running Crowsnest on/off as needed).

@mryel00
Copy link
Member

mryel00 commented Dec 4, 2023

@fluxor99232 no_proxy is currently only for ustreamer. camera-streamer didn't have such an option and allowed it by default on the master branch. But on the main branch, which is only used on bookworm images, it now restricts it. You should add --http-listen=0.0.0.0 to your custom_flags inside the crowsnest.conf to achieve the same effect as with no_proxy.
In future we will ofc add that parameter for camera-streamer, but currently we have to support two different versions that will make this unnecessary "difficult".

edit: no_proxy support for camera-streamer got added with #238

@fluxor99232

This comment has been minimized.

@mryel00

This comment has been minimized.

@fluxor99232

This comment has been minimized.

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

No branches or pull requests

4 participants