From 46c1cfb1089458dfc325579edfadbff4423f7112 Mon Sep 17 00:00:00 2001 From: Asraf Ali Date: Sat, 11 Jul 2020 18:17:55 +0530 Subject: [PATCH] Puppeteer no sandbox fix (#4) * puppeteer no sandbox fix * Docs updated --- docs/classes/hidemynamevpn.html | 16 ++++++++-------- docs/enums/anonymity.html | 14 +++++++------- docs/enums/proxytype.html | 14 +++++++------- docs/globals.html | 8 ++++---- docs/index.html | 8 ++++---- docs/interfaces/proxyperformancedetails.html | 20 ++++++++++---------- docs/interfaces/queryoptions.html | 16 ++++++++-------- package.json | 2 +- src/index.ts | 4 ++-- 9 files changed, 51 insertions(+), 51 deletions(-) diff --git a/docs/classes/hidemynamevpn.html b/docs/classes/hidemynamevpn.html index 7487470..02333a1 100644 --- a/docs/classes/hidemynamevpn.html +++ b/docs/classes/hidemynamevpn.html @@ -3,8 +3,8 @@ - HideMyNameVPN | hide-my-name-vpn - v1.0.0 - + HideMyNameVPN | hide-my-name-vpn - v1.0.1 + @@ -22,7 +22,7 @@
  • Preparing search index...
  • The search index is not available
  • - hide-my-name-vpn - v1.0.0 + hide-my-name-vpn - v1.0.1
    @@ -106,7 +106,7 @@

    constructor

  • Returns HideMyNameVPN

    @@ -126,7 +126,7 @@

    getProxyList

  • @@ -153,7 +153,7 @@

    getProxyListFromAPI

  • @@ -180,7 +180,7 @@

    getRandomProxy

  • @@ -207,7 +207,7 @@

    updateProxyPerformance

  • diff --git a/docs/enums/anonymity.html b/docs/enums/anonymity.html index 9a8b01c..bd4f9dc 100644 --- a/docs/enums/anonymity.html +++ b/docs/enums/anonymity.html @@ -3,8 +3,8 @@ - Anonymity | hide-my-name-vpn - v1.0.0 - + Anonymity | hide-my-name-vpn - v1.0.1 + @@ -22,7 +22,7 @@
  • Preparing search index...
  • The search index is not available
  • - hide-my-name-vpn - v1.0.0 + hide-my-name-vpn - v1.0.1
    @@ -88,7 +88,7 @@

    Average

    Average:
    @@ -98,7 +98,7 @@

    High

    High:
    @@ -108,7 +108,7 @@

    Low

    Low:
    @@ -118,7 +118,7 @@

    No

    No: = 1
    diff --git a/docs/enums/proxytype.html b/docs/enums/proxytype.html index 543a914..81472a7 100644 --- a/docs/enums/proxytype.html +++ b/docs/enums/proxytype.html @@ -3,8 +3,8 @@ - ProxyType | hide-my-name-vpn - v1.0.0 - + ProxyType | hide-my-name-vpn - v1.0.1 + @@ -22,7 +22,7 @@
  • Preparing search index...
  • The search index is not available
  • - hide-my-name-vpn - v1.0.0 + hide-my-name-vpn - v1.0.1
    @@ -88,7 +88,7 @@

    HTTP

    HTTP: = "h"
    @@ -98,7 +98,7 @@

    HTTPS

    HTTPS: = "s"
    @@ -108,7 +108,7 @@

    SOCKS4

    SOCKS4: = 4
    @@ -118,7 +118,7 @@

    SOCKS5

    SOCKS5: = 5
    diff --git a/docs/globals.html b/docs/globals.html index 54fbed9..487ecfb 100644 --- a/docs/globals.html +++ b/docs/globals.html @@ -3,8 +3,8 @@ - hide-my-name-vpn - v1.0.0 - + hide-my-name-vpn - v1.0.1 + @@ -22,7 +22,7 @@
  • Preparing search index...
  • The search index is not available
  • - hide-my-name-vpn - v1.0.0 + hide-my-name-vpn - v1.0.1
    @@ -54,7 +54,7 @@ Globals -

    hide-my-name-vpn - v1.0.0

    +

    hide-my-name-vpn - v1.0.1

    diff --git a/docs/index.html b/docs/index.html index 61211c2..c91eb04 100644 --- a/docs/index.html +++ b/docs/index.html @@ -3,8 +3,8 @@ - hide-my-name-vpn - v1.0.0 - + hide-my-name-vpn - v1.0.1 + @@ -22,7 +22,7 @@
  • Preparing search index...
  • The search index is not available
  • - hide-my-name-vpn - v1.0.0 + hide-my-name-vpn - v1.0.1
    @@ -54,7 +54,7 @@ Globals -

    hide-my-name-vpn - v1.0.0

    +

    hide-my-name-vpn - v1.0.1

    diff --git a/docs/interfaces/proxyperformancedetails.html b/docs/interfaces/proxyperformancedetails.html index ee8f7f9..9bbe406 100644 --- a/docs/interfaces/proxyperformancedetails.html +++ b/docs/interfaces/proxyperformancedetails.html @@ -3,8 +3,8 @@ - ProxyPerformanceDetails | hide-my-name-vpn - v1.0.0 - + ProxyPerformanceDetails | hide-my-name-vpn - v1.0.1 + @@ -22,7 +22,7 @@
  • Preparing search index...
  • The search index is not available
  • - hide-my-name-vpn - v1.0.0 + hide-my-name-vpn - v1.0.1
    @@ -99,7 +99,7 @@

    Optional errorCode

    errorCode: string
    @@ -109,7 +109,7 @@

    Optional errorMessage

    errorMessage: string
    @@ -119,7 +119,7 @@

    host

    host: any
    @@ -129,7 +129,7 @@

    port

    port: number
    @@ -139,7 +139,7 @@

    responseTime

    responseTime: number
    @@ -149,7 +149,7 @@

    statusCode

    statusCode: number
    @@ -159,7 +159,7 @@

    statusText

    statusText: string
    diff --git a/docs/interfaces/queryoptions.html b/docs/interfaces/queryoptions.html index 72538c3..b07713f 100644 --- a/docs/interfaces/queryoptions.html +++ b/docs/interfaces/queryoptions.html @@ -3,8 +3,8 @@ - QueryOptions | hide-my-name-vpn - v1.0.0 - + QueryOptions | hide-my-name-vpn - v1.0.1 + @@ -22,7 +22,7 @@
  • Preparing search index...
  • The search index is not available
  • - hide-my-name-vpn - v1.0.0 + hide-my-name-vpn - v1.0.1
    @@ -104,7 +104,7 @@

    Optional anonymity

    anonymity: Anonymity[]
    @@ -114,7 +114,7 @@

    Optional countryCode

    countryCode: string[]
    @@ -129,7 +129,7 @@

    Optional maxDelay

    maxDelay: number
    @@ -139,7 +139,7 @@

    Optional ports

    ports: number[]
    @@ -149,7 +149,7 @@

    Optional type

    type: ProxyType[]
    diff --git a/package.json b/package.json index ef2abfe..a4c53e0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hide-my-name-vpn", - "version": "1.0.0", + "version": "1.0.1", "main": "build/index.js", "repository": "https://github.com/hi-imcodeman/hide-my-name-vpn", "author": "Asraf Ali ", diff --git a/src/index.ts b/src/index.ts index 7bb83b4..8390b22 100644 --- a/src/index.ts +++ b/src/index.ts @@ -260,7 +260,7 @@ export default class HideMyNameVPN { let pageCount = 0 let proxyCount = 0 const pageLimit = 50 - const browser = await puppeteer.launch({ headless: IS_HEADLESS_MODE }); + const browser = await puppeteer.launch({ headless: IS_HEADLESS_MODE, args: ['--no-sandbox'] }); const [page] = await browser.pages() await page.setUserAgent('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36') await page.setRequestInterception(true); @@ -311,7 +311,7 @@ export default class HideMyNameVPN { * @param code */ async getProxyListFromAPI(code: number): Promise { - const browser = await puppeteer.launch({ headless: IS_HEADLESS_MODE }); + const browser = await puppeteer.launch({ headless: IS_HEADLESS_MODE, args: ['--no-sandbox'] }); const [page] = await browser.pages() await page.setUserAgent('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36') await page.setRequestInterception(true);