feat: create standalone native fnOS repository

This commit is contained in:
2026-10-02 15:19:09 +08:00
parent 69f3c30fab
commit 6725fc131d
492 changed files with 94023 additions and 3 deletions
+17
View File
@@ -0,0 +1,17 @@
package traffic
import (
"fmt"
"strings"
)
func EndpointKey(host string, port int) string {
host = strings.ToLower(strings.TrimSpace(host))
if i := strings.Index(host, ":"); i > 0 {
host = host[:i]
}
if port <= 0 {
return host
}
return fmt.Sprintf("%s:%d", host, port)
}