Page 1 of 1

Pi as a proxy server

Posted: Mon Nov 19, 2012 11:58 pm
by Procura
I was looking to turn my raspberry pi into a proxy server to avoid restricted internet. I don't know much on the subject and any links to how proxy servers work or any arm software for the pi that could help. I plan on hosting it on my home connection and being able to use it during the day.

Re: Pi as a proxy server

Posted: Tue Nov 20, 2012 3:10 am
by rickseiden
I run Dan's Guardian and Squid on an old Pentium 4 computer. Unfortunately, I don't remember how to set it up, otherwise I'd give you some detailed instructions. But it's a place to start.

Re: Pi as a proxy server

Posted: Tue Nov 20, 2012 4:38 am
by gospaz
Are you after a web proxy such as http://gospaz.info/zelune/ ( my site, its safe) or asystem wide proxy?

Re: Pi as a proxy server

Posted: Tue Nov 20, 2012 1:12 pm
by Baldrick1
Do you have SSH set up?

If so then that's all you need from the Pi side of things.

On the machine that you want to use a web browser on while proxying traffic through your Pi, install Putty.
Open Putty
Expand Connection > SSH > Tunnels
Click the "Dynamic" Radio button
Enter a port into "Source port", I use 1234
Click "Add"
You will now see "D1234" under forwarded ports
Now use SSH as normal to connect to your Pi from a remote connection (save the setup to save having to set this config each time)

Now open your web browser and go to your network settings, I use Firefox.
Under SOCKS Host, type in the IP of 127.0.0.1 and the port of 1234 (or whatever you chose above).

Traffic in Firefox will now go via an encrypted SSH session to your Pi and then onwards to the internet.


I think this is what you were after, sorry if it wasn't but it may still prove to be useful for someone else :)

Re: Pi as a proxy server

Posted: Wed Nov 21, 2012 2:43 am
by Procura
gospaz wrote:Are you after a web proxy such as http://gospaz.info/zelune/ ( my site, its safe) or asystem wide proxy?
A web based proxy would be optimal, I assume that all traffic coming in and out from my school would have to go through their proxy but I am uniformed and I don't know much about how these things work.

Re: Pi as a proxy server

Posted: Wed Nov 21, 2012 2:46 am
by gospaz
I use mine for school, as you can not normally change system settings. All the web proxy is is an apache server with php and a script that you can download.

Re: Pi as a proxy server

Posted: Wed Nov 21, 2012 3:42 am
by Procura
gospaz wrote:I use mine for school, as you can not normally change system settings. All the web proxy is is an apache server with php and a script that you can download.
So I could just run an Apache server and use some php scripts?

Edit: I found this project: http://phproxy-plus.sourceforge.net/
So now I will just look how to make a web server on the pi and use that script.

Re: Pi as a proxy server

Posted: Wed Nov 21, 2012 3:49 am
by gospaz
Yeah, or you could use something like lighttpd as it is more resource friendly. Here is a well know script that I used to use http://sourceforge.net/projects/php-proxy/ . The one I currentley use requires a mysql database.

Re: Pi as a proxy server

Posted: Tue Nov 05, 2013 8:10 pm
by mcgyver83
In my school I cannot ssh (22) to my raspberry at home (I set port fwd right, from other less protected network I can connect fine to my rasp).
My idea is to use the rasp as proxy (using port 80 that is free) to tunnel all my http request (and also I'll be able to ssh to my rasp).
How can I do this?

Re: Pi as a proxy server

Posted: Tue Nov 05, 2013 10:49 pm
by john564
As said above, SSH is the easiest.
if the school block port 22, use port 80 for SSH
you can set up ssh over any port you like

And there are many other ways of setting up a proxy besides SSH
http://tryapi.wordpress.com/

phproxy, a webpage based proxy
openvpn,

Re: Pi as a proxy server

Posted: Tue Dec 10, 2013 4:49 pm
by Virutas
Thanks Baldrick1 for your explanation. Works perfectly!!!

Re: Pi as a proxy server

Posted: Fri Feb 14, 2014 7:41 am
by mcgyver83
I'm a newbie, I'm using ubuntu and I'm now able to ssh into my rasp at home using sslh, how can I create a tunnel to use the rasp as proxy?

Re: Pi as a proxy server

Posted: Fri Feb 14, 2014 7:59 am
by DougieLawson
OpenVPN is the server of choice. You need to port forward port 1194 and set-up the OpenVPN server listening for remote clients.

Re: Pi as a proxy server

Posted: Sat Dec 06, 2014 4:35 am
by Hexark
My Pi is connected to openvpn.

I am trying to route my firefox web browser from my PC to use the encrypted traffic on my Pi to access blocked websites.
How can I get it to work?

SSH using putty, setting dynamic port does not seem to be working.

Re: Pi as a proxy server

Posted: Tue Dec 09, 2014 11:49 am
by txt3rob
how about squid?

Re: Pi as a proxy server

Posted: Sun Dec 21, 2014 5:53 pm
by Josheh
Can someone help me Code a Pi into a Proxy? I'm a complete Noob never even booted a Pi Video tutorial is preferred Thank you -Josheh

Re: Pi as a proxy server

Posted: Sun Jul 31, 2016 2:34 pm
by nigeldodd
righty oh

Re: Pi as a proxy server

Posted: Mon Aug 01, 2016 7:29 pm
by Sydiom
A few options I have had success with:

SSH Tunnel
Squid3 (Bit awkward to set up but works)
Shadowsocks (Easiest one for clients)

Re: Pi as a proxy server

Posted: Mon Jul 02, 2018 3:30 am
by atulkrishna
For connecting Raspi to a proxy server you can follow this blog. It works fine for me.
[https://theailearner.com/2018/03/13/con ... xy-server/]