guri: the default port for SOCKS URLs is 1080

This is true for socks://, socks4://, socks4a://, and socks5://. I could
list them individually and risk breaking in the future if socks6:// ever
exists, or test for "socks" and risk breaking if a future URL scheme
begins with "socks" but doesn't use port 1080. I picked the latter.
This commit is contained in:
Michael Catanzaro 2023-05-24 17:36:03 -05:00
parent 5c50aec060
commit 42cb8dfb95

View File

@ -820,6 +820,9 @@ default_scheme_port (const char *scheme)
if (strcmp (scheme, "ftp") == 0)
return 21;
if (strstr (scheme, "socks") == scheme)
return 1080;
return -1;
}