setup.go 316 B

123456789101112131415161718192021
  1. //go:build linux || darwin
  2. package libbox
  3. import (
  4. C "github.com/sagernet/sing-box/constant"
  5. "github.com/dustin/go-humanize"
  6. )
  7. func SetBasePath(path string) {
  8. C.SetBasePath(path)
  9. }
  10. func Version() string {
  11. return C.Version
  12. }
  13. func FormatBytes(length int64) string {
  14. return humanize.IBytes(uint64(length))
  15. }