Jump to content
The simFlight Network Forums
Firefly

Best way to make browser interface with FSUIPC?

Recommended Posts

Paul, this is working great! And so far is faultless when doing everything locally (on my computer). The only issue I have is, accessing this from various devices On my network fails, I think it requires a secure websocket (wss), could this be an option at all?

well I’m assuming it does as I can’t make connections from devices on my network, even using your website. Tested with chrome and safari.

EDIT: Looks like this is a windows firewall issue after all!

Thanks 

Share this post


Link to post
Share on other sites

Glad to hear its working!

I will add a option for wss as it's very easy in code, but using it would require that you have an SSL certificate installed on the PC from a trusted issuing authority bound to the correct port.

Paul

Share this post


Link to post
Share on other sites

wss shouldn't be necessary - and doing the encryption will just take extra resources. Would only be for security purposes but there isn't much point when you are just on a home LAN. 

If it only listens on 127.0.0.1 it will only work locally, but if you select to listen on the LAN IP it works from other computers. The only problem I had was that I had to run the program as Administrator in order to be allowed to listen on the LAN IP. Can that changed?

Normally you can also set a program to listen on 0.0.0.0 which means any IP can connect to it...

Otherwise I'm looking forward to test this out more as soon as I get a chance!

Share this post


Link to post
Share on other sites

Hi Firefly,

Quote

The only problem I had was that I had to run the program as Administrator in order to be allowed to listen on the LAN IP. Can that changed?

It can't be changed from my code. It's the Windows security that's blocking it.

If you don't want to run as admin you can grant permissions to your user account to use a particular URL. The only way I've found to do this is via the command line: (note you'll need to run the command line as admin, and you need use the http version of the url).

Example for using 192.168.0.1 port 2048

netsh http add urlacl url=http://192.168.0.1:2048/fsuipc/ user=DOMAIN\user

Your user account will be able to use the URL without running as admin. But it will also block you from using all other URLs (including localhost), unless you register them in the same way.

To delete the permissions use:

netsh http delete urlacl url=http://192.168.0.1:2048/fsuipc/

Paul

Share this post


Link to post
Share on other sites

Hi Paul,

I will take my words back - I think we do need an option for wss after all. If the web page we implement this on is https the browser does not allow using an insecure socket connection. I ran into this issue when trying to inject a little script into the Skyvector map to show aircraft position there... 🙂

Allan

Share this post


Link to post
Share on other sites
Quote

- I think we do need an option for wss after al

No problem. I've added it to the next version. I'll likely have it released at the weekend. I'm working on payload and fuel requests at the moment.

Paul 

Share this post


Link to post
Share on other sites

There is now an installer ready that includes the WebSocket server + integration into FSUIPC7 (via an Add-ons menu entry). You can download from here:

 
There is an issue if the WebServer is already running when FSUIPC7 is started as it currently doesn't check for this. I may add this at a later date.
Also, there is currently no indication if the WebSocket server is running or not (apart from entries in the log). I think I'll update the FSUIPC7 title bar to include this information at some point. 
 
Let me know if you have any issues or suggestions.
 
John

Share this post


Link to post
Share on other sites

Hi everyone,

I've just released version 0.2.0 of the server.

Changes and additions are as follows:

  • Added option to use SSL (wss://). Requires you have an SSL certificate from a trusted issuing authority installed, and bound to the port you are using
  • Default address for new installations is now 'localhost' rather than 127.0.0.1
  • Website now supports the browser's back and forward buttons
  • Browser bookmarks will now deep-link to the selected page
  • Added payload commands to more easily read and write payload station and fuel tank data.

Paul

Share this post


Link to post
Share on other sites
2 minutes ago, Paul Henty said:

I've just released version 0.2.0 of the server.

Ok, thanks Paul. I'll update the installer for this version for the next release. I would appreciate some feedback on the current release though first, in case I need to make some other updates. Thanks,

John

Share this post


Link to post
Share on other sites

Hi John,

I don't have MSFS so I assumed I couldn't install/start FSUIPC7, but I just found that I can.

I tested with version V0.2.0 (0.1.0 threw an error on shutdown). All looks good including starting, shutting down, autostart.

Thanks,

Paul

 

Share this post


Link to post
Share on other sites
6 minutes ago, Paul Henty said:

I don't have MSFS so I assumed I couldn't install/start FSUIPC7, but I just found that I can.

Yes, with FSUIPC7 now being a stand-alone exe rather than a dll, you don't need to have MSFS installed to install or run FSUIPC7. But of course, doesn't normally make much sense doing this!

7 minutes ago, Paul Henty said:

I tested with version V0.2.0 (0.1.0 threw an error on shutdown). All looks good including starting, shutting down, autostart.

Ok, thanks, I'll update the installer to include V0.2.0 and release sometime next week...once I've updated the FSUIPC7 user manual.

I'll also update the FSUIPC6 installer to include this, although I'm not sure yet if I'll add the start/stop/etc integration. I may do that at a later stage, via menu items in the P3D Add-on drop down menu entry, but that will depend if needed (i.e. requested). 

Regards,

John

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.