HTTP Proxy server in python

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Muhammad Ali

    HTTP Proxy server in python


    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 twohours
    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

  • fishboy

    #2
    Re: HTTP Proxy server in python

    On Mon, 31 May 2004 23:13:33 -0600 (MDT), Muhammad Ali
    <muhammad_ali@s pymac.com> wrote:
    [color=blue]
    >
    >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?[/color]

    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.

    Comment

    • Ludovico Magnocavallo

      #3
      Re: HTTP Proxy server in python

      Muhammad Ali wrote:
      [color=blue]
      > 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)[/color]

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



      L.

      Comment

      • fishboy

        #4
        Re: HTTP Proxy server in python

        On Wed, 02 Jun 2004 02:03:26 +0200, Ludovico Magnocavallo
        <ludo@asiatica. org> wrote:
        [color=blue]
        >Muhammad Ali wrote:
        >[color=green]
        >> 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)[/color]
        >
        >A list of proxy servers implemented in Python can be found here
        >
        >http://xhaus.com/alan/python/proxies.html
        >
        >L.[/color]

        A place to buy sticks can be found here

        Walking sticks, shooting sticks and accessories available to purchase worldwide. British made Linden Leisure seat sticks from an established family business


        In case you go with the "hitting with sticks" solution.
        [color=blue]
        ><{{{*>[/color]
        ..

        Comment

        Working...