diff --git a/pkg/utils/dwelling.go b/pkg/utils/dwelling.go new file mode 100644 index 0000000..3547f93 --- /dev/null +++ b/pkg/utils/dwelling.go @@ -0,0 +1,14 @@ +package utils + +import "strings" + +// MainSite returns homepage address depending on network used. +func MainSite(host string) string { + if strings.HasPrefix(host, "i2p") { + return "http://arav.i2p" + } else if strings.HasPrefix(host, "onion") { + return "http://.onion" + } + + return "https://arav.top" +}