From 935c6ad75e48b9488fc2428450f2e5abcd0c31ed Mon Sep 17 00:00:00 2001 From: yggverse Date: Mon, 25 Nov 2024 19:51:11 +0200 Subject: [PATCH] add custom port number support --- src/app/browser/window/tab/item/page.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/app/browser/window/tab/item/page.rs b/src/app/browser/window/tab/item/page.rs index fd8e1f1e..ba14f1b3 100644 --- a/src/app/browser/window/tab/item/page.rs +++ b/src/app/browser/window/tab/item/page.rs @@ -523,7 +523,14 @@ impl Page { // Implement shared [SocketConnectable](https://docs.gtk.org/gio/iface.SocketConnectable.html) interface // * required also on `auth` step ([SNI](https://geminiprotocol.net/docs/protocol-specification.gmi#server-name-indication)) - let connectable = NetworkAddress::new(&uri.host().unwrap(), 1965); + let connectable = NetworkAddress::new( + &uri.host().unwrap(), + if uri.port().is_positive() { + uri.port() as u16 + } else { + 1965 + }, + ); // Create connection client.connect_async(