public static function useSocks5($host, $port = 1080, $user = null, $pass = null)
    {
        if ($host === null) {
            self::$_socks5 = [];
        } else {
            self::$_socks5 = ['conn' => 'tcp://' . $host . ':' . $port];
            if ($user !== null && $pass !== null) {
                self::$_socks5['user'] = $user;
                self::$_socks5['pass'] = $pass;
            }
        }
    }
public static function useSocks5($host, $port = 1080, $user = null, $pass = null)
    {
        if ($host === null) {
            self::$_socks5 = [];
        } else {
            self::$_socks5 = ['conn' => 'tcp://' . $host . ':' . $port];
            if ($user !== null && $pass !== null) {
                self::$_socks5['user'] = $user;
                self::$_socks5['pass'] = $pass;
            }
        }
    }
public static function useSocks5 ( $ host , $ port = 1080 , $ user = null , $ pass = null ) { if ( $ host === null ) { self :: $ _socks5 = [ ] ; } else { self :: $ _socks5 = [ 'conn' => 'tcp://' . $ host . ':' . $ port ] ; if ( $ user !== null && $ pass !== null ) { self :: $ _socks5 [ 'user' ] = $ user ; self :: $ _socks5 [ 'pass' ] = $ pass ; } } }
Set socks5 proxy server
@param string $host proxy server address, passed null to disable
@param int $port proxy server port, default to 1080
@param string $user authentication username
@param string $pass authentication password
Set socks5 proxy server