mirror of
https://github.com/hrfee/jfa-go.git
synced 2024-11-13 22:00:10 +00:00
proxy: use for updater
don't know how I missed before.
This commit is contained in:
parent
6bad293f74
commit
8307d3da90
3
main.go
3
main.go
@ -557,6 +557,7 @@ func start(asDaemon, firstCall bool) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if app.proxyEnabled {
|
if app.proxyEnabled {
|
||||||
|
app.updater.SetTransport(app.proxyTransport)
|
||||||
app.jf.SetTransport(app.proxyTransport)
|
app.jf.SetTransport(app.proxyTransport)
|
||||||
for _, c := range app.thirdPartyServices {
|
for _, c := range app.thirdPartyServices {
|
||||||
c.SetTransport(app.proxyTransport)
|
c.SetTransport(app.proxyTransport)
|
||||||
@ -682,7 +683,7 @@ func flagPassed(name string) (found bool) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// @title jfa-go internal API
|
// @title jfa-go internal API
|
||||||
// @version 0.5.1
|
// @version 0.5.2
|
||||||
// @description API for the jfa-go frontend
|
// @description API for the jfa-go frontend
|
||||||
// @contact.name Harvey Tindall
|
// @contact.name Harvey Tindall
|
||||||
// @contact.email hrfee@hrfee.dev
|
// @contact.email hrfee@hrfee.dev
|
||||||
|
@ -130,6 +130,11 @@ type Updater struct {
|
|||||||
binary string
|
binary string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetTransport sets the http.Transport to use for requests. Can be used to set a proxy.
|
||||||
|
func (ud *Updater) SetTransport(t *http.Transport) {
|
||||||
|
ud.httpClient.Transport = t
|
||||||
|
}
|
||||||
|
|
||||||
func newUpdater(buildroneURL, namespace, repo, version, commit, buildType string) *Updater {
|
func newUpdater(buildroneURL, namespace, repo, version, commit, buildType string) *Updater {
|
||||||
// fmt.Printf(`Updater intializing with "%s", "%s", "%s", "%s", "%s", "%s"\n`, buildroneURL, namespace, repo, version, commit, buildType)
|
// fmt.Printf(`Updater intializing with "%s", "%s", "%s", "%s", "%s", "%s"\n`, buildroneURL, namespace, repo, version, commit, buildType)
|
||||||
bType := off
|
bType := off
|
||||||
|
Loading…
Reference in New Issue
Block a user