Secured proxy server in a network project is developed for companies where employees will access data from same source . proxy server will manage most of the data which can be accessed securely and reduce risks of attacks.
Explanation of Modules Interaction:
In this project both the modules Caching and Filtering are invoked by the Connection sharing module. The Connection sharing module creates the objects of the Caching and Filtering and uses those objects whenever they are required. After receiving a request from the client, the site filtering sub module in filtering module is invoked. According to the result, the cache module is invoked by connection sharing module. After getting a response from the parent proxy or web server the word filtering sub module in filtering module is invoked. According to the result the cache module is invoked by connection sharing module.
MODULE INTERACTION DIAGRAM:
CLASSES INVOLVED IN THE PROJECT: MODULES
Connection sharing filtering caching
Createpanels Proxy_Restrict Proxy_Cache
This class is used in the construction of the Graphical user Interface (GUI) of the proxy server. This class is used to create menus/buttons and it implements methods to handle events that are generated by the user.
Public void childproxypanel(): Used to the create child proxy server startup panel.
Public void main_proxy_panel(): Used to create main proxy sever start up panel.
Public void createbpanel(): Used to create button in the proxy server main window.
Public void createserverpanel(): Used to create a panel which is used to select a Server start up mode.
Public void create word panel(): Used to create word filter panel.
Public void create site panel(): Used to create site filter panel.
Public void createserverpanel():Used to create server configuration set up panel.
Public void createcachepanel():Used to create cache manager setup panel
Public static void create_in_pages_panel(): Used to generate reports of requested pages and derived users.
Public static void create_denied_user_panel(): Used to generate reports of requested pages and derived users.
Public void focuslost(Focus event ): Used to perform operations when focus lost event is generated.
Public void helpfuncton (int option): Used to display help of proxy server.
This class is used to display the main window of the proxy server when started. Invoking the main method of this class starts the proxy server.
Public JMenuBar createmenubar():This method creates all menu items in the main window.
Public static void displaystartaspanel(): Displays the start up mode of the sever panel.
Public static void main():This is the main method where the system execution stats from this method.
This class implements the main functionality of the project. This is the heart of the system. Whenever the used starts the server, this class’s object is created and server starts in the user specified mode (child mode, main proxy mode) and it is continuously listens for client’s request. Whenever it receives a client request an object of req_cli_proc class is created. An individual object is created for each client’s request. It allows only the specified numbers of users.
Public void server():
This method starts the server and invokes proxy_restrict class and Proxy_cache class object.
Public void start server():
This method performs necessary initialization, when server is started.
Public void exitall():
This method performs various operations, when system is Exiting and it closes the system.
Public void stopserver():
Perform necessary operation when the server is being stopped by the user.
This class methods process the client’s request. An individual object is created for each client’s request. A client can make any numbers of requests. So to handle all the requests from a single client, a thread is created for each request of that client.
Public void server():
It starts the processing of client is request
Public vector copyHeaders(Inputstream req_read):
This method copies the entire Headers specified in the Request/Response.
Public int check cont-head(vector check_vectors):
This method checks for the availability of various Headers in the Request/Response.
Public Boolean rest_words_exist_inpage(string check_str, Proxy_Restrict prox-restrict):
This method is used to prepare words list in the page and call the is_rest_words (vector words) method to perform word filter operation.
This class is used to implement animation of the panels in the main window of proxy server.
This class is used to check Redundancy of words and sites in the respective files. It eliminates the duplication of words and sites.
Public int sorts(string):
This method is used to sort the site list and word list.
Public Boolean wordRedundancyCheck(String s):
This method is used to check duplicate words in the word list.
Public Boolean siteRedundancychek(string s):
This method is used to check duplicate sites in the site list.
This class implements the filtering operations on requested pages.
Public Boolean is_rest_site(string url):
This method is used to check a particular site, which is restricted or not.
Public Boolean is_rest_words(vector words):
This method is used to check a particular list of words is restricted or not.
Public Hashtable copy_content(filereader fread):
This method is used to copy the file into temporary buffers of the programs.
This class is used to implement cache operations in the server.
Synchronized Boolean setcache (URL url, byte file_cont( ) ):
This method is used to add a particular page into cache folder.
Synchronized Boolean delete-cache pages (URL url):
This method is used to delete all the cached pages in the cache folder.
Synchronized file get cache (URL url):
This method is used to retrieve a particular file the cache.
This class is used to list all the files in the cached folder.
Public Boolean accept (File F):
It checks that files exist is the given directory or not.
This class is used to generate hash values for a particular value.
Classes Interaction in the Project:
In this project work we have made a modest attempt to design a new application named HTTP Proxy Server. We feel that we have succeeded in achieving the objective of the project. The technology we used in this project is networking, socket programming system calls. Before implementing the problem, a lot of work has been carried out for better understanding of the problem. The software has been tested successfully. This Proxy Server handles only HTTP—and thus leaves a scope for implementing other protocols like Telnet and FTP. A major advantage of this system is that the software needs to be installed only in the server machine; and not in all client machines. The system provides a limited caching facility—it replaces the pages in the server machine using the First In First Out (FIFO) page replacement algorithm. Thus the need for frequent updating of pages requested by the clients may bring down the performance of the system when the traffic is high. It provides high security in the network by filtering the sites. A default set of configuration options are used to configure the Proxy Server every time the server is up. Another disadvantage of the system being the need for establishing two connections when the page requested by the client is not present in the Proxy’s cache. The Proxy should then send a request to the Father Proxy.
Download Secured Proxy Server in a Network Project source code in java with project report .