miroslavpejic85 / p2p

🖥️ P2P Remote Desktop - Portable, No Configuration or Installation Needed.
MIT License
2.3k stars 312 forks source link

Make a crossplatform build #2

Open denisgolius opened 2 years ago

denisgolius commented 2 years ago

As I see this project is windows compatible only. AFAIK there is a lot libraries which are compatible for different OS e.g. https://docs.microsoft.com/en-us/dotnet/core/install/linux So could your provide builds for Ubuntu/MacOS ?

KieranDevvs commented 2 years ago

The problem you have is that this project is using WinForms which is Windows dependent. To make this crossplatform, you would have to replace the UI with something like AvaloniaUI (MAUI doesnt support Linux / GTK at the moment).

I'm not sure if any of the socket libraries are also Windows dependent.

denisgolius commented 2 years ago

The problem you have is that this project is using WinForms which is Windows dependent. To make this crossplatform, you would have to replace the UI with something like AvaloniaUI (MAUI doesnt support Linux / GTK at the moment).

I'm not sure if any of the socket libraries are also Windows dependent.

AFAIK AvaloniaUI is supported by Wayland and most of used Linux Distributions works with Wayland. 😃

denisgolius commented 2 years ago

The problem you have is that this project is using WinForms which is Windows dependent. To make this crossplatform, you would have to replace the UI with something like AvaloniaUI (MAUI doesnt support Linux / GTK at the moment).

I'm not sure if any of the socket libraries are also Windows dependent.

Also I don't think that most of Gentoo users or i3 DE will be use this instead of using teamviewer or other proprietary software.

miroslavpejic85 commented 2 years ago

Thank you so much for the valuable advice. It would be great to make it cross-platform. Any contribution is always welcome!

eirannejad commented 2 years ago

Highly suggest using Eto and the modern dotnet 6+ to very easily build your app cross-platform with not much UI rework. I usually spend my days in Eto.Xammac and Eto.Wpf so I can help with the conversion as well.

maverick74 commented 2 years ago

This is absolutely amazing!!!

But I too would like a cross-platform version. Connecting to a Windows machine from my Linux machine easily is something I really miss!!!

I believe it would be best creating it in Qt (since it's already cross-platform ready) and that it can help reduce your problems @miroslavpejic85

(An AppImage of it would be gold!!!)

miroslavpejic85 commented 2 years ago

Hello @eirannejad & @maverick74 Thank you so much, Your advice is greatly appreciated, I'm sure that all together we will find the best solution to make it so.

maverick74 commented 2 years ago

Qt ( https://www.qt.io/ ) is largely used by the KDE community ( https://kde.org/ ) so you get a lot of support and documentation and you also have examples such as the Falkon browser or Linus Torvalds' Sub-surface

KieranDevvs commented 2 years ago

I would advise against using Qt. While C# bindings exist, they're not actively maintained and ones that are, have no official support. Also, the winforms style of design is very old school, some form of markup language (i.e XAML) is favourable as most frameworks are taking this approach. Ive used AvaloniaUI in the past and it has good community support as well as official commercial support.

Or maybe even having a web UI either through Blazor (WASM), WebSocket / SignalR bidirectional communication or a pure javascript / HTML5 implementation.

jsanchez2021 commented 2 years ago

Descargue y compile la aplicación , la ejecute y la probé , ingrese la IP del punto remoto , presione el botón conectar y se queda en un while mostrando el mensaje e: 4 trying to connect to , que me puede estar faltando para que funcione,? , cuando lo ejecute acepte que permitiera realizar cambios en el dispositivo. Gracias

KieranDevvs commented 2 years ago

Descargue y compile la aplicación , la ejecute y la probé , ingrese la IP del punto remoto , presione el botón conectar y se queda en un while mostrando el mensaje e: 4 trying to connect to , que me puede estar faltando para que funcione,? , cuando lo ejecute acepte que permitiera realizar cambios en el dispositivo. Gracias

Create a new issue. This topic is regarding cross platform builds.

miroslavpejic85 commented 2 years ago

Hi @jsanchez2021, I'm agree with @KieranDevvs, Create a discussion about it, please in English, although I think it is explained in the Readme about how the app works, thank you very much.

KieranDevvs commented 5 months ago

I've opened a PR to migrate the existing codebase over to .NET 8 (#61). Once that gets merged, I can work on refactoring the code into a core class library and start picking apart the Windows specific code. After we have a core library, I can start to look at using Avalonia as a second UI provider to this library which is cross platform.

denisgolius commented 5 months ago

Any updates on this? :D

KieranDevvs commented 5 months ago

Any updates on this? :D

I'm working on refactoring the code based to separate out the UI and platform specific code from each other. Specifically I'm working on the encryption. Right now, the AES key is hard coded into the binary so a man in the middle attack is very trivial. Adding a Diffie–Hellman key exchange to the initial request handshake allows us to send a randomly generated AES key and IV securely so that the network session can be encrypted without any keys being known prior.

Making this cross platform isn't as easy as just using something like Avalonia. Each platform has its own way of handling device inputs and providing a screen buffer. I'd have to add support for one platform at a time.

With that being said, I'll be looking at Linux. I have no interest in macOS or any other platform as I don't know them well enough. Maybe others will also contribute towards that effort. But the bottom line is that P2P will have the ability to have other platform support added.

I give no time frame, I'm working on it in my free time which I have almost none of.

iuvi7 commented 1 week ago

I would like to jump in translation of program if\when cross-platform version comes out :) Thanks everyone

maverick74 commented 1 week ago

I'll be looking at Linux

Awesome!!! :)

Also, I could translate it too!!! (there isn't much to translate however!!! ahahah and that's the beauty of this!!!)