IceWhaleTech / CasaOS

CasaOS - A simple, easy-to-use, elegant open-source Personal Cloud system.
https://casaos.io
Apache License 2.0
26.36k stars 1.44k forks source link

Cannot change Web UI app port #665

Open ghost opened 2 years ago

ghost commented 2 years ago

Describe the bug Hi, i using https://github.com/suyashkumar/ssl-proxy to add ssl support for bitwarden, so by default bitwarden running on 34655, i running ./ssl-proxy-linux-amd64 -from 0.0.0.0:446 -to 127.0.0.1:34655 to access bitwarden truth 446 port, all working fine, but when i want to configure app, to open app on new port, i had error: image

how to disable duplicate port checking?

ghost commented 2 years ago

maybe it's possible to add checkbox "disable duplicate port checking", it will be very usefull for solve this problem.

ghost commented 2 years ago

in finnaly i able to configure, just stopping ./ssl-proxy-linux-amd64 after, set 446 port, and run again ./ssl-proxy-linux-amd64 -from 0.0.0.0:446 -to 127.0.0.1:34655

mojothemonkey2 commented 2 years ago

had same issue with caddy proxy.

we check that nothing is listening on WebUI port, before we start the container https://github.com/IceWhaleTech/CasaOS/blob/9ed82cd55e6d2fdd52913d1c64aaec383ea8ce43/route/v1/docker.go#L195 so we'll hit this issue whenever we try and use a proxy.

would almost be better with the opposite.. start the container first, and then check that someting IS listening on the WebUI port (could be just a warning). as this would alert to misconfiguration vs the app/proxy if there is nothing at the other end. though potential race condition with how fast the app will start up, and begin listening.

so maybe easiest just to remove the IsPortAvailable check on port_map. (still keeping the check on the app ports)

LinkLeong commented 2 years ago

Okay, we received your question, we will discuss and improve.

Cp0204 commented 2 years ago

我的用法可能是,用nginx反代各个应用,复用443端口,用path分流。也会有这个问题。

zhanghengxin commented 2 years ago

Good question