summaryrefslogtreecommitdiff
path: root/pkg/app/config.go
diff options
context:
space:
mode:
authordavy wybiral <davy.wybiral@gmail.com>2019-07-03 16:46:59 -0500
committerGitHub <noreply@github.com>2019-07-03 16:46:59 -0500
commitd38a88be8e94873187c3b82e9b3827faa3875541 (patch)
treea50e298a413d813805617814e3a9b68e2b8ae77c /pkg/app/config.go
parent6b8d872d680d019827cc45881186cce3f83f764a (diff)
Tor (#12)
* added tor support * change text
Diffstat (limited to 'pkg/app/config.go')
-rw-r--r--pkg/app/config.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/pkg/app/config.go b/pkg/app/config.go
index c2ecb45..ec27435 100644
--- a/pkg/app/config.go
+++ b/pkg/app/config.go
@@ -10,6 +10,7 @@ type Config struct {
Library []*PathConfig `json:"library"`
Server *ServerConfig `json:"server"`
Feed *FeedConfig `json:"feed"`
+ Tor *TorConfig `json:"tor,omitempty"`
}
// PathConfig settings for media library path.
@@ -37,6 +38,19 @@ type FeedConfig struct {
Copyright string `json:"copyright"`
}
+// TorConfig stores tor configuration.
+type TorConfig struct {
+ Enable bool `json:"enable"`
+ Controller *TorControllerConfig `json:"controller"`
+}
+
+// TorControllerConfig stores tor controller configuration.
+type TorControllerConfig struct {
+ Host string `json:"host"`
+ Port int `json:"port"`
+ Password string `json:"password,omitempty"`
+}
+
// DefaultConfig returns Config initialized with default values.
func DefaultConfig() *Config {
return &Config{
@@ -53,6 +67,13 @@ func DefaultConfig() *Config {
Feed: &FeedConfig{
ExternalURL: "http://localhost",
},
+ Tor: &TorConfig{
+ Enable: false,
+ Controller: &TorControllerConfig{
+ Host: "127.0.0.1",
+ Port: 9051,
+ },
+ },
}
}