Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: add ssh outbound #1087

Merged
merged 2 commits into from
Mar 8, 2024
Merged

feat: add ssh outbound #1087

merged 2 commits into from
Mar 8, 2024

Conversation

TreviD
Copy link

@TreviD TreviD commented Mar 8, 2024

No description provided.

}

func (h *Ssh) DialContext(ctx context.Context, metadata *C.Metadata, opts ...dialer.Option) (_ C.Conn, err error) {
dstAddr := M.ParseSocksaddrHostPort(metadata.String(), metadata.DstPort).String()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为什么不直接用metadata.RemoteAddress()

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改

@wwqgtxx wwqgtxx merged commit d7e2ceb into MetaCubeX:Alpha Mar 8, 2024
H1JK pushed a commit that referenced this pull request Mar 8, 2024
* feat: add ssh outbound

* fix: Modify the way to get dstAddr

---------

Co-authored-by: trevid <trevidmy@gmail.com>
@APT-ZERO
Copy link

APT-ZERO commented Mar 9, 2024

Thank you for this great feature

To improve this can add option to import privateKey from file and add key file's password, like sing-box
And can also add Fingerprint check to prevent MitM
https://pkg.go.dev/golang.org/x/crypto/ssh#FingerprintSHA256
ssh-keygen -lf /etc/ssh/ssh_host_rsa_key.pub
ssh-keygen -lf /etc/ssh/ssh_host_dsa_key.pub
ssh-keygen -lf /etc/ssh/ssh_host_ecdsa_key.pub
ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants