Skip to content

Commit

Permalink
Allow HTTP*S* URLs for the HTTP(S) proxy setting (#1276)
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 #1269
  • Loading branch information
lenerd authored Feb 11, 2025
1 parent fb2410e commit 35862e6
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 35862e6

Please sign in to comment.