This is a proxy server. Execute the code in a terminal with a specified port. (For eg. for listening to port 10000, run the command ./object_name 10000) After this, go to your browser settings and there is option in your browser to set the proxy settings. Give the same port no and the server in which proxy is running.
Godly can U tell me please what is the input format ?? I mean I am done with these steps : 1. gave object name like ./filename vaue 2.sites are working 3. HOW do I check other else paths of code??
It won't filter out any images. If you run it in a server/pc it'll act as an intermediary for requests from clients. Webpage will be displayed as it is.
This is program for a proxy server, You can execute program with a port number, so that proxy server will listen to that port number for requests, After this, go to your browser settings and there is option in your browser to set the proxy settings. Give the same port no and the server in which proxy is running. Then when you make requests in browser for requests, the proxy server will process it.
Godly, let's say I compiled it as "test", and run it "./test 10000"... I should change my proxy settings to port no. 10000, right? but what about for the "HTTP Proxy:"? what should I put there? should i put "test"? I'm using mozilla firefox. Thank you very much for your reply.
hey......i just complied this code it is giving me an error on line no 54.the errors are p.c:54:60: error: invalid conversion from ‘int*’ to ‘socklen_t* {aka unsigned int*}’ [-fpermissive] newsockfd=accept(sockfd,(struct sockaddr*)&cli_addr,&clilen); ^ In file included from p.c:6:0: /usr/include/x86_64-linux-gnu/sys/socket.h:243:12: error: initializing argument 3 of ‘int accept(int, sockaddr*, socklen_t*)’ [-fpermissive] extern int accept (int __fd, __SOCKADDR_ARG __addr,
It is my first visit to your blog, and I am very impressed with the articles that you serve. Give adequate knowledge for me. Thank you for sharing useful material. I will be back for the more great post. 1337x
Do i need a gcc compiler for this to run ?.i.e shall i run this program and use the executable file to use the proxy ?
ReplyDeleteFirst Compile the program and execute the program with port no. as an argument.
ReplyDeleteCan you please explain what this program actually does? I mean how exactly should you run it in the browser
ReplyDeleteThis is a proxy server. Execute the code in a terminal with a specified port. (For eg. for listening to port 10000, run the command ./object_name 10000)
DeleteAfter this, go to your browser settings and there is option in your browser to set the proxy settings. Give the same port no and the server in which proxy is running.
Godly can U tell me please what is the input format ??
DeleteI mean I am done with these steps :
1. gave object name like ./filename vaue
2.sites are working
3. HOW do I check other else paths of code??
What do you mean by other else paths?. What you want to do actually?
DeleteThis comment has been removed by the author.
DeleteWhat does this proxy server do exactly? I ran it does it just filter out images? That's what I'm getting from this so far.
ReplyDeleteIt won't filter out any images. If you run it in a server/pc it'll act as an intermediary for requests from clients. Webpage will be displayed as it is.
DeleteI changed a few lines to accomomdate POST request and used telnet to test. It works~
ReplyDeleteThank you~
do you have a proxy code with POST and HEAD samples too? thanks
DeleteThis essay is very attractive and useful. Your this work defiantly helps other.
ReplyDeleteaccess Monova in UK
Thank you for the compliments
DeleteIs it hard to implement proxy caching functionality into the server?
ReplyDeleteIt can be done easily, just some changes in the server code will do.
Deletehey goldy m trying to run it on linux using gcc i am typing ./a.out it just says success.How to exeecute it perfectly?
ReplyDeleteYou have to pass the port no as parameter while executing.
Deletehey goldy m trying to run it on linux using gcc i am typing ./a.out it just says success.How to exeecute it perfectly?
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteabcd
Delete13245
DeleteModify this code using parsing and repost it soon.
ReplyDeletei ran this code but it wont display anything on firefox browser
ReplyDelete*****WELCOME TO PROXY SERVER***** ..the output was just like this ..the website was not opening..please help me nagendra.kovvada@gmail.com
ReplyDeletecan i use this to filtering the websites
ReplyDeleteYes, you have to add the conditions for website string comparison or other filter conditions.
DeleteWhat should I do after the program started? what condition should I input if I want to access google via the program? Thank You so much!
ReplyDeleteThis is program for a proxy server, You can execute program with a port number, so that proxy server will listen to that port number for requests,
DeleteAfter this, go to your browser settings and there is option in your browser to set the proxy settings. Give the same port no and the server in which proxy is running.
Then when you make requests in browser for requests, the proxy server will process it.
Godly, let's say I compiled it as "test", and run it "./test 10000"... I should change my proxy settings to port no. 10000, right? but what about for the "HTTP Proxy:"? what should I put there? should i put "test"? I'm using mozilla firefox. Thank you very much for your reply.
DeleteHi, can I use this as FTP Proxy server?
ReplyDeletehey......i just complied this code it is giving me an error on line no 54.the errors are
ReplyDeletep.c:54:60: error: invalid conversion from ‘int*’ to ‘socklen_t* {aka unsigned int*}’ [-fpermissive]
newsockfd=accept(sockfd,(struct sockaddr*)&cli_addr,&clilen);
^
In file included from p.c:6:0:
/usr/include/x86_64-linux-gnu/sys/socket.h:243:12: error: initializing argument 3 of ‘int accept(int, sockaddr*, socklen_t*)’ [-fpermissive]
extern int accept (int __fd, __SOCKADDR_ARG __addr,
ugly code is ugly
ReplyDeleteNice post mate, keep up the great work, just shared this with my friendz 1337x
ReplyDeleteIt is my first visit to your blog, and I am very impressed with the articles that you serve. Give adequate knowledge for me. Thank you for sharing useful material. I will be back for the more great post. 1337x
ReplyDeleteThanks and that i have a neat provide: How To Become A House Renovation house remodel before and after
ReplyDelete