From 37e19b34ec76d51febf790cf55158b59b6bd065c Mon Sep 17 00:00:00 2001 From: Keijia Date: Tue, 17 Aug 2021 00:48:39 +0300 Subject: [PATCH] add socks4 to readme --- README.md | 5 +++-- src/lib.rs | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 62be65d..636456a 100644 --- a/README.md +++ b/README.md @@ -106,7 +106,7 @@ You can control them when including ureq as a dependency. * `charset` enables interpreting the charset part of the Content-Type header (e.g. `Content-Type: text/plain; charset=iso-8859-1`). Without this, the library defaults to Rust's built in `utf-8`. -* `socks-proxy` enables proxy config using the `socks://` and `socks5://` prefix. +* `socks-proxy` enables proxy config using the `socks4://`, `socks4a://`, `socks5://` and `socks://` prefix. ## Plain requests @@ -171,7 +171,7 @@ to encode the request body using that. ## Proxying -ureq supports two kinds of proxies, HTTP [`CONNECT`] and [`SOCKS5`], the former is +ureq supports two kinds of proxies, HTTP [`CONNECT`], [`SOCKS4`] and [`SOCKS5`], the former is always available while the latter must be enabled using the feature `ureq = { version = "*", features = ["socks-proxy"] }`. @@ -237,6 +237,7 @@ the dependencies required by an async API. [tokio]: https://github.com/tokio-rs/tokio#tokio [what-color]: https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function/ [`CONNECT`]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/CONNECT +[`SOCKS4`]: https://en.wikipedia.org/wiki/SOCKS#SOCKS4 [`SOCKS5`]: https://en.wikipedia.org/wiki/SOCKS#SOCKS5 ------------------------------------------------------------------------------ diff --git a/src/lib.rs b/src/lib.rs index 200c902..2c6ac0f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -126,7 +126,7 @@ //! * `charset` enables interpreting the charset part of the Content-Type header //! (e.g. `Content-Type: text/plain; charset=iso-8859-1`). Without this, the //! library defaults to Rust's built in `utf-8`. -//! * `socks-proxy` enables proxy config using the `socks://` and `socks5://` prefix. +//! * `socks-proxy` enables proxy config using the `socks4://`, `socks4a://`, `socks5://` and `socks://` prefix. //! //! # Plain requests //! @@ -191,7 +191,7 @@ //! //! # Proxying //! -//! ureq supports two kinds of proxies, HTTP [`CONNECT`] and [`SOCKS5`], the former is +//! ureq supports two kinds of proxies, HTTP [`CONNECT`], [`SOCKS4`] and [`SOCKS5`], the former is //! always available while the latter must be enabled using the feature //! `ureq = { version = "*", features = ["socks-proxy"] }`. //! @@ -260,6 +260,7 @@ //! [tokio]: https://github.com/tokio-rs/tokio#tokio //! [what-color]: https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function/ //! [`CONNECT`]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/CONNECT +//! [`SOCKS4`]: https://en.wikipedia.org/wiki/SOCKS#SOCKS4 //! [`SOCKS5`]: https://en.wikipedia.org/wiki/SOCKS#SOCKS5 //! //! ------------------------------------------------------------------------------