Giter Club home page Giter Club logo

gologin's Introduction

class GoLogin - class for working with gologin.app API

Getting Started

GoLogin supported Linux platform, under MacOS and Windows in work

Installation

npm install https://github.com/gologinapp/gologin.git

for running example.js install puppeteer-core

npm install puppeteer-core

Methods

constructor

  • options <[Object]> Options for profile
    • token <[string]> your API token
    • profile_id <[string]> profile ID
    • executablePath <[string]> path to Orbita browser
    • vncPort <[integer]> port of VNC server if you using it

Where is token? token is here

Token API in Settings

const GoLogin = require('./gologin');
const GL = new GoLogin({
    token: 'yU0token',
    profile_id: 'yU0Pr0f1leiD',
    executablePath: '/usr/bin/orbita-browser/chrome',
});

start()

  • returns: string

starting browser with profile id, returning WebSocket url for puppeteer

stop()

stoppin browser with profile id

create(options)

  • returns: string - profile_id

  • options <[Object]> Options for profile

    • name <[string]> profile name
    • notes <[String]> notes for profile
    • browserType <[String]> "chrome"
    • os <[String]> lin, mac or win
    • startUrl: <[String]>
    • googleServicesEnabled <[true, false]>
    • lockEnabled <[true, false]>
    • navigator <[Object]> navigator options
      • userAgent <[String]>
      • resolution <[String]>
      • language <[String]>
      • platform <[String]>
      • doNotTrack <[true, false]>
      • hardwareConcurrency <[Integer]>
    • storage <[Object]>
      • local <[true, false]>
      • extensions <[true, false]>
      • bookmarks <[true, false]>
      • history <[true, false]>
      • passwords <[true, false]>
    • proxyEnabled <[true, false]>
    • proxy <[Object]>
      • mode <[String]> proxy type "http"
      • host <[String]>
      • port <[Integer]>
      • username: <[String]>
      • password: <[String]>
      • autoProxyRegion: <[String]>
    • dns <[String]>
    • plugins <[Object]>
      • enableVulnerable <[true, false]>
      • enableFlash <[true, false]>
    • timezone <[Object]>
      • enabled <[true, false]>
      • fillBasedOnIp <[true, false]>
      • timezone: <[String]>
    • geolocation <[Object]>
      • mode <[String]> "prompt"
      • enabled <[true, false]>
      • customize <[true, false]>
      • fillBasedOnIp <[true, false]>
    • audioContext
      • mode <["on", "off"]>
      • noise <[Integer]>
    • canvas
      • mode <["on"], ["off"]>
      • noise <[Integer]>
    • fonts
      • families <[Array]>
      • enableMasking <[true, false]>
      • enableDomRect <[true, false]>
    • mediaDevices
      • videoInputs <[Integer]>
      • audioInputs <[Integer]>
      • audioOutputs <[Integer]>
      • enableMasking <[true, false]>
    • webRTC <[Object]>
      • mode <[String]>
      • enabled <[true, false]>
      • customize <[true, false]>
      • fillBasedOnIp <[true, false]>
      • publicIp <[String]>
      • localIps <[Array]>
    • webGL <[Object]>
      • mode <[String]> "noise"
      • getClientRectsNoise <[Integer]>
      • noise <[Integer]>
    • webGLMetadata <[Object]>
      • mode mask
      • vendor: <[String]>
      • renderer: <[String]>
    • extensions <[Object]>
      • enabled <[true, false]>
      • preloadCustom <[true, false]>
      • names <[Array]>
    • profile: <[String]>,
    • googleClientId: <[String]>

create new profile and returns profile_id

update(options)

  • options <[Object]> Options for profile
    • name <[string]> profile name
    • notes <[String]> notes for profile
    • browserType <[String]> "chrome"
    • os <[String]> lin, mac or win
    • startUrl: <[String]>
    • googleServicesEnabled <[true, false]>
    • lockEnabled <[true, false]>
    • navigator <[Object]> navigator options
      • userAgent <[String]>
      • resolution <[String]>
      • language <[String]>
      • platform <[String]>
      • doNotTrack <[true, false]>
      • hardwareConcurrency <[Integer]>
    • storage <[Object]>
      • local <[true, false]>
      • extensions <[true, false]>
      • bookmarks <[true, false]>
      • history <[true, false]>
      • passwords <[true, false]>
    • proxyEnabled <[true, false]>
    • proxy <[Object]>
      • mode <[String]> proxy type "http"
      • host <[String]>
      • port <[Integer]>
      • username: <[String]>
      • password: <[String]>
      • autoProxyRegion: <[String]>
    • dns <[String]>
    • plugins <[Object]>
      • enableVulnerable <[true, false]>
      • enableFlash <[true, false]>
    • timezone <[Object]>
      • enabled <[true, false]>
      • fillBasedOnIp <[true, false]>
      • timezone: <[String]>
    • geolocation <[Object]>
      • mode <[String]> "prompt"
      • enabled <[true, false]>
      • customize <[true, false]>
      • fillBasedOnIp <[true, false]>
    • audioContext
      • mode <["on", "off"]>
      • noise <[Integer]>
    • canvas
      • mode <["on"], ["off"]>
      • noise <[Integer]>
    • fonts
      • families <[Array]>
      • enableMasking <[true, false]>
      • enableDomRect <[true, false]>
    • mediaDevices
      • videoInputs <[Integer]>
      • audioInputs <[Integer]>
      • audioOutputs <[Integer]>
      • enableMasking <[true, false]>
    • webRTC <[Object]>
      • mode <[String]>
      • enabled <[true, false]>
      • customize <[true, false]>
      • fillBasedOnIp <[true, false]>
      • publicIp <[String]>
      • localIps <[Array]>
    • webGL <[Object]>
      • mode <[String]> "noise"
      • getClientRectsNoise <[Integer]>
      • noise <[Integer]>
    • webGLMetadata <[Object]>
      • mode mask
      • vendor: <[String]>
      • renderer: <[String]>
    • extensions <[Object]>
      • enabled <[true, false]>
      • preloadCustom <[true, false]>
      • names <[Array]>
    • profile: <[String]>,
    • googleClientId: <[String]>

update profile metadata

delete()

delete profile

example.js

const puppeteer = require('puppeteer-core');
const GoLogin = require('./gologin');

(async () =>{
    const GL = new GoLogin({
        token: 'yU0token',
        profile_id: 'yU0Pr0f1leiD',
        executablePath: '/usr/bin/orbita-browser/chrome',
    });

    const wsUrl = await GL.start(); 

    const browser = await puppeteer.connect({
        browserWSEndpoint: wsUrl.toString(), 
        ignoreHTTPSErrors: true,
    });

    const page = await browser.newPage();
    await page.goto('https://myip.gologin.app/mini');   
    console.log(await page.content());
    await browser.close();
    await GL.stop();
})();

Running example:

DEBUG=gologin* node example.js

gologin's People

Contributors

mixolap avatar vmestecdn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.