summaryrefslogtreecommitdiff
path: root/pkg/snowflake/tor.go
blob: 4f4c4e42f834b9ea7f5a8a98d409f74eca1e32a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package snowflake

import (
	"errors"
	"os"
)

func exists(path string) bool {
	_, err := os.Stat(path)
	return !errors.Is(err, os.ErrNotExist)
}

func HasTor() bool {
	return exists("/usr/sbin/tor")
}