Stellarium / stellarium

Stellarium is a free GPL software which renders realistic skies in real time with OpenGL. It is available for Linux/Unix, Windows and macOS. With Stellarium, you really see what you can see with your eyes, binoculars or a small telescope.
https://stellarium.org
GNU General Public License v2.0
7.8k stars 821 forks source link

Remote Control Plugin doesn't work with proxy #3597

Open uilzzw opened 10 months ago

uilzzw commented 10 months ago

When I turned on Remote Control Plugin, the console prompts the binding port to fail when starting.The following is the prompt message: Loaded plugin "RemoteControl" RemoteControl using QtWebApp version 1.6.4-stellarium StaticFileController: docroot=/usr/share/stellarium/webroot, encoding=UTF-8, maxAge=60 StaticFileController: cache timeout=60000, size=1048576 RemoteControl enabled HttpListener: Cannot bind on port 10109: Operation on socket is not supported Loaded plugin "RemoteSync" stel.plugin.remoteSync: Plugin initialized System:Arch Linux-6.7.0 StellariumVersion:24.4 Graphics:Nvidia(DriverVersion:545.29.06)

github-actions[bot] commented 10 months ago

Thanks for adding your first issue to Stellarium. If you have questions, please do not hesitate to contact us.

alex-w commented 10 months ago

You have someone service on this port already

uilzzw commented 10 months ago

You have someone service on this port already

I have no service running on this port.I tried other ports. The prompt is the same error. RemoteControl enabled HttpListener: Cannot bind on port 10109: Operation on socket is not supported HttpListener: closed HttpConnectionHandlerPool (0x64b798c876c0): destroyed HttpListener: destroyed HttpListener: Cannot bind on port 11111: Operation on socket is not supported HttpListener: closed HttpConnectionHandlerPool (0x64b798c876c0): destroyed HttpListener: destroyed HttpListener: Cannot bind on port 22222: Operation on socket is not supported HttpListener: closed HttpConnectionHandlerPool (0x64b798c876c0): destroyed HttpListener: destroyed HttpListener: Cannot bind on port 44444: Operation on socket is not supported HttpListener: closed HttpConnectionHandlerPool (0x64b798c876c0): destroyed HttpListener: destroyed HttpListener: Cannot bind on port 55555: Operation on socket is not supported Is it caused by my use of ordinary users?

uilzzw commented 10 months ago

You have someone service on this port already

I started trying it with root user just now. Can run normally

uilzzw commented 10 months ago

You have someone service on this port already

My user is in the root group, I don't know what caused it.

alex-w commented 10 months ago

I see no problem in my linux with common user

uilzzw commented 10 months ago

I see no problem in my linux with common user

I figure out what the reason for this problem is. The reason is that I have opened a global proxy. There is this line in the log. Using HTTP proxy: "" "" "127.0.0.1" "8118" But I haven't figured out yet what causes it to get two null values.

10110111 commented 10 months ago

If you mean the two "" items, they are proxy user and proxy password. See StelApp::setupNetworkProxy():

qDebug() << "Using HTTP proxy:" << proxyUser << ppDisp << proxyHost << proxyPort;
uilzzw commented 10 months ago

If you mean the two "" items, they are proxy user and proxy password. See StelApp::setupNetworkProxy():如果您指的是这两个 "" 项目,它们是代理用户和代理密码。请参见 StelApp::setupNetworkProxy()

qDebug() << "Using HTTP proxy:" << proxyUser << ppDisp << proxyHost << proxyPort;

I am very curious why after opening a global proxy, opening the remote control plugin will fail. I read a little remote control plugin code and didn't look carefully. Isn't the http service of this remote control plugin run independently?

10110111 commented 10 months ago

Isn't the http service of this remote control plugin run independently?

You can see the call to QNetworkProxy::setApplicationProxy in this function, so this is an app-global setting that will affect all HTTP connections (and servers, I suppose).

But I don't really know this code, so you'll have to study it more thoroughly to understand what's going on.