guysoft / OctoPi

Scripts to build OctoPi, a Raspberry PI distro for controlling 3D printers over the web
GNU General Public License v3.0
2.49k stars 369 forks source link

Octopi parsing IPv6 address incorrectly #797

Open KR8MER opened 2 years ago

KR8MER commented 2 years ago

In the shell, octopi is reporting the IPv6 address to access the UI incorrectly.

IPv6 addresses must be contained in brackets[] to open them directly in the browser.

In the attached picture, you can see the URL displayed to access does not contain required brackets, leading to confusion when novices try to access the webpage, especially when they don’t understand the url presented looks different than what they’re expecting.

It should look like this. http://[fdb0:9cb:c472:4645:bcd3:b225:4c0d:f1ea]/

6D7175B1-C84E-4883-81F1-669ECE9DD1B7

guysoft commented 2 years ago

Yep, i actually use IPv6 but usually the hostname works, never had to copy one. It will need to be changed here: https://github.com/guysoft/OctoPi/blob/devel/src/modules/octopi/start_chroot_script#L230 Can't find a decent bash validation script for that, PRs welcome