@@ -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 ) ]
2424pub 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