[GUIDE] Luban in Web Browser on Any Device

Jarod Ladrière posted this in FB group - The Post.

Quick search here didn’t find anything.
His original PDF is attached here for reference. And I also attached link to this post in the FB comments.
This was tested on v4.15.0

TLDR

If you start Luban - it starts a web server, accessible via IP (random port) address of the machine you are running it.

How to make it work - quick and dirty

You need some sort of workstation for this, the guide is for Windows, but same applies for MAC or Linux with OS related corrections. Luban starts on randmish port. We can change this, but let’s just figure out where for now. We also assume there is no firewall in between.

STPES
  1. Download this windows utility - TCPView for Windows - Sysinternals | Microsoft Learn

  2. Start Luban

  3. Start the TCP View utility and find Luban in the list - you can type LUBAN in the search at the top.

  4. You need port in TCP protocol with Listen state, from screenshot above - 1073

  5. You can open the browser with http://127.0.0.1:1073/ (replace the port to your number)

How to make it work and use it every day

You will be changing settings of your system and using tools under Admin credentials - proceed with caution and understanding.

Here we will modify Luban files so it uses the same port every time and change windows firewall settings (assuming you don’t have 3rd party firewall) to allow access to Luban from your device.
BACKUP THE FILES YOU CHANGE

STEPS
  1. Open the following file
    • "C:\Program Files\Snapmaker Luban\resources\app\src\server-cli.js"
  2. In this file, find the following string (#23 in my case)
    • var defaultPort = (0, _isElectron["default"])() ? 0 : 8000;
  3. Replace it with
    • var defaultPort = 58007
    • this will tell Luban to use port 58007 every time it starts.
  4. Now we need to allow your tablet or phone to connect to Luban on your PC.
  5. Open Command Terminal by searching for CMD in start menu then right click mouse and “Run As Administrator”
  6. We need to know IP address of the PC you running the Luban on - check your network settings to find it. Mine is 192.168.1.91
  7. Creating a proxy server to accept connections - use following command and insert your numbers
    • netsh interface portproxy add v4tov4 listenaddress=YOU_PC_IP_ADDRESS_GOES_HERE listenport=THE_PORT_NUMBER_YOU_USED_IN_THE_FILE_ABOVE connectaddress=127.0.0.1 connectport=THE_PORT_NUMBER_YOU_USED_IN_THE_FILE_ABOVE
    • It will look like this in my case
    • netsh interface portproxy add v4tov4 listenaddress=192.168.1.91 listenport=58007 connectaddress=127.0.0.1 connectport=58007
    • copy and paste to the terminal, hit enter.
  8. Now we add a rule to Windows Firewall to allow incoming connections to the proxy
    • netsh advfirewall firewall add rule name="Open Port for LUBAN Proxy" dir=in action=allow protocol=TCP localport=THE_PORT_NUMBER_YOU_USED_IN_THE_FILE_ABOVE
    • in my case it looks like this
    • netsh advfirewall firewall add rule name="Open Port for LUBAN Proxy" dir=in action=allow protocol=TCP localport=58007
    • copy and paste to the terminal, hit enter.
  9. Now you should be able to connect from any device on your local network using the address
  10. From my android phone.

To make this more secure - you can only allow connections from IP addresses that you allow, by adding remoteip=IP_OF_YOUR_OTHER_DEVICE in step 8 like so
netsh advfirewall firewall add rule name="Open Port for LUBAN Proxy" dir=in action=allow protocol=TCP remoteip=192.168.0.109 localport=58007

PDF From Jarod Ladrière

Luban Mobile.pdf (117.2 KB)

1 Like

As far as i know that was possible on former releases as well.

Not sure about the benefits…