After fighting with this for a while I finally reached a partial solution. First I managed to connect the server that runs on my remote linux machine with the emulator in my windows workstation. To do that I opened a reverse ssh tunnel from windows to linux, I changed the default port so it doesn’t collide. For example:
ssh -o ExitOnForwardFailure=yes `
-R 127.0.0.1:15037:127.0.0.1:5037 user@your-remote
Then on the linux machine I modified the environment variable that tells adb which port to use. At this point if I run adb devices I should be able to see the emulator from my local windows machine listed on the remote linux side.
adb kill-server
export ADB_SERVER_SOCKET=tcp:127.0.0.1:15037
adb devices
Since dioxus needs to know the server url I just added this line:
server_fn::client::set_server_url("http://localhost:8080");
With this I already got the app running in the windows emulator.
But even with this working I still hit some problems with routes and redirects. First the client running in the emulator couldn’t find the server on the linux machine.
To solve that I forwarded port 8080 from the remote machine:
ssh -N -L 8080:127.0.0.1:8080 user@your-remote
After that I was able to use the server routes, and that allowed me to start the google auth flow. The problem now is that after a successful login the browser inside the emulator tries to redirect to localhost:8080 but it cannot find that route, so this part I haven’t solved yet.