@@ -695,9 +695,7 @@ class SocksClient extends EventEmitter implements SocksClient {
695695
696696 if ( responseCode !== Socks4Response . Granted ) {
697697 this . closeSocket (
698- `${ ERRORS . Socks4ProxyRejectedConnection } - (${
699- Socks4Response [ responseCode ]
700- } )`,
698+ `${ ERRORS . Socks4ProxyRejectedConnection } - (${ Socks4Response [ responseCode ] } )` ,
701699 ) ;
702700 } else {
703701 // Bind response
@@ -740,9 +738,7 @@ class SocksClient extends EventEmitter implements SocksClient {
740738
741739 if ( responseCode !== Socks4Response . Granted ) {
742740 this . closeSocket (
743- `${ ERRORS . Socks4ProxyRejectedIncomingBoundConnection } - (${
744- Socks4Response [ responseCode ]
745- } )`,
741+ `${ ERRORS . Socks4ProxyRejectedIncomingBoundConnection } - (${ Socks4Response [ responseCode ] } )` ,
746742 ) ;
747743 } else {
748744 const remoteHost : SocksRemoteHost = {
@@ -812,7 +808,10 @@ class SocksClient extends EventEmitter implements SocksClient {
812808 this . socks5ChosenAuthType = Socks5Auth . UserPass ;
813809 this . sendSocks5UserPassAuthentication ( ) ;
814810 // If selected Socks v5 auth method is the custom_auth_method, send custom handshake.
815- } else if ( data [ 1 ] === this . options . proxy . custom_auth_method && this . options . proxy . custom_auth_method !== undefined ) {
811+ } else if (
812+ data [ 1 ] === this . options . proxy . custom_auth_method &&
813+ this . options . proxy . custom_auth_method !== undefined
814+ ) {
816815 this . socks5ChosenAuthType = this . options . proxy . custom_auth_method ;
817816 this . sendSocks5CustomAuthentication ( ) ;
818817 } else {
@@ -834,7 +833,9 @@ class SocksClient extends EventEmitter implements SocksClient {
834833 const passwordBuf = Buffer . from ( password , 'utf8' ) ;
835834
836835 // Build packet: Version (1) + UserLen (1) + User (n) + PassLen (1) + Pass (n)
837- const packet = Buffer . allocUnsafe ( 3 + userIdBuf . length + passwordBuf . length ) ;
836+ const packet = Buffer . allocUnsafe (
837+ 3 + userIdBuf . length + passwordBuf . length ,
838+ ) ;
838839 let offset = 0 ;
839840
840841 packet . writeUInt8 ( 0x01 , offset ++ ) ;
@@ -976,9 +977,7 @@ class SocksClient extends EventEmitter implements SocksClient {
976977 if ( header [ 0 ] !== 0x05 || header [ 1 ] !== Socks5Response . Granted ) {
977978 const responseCode = header [ 1 ] ?? 0 ;
978979 this . closeSocket (
979- `${ ERRORS . InvalidSocks5FinalHandshakeRejected } - ${
980- Socks5Response [ responseCode ]
981- } `,
980+ `${ ERRORS . InvalidSocks5FinalHandshakeRejected } - ${ Socks5Response [ responseCode ] } ` ,
982981 ) ;
983982 } else {
984983 // Read address type
@@ -1105,9 +1104,7 @@ class SocksClient extends EventEmitter implements SocksClient {
11051104 if ( header [ 0 ] !== 0x05 || header [ 1 ] !== Socks5Response . Granted ) {
11061105 const responseCode = header [ 1 ] ?? 0 ;
11071106 this . closeSocket (
1108- `${ ERRORS . Socks5ProxyRejectedIncomingBoundConnection } - ${
1109- Socks5Response [ responseCode ]
1110- } `,
1107+ `${ ERRORS . Socks5ProxyRejectedIncomingBoundConnection } - ${ Socks5Response [ responseCode ] } ` ,
11111108 ) ;
11121109 } else {
11131110 // Read address type
0 commit comments