-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Conversation
Similar to matrix-org#1689, but for endpoint.py
Can one of the admins verify this patch? |
4 similar comments
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
@@ -13,7 +13,7 @@ | |||
# See the License for the specific language governing permissions and | |||
# limitations under the License. | |||
|
|||
from twisted.internet.endpoints import SSL4ClientEndpoint, TCP4ClientEndpoint | |||
from twisted.internet.endpoints import HostnameEndpoint, wrapClientTLS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TCP4ClientEndpoint
is used as a default value in in the SpiderEndpoint
and SRVClientEndpoint
init functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should probably be removed from there; TCP4ClientEndpoint
is only interesting as a low-level implementation detail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly pointing it out as another place where it should have been replaced with HostnameEndpoint, but since they're only instantiated in one place, I'm not sure whether it would be simpler to just remove the default value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha; yeah. I'd be inclined to eliminate the default, personally; I find that default args are useful a lot more rarely than they seem like they'd be useful :)
transport_endpoint = SSL4ClientEndpoint | ||
endpoint_kw_args.update(sslContextFactory=ssl_context_factory) | ||
def transport_endpoint(reactor, host, port): | ||
return wrapClientTLS(ssl_context_factory, HostnameEndpoint(reactor, host, port)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wrapper also needs to take a timeout parameter for use in HostnameEndpoint.
Looks good other than those small things, and I've tested it and it seems to be working! |
Federation seems to be at least partially broken over IPv6 though. I can join rooms and send/accept invites over IPv6, but messages aren't being synced. Edit: It seems like it's actually working after switching to a trusted SSL cert. |
Signed-off-by: Johannes Löthberg <[email protected]>
Since this has been superseded, shall I close it? |
Similar to #1689, but for endpoint.py