Skip to content

Commit 71ef2fc

Browse files
authored
docs: fix spelling mistakes. improve RFC non-compliant behaviour with user/auth (#246)
1 parent eed21e7 commit 71ef2fc

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/client/legacy/connect/proxy/socks/v4/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use super::{Handshaking, SocksError};
1818
/// Tunnel Proxy via SOCKSv4
1919
///
2020
/// This is a connector that can be used by the `legacy::Client`. It wraps
21-
/// another connector, and after getting an underlying connection, it established
21+
/// another connector, and after getting an underlying connection, it establishes
2222
/// a TCP tunnel over it using SOCKSv4.
2323
#[derive(Debug, Clone)]
2424
pub struct SocksV4<C> {

src/client/legacy/connect/proxy/socks/v5/mod.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use super::{Handshaking, SocksError};
1818
/// Tunnel Proxy via SOCKSv5
1919
///
2020
/// This is a connector that can be used by the `legacy::Client`. It wraps
21-
/// another connector, and after getting an underlying connection, it established
21+
/// another connector, and after getting an underlying connection, it establishes
2222
/// a TCP tunnel over it using SOCKSv5.
2323
#[derive(Debug, Clone)]
2424
pub struct SocksV5<C> {
@@ -64,8 +64,9 @@ impl<C> SocksV5<C> {
6464
/// Use User/Pass authentication method during handshake.
6565
///
6666
/// Username and Password must be maximum of 255 characters each.
67-
/// 0 length strings are allowed despite RFC prohibiting it. This is done so that
68-
/// for compatablity with server implementations that require it for IP authentication.
67+
/// 0 length strings are allowed despite RFC prohibiting it. This is done for
68+
/// compatablity with server implementations that use empty credentials
69+
/// to allow returning error codes during IP authentication.
6970
pub fn with_auth(mut self, user: String, pass: String) -> Self {
7071
self.config.proxy_auth = Some((user, pass));
7172
self
@@ -82,10 +83,10 @@ impl<C> SocksV5<C> {
8283

8384
/// Send all messages of the handshake optmistically (without waiting for server response).
8485
///
85-
/// Typical SOCKS handshake with auithentication takes 3 round trips. Optimistic sending
86+
/// A typical SOCKS handshake with user/pass authentication takes 3 round trips Optimistic sending
8687
/// can reduce round trip times and dramatically increase speed of handshake at the cost of
8788
/// reduced portability; many server implementations do not support optimistic sending as it
88-
/// is not defined in the RFC (RFC 1928).
89+
/// is not defined in the RFC.
8990
///
9091
/// Recommended to ensure connector works correctly without optimistic sending before trying
9192
/// with optimistic sending.

0 commit comments

Comments
 (0)