Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore(vpn/tunnel): sort outgoing fqdns by length#16520

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ethanndickson merged 1 commit intomainfromethan/sort-fqdns
Feb 11, 2025

Conversation

ethanndickson
Copy link
Member

@ethanndicksonethanndickson commentedFeb 11, 2025
edited
Loading

On the Mac app, we want to display the shortest FQDN - we might as well do the sorting as they leave the tunnel.
Right now it's coming from a map, so it's they arrive in a random order each peer update.

@ethanndicksonGraphite App
Copy link
MemberAuthor

This stack of pull requests is managed byGraphite. Learn more aboutstacking.

fqdn=append(fqdn,name.WithTrailingDot())
}
sort.Slice(fqdn,func(i,jint)bool {
returnlen(fqdn[i])<len(fqdn[j])
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't a better sort be by the amount of periods?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Not necessarily? If we have:

dev.wsname.ethan.coderdev.wsname.me.coder

I'd want the latter to be shown. I guess we could do number of periods AND length?

deansheather reacted with thumbs up emoji
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Actually, I don't think it's worth doing that. We want the shortest name because that's what looks the best in the UI. With all the hostnames we set currently, the shortest name is always going to have the least periods. If we ever change that, we can revisit this.

@ethanndicksonethanndickson merged commit0e728a7 intomainFeb 11, 2025
39 checks passed
@ethanndicksonethanndickson deleted the ethan/sort-fqdns branchFebruary 11, 2025 11:36
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsFeb 11, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@deansheatherdeansheatherdeansheather approved these changes

Assignees

@ethanndicksonethanndickson

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@ethanndickson@deansheather

[8]ページ先頭

©2009-2025 Movatter.jp