Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 237 Vote(s) - 3.59 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Turning a Home Computer into a Proxy Server

#1
So I decided to provide you guys with a guide to turning your home computer into a proxy server.
Not only did I want a proxy server, but for ease of access, and just something to do, I wanted a GUI interface to go with it all.
While doing all this, I got a bit caught up and also added a web interface.
The original application I wrote for a windows machine, I don't plan on releasing the code for, however for this tutorial I did come up with some similar code in Python to give you an idea of how I set up the application.

This entire tutorial is based on using Windows, although you can technically institute most of this (aside from the method of setting proxy settings) on most distributions of Linux as well as Mac OSX.

Setting up a Web Interface

The first step in setting up a web interface that will be accessible from outside your Local Area Network, is getting a web development environment such as

[To see links please register here]

or

[To see links please register here]

. I guess it's really your choice and all, but keep in mind XAMPP is cross-platform, which sometimes makes it the preferred alternative. Regardless though, I have more experience with WAMP, so I went with WAMP on Windows. Just go to their website and install the WAMP server according to your machine specs. Also, you're going to need

[To see links please register here]

.

Once you've installed WAMP, navigate to your WAMP directory which is usually something like C:\wamp and file the folder labeled www. This is where you'll want to store the web application we'll be downloading in a moment, and when you put everything online, the index.php/index.html in that directory will be your home page.

Now that you've gotten acquainted with WAMP we're going to need a web application. We could build our own, and it wouldn't really be that complicated, but for those less web development savy people like myself, a great alternative is installing

[To see links please register here]

.

PHProxy is this neat little web proxy that allows you to bypass restrictions such as filters. When you connect to your home proxy server (if I'm correct) the request to whatever website you're trying to access will actually be sent from your home server, which doesn't have a filter. That's how it allows you to bypass filters on a LAN.

After you've downloaded PHProxy, you need to unzip it, and drag all the files into that www directory, replacing any index.php or index.html/htm file with the index.php file found in PHProxy. To test to see if you've installed it correctly, simply navigate to "http://localhost".

It's really that simple. After you've installed it, you can make any kind of tweaks and modifications you want as long as it conforms to the license provided with PHProxy (which I haven't examined at all). So, modify at your own risk. You should probably keep the bottom PHProxy link visible. :wink:

Port Forwarding on your Router

You need to do this. If you want your web application accessible from outside your LAN, this is a must. Port forwarding is a bit different for every router, but you should be able to a bunch of guides for whichever router you have on

[To see links please register here]

. What I did, was forward port 80 and port 443 for HTTP and HTTPS. Once you've done this and WAMP is up and running, you can click the WAMP tray icon, and put your application "online". You might run into a few issues, but those can be resolved by some simple error googling.
To confirm your application is online, visit

[To see links please register here]

to grab your IP address. Your home server will be running from that address. So simply navigate to

[To see links please register here]

on n a machine that's not on your local area network. That's very important. If it is on the same network as you, that won't work.

Putting Your Web Application Online

When Tree came out with his auto-activation method, the use of

[To see links please register here]

really prompted this method of uploading your application. You can use freedns to point one of the thousands of subdomains you can get for FREE to your home server's IP address. Just follow these simple steps.

  1. Make a freedns account, as Tree said, use a valid email.
  2. After you've logged in, go to the Registry link on the far left.
  3. Search whatever phrase you want for your domain. For example, you could search "proxy" and use one of the 10 or so proxy domains without buying your own.
  4. Click on whichever domain you'd link, and an option screen listing type, subdomain, domain, destination, TTL, and wildcard should come up. The only thing you need to do is set your subdomain and your destination.

Your subdomain should be whatever you want it to be, for example, mycoolproxy.proxybiz.net or something. In this case, mycoolproxy would be the subdomain you entered. Here's the really important part though. As the destination you MUST enter the external IP address of your home server. FreeDNS will fill this input box out with your IP address, make sure it's the IP address of your home server and not a laptop you're using. Then simply save your settings and navigate to your site. mycoolproxy.proxybiz.net should direct you to your custom home server proxy home page.

There's many other ways to set up your own domain, none of which I'll go into now. But just google "make my own domain" if you feel like paying for a custom name.

Running a secondary (traditional) proxy

To use the IP address of your home computer as a proxy on, say, Internet Explorer or Google Chrome, you'll need the IP and a port number, and a web application just won't suffice as far as I know.
To set up this second section, I used something called

[To see links please register here]

. Go to the URL, download Privoxy, and install it.
The only issues I've had with Privoxy are some bugs I've been able to iron out.
After you've downloaded Privoxy, open up the application, and your server should be live. I've had a few problems with it, and you might need to change a certain text file's contents. If you receive an error (which you probably will) just Google the error and you'll see all the answers are the same. Unfortunately I didn't write down the error and don't have time to reproduce it tonight.
So during installation you can set up Privoxy to run at startup (which is probably what you want). After it's open your proxy server is live. As long as port forwarding is turned on, you can use your home proxy server from your web browser by using the IP of your home server and the port 8118

Setting up an Application to do it for Us

As I said before, I wanted a GUI frontend because that's just the kind of guy I am. The original one I wrote wasn't in Python, but for this tutorial I whipped up a quick, working representation. Albeit the code isn't very good (mainly because I don't actually know Python) and it doesn't conform to all the PEP-8 standards. So forgive me for that. But either way, here's the code.
It was written for Python 2.7.3 and uses only imports from the Python standard library.

PHP Code:
import os
import sys
import time
import urllib2
import socket
import ConfigParser
from subprocess import call
from sys import stdout

#Global Variables
ini ConfigParser.RawConfigParser()
ini_file 'proxy_config.ini'
server '127.0.0.1'
port 8118
address 
'%s:%i' % (serverport)
status 'off'


#Check Status of Proxy
def check_status():
    global 
status
    ini
.read(ini_file)
    
status ini.get('SETTINGS''status')
    return 
status

#Read Settings from ini File
def read_info():
    global 
serverport
    ini
.read(ini_file)
    
server ini.get('SETTINGS''server')
    
port ini.getint('SETTINGS''port')

#Prompt User for Settings
def prompt_info():
    global 
serverportstatus
    server 
raw_input('Please enter the IP address of your proxy server: ')
    
port int(raw_input('Please enter the port number your proxy server is running on: '))
    
status raw_input('Is the proxy server currently on or off (on/off)?: ')
    
#Write Data to ini File
    
ini.add_section('SETTINGS')
    
ini.set('SETTINGS''server'server)
    
ini.set('SETTINGS''port'port)
    
ini.set('SETTINGS''status'status)
    
write_ini()
    
#Proxy Status Checking
def is_invalid_proxy(proxy):
    try:
        
proxy_handler urllib2.ProxyHandler({'http'proxy})
        
opener urllib2.build_opener(proxy_handler)
        
opener.addheaders = [('User-agent''Mozilla/5.0')]
        
urllib2.install_opener(opener)
        
req urllib2.Request('http://www.google.com')
        
sock urllib2.urlopen(req)
    
except urllib2.HTTPErrore:
        
stdout.write('Error Code: 'e.code)
        return 
e.code
    except Exception
detail:
        
stdout.write('Error: 'detail)
        return 
True
    
return False

#Turn Proxy on/off by Writing Info to Registry
def write_registry(bool_value):
    if (
bool_value):
        
call('reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1 /f')
        
call('reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /t REG_SZ /d ' address ' /f')
    else:
        
call('reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f')
        
call('reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /f')
        
    
stdout.write('Settings have successfully been written to registry.\n')

#Process to Turn on the Proxy
def turn_on():
    global 
address
    read_info
()

    
address '%s:%i' % (serverport)

    
#Proxy Check
    
os.system('title Proxy Configuration')
    
stdout.write('Connecting to the server %s on the port %i...\n' % (serverport))
    
time.sleep(2)

    if 
is_invalid_proxy(address):
        
stdout.write('Unable to connect to home proxy server on %s\n' address)
    else:
        
stdout.write('Successfully connected to proxy server on %s!\n' address)
        
time.sleep(0.5)
        
stdout.write('Writing settings to registry...\n')
        
time.sleep(0.5)
        
write_registry(True)
        
ini.set('SETTINGS''status''on')
        
write_ini()
        
#Process to Turn off the Proxy    
def turn_off():
    
stdout.write('Writing settings to registry...\n')
    
time.sleep(0.5)
    
write_registry(False)
    
ini.set('SETTINGS''status''off')
    
write_ini()

#Write Current Settings to the ini File
def write_ini():
    
with open(ini_file'w') as configfile:
        
ini.write(configfile)
    
def __main__():
    
#Check if ini File Exists
    
if (os.path.exists(ini_file) == 0):
        
prompt_info()

    
#Check if Proxy is on or off    
    
if (check_status() == 'on'):
        
stdout.write('The proxy is currently on. Turning off the proxy now...\n')
        
turn_off()
    else:
        
stdout.write('The proxy is currently off. Turning on the proxy now...\n')
        
turn_on()
        
__main__()

raw_input('Press any key to exit.'


The code is actually pretty shit and incredibly inefficient, but again, I don't know Python and it was written quick and dirty for the purpose of this tutorial. Any code criticisms and critiques would be appreciated, since though I'm not trying to learn Python at the moment, I'd still love the feedback.

The code essentially works off of an .ini file called proxy_config.ini. Any information should be in the format.


Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.



Even without an .ini file, the code will create its own, according to your input. The code will then check the proxy server to see if it's open for connection (by making a request to google.com utilizing the proxy server). It will then set proxy settings on a Windows machine to those specified.

It does this through this module

Code:
[SETTINGS]
server = 127.0.0.1
port = 8118
status = on


Here, you can see the registry values edited to either turn the proxy settings on or off.
That's really what's behind the entire application.

So there you go. That's my guide on turning your home computer into a proxy server and writing an application to connect to this server.
Reply

#2
Have fun, I think people can do this with people the have rated as well to provide proxy's for them. I think. Just a guess haha. Let me know how it goes!
Reply

#3
Wow this is actually a really good tutorial, did you create this all yourself? 'o.O
Reply

#4
Quote:(07-11-2013, 12:50 PM)Hexology Wrote:

[To see links please register here]

Wow this is actually a really good tutorial, did you create this all yourself? 'o.O

No I found on pastebin. So I didn't know who to give credits too. So if anyone knows. Tell me. :smile:

I did use it though. So I thought maybe some other people would be interested in it as well! I organized it and stuff because in pastebin it was a mess.
Reply

#5
Quote:(07-13-2013, 12:00 AM)Xanii Wrote:

[To see links please register here]

I have to ask, what is the point of using your house computer as a proxy? It could get you in trouble if other people use it illegally, and there would be no point in you using it, because, well, it's YOUR internet still...

Well, You could use it on people you R.A.T I would think.
Reply

#6
I have to ask, what is the point of using your house computer as a proxy? It could get you in trouble if other people use it illegally, and there would be no point in you using it, because, well, it's YOUR internet still...
Reply

#7
This tutorial is similar to the one i've seen in a SF on HF, but i see you modified and organized it well, so good job!
Reply

#8
Quote:(07-14-2013, 12:45 PM)Wet Wrote:

[To see links please register here]

This tutorial is similar to the one i've seen in a SF on HF, but i see you modified and organized it well, so good job! :smile:

I posted this on HF. I don't think anyone else has?
Reply

#9
Quote:(07-14-2013, 05:45 PM)Blue Wrote:

[To see links please register here]

Quote: (07-14-2013, 12:45 PM)Wet Wrote:

[To see links please register here]

This tutorial is similar to the one i've seen in a SF on HF, but i see you modified and organized it well, so good job! :smile:

I posted this on HF. I don't think anyone else has? :smile:

Don't misjudge the power of leechers!
Reply

#10
Quote:(07-14-2013, 05:50 PM)Wet Wrote:

[To see links please register here]

Quote: (07-14-2013, 05:45 PM)Blue Wrote:

[To see links please register here]

Quote: (07-14-2013, 12:45 PM)Wet Wrote:

[To see links please register here]

This tutorial is similar to the one i've seen in a SF on HF, but i see you modified and organized it well, so good job! :smile:

I posted this on HF. I don't think anyone else has? :smile:

Don't misjudge the power of leechers! :smile:

Ew, Leechers. Kill them all.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through