stevenarella
stevenarella copied to clipboard
Unable to ping bungeecord servers
When pinging BungeeCord servers, the server list only shows "Connecting", "Connection timed out (os error 110)" or "Connection refused (os error 111)" while connecting with original minecraft works fine.
Previous BungeeCord problems: #125 #142 May need to add some special connection handling for Bungee Or does the BungeeCord server have an SRV record? If so, not yet supported: https://github.com/iceiix/stevenarella/blob/eb452abbb5b34d7dd89610f51990527605d3fafc/protocol/src/protocol/mod.rs#L1046
// TODO SRV record support
see also: https://github.com/iceiix/stevenarella/issues/401 server_list: automatically show LAN servers
I tried it with Hypixel and some others and it didn't work, I don't know if they have a SRV record.
Should I close this issue? I fixed the issue for my project, but I can leave it open if it has any value to this project.
Yes I would like to fix this here too, curious of your fix? Couldn't find much searching for https://github.com/terrarier2111/Leafish/search?q=bungeecord - maybe this: SRV lookup in https://github.com/terrarier2111/Leafish/blame/f44cf08d818f755e9ca834ec6c55ee3912e67312/protocol/src/protocol/mod.rs#L1132-L1151
impl Conn {
fn get_server_addresses(mut hostname: &str) -> Vec<String> {
let mut addresses = vec![];
let parts = hostname.split(':').collect::<Vec<&str>>();
if parts.len() > 1 {
addresses.push(hostname.to_string());
hostname = parts[0];
}
let records = RESOLVER.srv_lookup(format!("_minecraft._tcp.{}", hostname));
if records.is_ok() {
for record in records.unwrap() {
debug!("{}:{}", record.target(), record.port());
addresses.push(format!("{}:{}", record.target(), record.port()));
}
}
addresses.push(format!("{}:25565", hostname));
addresses
}
added in https://github.com/terrarier2111/Leafish/commit/d8ce7ec59ae90e80cde3d8c6af319ee672157acc