[GH-ISSUE #861] Implement natural sorting for IP addresses. #3615

Closed
opened 2026-03-13 12:14:03 +03:00 by kerem · 5 comments
Owner

Originally created by @XiangJiang-Wang on GitHub (Feb 14, 2025).
Original GitHub issue: https://github.com/1Remote/1Remote/issues/861

Originally assigned to: @VShawn on GitHub.

目前UI界面的目标地址,排序是乱的,希望能按IP地址顺序排序。

Originally created by @XiangJiang-Wang on GitHub (Feb 14, 2025). Original GitHub issue: https://github.com/1Remote/1Remote/issues/861 Originally assigned to: @VShawn on GitHub. 目前UI界面的目标地址,排序是乱的,希望能按IP地址顺序排序。
kerem 2026-03-13 12:14:03 +03:00
Author
Owner

@VShawn commented on GitHub (Feb 14, 2025):

Image

你点一下标题就按IP地址排序了

<!-- gh-comment-id:2658166098 --> @VShawn commented on GitHub (Feb 14, 2025): ![Image](https://github.com/user-attachments/assets/98f7fae5-623a-40b2-96cb-28aa0a37f442) 你点一下标题就按IP地址排序了
Author
Owner

@XiangJiang-Wang commented on GitHub (Feb 14, 2025):

我知道可以排序,但是排序结果不是按数值大小顺序排的,显得很凌乱。

Image

<!-- gh-comment-id:2658169485 --> @XiangJiang-Wang commented on GitHub (Feb 14, 2025): 我知道可以排序,但是排序结果不是按数值大小顺序排的,显得很凌乱。 ![Image](https://github.com/user-attachments/assets/05fd89d9-9a2f-4157-b7cd-269d2b27be63)
Author
Owner

@VShawn commented on GitHub (Feb 14, 2025):

这个意思啊,这里要用到自然语言排序才能做到按IP每个段落的数字依次排序,但同时还要兼容域名地址和IPV6地址,对这个排序算法我没有好的想法,所以一直做不出来,你有什么意见么?

我希望首先按字符排序,如果整块为数字则再按数字大小排序

127.0.0.1:3389
1F65:0db8:85a3:0000:0000:8a2e:0370:7334
1Remote.org
214.241.3.4:3389
214.241.3.123:3389
<!-- gh-comment-id:2658184313 --> @VShawn commented on GitHub (Feb 14, 2025): 这个意思啊,这里要用到自然语言排序才能做到按IP每个段落的数字依次排序,但同时还要兼容域名地址和IPV6地址,对这个排序算法我没有好的想法,所以一直做不出来,你有什么意见么? 我希望首先按字符排序,如果整块为数字则再按数字大小排序 ``` 127.0.0.1:3389 1F65:0db8:85a3:0000:0000:8a2e:0370:7334 1Remote.org 214.241.3.4:3389 214.241.3.123:3389 ```
Author
Owner

@github-actions[bot] commented on GitHub (Mar 25, 2025):

This issue is stale because it has been open for 30 days with no activity.

<!-- gh-comment-id:2749854787 --> @github-actions[bot] commented on GitHub (Mar 25, 2025): This issue is stale because it has been open for 30 days with no activity.
Author
Owner

@VShawn commented on GitHub (Mar 25, 2025):

oh I've done this ticket.

<!-- gh-comment-id:2749987432 --> @VShawn commented on GitHub (Mar 25, 2025): oh I've done this ticket.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/1Remote#3615
No description provided.