quasar dev -m capacitor -T android changes my external ip of window to the internal ip of wsl

30 Views Asked by At

When my application compiles for Android Studio and runs in the Android Studio emulator, it works very well because Android Studio works on the same local machine and that's why I can access the internal WSL. But when instead of using the emulator I try to use my phone via USB, it does not allow access to the wsl IP from my phone obviously because it should access the external IP of window. Then I try to run the application in dev mode but on the external port of window and quasar always changes the IP and puts the IP of wsl, or it directly tells me: Invalid host specified. No network address matches. Please specify another one. So I am not being able to run the application on the external port of window

quasar config

devServer: {
      // https: true
      open: true, // opens browser window automatically
      port: 3000,
      allowedHosts: "all",
      proxy: "http://192.423.0.626:3000",
     
    }

capacitor.config.json


{
     "appId": "org.capacitor.quasar.app",
     "appName": "Quasar App",
     "webDir": "www",
     "server": {
       "androidScheme": "https",
       "url": "http://192.423.0.626:3000",
       "cleartext": true
     }
 }

when i run

quasar dev -m capacitor -T android change url to "url": "http://172.21.66.209:3000" automaticly and i cant acces from my device throught android studio

enter image description here

enter image description here is there something way to force run dev mode on specific ip?

0

There are 0 best solutions below