[Re-blog] Set proxy and unset proxy for RStudio

If you want to set proxy server using RStudio, you might google and land on RStudio support site. However, the obvious solution might not be clear, so I have blogged about it almost 10 years ago.

Today, the solution still comes in handy.

So, to unset the proxy this time, simply do the following!



I bought a MacBook pro for work because of the similarity between Linux terminal and Mac terminal. However, if this is the only justification for buying a macbook, I should have thought again.

Superficially, OsX and Linux might look similar. However, the libraries, packages, machinery inside is very different. For example, there is no “wget” on Mac. Then, how can I download anything through a terminal. One solution after probing around that I came up with a while ago was to use “homebrew

I’m not going to cover the installation of homebrew here, but

If you are behind a proxy server, to install wget

$ sudo http_proxy=http://proxyUser:proxyPassword@proxyServer:port brew install wget

You can find more detail about using homebrew at https://github.com/Homebrew/homebrew/blob/master/Library/Contributions/manpages/brew.1.md


How to wget with proxy authentication?

Once again, I have a problem with proxy server authentication through my university network. Trying to install the new KGGSeq software to do next-generation sequencing data analysis.

As a quick fix, with cygwin, here is what I did.

1. Need to tell bash that  that we are using a proxy server

## Add these to ~/.bashrc for my bash start up shell

## Add these to ~/.bashrc for my bash start up shell

export http_proxy=$proxy

2. Need to tell wget what username and password to use with the proxy server.

As an example to download KGGSeq through cygwin, here’s what I did.

wget --proxy-user "bhoom" --proxy-password "bhoom_password"  http://statgenpro.psychiatry.hku.hk/limx/kggseq/download.php?file=kggseq.zip

Wget – ArchWiki.

I’m still not quite sure why they still use it. There seems to be several other enterprise authentication system, but all other systems are probably pricy? But does price justify all the other troubles we all have with slow connection for every website, problems running many bioinformatics software that cannot connect through proxy-server, etc?