Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Unable to ping bungeecord servers #573

Open
terrarier2111 opened this issue Jul 4, 2021 · 4 comments
Open

Unable to ping bungeecord servers #573

terrarier2111 opened this issue Jul 4, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@terrarier2111
Copy link
Contributor

terrarier2111 commented Jul 4, 2021

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.

@iceiix
Copy link
Owner

iceiix commented Jul 18, 2021

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:

// TODO SRV record support

        // TODO SRV record support

see also: #401 server_list: automatically show LAN servers

@iceiix iceiix added the bug Something isn't working label Jul 18, 2021
@terrarier2111
Copy link
Contributor Author

terrarier2111 commented Jul 20, 2021

I tried it with Hypixel and some others and it didn't work, I don't know if they have a SRV record.

@terrarier2111
Copy link
Contributor Author

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.

@iceiix
Copy link
Owner

iceiix commented Sep 6, 2021

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 terrarier2111/Leafish@d8ce7ec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants