import React, { useState } from 'react'; import ContentWrapper from './ContentWrapper'; import style from '../../less/main.less'; export default ({ onClick }) => { const [fedPort, setFedPort] = useState(""); const [clientPort, setClientPort] = useState(""); const [clientPortValid, setClientPortValid] = useState(true) const [fedPortValid, setFedPortValid] = useState(true) const updateValidity = (port, setValid) => setValid( !port || (!isNaN(port) && 0 < port && port <= 65535) ) const onFederationChange = event => { const val = event.target.value; setFedPort(val); updateValidity(val, setFedPortValid); } const onClientChange = event => { const val = event.target.value; setClientPort(val); updateValidity(val, setClientPortValid); } return

Outward facing port selection

Normally other matrix servers will try to contact the Synapse install's server on port 8448 and clients, such as riot, riotX, neo etc., will try to contact the install server on port 443.

Delegation let's us tell those servers and clients to try a different port! (Flexible!)

It's perfectly fine to leave the defaults. Only change them if you have a real need to.

I would recommend using unprivileged ports but I would recommend the default ports more strongly.

Please choose the port for other matrix servers to contact:

Please choose the port for clients to contact:

}