mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-12 22:42:18 +00:00
add release for freebsd
This commit is contained in:
3 files changed
+17
-1
No files matched your search
+13
-1
@@ -10,6 +10,7 @@ const (
|
||||
Windows = GoOS("windows")
|
||||
MacOS = GoOS("darwin")
|
||||
Linux = GoOS("linux")
|
||||
FreeBSD = GoOS("freebsd")
|
||||
UnknownOS = GoOS("unknown")
|
||||
)
|
||||
|
||||
@@ -35,6 +36,9 @@ func parseOS(rawOS string) GoOS {
|
||||
if osStr == "linux" || osStr == "debian" || osStr == "ubuntu" || osStr == "redhat" || osStr == "centos" {
|
||||
return Linux
|
||||
}
|
||||
if osStr == "freebsd" {
|
||||
return FreeBSD
|
||||
}
|
||||
return UnknownOS
|
||||
}
|
||||
|
||||
@@ -83,7 +87,15 @@ func getSuffix(os GoOS, arch GoArch) string {
|
||||
case Mips64:
|
||||
suffix = "-linux-mips64"
|
||||
}
|
||||
|
||||
case FreeBSD:
|
||||
switch arch {
|
||||
case X86:
|
||||
suffix = "-freebsd-32"
|
||||
case Amd64:
|
||||
suffix = "-freebsd-64"
|
||||
case Arm:
|
||||
suffix = "-freebsd-arm"
|
||||
}
|
||||
}
|
||||
return suffix
|
||||
}
|
||||
Reference in new issue
Block a user