HTTP Proxy server in python

Discussion in 'Python' started by Muhammad Ali, Jun 1, 2004.

  1. Muhammad Ali

    Muhammad Ali Guest

    Hi,

    I am a python newbie but have c/c++ experience.

    I have a small Lan (windows 2000 sever + some win 98 machines).
    The win2k connects to the internet using a dial-up connection. What i need
    to do is to allow users, who would come from win98 machines to use internet
    for a specific amount of time. For example, if userA has been alloted two hours
    then he can no longer access internet from the win98 machine after expiring those
    two hours.

    I am thinking of doing a proxy server for this purpose in python that will have
    a list of users and their hours, and would require logging in by the user, calculate
    their times etc.

    So, is this the best way of doing this? if not what else can be done? (what ever the
    solution, i would like to implement in python)

    If proxy server is a good idea, could someone give me an outline of how to do it?
    for example, should i use a database for users (mysql?) or just a text file. How
    would
    i know if a user has logged off? any links on the net?

    Thanks...


    ---- Msg sent via Spymac Mail - http://www.spymac.com
     
    Muhammad Ali, Jun 1, 2004
    #1
    1. Advertising

  2. Muhammad Ali

    fishboy Guest

    On Mon, 31 May 2004 23:13:33 -0600 (MDT), Muhammad Ali
    <> wrote:

    >
    >If proxy server is a good idea, could someone give me an outline of how to do it?
    >for example, should i use a database for users (mysql?) or just a text file. How
    >would
    >i know if a user has logged off? any links on the net?


    Well, my first thought is to write a script to harrass them
    mercilessly with emails whenever they use the internet too much.

    But at far as proxy, Squid is a proxy and runs on win2k. Hmmm,
    outline:

    1. Setup Squid
    a. require passwords to use proxy
    2. Setup python to analyze access.log
    a. analyzing the output of a 'tail -f' would give you on the
    fly data.
    b. change the password of anyone over usage
    c. change password back when they have more minutes.

    If they all had static IPs, you could block them with ACLs instead of
    passwords.

    Alternatly, you could hit them with a stick when they use too much
    internet. People don't like being hit with sticks. They'd prolly
    stop.

    It's the middle of the night here, and I'm sure someone else may have
    a better idea, if this doesn't make sense.
     
    fishboy, Jun 1, 2004
    #2
    1. Advertising

  3. Muhammad Ali wrote:

    > I am thinking of doing a proxy server for this purpose in python that will have
    > a list of users and their hours, and would require logging in by the user, calculate
    > their times etc.
    >
    > So, is this the best way of doing this? if not what else can be done? (what ever the
    > solution, i would like to implement in python)


    A list of proxy servers implemented in Python can be found here

    http://xhaus.com/alan/python/proxies.html

    L.
     
    Ludovico Magnocavallo, Jun 2, 2004
    #3
  4. Muhammad Ali

    fishboy Guest

    On Wed, 02 Jun 2004 02:03:26 +0200, Ludovico Magnocavallo
    <> wrote:

    >Muhammad Ali wrote:
    >
    >> I am thinking of doing a proxy server for this purpose in python that will have
    >> a list of users and their hours, and would require logging in by the user, calculate
    >> their times etc.
    >>
    >> So, is this the best way of doing this? if not what else can be done? (what ever the
    >> solution, i would like to implement in python)

    >
    >A list of proxy servers implemented in Python can be found here
    >
    >http://xhaus.com/alan/python/proxies.html
    >
    >L.


    A place to buy sticks can be found here

    http://www.sticks.org/buy_sticks.htm

    In case you go with the "hitting with sticks" solution.

    ><{{{*>

    ..
     
    fishboy, Jun 2, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris Gray
    Replies:
    8
    Views:
    672
    Alan Kennedy
    Nov 19, 2003
  2. Dan Lenski
    Replies:
    0
    Views:
    409
    Dan Lenski
    Feb 22, 2007
  3. nntp
    Replies:
    12
    Views:
    360
    Joe Smith
    Oct 23, 2004
  4. Greg
    Replies:
    4
    Views:
    308
    Steven Simpson
    Aug 16, 2012
  5. sajuptpm
    Replies:
    3
    Views:
    416
    Saju M
    Jan 29, 2013
Loading...

Share This Page