Exemple #1
0
            TcpForwarder(AuxiliaryInvisibleSocksProxy m, IPEndPoint proxy_socket, byte socket_type, bool this_is_socks, string user, string password)
            {
                _Module   = m;
                _User     = user;
                _Password = password;

                if ((socket_type == 4 || socket_type == 5) && proxy_socket != null)
                {
                    ProxySocket = proxy_socket;
                    bSocketType = socket_type;

                    if (this_is_socks)
                    {
                        MainSocket = new ProxySocket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
                        {
                            ProxyEndPoint = proxy_socket,
                            ProxyType     = socket_type == 4 ? ProxyTypes.Socks4 : ProxyTypes.Socks5,
                            ProxyUser     = string.IsNullOrEmpty(user) ? null : user,
                            ProxyPass     = string.IsNullOrEmpty(password) ? null : password
                        };
                        return;
                    }
                }

                MainSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
            }
            TcpForwarder(AuxiliaryInvisibleSocksProxy m, IPEndPoint proxy_socket, byte socket_type, bool this_is_socks, string user, string password)
            {
                _Module = m;
                _User = user;
                _Password = password;

                if ((socket_type == 4 || socket_type == 5) && proxy_socket != null)
                {
                    ProxySocket = proxy_socket;
                    bSocketType = socket_type;

                    if (this_is_socks)
                    {
                        MainSocket = new ProxySocket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
                        {
                            ProxyEndPoint = proxy_socket,
                            ProxyType = socket_type == 4 ? ProxyTypes.Socks4 : ProxyTypes.Socks5,
                            ProxyUser = string.IsNullOrEmpty(user) ? null : user,
                            ProxyPass = string.IsNullOrEmpty(password) ? null : password
                        };
                        return;
                    }
                }

                MainSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
            }
 public TcpForwarder(AuxiliaryInvisibleSocksProxy m, IPEndPoint proxy_socket, byte socket_type, string user, string password) :
     this(m, proxy_socket, socket_type, false, user, password) { }
Exemple #4
0
 public TcpForwarder(AuxiliaryInvisibleSocksProxy m, IPEndPoint proxy_socket, byte socket_type, string user, string password) :
     this(m, proxy_socket, socket_type, false, user, password)
 {
 }