AzurLaneAutoScript icon indicating copy to clipboard operation
AzurLaneAutoScript copied to clipboard

GUI: using '::' as server host results in a blank GUI with nothing showing up; browser works fine

Open Shane-Xue opened this issue 6 months ago • 8 comments

Before you asking

  • [x] I have searched the existing issues
  • [x] I spend at least 5 minutes for thinking and preparing
  • [x] I checked Frequently Asked Questions (FAQ) in Wiki page
  • [x] I am using the latest version of Alas

Describe the bug

I have a domain name tied to my public ipv6 address but I don't have a public ipv4, so it would be resonable when I host my ALAS webui host over ipv6 like this: (in deploy.yaml) WebuiHost: '::'

Everything looks great when you boot your browser and enter the address (my domain name works as well): Image

Until you look at your alas GUI and KABAM, nothing's there: Image

127.0.0.1 or 0.0.0.0 as host sees ALAS working fine.

So I searched around a bit to find this code: https://github.com/LmeSzinc/AzurLaneAutoScript/blob/5fcf1aee95e816f0fd94fa64555b8d8964044677/module/webui/remote_access.py#L159-L164 Which means 3 years ago using :: was taken into consideration. However this looks like the ssh module, which I did not touch, thus I suspect the issue comes from the GUI electron window unable to change the host according to config.

I have no experience whatsoever with WebUI, so I really don't know how to fix it myself. Please help and thanks in advance.

To Reproduce

Follow steps above.

Expected behavior

ALAS stuff shows up correctly in electron window

Relevant log output


Screenshots

No response

Anything else?

No response

Shane-Xue avatar Jun 16 '25 19:06 Shane-Xue

f12 查看是否有更多信息提示

XingHeYuZhuan avatar Jun 19 '25 13:06 XingHeYuZhuan

f12 查看是否有更多信息提示

对于ALAS的electron GUI点击F12没有任何反应。大概应该是electron界面根本没有连接到真正的webui,webui本身没有问题,是electron客户端和host在::1上的网页没有衔接起来。

Shane-Xue avatar Jun 21 '25 04:06 Shane-Xue

WebUI 是写死的 127.0.0.1: https://github.com/LmeSzinc/AzurLaneAutoScript/blob/5fcf1aee95e816f0fd94fa64555b8d8964044677/webapp/packages/main/src/config.ts#L14

我想知道应用场景是啥,如果需要远程访问那不是不应该使用本机的 WebUI 吗?我有另外用 tauri 做的一个 UI,为了防止非法访问服务端和客户端都是写死的 127.0.0.1

swordfeng avatar Jun 24 '25 04:06 swordfeng

我想知道应用场景是啥,如果需要远程访问那不是不应该使用本机的 WebUI 吗?我有另外用 tauri 做的一个 UI,为了防止非法访问服务端和客户端都是写死的 127.0.0.1

应用场景就是远程访问。WebUI其实只是个UI而已,不同机器上访问需要重新输入密码,我没能理解何谓“本机的WebUI”。防止非法访问是通过设置WebUI的密码实现的。或者说,目前有没有替代的远程访问方案?

BTW看了代码,webuiUrl这个变量其实根本没被利用(

Shane-Xue avatar Jun 28 '25 10:06 Shane-Xue

去看了看代码,自行额外在127.0.0.1开了个uvicorn服务器,算是满足我自己的需求了 至于GUI,没找到electron的入口,所以最后也就没动

Shane-Xue avatar Jun 28 '25 11:06 Shane-Xue

你这问题有点莫名其妙的,远程访问你要electron干啥?远程桌面开electron?

我不知道你怎么看的没利用的 https://github.com/LmeSzinc/AzurLaneAutoScript/blob/e74c0a5507e5caa376f98678b2c3c83f5d564b2c/webapp/packages/renderer/src/components/Alas.vue#L13

swordfeng avatar Jun 28 '25 18:06 swordfeng

我同时需要远程访问和桌面访问:如果我在电脑边我希望可以直接使用ALAS的gui,而不是一定要打开浏览器;如果我不在电脑旁,我希望可以通过手机浏览器直接访问ALAS。

我不知道你怎么看的没利用的

看来是我检查不仔细,不好意思。

Shane-Xue avatar Jun 29 '25 04:06 Shane-Xue

那IPv4不行吗……或者去开个需求让 WebuiHost 可以设置多个地址

swordfeng avatar Jun 29 '25 04:06 swordfeng