feschber / lan-mouse

mouse & keyboard sharing via LAN
GNU General Public License v3.0
2.6k stars 82 forks source link

Lan Mouse Mobile Server #231

Open rohitsangwan01 opened 1 week ago

rohitsangwan01 commented 1 week ago

As discussed in this comment, here is the LanMouse Mobile Server initial version:

LanMouse Mobile GitHub Repository

While a few features are still being worked on, it’s overall functioning well. I've tested it with the following setups:

You can download the test APK from the Releases section.

Feel free to check it out!

feschber commented 1 week ago

Very cool! Working out of the box :smiley:.

Scrolling is a bit weird (seems like on_scroll is activated after completing a scroll instead of immediately and for each "step").

I just merged encryption support so you are going to have to add support for DTLS in case you want to adapt this to the latest version.

feschber commented 1 week ago

And one more suggestion:

Tap + drag would be a nice feature, as in keep mouse 1 pressed in case it is immediately (within maybe 250ms) followed by a drag action until the drag is finished.

feschber commented 1 week ago

I added a link to your repo to the README

rohitsangwan01 commented 1 week ago

@feschber Thankyou for the feedbacks Will try to apply the suggestions and add encryption support as well, i have to check the code on how Encryption is implemented

rohitsangwan01 commented 1 week ago

Am having issue in implementing keyEvents, i tried implementing like this, but after sending these events MacOs stucked in keyPressed state, and only option i had was to force restart Mac Seems like KeyRelease event is somehow ignored or maybe some kind of race condition

feschber commented 1 week ago

I recently fixed an issue with stuck keys on MacOS concerning modifier keys (CTRL / OPTION / CMD / CAPSLOCK / SHIFT).

Did you check the latest version?

Definitely possible there is still something wrong though

feschber commented 1 week ago

For encryption you dont really need to know anything other than the fact that its using DTLS v1.2 and a sha256 fingerprint for certificate verification.

You can obtain a fingerprint through openssl using

openssl x509 -in lan-mouse.pem -noout -sha256 -fingerprint

where lan-mouse.pem is the file containing the ssl certificate.

rohitsangwan01 commented 1 week ago

Thankyou for the info, will implementing in new versions

rohitsangwan01 commented 6 days ago

@feschber Added Encryption support in V0.0.2 Udp and Encryption logic is now in Rust and UI part in Flutter

feschber commented 6 days ago

That was fast! I'm impressed. And it's working flawlessly as well! I updated the REAMDE accordingly

rohitsangwan01 commented 6 days ago

Glad to hear it's working smoothly! it's always great when everything comes together seamlessly. Let me know if there’s anything else I can help with!

rohitsangwan01 commented 1 day ago

@feschber do you think using Flutter for Frontend can be an option for LanMouse ? There are plugins to easily integrate Flutter and Rust like flutter_rust_bridge, which i have also used in LanMouseMobile, and few Popular softwares like RustDesk is also using Rust + Flutter I think its easy to build on every platform and more freedom in building UI

feschber commented 21 hours ago

I intentionally designed lan-mouse in a way to make it easy to create new frontends. I don't want to replace the Gtk frontend, but I certainly dont have anything against a flutter frontend.

feschber commented 21 hours ago

lan-mouse-ipc is responsible for the communication, if you want to have a look

rohitsangwan01 commented 19 hours ago

I tried writing frontend in flutter, It works fine but Issue is to maintain dart and lanMouse's rust communication protocols in sync In case if anything changes in future