cknipe Posted July 17, 2023 Report Posted July 17, 2023 Hi, Just two quick ones please.... 1) Is there a reason why WebSocketServer is not included in FSUIPC6? Is it supported (P3D, etc?) 2) When using WebSocketServer (latest FSUIPC7), if I bind the application to an IP address other than 127.0.0.1 (localhost) - it requires Windows Admin rights to run? Surely this doesn't seem correct? PS - would be nice to bind to multiple IPs, or listen on any/all IPs.
John Dowson Posted July 17, 2023 Report Posted July 17, 2023 4 hours ago, cknipe said: 1) Is there a reason why WebSocketServer is not included in FSUIPC6? Is it supported (P3D, etc?) From the websocket server online help (http://fsuipcwebsockets.paulhenty.com/😞 Quote Can be used with Microsoft Flight Sims from Version 2004, Prepar3d, and X-Plane So it can be used, it is just not included or integrated into FSUIPC6 as it is with FSUIPC7. 4 hours ago, cknipe said: 2) When using WebSocketServer (latest FSUIPC7), if I bind the application to an IP address other than 127.0.0.1 (localhost) - it requires Windows Admin rights to run? Surely this doesn't seem correct? PS - would be nice to bind to multiple IPs, or listen on any/all IPs. Those are questions for @Paul Henty... John
Paul Henty Posted July 17, 2023 Report Posted July 17, 2023 As John pointed out the Socket Server runs with any version of FSUIPC from 3 onwards. The only difference is that the 'vars' command will run in a legacy mode for all versions before 7. This is significantly slower than the way 'vars' are handled with MSFS. 4 hours ago, cknipe said: When using WebSocketServer (latest FSUIPC7), if I bind the application to an IP address other than 127.0.0.1 (localhost) - it requires Windows Admin rights to run? Surely this doesn't seem correct Certain URLs and Ports are secured by Windows. To use them, the account the application is running under needs permission. You can achieve this is two ways: 1. By running the application as Admin. 2. By giving the required permission to the current user. This is done using the following command: (You can execute this in the command window or in code): netsh http add urlacl url=[URL TO REGISTER] user=[DOMAIN]\[USER OR GROUP] e.g. my PC here is call PJH. My user name is Paul. If I want to use the URL http://PJH:2048/fsuipc I would need this command: netsh http add urlacl url=http://PJH:2048/fsuipc/ user=PJH\Paul To run this command you need to be running 'as admin'. But once you've given permissions the socket server will be able to work without admin privileges. I will add this information to the website. 4 hours ago, cknipe said: PS - would be nice to bind to multiple IPs, or listen on any/all IPs. A listener can only bind to a one URL. Binding to multiple IPs would require starting multiple listeners on the server side and handling requests from any of them. I don't want to make such a fundamental change to the application at this point. Listening on all IPs might be possible as it looks like the URL can include wildcard symbols. So something like http://*:2048/fsuipc will listen on all IPs. At the moment there's no way of typing this in as you need to choose from the dropdown list. I'll look into change this to allow any URL to be typed in. (If the wildcards work). This will not get around the Windows security however. You'll still need to grant permissions to the wildcard URL or be running 'as administrator'. Paul
cknipe Posted July 17, 2023 Author Report Posted July 17, 2023 Thanks John & Paul. Very insightful and useful feedback as always!
Paul Henty Posted July 18, 2023 Report Posted July 18, 2023 Version 1.1.2 is now on the website: http://fsuipcwebsockets.paulhenty.com/index.html#home I've added two 'wildcard' addresses to the dropdown list. (Note that these are not my invention, they are built into Windows. How they work is down to Windows not me.) * (Handles requests on all physical IP Addresses. Doesn't seem to work with any host names or the 127.0.0.1 loopback address.) + (Handles requests on all IP Addresses and host names. This creates a secure URL that needs admin permissions.) Paul 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now