summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Robertson <davidr@element.io>2023-03-01 19:08:26 +0000
committerDavid Robertson <davidr@element.io>2023-03-02 16:21:45 +0000
commit15093ea48bf61809b9fc04e89c5ab4f37106877d (patch)
treebbddee434a2842676358375734a9d3b66aa5d2df
parentWIP: make proxy requests (diff)
downloadsynapse-15093ea48bf61809b9fc04e89c5ab4f37106877d.tar.xz
Testing
- Force demo script to listen for proxy
- Refuse to make fed request if restricted
-rwxr-xr-xdemo/start.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/demo/start.sh b/demo/start.sh
index fdd75816fb..57975b78c9 100755
--- a/demo/start.sh
+++ b/demo/start.sh
@@ -18,6 +18,7 @@ for port in 8080 8081 8082; do
     echo "Starting server on port $port... "
 
     https_port=$((port + 400))
+    proxy_port=$((port + 100))
     mkdir -p demo/$port
     pushd demo/$port || exit
 
@@ -65,11 +66,21 @@ for port in 8080 8081 8082; do
 			    resources:
 			      - names: [client, federation]
 			        compress: false
+
+			  - port: $proxy_port
+			    bind_addresses: ['::1', '127.0.0.1']
+			    type: outbound_federation_proxy
+
 			PORTLISTENERS
 			)
 
             echo "${listeners}"
 
+            echo "outbound_federation_proxied_via:"
+            echo "  master:"
+            echo "    host: localhost"
+            echo "    port: $proxy_port"
+
             # Disable TLS for the servers
             printf '\n\n# Disable TLS for the servers.'
             echo '# DO NOT USE IN PRODUCTION'