Pi as a proxy server
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.
-
- Posts: 411
- Joined: Thu Aug 02, 2012 12:21 pm
- Location: Buffalo, NY, USA
Re: Pi as a proxy server
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.
There are 10 types of people in this world. Those that understand binary, and those that don't.
Re: Pi as a proxy server
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
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
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
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.gospaz wrote: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
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
So I could just run an Apache server and use some php scripts?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.
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.
Last edited by Procura on Wed Nov 21, 2012 4:01 am, edited 1 time in total.
Re: Pi as a proxy server
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
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?
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
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,
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
Thanks Baldrick1 for your explanation. Works perfectly!!!
Re: Pi as a proxy server
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?
- DougieLawson
- Posts: 40539
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
- Contact: Website Twitter
Re: Pi as a proxy server
OpenVPN is the server of choice. You need to port forward port 1194 and set-up the OpenVPN server listening for remote clients.
Any language using left-hand whitespace for syntax is ridiculous
Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.
Any requirement to use a crystal ball or mind reading will result in me ignoring your question.
Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.
Any requirement to use a crystal ball or mind reading will result in me ignoring your question.
Re: Pi as a proxy server
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.
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
how about squid?
The Raspberry Pi Hell Guy - Random Ramblings to assist me and others.
http://raspberrypihell.blogspot.com
My Github - http:/www.github.com/random-robbie/
http://www.smspi.co.uk - send free uk sms via your raspberry pi from here
http://raspberrypihell.blogspot.com
My Github - http:/www.github.com/random-robbie/
http://www.smspi.co.uk - send free uk sms via your raspberry pi from here
Re: Pi as a proxy server
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
righty oh
Re: Pi as a proxy server
A few options I have had success with:
SSH Tunnel
Squid3 (Bit awkward to set up but works)
Shadowsocks (Easiest one for clients)
SSH Tunnel
Squid3 (Bit awkward to set up but works)
Shadowsocks (Easiest one for clients)
-
- Posts: 2
- Joined: Tue Mar 13, 2018 7:38 pm
Re: Pi as a proxy server
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/]
[https://theailearner.com/2018/03/13/con ... xy-server/]