DCC Socks5 Protocol

 

mIRC uses a passive protocol to establish DCC connections when a client is behind a SOCKS5 firewall.

 

The method will work with SOCKS5 firewalls that both:

 

 i) Support listening/binding to a port of Zero for an incoming connection.

 ii) Assign outgoing connections an IP address that is the same as the SOCKS firewall IP address.

 

The DCC Send/Chat CTCP messages are extended by adding an extra number to the end of the message which uniquely identifies the negotiation, and a port of Zero is specified to indicate that this is a passive connection request. All other fields are identical to a standard DCC Send/Chat message.

 

DCC Chat Passive Protocol

Client A, initiating the DCC Chat, sends the passive connection request below to Client B. The port is set to zero, and the id number is a unique integer identifying the connection:

 

 DCC CHAT nickname address port id

 

If Client A is behind a firewall, the address is the ip address of its SOCKS firewall.

 

Client B receives the message and sets up a listening socket, and sends the IP address and port back to Client A, specifying the id number that identifies Client A's request:

 

 DCC CHAT nickname address port id

 

If Client B is behind a SOCKS5 firewall, it requests a listening socket from the SOCKS5 firewall and specifies Client A's IP address as the binding address.

 

Client A then proceeds to connect to this address to chat. If Client A is behind a SOCKS firewall, it sends a connection request to it.

 

DCC Send Passive Protocol

Client A, initiating the DCC Send, sends the passive connection request below to Client B. The port is set to zero, and the id number is a unique integer identifying the connection:

 

 DCC SEND filename address port filesize id

 

If Client A is behind a firewall, the address is the ip address of its SOCKS firewall.

 

Client B receives the message and sets up a listening socket, and sends the IP address and port back to Client A, specifying the id number that identifies Client A's request:

 

 DCC SEND filename address port filesize id

 

If Client B is behind a SOCKS5 firewall, it requests a listening socket from the SOCKS5 firewall and specifies Client A's IP address as the binding address.

 

Client A then proceeds to connect to this address to begin the transfer. If Client A is behind a SOCKS firewall, it sends a connection request to it.

 

Note: The DCC Resume and Accept protocols in mIRC are also extended by adding the id number to the end of the CTCP message, but otherwise work in exactly the same way.