Sam - May 29, 2018

How to setup AnyProxy.io HTTPS Proxy

An HTTPS proxy server can be set up between your internal network and the internet for an added layer of protection and control. With the HTTPS proxy, your IP addresses and information are limited from hackers. You are also able to control what websites are accessed and sent information within your network.

What is AnyProxy?

AnyProxy provides you with this control as a fully configurable http/https proxy in NodeJS. You can use this platform to set up your socks proxy without a big cost or hassle. Then your proxy can act as the trustworthy middleman that protects your activity on the web.

Set Up NodeJS

You will want to install nodejs-legacy if you are a Debian or Ubuntu user. This JavaScript platform enables scalable network applications that are quick and efficient. It is ideal for a real-time application like AnyProxy that works across multiple devices.

sudo apt-get install nodejs-legacy

Install Anyproxy from NPM

When you have a platform in place to build the module, install the AnyProxy:

Find the perfect Proxy Product.

Proxyrack offers a multiple options to suit most use cases, if you are unsure our 3 Day Trial allows you to test them all.
Security

Residential proxies

Never get blocked, choose your location
View all option available
Vault

Datacenter proxies

Super fast and reliable
View all option available
Try

3 Day Trial

Test all products to find the best fit
View all option available
npm install -g anyproxy

Run Anyproxy

Start AnyProxy in command line, using default port 8001.

anyproxy

Now you can use http proxy server by 127.0.0.1:8001 and visit http://127.0.0.1:8002 to see the http requests.

How to Input into FireFox (Proxy Settings)

You will need to change your default settings in FireFox to use AnyProxy.

Open Firefox Menu and choose Options

Click on Advanced icon in the Option window

Click Settings under Connection

Select “Automatic Proxy Configuration URL” and enter: http://127.0.0.1:8002

Click OK to finish.

[Show Encrypted HTTPS Body Responses]

Install Root Certificate

In order to establish a trusted root, you will want to install the root certificate. First you need to generate one or you will just see a privacy error on your browser.

Start with a command to generate the private key:

openssl genrsa -des3 -out myCA.key 2048

Then choose a pass phrase. You want to keep this private and safe so that no one else can use your private key to create their own root certificate. The command to choose your pass phrase:

Generating RSA private key, 2048 bit long modulus

.................................................................+++

.....................................+++

e is 65537 (0x10001)

Enter pass phrase for myCA.key:

Verifying - Enter pass phrase for myCA.key:

And then generate the root certificate:

openssl req -x509 -new -nodes -key myCA.key -sha256 -days 1825 -out myCA.pem

You will then get to choose the Common Name so that you can recognize your root certificate in a list. The rest of the information asked is not as important. When finished, you will have a myCA.key (private key) and myCA.pem (certificate) files.

Once you’ve gotten your root certificate, you will need to add it to all your devices, laptops and desktops that will access your HTTPS sites. Import your private key and choose “Always Trust” as the setting for your certificate.

[Show Unencrypted HTTPS Body Responses]

Run as a Node Module and Modify the Page Output of a HTTPS Page

You can use AnyProxy to create your own rules in Java Script.

This will allow you to customize the way you handle requests and page output esentially performing a man in the middle modifier on your own requests.

Set up your rules for your proxy like this:

// file: modify_proxyrack_response.js
module.exports = {
  summary: 'Trick my friends into thinking I am the admin of this website',
  *beforeSendResponse(requestDetail, responseDetail) {
    if (requestDetail.url === 'https://www.proxyrack.com/how-to-setup-anyproxy-io-https-proxy') {
      const newResponse = responseDetail.response;
      newResponse.body += '<h1 style="font-size:52px;">ProxyRack Belongs To Me!</h1>';
      return new Promise((resolve, reject) => {
        setTimeout(() => { // delay
          resolve({ response: newResponse });
        }, 1000);
      });
    }
  },
};

Use this rule module to have better control over what information is sent out and how https requests are responded to.Your rule file should always come from a trusted source to ensure you don’t face an unknown security risk. You will be able to view the request log by visiting http://127.0.0.1:8002 and checking out the list.

This allows the proxy server to access the server instead of being stopped prematurely. AnyProxy acts as the middle man to help increase privacy and the rule module will help reduce requests that aren’t valid. All requests are responded to by AnyProxy to send additional responseDetail beforeSendResponse. When AnyProxy gets a request, the rule module is called and the request is not dealt if the function returns true. The client will either return null, change the response status code or provide the response content.

Setting up your own proxy gives you control. If you ever want to reset your proxy settings, you can manually remove the lines specifying your changes from your .pmrc file.

Find the perfect Proxy Product.

Proxyrack offers a multiple options to suit most use cases, if you are unsure our 3 Day Trial allows you to test them all.
Security

Residential proxies

Never get blocked, choose your location
View all option available
Vault

Datacenter proxies

Super fast and reliable
View all option available
Try

3 Day Trial

Test all products to find the best fit
View all option available

Get Started by signing up for a Proxy Product