isontheline / pro.webssh.net

iOS / iPadOS / macOS SSH Client
https://apps.apple.com/us/app/id497714887
MIT License
299 stars 43 forks source link

Is it possible to use CloudFlare ZeroTrust CloudFlareD? #1159

Open wildernessfamily opened 1 month ago

wildernessfamily commented 1 month ago

Feature description

I looked at some of the other issues. There is one that might match this that I came across #266 but, I'm not sure if that is the correct ticket or not regarding what I'm trying to do.

I use CloudFlare, ZeroTrust CloudFlareD feature. I setup an application on who is allowed to access the "app" in CF ZeroTrust, in this case my server through SSH. I then setup a tunnel in CloudFlare ZeroTrust. On my local MacBook I added the following to the ~/.ssh/config

Host ssh.mydomain.tld
    ProxyCommand cloudflared access ssh --hostname %h
    User my-username
    IdentityFile my-private-key

I tried some different ways to do this in WebSSH but have not been able to figure out how to do this. Any guidance would be greatly appreciated and/or add it to a future enhancement request :)

Note: I rarely travel, but my house is under construction, and during the work I couldn't stay in the house and had to stay at a hotel. I needed away to access my home servers. Found your app. It's awesome. I just purchased it. Thanks for your hard work and time that you placed in the app.

isontheline commented 1 month ago

Hello @wildernessfamily 👋

Thank you so much for your purchase 🙏

I'm merging #993 with your one as yours are better described

As WebSSH is sandboxed I can't run cloudflaredcommand and if I want to support Cloudflare ZeroTrust I need to re-implement the full cloudflare inside WebSSH (not same language).

I will take a look but will not be trivial

wildernessfamily commented 1 month ago

Awesome, thank you! Do you allow pull request. I'm actually a computer engineer. I'm in the middle of a large project, but, in a few weeks from now, I can take a look and see if I can help you implement this.

isontheline commented 1 month ago

@wildernessfamily WebSSH is closed source but I can use third party libraries in Objective-C and Swift.

WebSSH needs to have an access to a SOCKS server that emulate the Cloudflared features