This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Linux / UNIX and the fly likes Proxy in linux Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Reply Bookmark "Proxy in linux" Watch "Proxy in linux" New topic
Author

Proxy in linux

Arvind Subramanian
Ranch Hand

Joined: Jul 25, 2008
Posts: 84
IS there any way to configure the proxy to access the internet in linux without using the browser. Reason is i want to connect to ftp via console from my linux system, how can i use it with http proxy configured via webbrowser?


"Many of lifes failure are people who did not realize how close they were to success when they gave up."
-Thomas Edison
~ar~stutzen~
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8263

What proxy are you using? All a proxy does is say that traffic coming in on port x gets forwarded to destination y. It should be possible to forward FTP requests.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 10816
    
  25

Perhaps you should consider using a tool like wget, for which is easy to configure proxys. If you need a username / password for your proxy then wget supports them as well.


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Arvind Subramanian
Ranch Hand

Joined: Jul 25, 2008
Posts: 84
Thanks Andrew,
But is there any universal way to set or configure that proxy host and port to linux machine such that i dont need to configure that in every application.(a place like in /etc/profile)
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 10816
    
  25

The link I provided showed how to set an environmental variable that wget understands and other applications may do as well¹. As such, you could easily put that environmental variable into your /etc/profile file(s).

Note ¹: It is up to individual applications whether to handle such "advisory" environmental variables. If the application chooses not to do anything with the advice, you may be stuck².

Note ²: I suppose you might be able to get around such a problem by creating your own Socks proxy (which would then point to the real proxy) on the Linux client box, and then "SOCKify" the command line application to force it to use your Socks proxy. Personally I would not do this - I would ensure that I used a command line tool that uses the main proxy from the beginning.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Proxy in linux
 
Similar Threads
How can Apache proxy all http requests to weblogic?
Internet Access
FTP via Proxy
JavaMail thru proxy server
get phone ip address in J2ME