feat(api): implement sorting functionality for nodes and servers

This commit is contained in:
Chang lue Tsen
2025-09-01 13:13:07 -04:00
parent d4850a73f3
commit 26b2afe06d
8 changed files with 210 additions and 8 deletions
+1
View File
@@ -102,6 +102,7 @@ func (adapter *Adapter) Proxies(servers []*node.Node) ([]Proxy, error) {
for _, protocol := range protocols {
if protocol.Type == item.Protocol {
proxies = append(proxies, Proxy{
Sort: item.Sort,
Name: item.Name,
Server: item.Address,
Port: item.Port,
+1
View File
@@ -11,6 +11,7 @@ import (
)
type Proxy struct {
Sort int
Name string
Server string
Port uint16