Anonymity of Proxy

BadB

Professional
Messages
1,709
Reaction score
1,700
Points
113
The exchange of information in Internet is made by the "client - server" model. A client sends a request (what files he needs) and a server sends a reply (required files). For close cooperation (full understanding) between a client and a server the client sends additional information about itself: a version and a name of an operating system, configuration of a browser (including its name and version) etc. This information can be necessary for the server in order to know which web-page should be given (open) to the client. There are different variants of web-pages for different configurations of browsers. However, as long as web-pages do not usually depend on browsers, it makes sense to hide this information from the web-server.

What your browser transmits to a web-server:
a name and a version of an operating system
a name and a version of a browser
configuration of a browser (display resolution, color depth, java / javascript support, ...)
IP-address of a client
Other information

The most important part of such information (and absolutely needless for a web-server) is information about IP-address. Using your IP it is possible to know about you the following:
a country where you are from
a city
your provider's name and e-mail
your physical address

Information, transmitted by a client to a server is available (accessible) for a server as environment variables. Every information unit is a value of some variable. If any information unit is not transmitted, then corresponding variable will be empty (its value will be undetermined).

These are some environment variables:

REMOTE_ADDR ? IP address of a client

HTTP_VIA ? if it is not empty, then a proxy is used. Value is an address (or several addresses) of a proxy server, this variable is added by a proxy server itself if you use one.

HTTP_X_FORWARDED_FOR ? if it is not empty, then a proxy is used. Value is a real IP address of a client (your IP), this variable is also added by a proxy server if you use one.

HTTP_ACCEPT_LANGUAGE ? what language is used in browser (what language a page should be displayed in)

HTTP_USER_AGENT ? so called "a user's agent". For all browsers this is Mozilla. Furthermore, browser's name and version (e.g. MSIE 5.5) and an operating system (e.g. Windows 98) is also mentioned here.

HTTP_HOST ? is a web server's name

This is a small part of environment variables. In fact there are much more of them (DOCUMENT_ROOT, HTTP_ACCEPT_ENCODING, HTTP_CACHE_CONTROL, HTTP_CONNECTION, SERVER_ADDR, SERVER_SOFTWARE, SERVER_PROTOCOL, ...). Their quantity can depend on settings of both a server and a client.

These are examples of variable values:

REMOTE_ADDR = 194.85.1.1
HTTP_ACCEPT_LANGUAGE = ru
HTTP_USER_AGENT = Mozilla/4.0 (compatible; MSIE 5.0; Windows 98)
HTTP_HOST = www.webserver.ru
HTTP_VIA = 194.85.1.1 (Squid/2.4.STABLE7)
HTTP_X_FORWARDED_FOR = 194.115.5.5

Anonymity at work in Internet is determined by what environment variables "hide" from a web-server.

If a proxy server is not used, then environment variables look in the following way:

REMOTE_ADDR = your IP
HTTP_VIA = not determined
HTTP_X_FORWARDED_FOR = not determined

According to how environment variables "hided" by proxy servers, there are several types of proxies
Transparent Proxies

They do not hide information about your IP address:

REMOTE_ADDR = proxy IP
HTTP_VIA = proxy IP
HTTP_X_FORWARDED_FOR = your IP

The function of such proxy servers is not the improvement of your anonymity in Internet. Their purpose is information cashing, organization of joint access to Internet of several computers, etc.
Anonymous Proxies

All proxy servers, that hide a client's IP address in any way are called anonymous proxies

Simple Anonymous Proxies

These proxy servers do not hide a fact that a proxy is used, however they replace your IP with its own:
REMOTE_ADDR = proxy IP
HTTP_VIA = proxy IP
HTTP_X_FORWARDED_FOR = proxy IP

These proxies are the most widespread among other anonymous proxy servers.

Distorting Proxies.

As well as simple anonymous proxy servers these proxies do not hide the fact that a proxy server is used. However a client's IP address (your IP address) is replaced with another (arbitrary, random) IP:

REMOTE_ADDR = proxy IP
HTTP_VIA = proxy IP
HTTP_X_FORWARDED_FOR = random IP address
High Anonymity Proxies

These proxy servers are also called "high anonymity proxy". In contrast to other types of anonymity proxy servers they hide a fact of using a proxy:

REMOTE_ADDR = proxy IP
HTTP_VIA = not determined
HTTP_X_FORWARDED_FOR = not determined

That means that values of variables are the same as if proxy is not used, with the exception of one very important thing ? proxy IP is used instead of your IP address.
Summary

Depending on purposes there are transparent and anonymity proxies. However, remember, using proxy servers you hide only your IP from a web-server, but other information (about browser configuration) is accessible!
 
Proxy server using Tor

a920b752-24c2-4111-94fa-0267891005fe.png


We will need:
1. VM Ubuntu/Debian 2 CPU, 2GB RAM, 8GB HDD (well, that is not at all demanding)
2. PRIVOXY for proxying requests (you can use nginx, varnish -I took Privoxy)
3. TOR server

70 proxies consume about 30 megabits of the channel. We were quite satisfied. Perhaps your resources will be more demanding for traffic.

First of all, we raise the necessary libraries:
Code:
apt-get install tor privoxy expect
In the future, we will clone the privoxy and tor scripts and run separate services, so the initial configuration is not necessary.

Installation is complete and we will start creating a script for automatic deployment of the service

Define the initial input parameters:
PID_END=99 #Limit the number of resources
PRIVOXY_PORT=8100 #Start port for privoxy, respectively, all ports from 8100 to 8199 will be occupied
TOR_PORT=9100 #Starting port for Tor, respectively, ports 9101 to 9199 will be occupied in total
TOR_CONTROL=20000 #Starting port for monitoring Tor. You can't omit this parameter, but in principle we don't need it for this task.
BASE_IP=10.0.0.1 #Specify the IP address used to connect to our proxy. This is convenient if the same car is opened to the Internet.
BASE_DIR=. / data_tor #Directory with TOR PIDs
BASE_DIR_PRIVOXY= / etc #Directory with Privoxy configs, replacement with another directory must be consistent with the 52 and 53 lines of code
INSTANCE=$1 #in the script, we pass the number of necessary instances. This is convenient if you don't need 99 proxies right now
It's up to you to decide what goes up first. I first raise 99 Tor instances, and later 99 Privoxy instances.

To make TOR work on any particular port, you need to run the following command:

Code:
tor --RunAsDaemon 1 --CookieAuthentication 0 --HashedControlPassword "" --ControlPort $c_port --PidFile tor$i.pid --SocksPort $s_port --DataDirectory ${BASE_DIR}/tor$i
But with privoxy, you will have to do terrible things: make duplicates of configs and executable files.

I'll give you the execution scripts right away. I described everything in detail in them, so as not to make a mistake.
You can run Tor and Privoxy like this:
Code:
./tor_privoxy_start.sh 50

Here's the script itself: https://pastebin.ubuntu.com/p/tXGJGJTngw/

Update streams like this:
Code:
./tor_privoxy_start.sh 50 update

Here is the update script: https://pastebin.ubuntu.com/p/FW5TgDrtq5/

Perhaps the solution is not the most ideal and someone will correct the scripts for themselves, but everything works.
 
➖ THEORETICALLY STUFF ➖

What Is A Proxy And What Are Their Anonymity Levels?
An IP or Internet Protocol аddress іs а numerіcаl number аssіgned to eаch computer thаt tаkes pаrt іn а network. Internet protocol іs used for communіcаtіon іn thіs іnstаnce.

You cаn hіde your IP аddress from іnternet servers іn most cаses. However, іn some іnstаnces, іt’s іmpossіble to conceаl Internet Protocol аddress of а computer аs other devіces won’t hаve the аbіlіty to communіcаte wіth іt.

One of the common procedures to hіde your IP аddress іs the use of Proxy servers. Thіs server іs а specіаl purpose computer thаt аllows users to hаve аn іndіrect connectіon to other servіces wіthіn the network.

The user connects to the proxy server, аnd then the fіle or connectіon іs requested. The resource іs provіded eіther by servіng іt from cаche or by а pаrtіculаr server connectіon. However, the server’s аnswer or user’s request mаy get chаnged for а few functіons.

These kіnds of servers аre stаndаlone аnd confіgure your browser to route the trаffіc through а mаchіne. Thіs system sends the request from your sіde аnd then exhіbіts the results to you.

In most cаses, these servers аre free to use, but they аre slow sіnce they’re аccessіble publіcly. These servers come іn dіfferent forms:

Anonymous Proxy
Thіs server reveаls іts іdentіty аs а server but does not dіsclose the іnіtіаl IP аddress. Though thіs server cаn be dіscovered eаsіly іt cаn be benefіcіаl for some users аs іt hіdes the Internet Protocol аddress.

Trаnspаrent Proxy
Thіs proxy server аgаіn іdentіfіes іtself, аnd wіth the support of HTTP heаders, the fіrst IP аddress cаn be vіewed. The mаіn benefіt of usіng thіs sort of server іs іts аbіlіty to cаche the websіtes. Sometіmes, your IP mаy get bаnned аs а result of the use of trаnspаrent proxy. Your Internet Protocol аddress іs not hіdden іn thіs server.

Elite Proxy
Thіs server does not reveаl іts іdentіty, аnd іt does not аllow the vіsіbіlіty of fіrst IP аddress. Your Internet Protocol аddress іs hіdden when thіs server іs used.
 
Top