Closed wherget closed 3 years ago
On a whim, I set up TS3Hook anyway, and it looks like client_server_password
needs to be hashed (looks to be sha1) and base64'd before going into the configuration. Maybe tsclientlib should take care of this internally e.g. in the password()
fluent api.
Used "test":
[OUT] clientinit client_nickname=test client_version=3.?.?\s[Build:\s5680278000] client_platform=Windows client_input_hardware=1 client_output_hardware=1 client_default_channel client_default_channel_password client_server_password=qUqP5cyxm6YcTAhz05Hph5gvu9M= client_meta_data client_version_sign=DX5NIYLvfJEUjuIbCidnoeozxIDRRkpq3I9vVMBmE9L2qnekOoBzSenkzsg2lC9CMv8K5hkEzhr2TYUYSwUXCg== client_key_offset=182 client_nickname_phonetic client_default_token client_badges=Overwolf=0 client_myteam
Used "x":
[OUT] clientinit client_nickname=test client_version=3.?.?\s[Build:\s5680278000] client_platform=Windows client_input_hardware=1 client_output_hardware=1 client_default_channel client_default_channel_password client_server_password=EfatjsUqKYSrqv18O1FlA3hcIHI= client_meta_data client_version_sign=DX5NIYLvfJEUjuIbCidnoeozxIDRRkpq3I9vVMBmE9L2qnekOoBzSenkzsg2lC9CMv8K5hkEzhr2TYUYSwUXCg== client_key_offset=182 client_nickname_phonetic client_default_token client_badges=Overwolf=0 client_myteam
Thanks for the note, I guess I never tested that. base64(sha1(password))
seems to work, I added that in c53456d.
Clientmove, channeledit and all the file functions still need to be fixed.
Environment
Steps to reproduce
Add password setting:
/// The address of the server to connect to
[structopt(short = "p", long, default_value = "")]
password: String, /// The address of the server to connect to
[structopt(short = "a", long, default_value = "localhost")]
address: String, @@ -54,7 +57,8 @@ async fn real_main() -> Result<()> { let con_config = Connection::build(args.address) .log_commands(args.verbose >= 1) .log_packets(args.verbose >= 2)
.log_udp_packets(args.verbose >= 3);
.log_udp_packets(args.verbose >= 3)
.password(args.password);
// Optionally set the key of this client, otherwise a new key is generated. let id = Identity::new_from_str(
Run:
cargo run --example audio -- -v -a <server> -p <password>
Expected result
Audio example runs.
Actual result
Remarks
I tested with multiple servers (another one at 3.12.1), and the password supplied is verified correct (TS3 Client connects). I don't think it's a tsclientlib issue per se, as ts3j has the same problem, maybe the protocol has changed slightly? Seeing as server password is a relatively recent addition to the lib, maybe I'm just using it wrong? I haven't checked with TS3Hook yet how the password is presented in the regular client, might that be helpful?