Skip to content

Commit 89b2cff

Browse files
fix(proxy): Fix SOCKS4 proxy protocol parsing and matching (#219)
Co-authored-by: Sean McArthur <sean@seanmonstar.com>
1 parent 39fd779 commit 89b2cff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/client/proxy/matcher.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ fn parse_env_uri(val: &str) -> Option<Intercept> {
341341
if s == &http::uri::Scheme::HTTP || s == &http::uri::Scheme::HTTPS {
342342
is_httpish = true;
343343
s.clone()
344-
} else if s.as_str() == "socks5" || s.as_str() == "socks5h" {
344+
} else if matches!(s.as_str(), "socks4" | "socks4a" | "socks5" | "socks5h") {
345345
s.clone()
346346
} else {
347347
// can't use this proxy scheme

0 commit comments

Comments
 (0)