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

Improve remote access support #2815

Merged

Conversation

Williangalvani
Copy link
Member

@Williangalvani Williangalvani commented Jul 16, 2024

reviving #1842 as a fallback for remote control

This introduces a new optional works_in_relative_paths to the services metadata.
These will use a relative path (under /extensionv2/) to load the extension in the browser.
This allows them to be used seamlessly behind a webserver with ssl.

@Williangalvani Williangalvani force-pushed the new_extension_links branch 2 times, most recently from 0ce272b to 0c94b1e Compare July 17, 2024 19:46
@Williangalvani Williangalvani changed the title add nginx routes for extensions WIP: Remote access support Aug 27, 2024
@Williangalvani Williangalvani force-pushed the new_extension_links branch 3 times, most recently from 2e74ab6 to 58ef4a2 Compare August 29, 2024 21:17
@Williangalvani Williangalvani marked this pull request as ready for review August 29, 2024 21:20
@Williangalvani Williangalvani changed the title WIP: Remote access support Improve remote access support Aug 29, 2024
@Williangalvani Williangalvani added the docs-needed Change needs to be documented label Sep 2, 2024
@Williangalvani
Copy link
Member Author

@patrickelectric @voorloopnul can you give this a try?

I have a cockpit branch at https://github.com/bluerobotics/cockpit/compare/master...Williangalvani:cockpit:remote_access?expand=1 with the changes and a stun server.

it is deployed at williangalvani/cockpit:remote2

@Williangalvani
Copy link
Member Author

rebased

@joaoantoniocardoso joaoantoniocardoso merged commit 3b6cd4c into bluerobotics:master Sep 18, 2024
5 checks passed
Copy link
Member

@patrickelectric patrickelectric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot to submit it 🤦

logging.info(f"file '{filename}' not found ({e}):, a new one will be created")
with open(filename, "w", encoding="utf-8") as f:
logging.info(f"updating nginx route for {name}")
f.write(text)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the context is different we need to erase it and then writing to it no ?

@@ -101,7 +101,7 @@ find /usr/blueos/userdata -type f -exec chmod a+rw {} \;
PRIORITY_SERVICES=(
'autopilot',0,"nice --19 $SERVICES_PATH/ardupilot_manager/main.py"
'cable_guy',0,"$SERVICES_PATH/cable_guy/main.py"
'video',0,"nice --19 mavlink-camera-manager --default-settings BlueROVUDP --mavlink tcpout:127.0.0.1:5777 --mavlink-system-id $MAV_SYSTEM_ID --gst-feature-rank omxh264enc=0,v4l2h264enc=250,x264enc=260 --log-path /var/logs/blueos/services/mavlink-camera-manager --verbose"
'video',0,"nice --19 mavlink-camera-manager --default-settings BlueROVUDP --mavlink tcpout:127.0.0.1:5777 --mavlink-system-id $MAV_SYSTEM_ID --gst-feature-rank omxh264enc=0,v4l2h264enc=250,x264enc=260 --log-path /var/logs/blueos/services/mavlink-camera-manager --stun-server stun://stun.l.google.com:19302 --verbose"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joaoantoniocardoso Will this affect cockpit usage in an environment where cockpit is used locally but internet is available ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not if they use the filter, which is the default, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-minimal Documentation exists but should be improved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants