1

I am behind a proxy which requires users to login during the first connection with a username and password with a HTML form. Thus, it is not handled with usual http://username:[email protected] and any attempt to access the internet from this setting falls into the login form.

How could I automatically login to the proxy? In linux, what manages proxy stuffs when a command tries to access the internet?

Thank you.

2 Answers 2

0

If the HTML form doesn't have any JavaScript involved, you could send a HTTP POST request with wget (see --post-data option). You could stick a wget call to your ~/.bash_profile (if bash is your shell), so it gets executed everytime you login. The drawback is that you'll have a plain text password (the proxy password) in a config file.

2
  • Nice option but it does use javascrit :( Jun 27, 2013 at 13:35
  • you could still log in using a browser, try to intercept HTTP requests, find the HTTP POST that's being sent to the proxy and try to craft it the same way Jun 28, 2013 at 23:36
0

I have been successfully using tinyproxy so far to talk with the proxy by sending it a cookie it gives me when I log in. I then configure my clients to talk with tinyproxy (export http_proxy=http://localhost:8080/) and it works. See upstream and AddCookie options of tinyproxy.conf.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .