Latch (ejinoz) wrote in lj_dev,

Proxy Access Requires Username/Password

I posted this in "Ask a question..." and got referred here, so here goes:

I have a small problem. I can only access the internet through a proxy that requires a username and password when you access it (even for HTTP / Port 80 requests). When I run the client, and try to logon, it sits there trying to connect. I believe the proxy server is waiting for a username and password to be inputted, but since LiveJournal doesn't have the option to do that, it just sits there not connecting. I have VERY VERY VERY basic C knowledge, so I downloaded the source to see if there was possibly a simple fix. I found the spot that I believe is where it accesses the server (I am looking in LJRequest.cpp) I checked out the MSDN library for the context for the GetHttpConnection function, and modified the following lines:

c = m_connection->GetHttpConnection("", NULL, INTERNET_PORT(3128), "MYUSERNAMEHERE", "MYPASSWORDHERE");
f = c->OpenRequest(CHttpConnection::HTTP_VERB_POST,"",NULL,1,NULL,"HTTP/1.0",INTERNET_FLAG_RELOAD); is the appropriate server, and 3128 is the proper port. (That's how the HTTP proxy is setup in IE).. When compiled (which is successful) and run, the client once again sits there trying to contact the server. The program isn't frozen (I can click "Cancel" just like normal) Can anybody help me out on proper context here? I have a SOCKS program called SocksCap that takes programs that don't have settings for proxy servers and ports their ports through the SOCKS server. (i.e. if I have a program, that I run under sockscap, that connects to a port (like 6667 ;>) then it will connect to the SOCKS server and talk to port 6667 outside the firewall) The reason I say this is.. is there (or can one be easily opened) any non-standard ports (non 80,21,23 would be good ;>) that I can setup the client to connect to (that link to port 80).. that way I can run the client under SocksCap and SocksCap will handle the username/password stuff. I have tried the client under SocksCap, and it didn't work (as expected) since SocksCap won't interfere w/ port 80 requests. Any help would be appreciated, and if you need any further information.. please let me know. Thanks!

p.s. Reason I don't want to continuely use the webform is that they charge for downloading stuff (yuck).. plus I like the automatic song detection ;>

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded