Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
we are tasked to make a simple web proxy server in linux using C. its compiled and ran.
but when i tried using it on firefox on ubuntu the result is: "Proxy server refusing connections"
while on windows, the result is: "Connection has timed out."
hi all!
we are tasked to make a simple web proxy server in linux using C. its compiled and ran.
but when i tried using it on firefox on ubuntu the result is: "Proxy server refusing connections"
while on windows, the result is: "Connection has timed out."
pls help.
Spell out your words. And what do you think we can help WITH? If you wrote this proxy server yourself, it's up to you to debug it. If you're using Squid, then you need to provide actual details...things like version/distro of Linux, version of squid, information from the squid logs, network topology, etc.
If this is a program you wrote, there's little we can help with. Debugging your programs is up to you, but we're happy to help if you post the exact bits of code you're having problems with.
As was told to you in that thread, a proxy server has THOUSANDS of lines of code...open up the source files for Squid as an example. And as you were asked, you need to tell us WHAT ERRORS you're getting. Do you have ANY debugging statements in your code? Have you enabled them to see what's going on? Any logging you can check?
FYI - proxyProcess() appears to have a heap-based buffer overflow in your strcat. Remember that strcat() relies on null-terminated strings and that you are using it to copy user-controlled data into a finite sized buffer. I haven't reviewed the entire code to be sure it is exploitable (i.e you may have bounds checking I didn't notice) but in any case, it wouldn't hurt to make it strncat(request, end, strlen(buf)-(end-begin)).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.