Hotfix for Proxy
This commit is contained in:
@@ -27,7 +27,6 @@ func Start(ctx context.Context) error {
|
|||||||
|
|
||||||
svc := service.New()
|
svc := service.New()
|
||||||
_qbit := qbit.New()
|
_qbit := qbit.New()
|
||||||
_proxy := proxy.NewProxy()
|
|
||||||
srv := server.New()
|
srv := server.New()
|
||||||
webRoutes := web.New(_qbit).Routes()
|
webRoutes := web.New(_qbit).Routes()
|
||||||
qbitRoutes := _qbit.Routes()
|
qbitRoutes := _qbit.Routes()
|
||||||
@@ -40,7 +39,7 @@ func Start(ctx context.Context) error {
|
|||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
go func() {
|
go func() {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
if err := _proxy.Start(ctx); err != nil {
|
if err := proxy.NewProxy().Start(ctx); err != nil {
|
||||||
errChan <- err
|
errChan <- err
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ type Proxy struct {
|
|||||||
LogLevel string `json:"log_level"`
|
LogLevel string `json:"log_level"`
|
||||||
Username string `json:"username"`
|
Username string `json:"username"`
|
||||||
Password string `json:"password"`
|
Password string `json:"password"`
|
||||||
CachedOnly *bool `json:"cached_only"`
|
CachedOnly bool `json:"cached_only"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type QBitTorrent struct {
|
type QBitTorrent struct {
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ func NewProxy() *Proxy {
|
|||||||
enabled: cfg.Enabled,
|
enabled: cfg.Enabled,
|
||||||
username: cfg.Username,
|
username: cfg.Username,
|
||||||
password: cfg.Password,
|
password: cfg.Password,
|
||||||
cachedOnly: *cfg.CachedOnly,
|
cachedOnly: cfg.CachedOnly,
|
||||||
logger: logger.NewLogger("proxy", cfg.LogLevel, os.Stdout),
|
logger: logger.NewLogger("proxy", cfg.LogLevel, os.Stdout),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user