Update module github.com/melbahja/goph to v2 #82
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "renovate/github.com-melbahja-goph-2.x"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This MR contains the following updates:
v1.5.2→v2.0.3Release Notes
melbahja/goph (github.com/melbahja/goph)
v2.0.3Compare Source
v2.0.2Compare Source
v2.0.1: v2Compare Source
Goph v2
Goph v2 brings Functional options API, context-aware commands, SOCKS5 proxy, jump hosts, lazy agent sockets, and many more features.
Breaking Changes
Removed
goph.Authtype andgoph.Configstruct.goph.New.Removed constructors:
NewUnknown,NewConn.goph.New(user, addr, opts...)withWithInsecureIgnoreHostKey()where needed.Removed auth constructor functions:
goph.Password(),goph.Key(),goph.UseAgent().WithPassword,WithKeyFile,WithDefaultAgent,WithAgentSocketetc.Client.Configfield removed.*ssh.ClientConfigis now ephemeral: built inNew, passed to options and dial helpers, then discarded. It is no longer stored on the connectedClient.Renamed key auth options:
WithKey(file, passphrase)=>WithKeyFile(file, passphrase)WithRawKey(pem, passphrase)=>WithKey(pem, passphrase)Renamed key parsing helpers:
GetSigner(file, passphrase)=>ParseKeyFile(file, passphrase)GetSignerForRawKey(key, passphrase)=>ParseKey(key, passphrase)New Features
Functional options API.
WithPassword,WithKeyFile,WithKey,WithAgent,WithAgentSocket,WithDefaultAgent,WithSigner,WithAuthWithPort,WithTimeout,WithKnownHosts,WithInsecureIgnoreHostKey,WithHostKeyCallback,WithBannerCallback,WithConfigWithProxy,WithJumpDialerfor reusable connections.d := goph.NewDialer(opts...)thend.New(user, addr)for multiple hosts with shared defaults.SOCKS5 proxy authentication.
WithProxycan accepts URLs with embedded credentials:socks5://user:pass@host:port.Context-aware command cancellation.
RunContextandCommandContextacceptcontext.Context.ssh.SIGINTto the remote session.goph.Dial.goph.Dial(c *Client, config *ssh.ClientConfig) errorfor manualClientconstruction and customssh.ClientConfig.Clientnow storesUser;Dialdefaultsconfig.UsertoClient.Useror the current OS user when empty.config.Timeout.Security fixes.
WithPasswordno longer includes a keyboard-interactive fallback. Added standaloneWithKeyboardInteractive(handler)that gives callers full control over each server prompt (password, OTP, 2FA, etc.).Cmd.Stringwarning now clearly states thatPathandArgsare not shell-escaped and that callers must sanitize untrusted input.Known-hosts helpers.
KnownHostsnow documents that the file must exist.EnsureKnownHostscreates the file (and parent directory) if missing.DefaultKnownHostsusesEnsureKnownHostsso first-time users no longer hit a file-read error when~/.ssh/known_hostsis absent.Merge Request by @melbahja in #78
Full Changelog https://github.com/melbahja/goph/compare/v1.5.0...v2.0.1
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this MR and you won't be reminded about this update again.
This MR has been generated by Mend Renovate CLI.
mentioned in issue #1
changed the description
added 1 commit
Compare with previous version
added 3 commits
masterCompare with previous version
changed the description
changed the description
added 17 commits
masterCompare with previous version
added 1 commit
962ebdd5- Update module github.com/melbahja/goph to v2Compare with previous version
⚠️ Artifact update problem
Renovate failed to update an artifact related to this branch. You probably do not want to merge this MR as-is.
♻ Renovate will retry this branch, including artifacts, only when one of the following happens:
The artifact failure details are included below:
File name: go.sum