codefori / vscode-ibmi

🌍 IBM i development extension for VS Code
https://codefori.github.io/docs/#/
MIT License
287 stars 94 forks source link

SSH proxy support and/or jump host #1692

Open wingett opened 11 months ago

wingett commented 11 months ago

Is your feature request related to a problem? Please describe. vscode-ibmi doesn't appear to use the Proxy settings for VSCode when connecting to the IBM i host

Describe the solution you'd like Would it be possible to either use the existing Proxy support in VSCode or potentially use the settings for the host in the ~/.ssh/config file as normal

Describe alternatives you've considered Proxifier or any Socksifying product does the job but it would be nice to have a "native" solution

Additional context Add any other context or screenshots about the feature request here.

worksofliam commented 11 months ago

@codefori/core I think we'd be able to do this in the connection UI. Perhaps as a second tab?

wingett commented 11 months ago

I have got a bit of a workaround without using external products now - setting up an SSH tunnel first before starting VScode and pointing the vscode-for-ibmi at localhost instead does work. Not the cleanest of solutions, but it works for the moment:

1) Set up tunnel using "ssh -J jump_host -L22000:127.0.0.1:22 iseries_host_ip" - leave that running in a separate window 2) Modify vscode-for-ibmi settings to point IBMi connection to IP 127.0.01 and port 22000

Everything else is the same and it works for editing and compiling. Not tried debug yet, but that is for later on

chrjorgensen commented 11 months ago

@wingett

Everything else is the same and it works for editing and compiling. Not tried debug yet, but that is for later on

I don't think debug will work - your ssh command only forwards port 22000 on your SSH client (VS Code) to port 22 on IBM i, and debug uses other ports. You could make it work by also forwarding the debug ports per documentation (include them on your ssh command).

wingett commented 11 months ago

Yes, I thought it might be something like that. I have used it behind an SSH proxy in the past using RDi but that was a SOCKS5 proxy.

I’m just in the process of downloading the relevant PTFs for the debugger now (I’m embarrassingly a bit behind on PTFs) and was going to play with that today. See how far I get. Might be able to do it some remote port forwarding too - fingers crossed!

On 12 Dec 2023, at 10:24, Christian Jorgensen @.***> wrote:

@wingetthttps://github.com/wingett

Everything else is the same and it works for editing and compiling. Not tried debug yet, but that is for later on

I don't think debug will work - your ssh command only forwards port 22000 on your SSH client (VS Code) to port 22 on IBM i, and debug uses other ports. You could make it work by also forwarding the debug ports per documentation (include them on your ssh command).

— Reply to this email directly, view it on GitHubhttps://github.com/codefori/vscode-ibmi/issues/1692#issuecomment-1851753216, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AA47ETWIBVRGSWTY66JCGFLYJAWG5AVCNFSM6AAAAABAJHNOQOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJRG42TGMRRGY. You are receiving this because you were mentioned.Message ID: @.***>