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

Remote Control Plugin doesn't work with proxy #3597

Open
uilzzw opened this issue Jan 17, 2024 · 10 comments
Open

Remote Control Plugin doesn't work with proxy #3597

uilzzw opened this issue Jan 17, 2024 · 10 comments
Labels
bug Something likely wrong in the code

Comments

@uilzzw
Copy link

uilzzw commented Jan 17, 2024

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)

Copy link

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

@alex-w
Copy link
Member

alex-w commented Jan 17, 2024

You have someone service on this port already

@uilzzw
Copy link
Author

uilzzw commented Jan 17, 2024

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
Copy link
Author

uilzzw commented Jan 17, 2024

You have someone service on this port already

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

@uilzzw
Copy link
Author

uilzzw commented Jan 17, 2024

You have someone service on this port already

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

@alex-w
Copy link
Member

alex-w commented Jan 17, 2024

I see no problem in my linux with common user

@uilzzw
Copy link
Author

uilzzw commented Jan 17, 2024

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
Copy link
Contributor

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
Copy link
Author

uilzzw commented Jan 17, 2024

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
Copy link
Contributor

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.

@alex-w alex-w added this to Needs triage in Interoperability of Stellarium via automation Jan 17, 2024
@alex-w alex-w added this to Needs triage in Plugin via automation Jan 17, 2024
@gzotti gzotti changed the title Remote Control Plugin doesn't work Remote Control Plugin doesn't work with proxy Jan 22, 2024
@alex-w alex-w added the bug Something likely wrong in the code label Jan 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something likely wrong in the code
Projects
Plugin
  
Needs triage
Development

No branches or pull requests

3 participants