Browse Source

Force proxying legacy federated downloads in giphy proxy

pull/66/merge
Tulir Asokan 6 months ago
parent
commit
e1038e7d1e
  1. 2
      giphyproxy/go.mod
  2. 4
      giphyproxy/go.sum
  3. 1
      giphyproxy/main.go

2
giphyproxy/go.mod

@ -5,7 +5,7 @@ go 1.22.3
require ( require (
go.mau.fi/util v0.5.0 go.mau.fi/util v0.5.0
gopkg.in/yaml.v3 v3.0.1 gopkg.in/yaml.v3 v3.0.1
maunium.net/go/mautrix v0.19.0-beta.1.0.20240619091941-bd2c40e815bd
maunium.net/go/mautrix v0.19.0-beta.1.0.20240619092812-451658374280
) )
require ( require (

4
giphyproxy/go.sum

@ -43,5 +43,5 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
maunium.net/go/mautrix v0.19.0-beta.1.0.20240619091941-bd2c40e815bd h1:7AHHY/lGiMeTyarMrAwoTUno2KlLAMyeGgQn3XZKMWs=
maunium.net/go/mautrix v0.19.0-beta.1.0.20240619091941-bd2c40e815bd/go.mod h1:cxv1w6+syudmEpOewHYIQT9yO7TM5UOWmf6xEBVI4H4=
maunium.net/go/mautrix v0.19.0-beta.1.0.20240619092812-451658374280 h1:+EHJF8h7obPow7kDnsmGoWN+bTCjHGxCKaH99MldZUI=
maunium.net/go/mautrix v0.19.0-beta.1.0.20240619092812-451658374280/go.mod h1:cxv1w6+syudmEpOewHYIQT9yO7TM5UOWmf6xEBVI4H4=

1
giphyproxy/main.go

@ -50,6 +50,7 @@ func main() {
exerrors.PanicIfNotNil(yaml.Unmarshal(cfgFile, &cfg)) exerrors.PanicIfNotNil(yaml.Unmarshal(cfgFile, &cfg))
mp := exerrors.Must(mediaproxy.NewFromConfig(cfg.BasicConfig, getMedia)) mp := exerrors.Must(mediaproxy.NewFromConfig(cfg.BasicConfig, getMedia))
mp.KeyServer.Version.Name = "maunium-stickerpicker giphy proxy" mp.KeyServer.Version.Name = "maunium-stickerpicker giphy proxy"
mp.ForceProxyLegacyFederation = true
exerrors.PanicIfNotNil(mp.Listen(cfg.ServerConfig)) exerrors.PanicIfNotNil(mp.Listen(cfg.ServerConfig))
} }
} }

Loading…
Cancel
Save