Support network proxies
This commit is contained in:
@@ -13,6 +13,7 @@ type ConfigInterface interface {
|
||||
GetPort() string
|
||||
GetUsername() string
|
||||
GetPassword() string
|
||||
GetProxy() string
|
||||
GetDirectories() []string
|
||||
MeetsConditions(directory, torrentName string, torrentSize int64, torrentIDs, fileNames []string, fileSizes []int64) bool
|
||||
GetOnLibraryUpdate() string
|
||||
@@ -39,6 +40,7 @@ type ZurgConfig struct {
|
||||
Port string `yaml:"port" json:"port"`
|
||||
Username string `yaml:"username" json:"username"`
|
||||
Password string `yaml:"password" json:"password"`
|
||||
Proxy string `yaml:"proxy" json:"proxy"`
|
||||
NumOfWorkers int `yaml:"concurrent_workers" json:"concurrent_workers"`
|
||||
RefreshEverySeconds int `yaml:"check_for_changes_every_secs" json:"check_for_changes_every_secs"`
|
||||
|
||||
@@ -92,6 +94,10 @@ func (z *ZurgConfig) GetPassword() string {
|
||||
return z.Password
|
||||
}
|
||||
|
||||
func (z *ZurgConfig) GetProxy() string {
|
||||
return z.Proxy
|
||||
}
|
||||
|
||||
func (z *ZurgConfig) GetNumOfWorkers() int {
|
||||
if z.NumOfWorkers == 0 {
|
||||
return 50
|
||||
|
||||
Reference in New Issue
Block a user