Skip to content

Commit

Permalink
Allow HTTP*S* URLs for the HTTP(S) proxy setting
Browse files Browse the repository at this point in the history
Make the regular expression used to check the validity of the "HTTP(S)
proxy" setting less restrictive such that not only `http://, but also
`https://` URLs are allowed.

Fixes Catfriend1#1269
  • Loading branch information
lenerd committed Feb 11, 2025
1 parent fb2410e commit a14f794
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1176,7 +1176,7 @@ private boolean handleHttpProxyPreferenceChange(Preference preference, String ne
if (newValue.equals("")) {
preference.setSummary(getString(R.string.do_not_use_proxy) + " " + getString(R.string.generic_example) + ": " + getString(R.string.http_proxy_address_example));
return true;
} else if (newValue.matches("^http://.*:\\d{1,5}$")) {
} else if (newValue.matches("^https?://.*:\\d{1,5}$")) {
preference.setSummary(getString(R.string.use_proxy) + " " + newValue);
return true;
} else {
Expand Down

0 comments on commit a14f794

Please sign in to comment.