Unity-Technologies / go-ts3

A golang TeamSpeak 3 ServerQuery client
BSD 2-Clause "Simplified" License
47 stars 21 forks source link

Add support for SSH connections #35

Closed HalloTschuess closed 1 year ago

HalloTschuess commented 2 years ago

This add support for connecting to a Teamspeak server over SSH with the new client option SSH(...)

golang.org/x/crypto/ssh is used for SSH communication.

Example usage:

...

sshConfig := &ssh.ClientConfig{
    User: "serveradmin",
    Auth: []ssh.AuthMethod{
        ssh.Password("my-password"),
    },
    HostKeyCallback: ssh.InsecureIgnoreHostKey(), // has to be handled by the user correctly
}

c, err := ts3.NewClient("localhost", ts3.SSH(sshConfig))

...

Everything should be fully backwards compatible.

Closes #31

stevenh commented 2 years ago

I will get this merged when I get my permissions sorted out.

HalloTschuess commented 2 years ago

Thank you so much.

I'm kinda confused about the Github review process so sorry if someone of you got spammed with notifications

stevenh commented 2 years ago

Don't worry its been sat in my todo for some time, so thank you for your patience.

I just noticed that the team removed travis ci a while back, so I've just put a PR in to add github actions to bring back running tests and linting.

Once this team approves this, I'll ask you to rebase so we can validate everything is good according to the linters.

stevenh commented 1 year ago

Hey @HalloTschuess can you rebase on top of the latest master to fix the conflicts and enable CI validation please.

HalloTschuess commented 1 year ago

Hey @stevenh I rebased my changes.

stevenh commented 1 year ago

Thanks @HalloTschuess please see the lint failure.

HalloTschuess commented 1 year ago

Thanks for the notice @stevenh. Linting errors should be fixed now.

stevenh commented 1 year ago

Thanks for the PR @HalloTschuess all merged, will cut a release once I've added auto release functionality.

stevenh commented 1 year ago

Looks like this introduced a race condition in the tests, could you have a look please @HalloTschuess

stevenh commented 1 year ago

PR https://github.com/Unity-Technologies/go-ts3/pull/38 should fix, if you could review @HalloTschuess