skywire icon indicating copy to clipboard operation
skywire copied to clipboard

It is not possible to open comple websites with the fwd and rev commands

Open Senyoret1 opened this issue 2 years ago • 1 comments

If you run a local instance of the Skycoin explorer, you will normally be able to access it locally and from remote clients (if configured correctly), as a normal webpage. However, if you expose the port serving the explorer with skywire-cli fwd and connect to that port remotelly with skywire-cli rev, when trying to open the explorer from the remote machine the browser window will stay blank.

If you see the dev tools on the browser, you will see that the HTML is download correctly and the browser tab in fact says “Skycoin Explorer”. This means that a simple html page can be sent using the fwd functionality, the problem is when the page is complex.

The problem with the explorer is that some files are not downloaded correctly while using the fwd functionality. Here is what is received when connecting directly to the server without the fwd functionality: f1

And this is what is received when connecting using fwd and rev: f2

The problem is in the size of the files. The fist 2 have the same size with both methods, but the polyfill js file and the next ones are much smaller with the fwd-rev. In fact, when checking the contents of the small js files, instead of js code, the following is shown: f3

An interesting fact that may give a clue about the cause of this problem is that in the html file, the runtime js file (which is the one downloaded correctly) is the first one listed and the other js files are just after it: f4

This could mean that the browser tried to download all the js files almost at the same time in the order stablished on the html file and the runtime js was processed correctly because it was the first one processed by the fwd code, but the fwd code has problems to process the other requests before finishing with the first one, so the code for processing several request in parallel could need improvements.

Senyoret1 avatar May 24 '23 17:05 Senyoret1

This was sortof a known issue, skyfwd works for simple things, not complex resources currently.

I've encountered similar difficulty getting websites working over dmsg.

Good documentation on this, definitely some things we can directly investigate here.

0pcom avatar May 24 '23 18:05 0pcom