Professional Documents
Culture Documents
Declaration i
Acknowledgement ii
Abstract iii
Introduction v
Chapter 4 : Testing 21
Conclusion 27
Bibliography 28
DECLARATION
We here by declare that our project “Proxy Server” and its report submitted in
the partial fulfillment of requirement for the award of degree of Bachelor of
Engineering in Computer Science and Engineering of Jai Narayan Vyas
University, Jodhpur, is authentic work done by us and is not reproduced as it is
from any kind of source.
DEVSHREE GEHLOT
NEELU LAKHANI
B.E. Final yr. C.S.E.
Dept. OF CSE
M. B. M. Engg. College
Proxy Server i
ACKNOWLEDGEMENT
The beatitude that accompanies the successful completion of any task would not
be completed without the appreciation of colleague who made it possible. So with
veneration honor, we acknowledge all those whose guidance and
encouragement has made successful in winding up the project.
It is our privilege to acknowledge with deep sense of gratitude and devotion the
keen interest and invaluable guidance rendered to us by revered guide Mr. N.C.
Barwar, Head, Department of Computer Science & Engineering, M. B. M.
Engineering College, Jai Narain Vyas University, Jodhpur
It’s our privilege to thank Sh. Rajesh Purohit, Sh. Alok Gehlot and Sh. K.R.
Choudhary who have with their unflinching faith, been a source of inspiration for
us always to move towards success.
Proxy Server ii
ABSTRACT
1. Introduction:
2. Features:
Blocking:
There are two types of blocking:
1. URL Blocking
Proxy
Web Server Client
Server
Proxy Server iv
INTRODUCTION
Currently there are billions of web pages on the Internet but only a fraction of
them are frequently accessed. If these frequently used web pages are stored
much nearer to the client and retrieved directly from there instead of accessing
from original server. The network traffic can be brought down to a very
considerable extent. This will also improve the client observed latency. Here we
are implementing the Proxy Server for a LAN, which also acts as a firewall
between LAN and Internet.
Proxy Server v
System Study
1.1Identification of need
1.2Feasibility study
1.2.1Technology
Proxy Server 6
System Analysis
1.1Requirement Specification
To develop a system according to the need of the end user and compatible to the
most frequently used and easily available software and hardware, a detailed
requirement specification is needed to be performed. The various requirement
specifications are as follows:
1.1.1User requirement
1.1.2Requirement Analysis
The firewall of proxy has to block the HTTP request emanating from an invalid IP
address. It also has to not to service the request for any link which is blocked by
Proxy Server 7
System Analysis
the proxy administrator. The proxy has to have cache to store the web pages
locally to reduce latency and network load. A user friendly Graphical User
Interface also needed to be supplied for proxy administrator.
1.1.2.1Modeling
Now what will follow is a series of modeling tasks that lead to a complete
specification of requirement and a comprehensive design representation. We will
follow the structured analysis model in which we create and partition data,
functional and behavioral models. Below is the figure for structured analysis.
Data
Dictionary
Control
Proxy Server 8
System Analysis
Cache
Proxy Server
Proxy Server 9
System Analysis
Expanded ER Diagram
Internet
1 stores
User 2 checks
Cache Manager Cache
3 retrieves
Sends modified
Request
Sends request
Firewall
Updates
User Interface
Handles
Proxy Administrator
Expanded ER Diagram
Firewall
Firewall has to block the HTTP request from the invalid IP’s, for the blocked
URLs reformat for the allowed Content Type. Therefore, it must maintain the list
of all the three. It also has to generate the error message for invalid request.
Proxy Server 10
System Analysis
Cache
The Cache stores the web documents (HTTP Response) that could be
accessed for the future use.
USER USER
Proxy
ADMINISTRATOR ADMINISTRATOR
Proxy Server 11
System Analysis
USER
CACHE
MANAGER
USER
INTERFACE
URL’s Log
IP’s
CACHE
PROXY ADMINISTRATOR
Proxy Server 12
System Analysis
Firewall:
It has to act as a filter to block the HTTP request from the user. It has to compare
the IP address in request header with those made available to it, if address
matches then it checks whether the requested links is blocked or not. If it is
blocked then it returns error message to the user. Else it modifies the request
header according to the Content Type enabled/disabled in firewall. Then it sends
the request to the Cache Manager.
User Interface:
It is handled by the Proxy Administrator. He supplies the list of valid IP addresses
from which the proxy can provide services through the UI. The UI then updates
the corresponding file. Same holds for blocked sites.
Cache Manager:
It is responsible for storing, deleting and searching of web pages in the cache. It
is process which has to handle HTTP request and response after it is forwarded
by the firewall. When it gets HTTP request from the firewall: it first checks
whether the links associated with that request is present in cache or not. If not, it
will send the request to the Internet to get appropriate response: it will update the
cache and send response to the user simultaneously. The policy for adding or
deleting cache will be specified by the cache only.
Proxy Server 13
System Analysis
Cached Response
LAN PC
HTTP PROXY
Request INTERFACE
Validate
Error IP
Message
Valid IP’s
Error
Code
Configuration Files
HTTP
Request Search
Error Blocked
URL’s Cache
code
Resolve
Error
Code Cached
Check Response
URL
URL
HTTP
Response
Internet Forwarded
Cache
Request
Cache
HTTP
Updating
Request
Data
Web Server Get from
Web
HTTP
Response HTTP Cache
Response Manager
Proxy Server 14
System Analysis
Validate IP:
It reads the IP address from the HTTP request header and matches with the list
of IP’s presented by the Proxy Administrator. If the match is found then it will
forward the request header to the nest process. If match is not found, it will return
an error code.
Check URL:
On receiving the request header from the validate IP function it will check that the
web document represented by the URI is blocked by the Proxy Administrator or
not. It does so by comparing the URL with the list of URL’s presented by the
Proxy Administrator. If match is not found it will forward the header to the next
process. If found then it will return an error code.
Search Cache:
It reads the URI from the header and searches the cache to find whether the web
document is present in cache or not. If found it will return the cached web
document to the IP address specified in the header.
Cache Manager:
The cache policy implementer works as the interface to manipulate or update the
cache. Only this function can write or delete anything from the cache. Any
algorithm for page replacement can be implemented in this interface only.
Proxy Server 15
System Analysis
System Recommended
1.1.3Software Requirements
Windows 98/NT/2000/XP.
Internet Explorer
Tomcat Apache server4.0(for testing purpose).
JDK 1.4
Proxy Server 16
System Design
Data Design
Architectural Design
Interface Design
Component Design
1.1Data Design
The data Design transforms the information domain model created during
analysis to the data structures that will be required to implement the software.
The data Objects and relationships defined in the entity relationship diagram and
detailed data content depicted in the data dictionary provide the basis for the
data design activity.
Following are the data structures that will be used to implement the application:
1.1.1HTTP Request
This will be the input to the proxy system. It has to accept the HTTP Response
and validate and manipulate it in the firewall.
1.1.2HTTP Response
This is required to be the output to the LAN PCs. It also has to store the HTTP
Response in the Cache for the future user.
Proxy Server 17
System Design
1.1.3Cache
The basic requirement of cache is to store the Web Documents, which could be
referenced by the LAN PCs in future. The Cache needs to be stored in main
memory for fast and efficient access.
1.1.4Error Message
Appropriate error messages are to be shown to the user for any error
encountered. The user can only view web page, hence messages should be
HTML tagged.
1.1.5Files
1.1.5.1Valid IP’s
The file contains the list of IP address on the LAN, which can access the services
of the Proxy Server.
1.1.5.2Blocked Sites
It contains the list of blocked URL’s.
1.1.5.3Cache Folder
The Cache Folder will store cache present in the main memory in the form of
files. Each HTTP Response will be stored as a separate file corresponding to its
URI. This will be used only on start-ups or shutting down the proxy server.
1.2Architectural Design:
Proxy Server 18
System Design
1.2.1Functional Modules
The various functional modules needed to perform its basic functions of a proxy
server are:
Proxy Server 19
System Design
1.2.1.3Connection Manager
This module will contain the main functions of the Proxy Server. It will read the
request header from the client. It will parse the URL and determine whether the
URL is blocked or not. Else it will generate a connection to the web server.
Then it will read the reply header from the web server. If there is no copy of the
page in then cache then it will download the page from Web Server else will
check its last modified date from the reply header and accordingly will read from
the cache or serve from the Web. Then it will also check the header for caching
allowed or not and accordingly will cache the page.
1.2.1.4Cache Manager
The Cache Manager is responsible for storing, deleting, clearing and
searching of web pages in the cache.
1.2.1.5Log Manager
The Log Manager is responsible viewing, clearing and updating the Log.
1.2.1.6Configuration
This module will enable the user to make his configuration settings. It will work
with the other modules to perform the desired configurations such as caching
(on/off), log (on/off), etc.
The Golden rule that guides the design of effective user interface is:
Place the user in control
Reduce the user’s memory load.
Make the interface consistent.
The user interface is the window to software system. It should be convenient and
easily understandable even by the naïve users. We have provided an easy to
use user interface in the form of menu’s in which functions are categorized
according to relevance.
Proxy Server 20
Testing
CHAPTER 4 :TESTING
1.1SOFTWARE TESTING
All independent logical paths within a module are exercised, all logical decisions
are exercised, all loops are executed and all data structures are exercised for
their validity i.e. White Box Testing.
All functions are fully operational and that input is properly accepted and correct
output is produced. This is Black Box Testing.
These two test case design techniques are used invariably in a software testing
strategy which solves test planning, test case design, test execution, and
resultant data collection and evaluation. A strategy for software testing involves
four steps:
Unit Test
Integration Test
System Test
Proxy Server 21
Testing
Unit testing
Module
testing
Sub-system
testing
System
testing
Acceptance
testing
1.1.1Unit Testing
Unit testing focuses various verification efforts on the smaller unit of software
design module. Here the module interface is tested to ensure that information
properly flows into and out of the program unit under test. It ensures that integrity
is maintained during all the activities of a session. Boundary conditions are tested
to ensure that the module operates properly at the boundaries established to limit
or restrict processing. All independent paths through the control structure are
exercised to ensure that all statements in a module have been executed at least
once. And finally, all error-handling paths are tested.
Proxy Server 22
Testing
Testing is done with the test cases, which are supplied, from the client and also
by the prepared by the offshore, for rigorous unit testing.
1.1.2Integration Testing
Integration testing tests both the physical and the logical interfacing. Physical
interfacing is checks the structure and form of the interfaces. It is verified that the
same data and parameters are passed, with the same order. Logical interfacing
checks the semantic content of the interfaces. In this level the range of the data
are looked that there arc in the desirable form in which the modules need.
1.1.3System Testing
System testing is carried on to ensure that the system is consistent with its
environment. After all these tests the system is installed to the client and it is
checked with all test data to verify that is works fine with the client environment.
This software is dually tested at each level. Sufficient time is devoted on the
testing. Testing is done; keeping in mind that how big price has to pay in case of
software failure.
Proxy Server 23
Testing
Port Listening
Connection
Caching
Log
Blocking
Firstly, tests were conducted over separate classes and then these classes were
integrated to develop the total software. Testing was performed over various
independent classes i.e. classes which do not require involvement of server
classes. Once the modules (independent classes) were tested, testing start over
dependent classes by associating them with server classes. Various tests
performed and their results are:
1234 1020 No
1234 1112 No
Proxy Server 24
Testing
1.2.2Connection
This test was conducted to check whether individual requests from clients formed
a connection to the Proxy Server or not. The very fact that there was some
output to the browser for each request accordingly, proved that there was a
connection established.
1.2.3Cache Test
This test was conducted by checking the cache folder formed while execution.
Cache replacement and addition of files in cache storage worked properly though
the first response took quite a long time. We noted that those requests with a
copy existing in cache were read from the cache and those not in cache were
requested to the web server and subsequently saved in the cache folder.
1.2.4Log Test
This test was conducted by checking the log folder formed while execution. We
noted that for each request from one IP a file named that IP.log was created or
updated if existing and the URL accessed was added to the file with date and
time.
Table 4.2
123.6.3.7 127.0.0.1 No
220.100.101.98
123.6.3.7 Yes
12.76.45.9
120.6.88.32 No
128.3.45.12
221.67.43.100 128.3.45.12 Yes
Proxy Server 25
Testing
Table 4.3
http://www.gmail.com\show?3ngb8g Yes
www.gmail.com
www.google.com No
www.hello.com
www.byte.com www.mail.yahoo.com No
www.zapak.com
228.10.45.1 No
www.yahoo.com
www.byte.com Yes
1.3Integration Test
Since independent classes have been tested, classes which depend on each
other are tested by clustering together these dependent classes. It worked well
under IIS(Internet Information Server) but showed inconsistency with Apache
Server.
1.4System Testing
At the validation or system level, the details of class connection disappear. The
validation of software focuses on user visible actions and user recognizable
outputs from the system. It was found that the application meshed with the
system without showing inconsistency.
Proxy Server 26
CONCLUSION
This software was tested on different testing environment and was found to be
satisfactorily running. The following limitations exist and modification is
suggested:
The most striking limitation of the software is that it cant’s interact with
other proxy in cascade.
For most of buttons in GUI keyboard support along with mouse has been
provided but other like selecting an item and then removal of that item
from the list does not have keyboard interaction. The present version can
be extended to include keyboard interaction.
These are several limitations that can be pointed out, and possible extension of
the present version is outlined.
Proxy Server 27
BIBLIOGRAPHY
Bibliography
References
1. www.java.sun.com
2. www.jakarta.apache.org
Proxy Server 28