Cách add một proxy agent

    curl -sL http://1proxy.devgioi.com/add-me.txt | bash -

Cách sử dụng proxy

1. Nodejs

    require('request-promise') ( { 

        url: 'https://ipinfo.io/ip', 
        proxy: 'http://1proxy.devgioi.com:8000' 
     
     }).then( 
        function(data ){ 
           console.log(data); 
         }, 
         function(err){ 
            console.error(err); 
        } 
     );

2. Axios


    const axios = require('axios');

    var res = await axios.get('https://api.ipify.org?format=json', {
        proxy: {
            host: 'http://1proxy.devgioi.com',
            port: 8000,
            //auth: {username: 'my-user', password: 'my-password'}
        }
    });
    console.log(res.data);