First start by logging into AWS, Go to your instances tab and click Launch Instance. I'm choozing an Amazon Linux 32 bit instance but you can use ubuntu if you prefer. Choose micro for instance type and the rest is as you prefer. When you get to the tags section type 'Proxy' for the name.
When your instance launches make a note of it's Public DNS and connect to it like so:
ssh -i mykey.pem ec2-user@ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.com(replace mykey and the xxx's with your keyname and public ip)
now to create a simple proxy, type:
cat > proxy.rband then paste in the following
require 'webrick' require 'webrick/httpproxy' s = WEBrick::HTTPProxyServer.new(:Port => 8080).start
Then type (crl-D) to exit cat.
We want the proxy to start running on startup so let's add it to the crontab:
crontab -enow add the following line:
@reboot /usr/bin/ruby /home/ec2-user/proxy.rb(crl-C) + :wq to exit vim
now reboot the server:
sudo rebootThat's it, now you've got a http/https proxy that you can connect to and send unlimited amounts of bandwidth over (careful though, you will be charged extra for the bandwidth.)
I want to do one more thing before we're finished here and make this instance into an AMI Image so we can spin up more later.
Go back to your instance tab, select the proxy instance, then go up to Instance Actions and select 'Create Image'. Name the image 'Proxy' and save it. This will allow you to spin up an identical image in the future on demand and connect to it whenever you need a good quick proxy. Once the proxy mai image is created you can terminate your proxy instance when you're done with it.
Thank you for this, I've been looking everywhere for some info on the subject.
ReplyDeleteThanks for your great information, the contents are quiet interesting.
ReplyDeleteNew Album Releases UK proxy