mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
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:
parent
5c50aec060
commit
42cb8dfb95
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user