mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-10 16:33:11 -06:00
common/test/server: Add StartProxy to create a reverse proxy
This commit is contained in:
parent
39ec5fdf63
commit
9a48de7db3
|
|
@ -98,3 +98,17 @@ func StartServer(serverType string, serverArgs []string, suffix, configFilename,
|
|||
serverArgs,
|
||||
)
|
||||
}
|
||||
|
||||
// StartProxy creates a reverse proxy
|
||||
func StartProxy(bindAddr, syncAddr, clientAddr, mediaAddr string) (*exec.Cmd, chan error) {
|
||||
proxyArgs := []string{
|
||||
"--bind-address", bindAddr,
|
||||
"--sync-api-server-url", syncAddr,
|
||||
"--client-api-server-url", clientAddr,
|
||||
"--media-api-server-url", mediaAddr,
|
||||
}
|
||||
return CreateBackgroundCommand(
|
||||
filepath.Join(filepath.Dir(os.Args[0]), "client-api-proxy"),
|
||||
proxyArgs,
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue