Proxy Server Overview and Analysis Report
Proxy Server Overview and Analysis Report
A Project Report
On
Proxy server
Submitted by
Miss. Namrata Manohar Hage
CERTIFICATE
This is to certify that Miss. Namrata Manohar Hage studying in
M.Sc Part-II Semester IV (Computer Science ) has successfully
completed the project entitled “ proxy server ” and submitted the
related project report for the partial fulfillment of Master Degree in
Computer Science of Sant Gadge Baba Amravati University,
Amravati for the session 2023 - 2024
Acknowledgement
The real spirit of achieving a goal is through the way of excellence and
lustrous discipline. I would have never succeeded in completing my task
without the cooperation, encouragement, and help provided to me by various
personalities.
I would like to take this opportunity to express my heartfelt thanks to our
principal Sir Dr. D. S. Talwankar .
ABSTRACT
Every computer has an Ip address that identifies the device uniquely. Similarly,
the proxy server is a computer on the network that has its own IP address. But
not want to show our identity (IP address). In such a scenario, the proxy comes
into existence. We can achieve the same by using the proxy server. It provides
varying levels of functionality, security and privacy that depend on the use case,
needs or policies of the company. In this section, we will discuss what is a
proxy server, its type, advantages, need, and working of proxy servers.
The proxy server is a computer on the internet that accepts the incoming
requests from the client and forwards those requests to the destination server. It
works as a gateway between the end-user and the internet. It has its own IP
address. It separates the client system and web server from the global network.
In other words, we can says that the proxy server allows us to access any
websites with a different IP address. It play an intermediary role between user
and targeted websites or servers. It collects and provides information related to
user requests. The most important point about proxy server is that it does not
encrypt traffic.
TABLE CONTENT
ANALYSIS--------------------------------------------------------------11
User Requirement 12
Tools 13
Feature 14
System Requirement 15
System Requirement Specification ---------------------------- 16
Key features 16
Scope 17
Abreviation 18
Conclusion 36
Reference 36
Introduction
Proxy server services should run on one computer to which both private
network and public network is connected to. The computer running proxy
server should have to interfaces:
A network interface that point to public network.
A network interface that point to the private network.
6.Anonymous:
7. Transparent:
A Transparent Proxy Server tells the remote Computer the IP Address of your
Computer. This provides no privacy.Anonymous Proxy Servers can further be
broken down into two more categories, Elite and Disguised. An Elite Proxy
Server is not identifiable to the remote computer as a Proxy in any way. A
Disguised Proxy Server gives the remote computer enough information to let it
know that it is a Proxy, however it still does not give away the IP of the
Computer it is relaying information for.
faces. Even the proxy servers with the highest availability rates still have to
account for Web servers on the Internet that are down. If the remote site is down
or inaccessible, it's often up to the administrator to break the bad news to end
users.You can quickly eliminate the proxy server from this picture by asking a
user to go to another Web site. Note that although the site appears, it might be
coming from the cache. To ensure that the proxy server is loading afresh copy
from the Web server, ask the user to hold down Ctrl+Shift and click Refresh (if
the client is using IE).One common problem during setup is the presence of
multiple default gateways. This problem generates a 10060 error (Connection
Timed Out)to any request sent to the Web Proxy service. Though this error is
often associated with slow external links to the Internet, if it occurs right after
setup, more than one default gateway is probably present.
Proxy server administrators often see event ID 120 in the proxy server's event
log. The event's description is The Proxy Service could not create a packet
filter. This message is typical on busy proxy servers with packet filtering
enabled. The purpose of the message is to alert the administrator that the packet
filter dropped more than 20 packets.
Staff Users can open answers and incidents for editing, but when the session
times out or they leave the page, they can no longer get in.User must clear the
temporary Internet files in order to get in again.4.
You may also change the browser to always request a new page. In Internet
Explorer, use the following steps:1.
Under Check for new versions of stored pages, select Every visit tothe page.4.
Click OK.
ANALYSIS
3.1) SYSTEM STUDY
IDENTIFICATION OF NEED
In a LAN, it is needed that there should be some security provided by the administrator
and that some unauthorized sites should not be shown to that client in LAN. It was
needed to decrease the web page access time sothat those web pages that have been
accessed earlier should not be asked from the web directly.
FEASIBILITY STUDY
Following points are to be considered in feasibility study:
TECHNOLOGY
Mechanism for Client Server communication Browser Connection to server
Cache management
USER REQUIREMENT
REQUIREMENT ANALYSIS
The firewall of proxy has to block the HTTP request emanating from aninvalid
IP address.
It also has to not to service the request for any link which is blocked by
the proxy administrator. The proxy has to have cacheto store the web
pages locally to reduce latency and network load. A userfriendly Graphical User
Interface also needed to be supplied for proxyadministrator.
5. TOOLS USED
Introduction to Java:
Java (with a capital J) is a high-level, third generation programming language,
like C, FORTRAN, Small talk, Perl, and many others. You can use Java to
write computer applications that crunch numbers, process words, play games,
store data or do any of the thousands of other things computer software can
do.Compared to other programming languages, Java is most similar to
C.However although Java shares much of C's syntax, it is not C. Knowing how
to program in C or, better yet, C++, will certainly help you to learn Java more
quickly, but you don't need to know C to learn Java. Unlike C++ Java is not a
super set of C. A Java compiler won't compile C code,and most large C
programs need to be changed substantially before they can become Java
programs.What's most special about Java in relation to other programming
languages is that it lets you write special programs called applets that can be
downloaded from the Internet and played safely within a web browser
environment, the Java platform can be a bits lower than native code. However,
advances in compiler and virtual machine technologies are bringing
performance close to that of native code without threatening portability.
Features of Java:
1. Platform independent:
The concept of Write-once-run-anywhere (known as the Platform
independent) is one of the important key feature of java language that makes
java as the most powerful language. Not even a single language is idle to this
feature
but java is closer to this feature. The programs written on one platform can
run on any platform provided the platform must have the JVM.
2. Simple:
There are various features that makes the java as a simple language.Programs
are easy to write and debug because java does not use the pointers explicitly. It
is much harder to write the java programs that can crash the system but we
cannot say about the other programming languages. Java provides the bug free
system due to the strong memory management. It also has the automatic
memory allocation and deallocation system.
3. Object Oriented:
To be an Object Oriented language, any language must follow at least thefour
characteristics.
1. Inheritance:
It is the process of creating the new classes and using the behavior of the
existing classes by extending them just to reuse the existing code and adding
MSc Final Year Page | 15
“proxy Server”
2. Encapsulation:
It is the mechanism of combining the information and providing the abstraction.
methods.
Dynamic binding:
Sometimes we don't have the knowledge of objects about their specific types
while writing our code. It is the way of providing the maximum functionality to
a program about the specific type at runtime.
As the languages like Objective C, C++ fulfills the above four characteristics
yet they are not fully object oriented languages because they are structured as
well as object oriented languages.
But in case of java, it is a fully Object Oriented language because object
is at the outermost level of data structure in java. No stand alone methods,
constants,and variables are there in java. Everything in java is object even the
primitive data types can also be converted into object by using the wrapper
class.
4. Robust:
Java has the strong memory allocation and automatic garbage collection
mechanism. It provides the powerful exception handling and type checking
mechanism as compare to other programming languages.Compiler checks
the program whether there any error and interpreter checks any run time
error and makes the system secure from crash. All of the above features
makes the java language robust.
5. Distributed:
The widely used protocols like HTTP and FTP are developed in java.Internet
programmers can call functions on these protocols and can get access the files
from any remote machine on the internet rather than writing codes on their local
system.
6. Portable:
The feature Write-once-run-anywhere makes the java language portable
provided that the system must have interpreter for the JVM. Java also has the
7. Dynamic:
while executing the java program the user can get the required files dynamically
from a local drive or from a computer thousands of miles away from the user
just by connecting with the Internet.
8. Secure:
Java does not use memory pointers explicitly. All the programs in java are run
under an area known as the sand box. Security manager determines the
accessibility options of a class like reading and writing a file to the local
disk. Java uses the public key encryption system to allow the java applications
to transmit over the internet in the secure encrypted form. The byte code Verify
checks the classes after loading.
9. Performance:
Java uses native code usage, and lightweight process called threads. In the
beginning interpretation of byte code resulted the performance slow but the
advance version of JVM uses the adaptive and just in time compilation
technique that improves the performance.
Multithreaded.
Java is also a multithreaded programming language. Multithreading means a
single program having different threads executing independently at the same
time. Multiple threads execute instructions according to the program code in a
process or a program. Multithreading works the similar way as multiple
processes run on one computer.Multithreading programming is a
very interesting concept in Java. In multithreaded programs not even a single
thread disturbs the execution of other thread. Threads are obtained from the
pool of available ready to run threads and they run on the system CPUs.
11. Interpreted:
we all know that Java is an interpreted language as well. With an interpreted
language such as Java, programs run directly from the source code.The
MSc Final Year Page | 18
“proxy Server”
interpreter program reads the source code and translates it on the fly into
computations. Thus, Java as an interpreted language depends on an interpreter
program.The versatility of being platform independent makes Java to out shine
from other languages. The source code to be written and distributed is platform
independent.Another advantage of Java as an interpreted language is its error
debugging quality. Due to this any error occurring in the program get straced.
This is how it is different to work with Java.
6. SYSTEM REQUIREMENTS:
Hardware Requirements
:
Windows XP
Front End :
Language used : Java (Edition : J2SE)- Jdk : Java Development kit 1.6- Compil
er : javac- Interpreter : java- Debugger : jdb- Developing Tool/IDE : NetBeans I
DE 6.5
BackEnd :
Other Requirements:
MSc Final Year Page | 19
“proxy Server”
Internet Connectivity.
9.1 PURPOSE
Proxies which process http and (not always) ftp requests areknown as http proxy
servers
Multithreading.
SCOPE
J DesktopPane:
A container used to create a multiple-document interface or a virtual desktop.
You create J Internal Frame objects and add them to the J DesktopPane.
Virtual desktop:
-Virtual desktop can be created using J Desktop Pane and J Internal Frame.-J
Desktop Pane works as parent and J Internal Frame works as child.
J Panel:
It acts as a cover to the container. Reusability highly increases if we use Panel
as a base.
Card Layout:
- Multiple cards( JPanel) can be added to Card Layout.- Each card added to
the Card Layout should be JPanel or its derived class- Only one card is visible
at a time.-Navigation options like first,next,previous and last can be added.-
Card Layout is used to create wizards.
J Window:
-It is very similar to J Frame but it does not have min ,max or close buttons.-It
does not have borders,title bar a menubar. It is used to create Splash Screen
J Internal Frame :
A lightweight object that provides many of the features of a native frame,
including dragging, closing, becoming an icon, resizing, title display, and
support for a menu bar
PRODUCT PERSPECTIVE
by the processor.
Hence, the processor first searches the instruction in the cache memory. It
helps in improving the speed. Caching, in proxy server is similar to the above
mechanism.
PRODUCT FUNCTIONS
It performs the basic URL blocking. But, it is not capable of performing this
functionality selectively. It blocks the URL for all clients using the proxy.
USER CHARACTERISTICS
REQUIREMENTS EXECUTION
QUALITIES:
1) This project performs the caching of web sites which improves the speed .
2) This project performs the basic URL blocking procedure.
3) It act as an intermediary between a network and a client.
EVOLUTION QUALITIES:
This project has been designed with the help of Net Beans hence it is scalable
and flexible. It can easily handle all future changes like addition of extra
functionality. It is also easy to maintain, with all the source code and class file
in one folder implicitly. this is in contrast to notepad programming, where we
have to explicitly store all source code.
1) Create JFrame
2) Create JDesktopPane and add it to JFrame.
3) Create multiple instances of JIntaernalFrame and add it toJDesktopPane.
4) Each JInternalFrame can be covered by a separate JPanel.The
benefits of desktop virtualizationinclude:
Centralized administration.
GUI Listing:
SplashPanel1.java
It opens a splash screen which displays the name of the project. A splash screen
is animagethat appears while a game or program is loading. It mayalso be used
to describe an introduction page on a website.
VirtualDesktop.java
It opens a virtual desktop including a log-in page which allow only
authenticated user to have access to the server. If user name and password is
wrong, it shows an error message otherwise it opens a settings form.And it
also includes settings for changing username and password
JPanel3.java
It opens up a form which allows to change the username
JPanel4.java
It opens up a form which allows to change the password
JPanel5.java
It consists of following elements:
Text Field: user can enter a site of his own choice to be blocked.
Add Button: this adds the site given by the user to the list.
Remove Button: user can select one or more sites in the list andclicking on this
button removes the selected sites from the list.
MainClass.java
The project is run through this class. Server Socket, Socket andSERVER_PORT
are initialized. Connection is established throughserverSocket.accept(). It
also starts the Talker thread.
Talker.java
This class listens to the multiple clients connecting to the server. It takes
the input from the browser‟s address bar
through BufferedReader andprints the request and various headers associated
with the request. It alsochecks to see if the request contains the URL which we
intend to block. If it contains the blocked URL, it calls the method siteBlocker()
from the
ProxyURLConnection.java
This class creates the constructor of URL class. It fetches the dataassociated
with the URL given in the address bar. It calls the get() method
from the URLCache class with parameters as url and browser‟s
output stream.
SiteBlocker.java
This class contains the method site Blocker() which gives the desiredaction to
take if the clients request for a blocked site.
URLCache.java
This class defines a simple caching mechanism used by the proxy server.If it
happens that the remote server/web server from where you are requesting any
data has filtered out your IP Address in that scenario you cannot access that
particular data but if you had accessed that data before through a proxy then
there are chances that the proxy server must have stored that data in it which is
called cache, it can be accessed now if you connect through the proxy
server.Our project does not effectively implement caching. It uses a Hash Map
to store pairs of URL and content accessed by the clients. After every request
made, this class first checks if the URL is present in the Hash Map, if it is then
it delivers the response from the cache. If not then, it delivers there response
server.
11. CODING
1. Main Class.java
package my proxy;
import java.net.Server
Socket; import
java.net.Socket; import
java.util.Set;
public class Main Class
{public void start Main()
{Server Socket server Socket = null;
Socket socket = null;
final int SERVER_PORT = 9867;try
{server Socket = new Server Socket(SERVER_PORT);while (true)
{socket=
serverSocket.accept(); Talker
tk = new Talker(socket);
tk.start();
}
}
catch (Exception e1)
{e1.print StackTrace();
}
}
1. Talker.java
package my proxy;
import java.io.BufferedReader;
import java.io.Input Stream Reader;
import java.io.Print Writer;
import java.net.Socket;
public class Talker extends Thread
{ Buffered Reader input = null;
Print Writer output = null;
String b Sites;
public Talker() {
}public Talker(Socket socket, String str3)
{ try {
int x1 = file.indexOf(".");
int y1 = file.lastIndexOf(".");
String site = file.substring(x1 + 1, y1);
if (bSites.indexOf(site) != -1) {
SiteBlocker.siteBlocker(output);
} else {
p.getConnection(file, output);
}
} catch (Exception e2) {
e2.printStackTrace();
System.out.println("Problem with Talker");
}
output.close();
}
}
}
2. SiteBlocker.java
package myproxy;
import java.io.PrintWriter;
public class SiteBlocker {
public static void siteBlocker( PrintWriter output,String file){
{
output.checkError();
output.write("Cannot Display........");
}
output.close();
}
}
4. ProxyURLClassConnection.java
package
myproxy;
importjava.io.*;
import java.io.InputStream;
import
java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;import java.net.URLConnection;
import java.io.PrintWriter;
public class ProxyURLClassConnection {
public void getConnection(String s,PrintWriter output)throws
MalformedURLException, IOException {
}output.close();
input.close();
}
}
5. Splash1.java
import javax.swing.*;
import java.awt.*;
public class Splash1
{
public static void main(String[] args){
Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
int x = (screen.width-400)/2;
int y = (screen.height-300)/2;JWindow win = new JWindow();
SplashPanel1 s = new SplashPanel1();
win.setContentPane(s);
win.setBounds(x,y,400,300);
win.setVisible(true);
try {
for(int i=1;i<=100;i++)
{ Thread.sleep(60);
s.abc(i);
}
} catch(Exception e) {}
win.setVisible(false);
VirtualDesktop m= new VirtualDesktop();
m.setBounds(0,0,screen.width,screen.height);
m.setVisible(true);
}
}
MSc Final Year Page | 41
“proxy Server”
6. SplashPanel1.java
public class SplashPanel1 extends javax.swing.JPanel {
public SplashPanel1() {
initComponents();
}
public void abc(int a) {
jProgressBar1.setValue(a);
}
private void initComponents() {
jProgressBar1 = new javax.swing.JProgressBar();
jLabel1 =new javax.swing.JLabel();
setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.
BevelBorder.RAISED, null, new java.awt.Color(255, 153, 0), null,null));
setLayout(new java.awt.BorderLayout());
jProgressBar1.setBackground(new java.awt.Color(255, 153, 0));
jProgressBar1.setForeground(new java.awt.Color(255, 255, 255));
add(jProgressBar1, java.awt.BorderLayout.PAGE_END);
jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
jLabel1.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/images/myproxy.jpg"))
);
jLabel1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
add(jLabel1, java.awt.BorderLayout.CENTER);
}
private javax.swing.JLabel jLabel1;private javax.swing.JProgressBar
jProgressBar1;
12. OUTPUT:
Output is retrieved by following steps:1.
13. LIMITATIONS
One of the limitations is that you may have some issues with speed. Caching
becomes a bit slower in case of opening of subsequent pages.
Conclusion
Thanks to standard proxy support in the clients, and the wide availability of
the cern_httpd proxy server, anyone behind a firewall can now have full Web
access through the firewall host with minimum effort and without compromising
security. Corporate users don't have to be denied access to the Web any longer.
Considering the extremely fast growth of the Web, its ability to replace FTP, and
the fact that by the time this paper is published the Web usage has already passed
Gopher usage metered by the packet statistics in the network, the use of caching
proxy servers becomes essential to allow the growth to continue in case the total
Internet capacity doesn't keep up with the Web growth rate. The proxy caching
makes it possible to gain "virtual bandwidth" as documents often get returned from
a nearby cache rather than from some far away server.
References
https://www.geeksforgeeks.org/what-is-proxy-server/
enables caching and supports only GET method and handles errors whenever a
client requests an object that is not available.
INDEX
Sr. No. Name of Topics Page No.
1. INTRODUCTION
1.1 Background 1
1.2 Objectives
1.3 Purpose, Scope, and Proposed system 2
1.3.1 Purpose
1.3.2 Scope
1.3.3 Proposed system
4. SYSTEM DESIGN
18
4.1 Program Flowchart
19
4.2 UML Diagram
20
4.2.1 Use Case Diagram
6. CONCLUSIONS 28